summaryrefslogtreecommitdiff
path: root/mysql-test/main
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2020-05-09 20:20:02 +0200
committerSergei Golubchik <serg@mariadb.org>2020-05-09 20:20:02 +0200
commit607467bd63db2c6ca64610eb9f4e703711f4dfc6 (patch)
tree207950367562dbb11f5e3d1789b05db44366f7c7 /mysql-test/main
parent1a9c593db8046a48b47db045915c6cce7f11e9ec (diff)
parent985f63cce1057d7b3fd6e86e65a2a2ee7d970073 (diff)
downloadmariadb-git-607467bd63db2c6ca64610eb9f4e703711f4dfc6.tar.gz
Merge branch '10.2' into 10.3mariadb-10.3.23
Diffstat (limited to 'mysql-test/main')
-rw-r--r--mysql-test/main/mysqltest_tracking_info.result18
-rw-r--r--mysql-test/main/mysqltest_tracking_info.test24
-rw-r--r--mysql-test/main/processlist_notembedded.result5
-rw-r--r--mysql-test/main/processlist_notembedded.test11
4 files changed, 51 insertions, 7 deletions
diff --git a/mysql-test/main/mysqltest_tracking_info.result b/mysql-test/main/mysqltest_tracking_info.result
index df966ae1d39..4ce4da31c13 100644
--- a/mysql-test/main/mysqltest_tracking_info.result
+++ b/mysql-test/main/mysqltest_tracking_info.result
@@ -1,3 +1,4 @@
+set @save_session_track_system_variables=@@session_track_system_variables;
SELECT @@session.character_set_connection;
@@session.character_set_connection
latin1
@@ -28,4 +29,19 @@ SET NAMES 'utf8';
# tracking info off once
SET NAMES 'big5';
-SET @@session.session_track_system_variables= default;
+SET @@session.session_track_system_variables= @save_session_track_system_variables;
+#
+# MDEV-22504: session tracking return incorrectly long traking data
+#
+set @save_optimizer_switch=@@optimizer_switch;
+SET @@session.session_track_system_variables='optimizer_switch';
+set optimizer_switch='index_merge=off,index_merge_union=off,index_merge_sort_union=off,index_merge_intersection=off,index_merge_sort_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=on,mrr_cost_based=on,mrr_sort_keys=on,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=on,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off';
+-- Tracker : SESSION_TRACK_SYSTEM_VARIABLES
+-- optimizer_switch
+-- index_merge=off,index_merge_union=off,index_merge_sort_union=off,index_merge_intersection=off,index_merge_sort_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=on,mrr_cost_based=on,mrr_sort_keys=on,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=on,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off,split_materialized=on
+
+Warnings:
+Warning 1681 'engine_condition_pushdown=on' is deprecated and will be removed in a future release
+set @@optimizer_switch=@save_optimizer_switch;
+SET @@session.session_track_system_variables= @save_session_track_system_variables;
+# End of 10.2 tests
diff --git a/mysql-test/main/mysqltest_tracking_info.test b/mysql-test/main/mysqltest_tracking_info.test
index d31f68b3cbd..da7732b5011 100644
--- a/mysql-test/main/mysqltest_tracking_info.test
+++ b/mysql-test/main/mysqltest_tracking_info.test
@@ -2,6 +2,9 @@
--source include/no_protocol.inc
--source include/not_embedded.inc
+
+set @save_session_track_system_variables=@@session_track_system_variables;
+
SELECT @@session.character_set_connection;
SET @@session.session_track_system_variables='character_set_connection';
@@ -22,4 +25,23 @@ SET NAMES 'utf8';
SET NAMES 'big5';
--disable_session_track_info
-SET @@session.session_track_system_variables= default;
+SET @@session.session_track_system_variables= @save_session_track_system_variables;
+
+--echo #
+--echo # MDEV-22504: session tracking return incorrectly long traking data
+--echo #
+
+set @save_optimizer_switch=@@optimizer_switch;
+
+SET @@session.session_track_system_variables='optimizer_switch';
+
+--enable_session_track_info
+set optimizer_switch='index_merge=off,index_merge_union=off,index_merge_sort_union=off,index_merge_intersection=off,index_merge_sort_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=on,mrr_cost_based=on,mrr_sort_keys=on,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=on,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off';
+--disable_session_track_info
+
+set @@optimizer_switch=@save_optimizer_switch;
+
+
+SET @@session.session_track_system_variables= @save_session_track_system_variables;
+
+--echo # End of 10.2 tests
diff --git a/mysql-test/main/processlist_notembedded.result b/mysql-test/main/processlist_notembedded.result
index 67eeb5ae2ff..e663c407a1b 100644
--- a/mysql-test/main/processlist_notembedded.result
+++ b/mysql-test/main/processlist_notembedded.result
@@ -3,10 +3,11 @@
#
connect con1,localhost,root,,;
connection con1;
-SET DEBUG_SYNC= 'before_join_optimize SIGNAL in_sync';
+SET DEBUG_SYNC= 'before_join_optimize SIGNAL in_sync WAIT_FOR go';
connection default;
SET DEBUG_SYNC= 'now WAIT_FOR in_sync';
-FOUND 1 /sleep \(30\)/ in MDEV-20466.text
+FOUND 1 /sleep/ in MDEV-20466.text
+SET DEBUG_SYNC= 'now SIGNAL go';
disconnect con1;
SET DEBUG_SYNC = 'RESET';
End of 5.5 tests
diff --git a/mysql-test/main/processlist_notembedded.test b/mysql-test/main/processlist_notembedded.test
index 2dc6a0539ab..4979e40a85a 100644
--- a/mysql-test/main/processlist_notembedded.test
+++ b/mysql-test/main/processlist_notembedded.test
@@ -1,6 +1,7 @@
source include/have_debug.inc;
source include/have_debug_sync.inc;
source include/not_embedded.inc;
+source include/count_sessions.inc;
--echo #
--echo # MDEV-20466: SHOW PROCESSLIST truncates query text on \0 bytes
@@ -10,9 +11,9 @@ connect (con1,localhost,root,,);
connection con1;
-let $q= `select CONCAT("SELECT user FROM mysql.user WHERE user ='some", CHAR(0), "' or sleep (30)")`;
+let $q= `select CONCAT("SELECT user FROM mysql.user WHERE user ='some", CHAR(0), "sleep'")`;
-SET DEBUG_SYNC= 'before_join_optimize SIGNAL in_sync';
+SET DEBUG_SYNC= 'before_join_optimize SIGNAL in_sync WAIT_FOR go';
--disable_query_log
--send_eval $q;
--enable_query_log
@@ -23,12 +24,16 @@ 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 \(30\);
+let SEARCH_PATTERN=sleep;
source include/search_pattern_in_file.inc;
remove_file $MYSQLTEST_VARDIR/tmp/MDEV-20466.text;
+SET DEBUG_SYNC= 'now SIGNAL go';
+
disconnect con1;
SET DEBUG_SYNC = 'RESET';
+source include/wait_until_count_sessions.inc;
+
--echo End of 5.5 tests