summaryrefslogtreecommitdiff
path: root/sql-common
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2014-07-19 13:38:40 +0300
committerMichael Widenius <monty@askmonty.org>2014-07-19 13:38:40 +0300
commitff205b25d543f87c8b79afc3ea0013017e751cd9 (patch)
tree73b4020189b43e041b5de228e3cbd2b1c4d4c177 /sql-common
parent54538b481d0adac73da7054740122d05611cffac (diff)
downloadmariadb-git-ff205b25d543f87c8b79afc3ea0013017e751cd9.tar.gz
Fixed assert in perfschema/pfs.cc::start_idle_wait_v1 when using performance schema and big packets in debug version.
The bug was that my_real_read() called net_before_header_psi() multiple times for long packets. Fixed by adding a flag when we are reading a header. Did also some cleanups to interface of my_net_read() to avoid unnecessary calls if performance schema is not used. - Added my_net_read_packet() as a replacement for my_net_read(). my_net_read() is still in the client library for old clients. - Removed THD->m_server_idle (not needed anymore as this is now given as argument to my_net_read_packet() - Added my_net_read_packet(), which is a new version of my_net_read() with a new parameter if we are doing a read for a new command from the server. - Added tests for compressed protocol and big packets include/mysql.h.pp: Added my_net_read_packet() as a replacement for my_net_read() include/mysql_com.h: Added my_net_read_packet() as a replacement for my_net_read() mysql-test/r/mysql_client_test_comp.result: New test mysql-test/t/mysql_client_test-master.opt: Added max_allowed_packet to be able to test big packets and packet size overflows. mysql-test/t/mysql_client_test_comp-master.opt: New test mysql-test/t/mysql_client_test_nonblock-master.opt: Added max_allowed_packet to be able to test big packets and packet size overflows. sql-common/client.c: Use my_net_read_packet() sql/mf_iocache.cc: Use my_net_read_packet() sql/mysqld.cc: Removed THD->m_server_idle (not needed anymore as this is now given as argument to my_net_read_packet() sql/net_serv.cc: Added argument to my_real_read() to indicte if we are reading the first block of the next statement and should call performance schema. Added 'compatibilty function' my_net_read(). Added my_net_read_packet(), which is a new version of my_net_read() with a new parameter if we are doing a read for a new command from the server. sql/sql_class.cc: Removed m_server_idle (not needed anymore) sql/sql_class.h: Removed m_server_idle (not needed anymore) sql/sql_parse.cc: Removed m_server_idle (not needed anymore) tests/mysql_client_test.c: Added tests for compressed protocol and big packets
Diffstat (limited to 'sql-common')
-rw-r--r--sql-common/client.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql-common/client.c b/sql-common/client.c
index 72760560903..c7065925198 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -764,8 +764,8 @@ cli_safe_read(MYSQL *mysql)
restart:
if (net->vio != 0)
- len=my_net_read(net);
-
+ len= my_net_read_packet(net, 0);
+
if (len == packet_error || len == 0)
{
DBUG_PRINT("error",("Wrong connection or packet. fd: %s len: %lu",