Browse Source
Fixed assert in perfschema/pfs.cc::start_idle_wait_v1 when using performance schema and big packets in debug version.
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 packetspull/57/head
15 changed files with 210 additions and 70 deletions
-
10include/mysql.h.pp
-
3include/mysql_com.h
-
4mysql-test/r/mysql_client_test_comp.result
-
1mysql-test/t/mysql_client_test-master.opt
-
2mysql-test/t/mysql_client_test_comp-master.opt
-
20mysql-test/t/mysql_client_test_comp.test
-
1mysql-test/t/mysql_client_test_nonblock-master.opt
-
4sql-common/client.c
-
2sql/mf_iocache.cc
-
79sql/mysqld.cc
-
43sql/net_serv.cc
-
1sql/sql_class.cc
-
2sql/sql_class.h
-
4sql/sql_parse.cc
-
104tests/mysql_client_test.c
@ -0,0 +1,4 @@ |
|||
SET @old_slow_query_log= @@global.slow_query_log; |
|||
call mtr.add_suppression(" Error reading file './client_test_db/test_frm_bug.frm'"); |
|||
ok |
|||
SET @@global.slow_query_log= @old_slow_query_log; |
@ -1,3 +1,4 @@ |
|||
--general-log |
|||
--general-log-file=$MYSQLTEST_VARDIR/log/master.log |
|||
--log-output=FILE,TABLE |
|||
--max-allowed-packet=32000000 |
@ -0,0 +1,2 @@ |
|||
--loose-enable-performance-schema |
|||
--max-allowed-packet=32000000 |
@ -0,0 +1,20 @@ |
|||
# run mysql_client_test with performance schema |
|||
|
|||
# No need to run this with embedded server |
|||
-- source include/not_embedded.inc |
|||
|
|||
# need to have the dynamic loading turned on for the client plugin tests |
|||
--source include/have_plugin_auth.inc |
|||
|
|||
SET @old_slow_query_log= @@global.slow_query_log; |
|||
|
|||
call mtr.add_suppression(" Error reading file './client_test_db/test_frm_bug.frm'"); |
|||
|
|||
--exec echo "$MYSQL_CLIENT_TEST" > $MYSQLTEST_VARDIR/log/mysql_client_test_comp.out.log 2>&1 |
|||
--exec $MYSQL_CLIENT_TEST --getopt-ll-test=25600M >> $MYSQLTEST_VARDIR/log/mysql_client_test_comp.out.log 2>&1 |
|||
|
|||
# End of test |
|||
echo ok; |
|||
|
|||
# Restore state changed by mysql_test_run |
|||
SET @@global.slow_query_log= @old_slow_query_log; |
@ -1 +1,2 @@ |
|||
--general-log --general-log-file=$MYSQLTEST_VARDIR/log/master.log --log-output=FILE,TABLE |
|||
--max-allowed-packet=32000000 |
Write
Preview
Loading…
Cancel
Save
Reference in new issue