From 5917fece65d038e9ca532f8caafd8e1b2bdbc77a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Fri, 8 Jan 2016 03:17:09 +0000 Subject: [PATCH] Should fix bug #459 Closes #459 --- deps/Makefile | 1 + deps/mariadb-client-library/net.c.patch | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 deps/mariadb-client-library/net.c.patch diff --git a/deps/Makefile b/deps/Makefile index 2d2657cc95..3c616b1e87 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -40,6 +40,7 @@ mariadb-client-library/mariadb_client/include/my_config.h: cd mariadb-client-library && tar -zxf mariadb-connector-c-2.1.0-src.tar.gz cd mariadb-client-library/mariadb_client && cmake . cd mariadb-client-library/mariadb_client && patch libmariadb/libmariadb.c < ../libmariadb.c.patch + cd mariadb-client-library/mariadb_client && patch libmariadb/net.c < ../net.c.patch cd mariadb-client-library/mariadb_client && patch include/mysql.h < ../mysql.h.patch cd mariadb-client-library/mariadb_client && CC=${CC} CXX=${CXX} ${MAKE} # cd mariadb-client-library/mariadb_client/include && make my_config.h diff --git a/deps/mariadb-client-library/net.c.patch b/deps/mariadb-client-library/net.c.patch new file mode 100644 index 0000000000..6ba7cb4522 --- /dev/null +++ b/deps/mariadb-client-library/net.c.patch @@ -0,0 +1,21 @@ +@@ -224,16 +224,16 @@ + /* see conc-71: we need to check the socket status first: + if the socket is dead we set net->error, so net_flush + will report an error */ +- while (net_check_socket_status(net->vio->sd)) +- { ++// while (net_check_socket_status(net->vio->sd)) ++// { + /* vio_read returns size_t. so casting to long is required to check for -1 */ +- if ((long)vio_read(net->vio, (gptr)net->buff, (size_t) net->max_packet) <= 0) ++/* if ((long)vio_read(net->vio, (gptr)net->buff, (size_t) net->max_packet) <= 0) + { + net->error= 2; + DBUG_PRINT("info", ("socket disconnected")); + DBUG_VOID_RETURN; + } +- } ++ } */ + net->compress_pkt_nr= net->pkt_nr=0; /* Ready for new command */ + net->write_pos=net->buff; + DBUG_VOID_RETURN;