From c9b5280371b0ceddb9a805f0bc4cd5265d9fab86 Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Sat, 19 Oct 2019 10:01:26 +0200 Subject: MDEV-20466: fix of embedded test suite --- mysql-test/r/processlist.result | 6 ----- mysql-test/r/processlist_notembedded.result | 7 ++++++ mysql-test/t/processlist.test | 29 ------------------------ mysql-test/t/processlist_notembedded.test | 34 +++++++++++++++++++++++++++++ 4 files changed, 41 insertions(+), 35 deletions(-) create mode 100644 mysql-test/r/processlist_notembedded.result create mode 100644 mysql-test/t/processlist_notembedded.test diff --git a/mysql-test/r/processlist.result b/mysql-test/r/processlist.result index 24802cb2425..55d2425d269 100644 --- a/mysql-test/r/processlist.result +++ b/mysql-test/r/processlist.result @@ -17,10 +17,4 @@ select command, time < 5 from information_schema.processlist where id != connect command time < 5 Sleep 1 set debug_sync='reset'; -# -# MDEV-20466: SHOW PROCESSLIST truncates query text on \0 bytes -# -SET DEBUG_SYNC= 'before_join_optimize SIGNAL in_sync'; -SET DEBUG_SYNC= 'now WAIT_FOR in_sync'; -SET DEBUG_SYNC = 'RESET'; End of 5.5 tests diff --git a/mysql-test/r/processlist_notembedded.result b/mysql-test/r/processlist_notembedded.result new file mode 100644 index 00000000000..f5b2a310813 --- /dev/null +++ b/mysql-test/r/processlist_notembedded.result @@ -0,0 +1,7 @@ +# +# MDEV-20466: SHOW PROCESSLIST truncates query text on \0 bytes +# +SET DEBUG_SYNC= 'before_join_optimize SIGNAL in_sync'; +SET DEBUG_SYNC= 'now WAIT_FOR in_sync'; +SET DEBUG_SYNC = 'RESET'; +End of 5.5 tests diff --git a/mysql-test/t/processlist.test b/mysql-test/t/processlist.test index 52cb6b31919..8a8995f43b0 100644 --- a/mysql-test/t/processlist.test +++ b/mysql-test/t/processlist.test @@ -51,33 +51,4 @@ select command, time < 5 from information_schema.processlist where id != connect disconnect con1; set debug_sync='reset'; ---echo # ---echo # MDEV-20466: SHOW PROCESSLIST truncates query text on \0 bytes ---echo # - -connect (con1,localhost,root,,); - -connection con1; - -let $q= `select CONCAT("SELECT user FROM mysql.user WHERE user ='some", CHAR(0), "' or sleep (30)")`; - -SET DEBUG_SYNC= 'before_join_optimize SIGNAL in_sync'; ---disable_query_log ---send_eval $q; ---enable_query_log -connection default; - -SET DEBUG_SYNC= 'now WAIT_FOR in_sync'; - -exec $MYSQL test -e "SHOW PROCESSLIST" > $MYSQLTEST_VARDIR/tmp/MDEV-20466.text; - -let SEARCH_FILE=$MYSQLTEST_VARDIR/tmp/MDEV-20466.text; -let SEARCH_PATTERN=sleep; -source include/search_pattern_in_file.inc; -remove_file $MYSQLTEST_VARDIR/tmp//MDEV-20466.text; - -disconnect con1; - -SET DEBUG_SYNC = 'RESET'; - --echo End of 5.5 tests diff --git a/mysql-test/t/processlist_notembedded.test b/mysql-test/t/processlist_notembedded.test new file mode 100644 index 00000000000..dc970cf5709 --- /dev/null +++ b/mysql-test/t/processlist_notembedded.test @@ -0,0 +1,34 @@ +source include/have_debug.inc; +source include/have_debug_sync.inc; +source include/not_embedded.inc; + +--echo # +--echo # MDEV-20466: SHOW PROCESSLIST truncates query text on \0 bytes +--echo # + +connect (con1,localhost,root,,); + +connection con1; + +let $q= `select CONCAT("SELECT user FROM mysql.user WHERE user ='some", CHAR(0), "' or sleep (30)")`; + +SET DEBUG_SYNC= 'before_join_optimize SIGNAL in_sync'; +--disable_query_log +--send_eval $q; +--enable_query_log +connection default; + +SET DEBUG_SYNC= 'now WAIT_FOR in_sync'; + +exec $MYSQL test -e "SHOW PROCESSLIST" > $MYSQLTEST_VARDIR/tmp/MDEV-20466.text; + +let SEARCH_FILE=$MYSQLTEST_VARDIR/tmp/MDEV-20466.text; +let SEARCH_PATTERN=sleep; +source include/search_pattern_in_file.inc; +remove_file $MYSQLTEST_VARDIR/tmp//MDEV-20466.text; + +disconnect con1; + +SET DEBUG_SYNC = 'RESET'; + +--echo End of 5.5 tests -- cgit v1.2.1