diff --git a/client/mysqltest.cc b/client/mysqltest.cc index 6558436bbca..3dcbd3c69e5 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -116,7 +116,7 @@ static my_bool opt_compress= 0, silent= 0, verbose= 0; static my_bool debug_info_flag= 0, debug_check_flag= 0; static my_bool tty_password= 0; static my_bool opt_mark_progress= 0; -static my_bool ps_protocol= 0, ps_protocol_enabled= 0; +static my_bool ps_protocol= 0, ps_protocol_enabled= 0, ps2_protocol_enabled= 0; static my_bool sp_protocol= 0, sp_protocol_enabled= 0; static my_bool view_protocol= 0, view_protocol_enabled= 0; static my_bool service_connection_enabled= 1; @@ -157,6 +157,7 @@ static struct property prop_list[] = { { &display_session_track_info, 0, 1, 1, "$ENABLED_STATE_CHANGE_INFO" }, { &display_metadata, 0, 0, 0, "$ENABLED_METADATA" }, { &ps_protocol_enabled, 0, 0, 0, "$ENABLED_PS_PROTOCOL" }, + { &ps2_protocol_enabled, 0, 0, 0, "$ENABLED_PS2_PROTOCOL" }, { &view_protocol_enabled, 0, 0, 0, "$ENABLED_VIEW_PROTOCOL"}, { &service_connection_enabled, 0, 1, 0, "$ENABLED_SERVICE_CONNECTION"}, { &disable_query_log, 0, 0, 1, "$ENABLED_QUERY_LOG" }, @@ -173,6 +174,7 @@ enum enum_prop { P_SESSION_TRACK, P_META, P_PS, + P_PS2, P_VIEW, P_CONN, P_QUERY, @@ -263,6 +265,7 @@ static size_t suite_dir_len, overlay_dir_len; /* Precompiled re's */ static regex_t ps_re; /* the query can be run using PS protocol */ +static regex_t ps2_re; /* the query can be run using PS protocol with second execution*/ static regex_t sp_re; /* the query can be run as a SP */ static regex_t view_re; /* the query can be run as a view*/ @@ -381,6 +384,7 @@ enum enum_commands { Q_LOWERCASE, Q_START_TIMER, Q_END_TIMER, Q_CHARACTER_SET, Q_DISABLE_PS_PROTOCOL, Q_ENABLE_PS_PROTOCOL, + Q_DISABLE_PS2_PROTOCOL, Q_ENABLE_PS2_PROTOCOL, Q_DISABLE_VIEW_PROTOCOL, Q_ENABLE_VIEW_PROTOCOL, Q_DISABLE_SERVICE_CONNECTION, Q_ENABLE_SERVICE_CONNECTION, Q_ENABLE_NON_BLOCKING_API, Q_DISABLE_NON_BLOCKING_API, @@ -474,6 +478,8 @@ const char *command_names[]= "character_set", "disable_ps_protocol", "enable_ps_protocol", + "disable_ps2_protocol", + "enable_ps2_protocol", "disable_view_protocol", "enable_view_protocol", "disable_service_connection", @@ -8347,6 +8353,19 @@ void run_query_stmt(struct st_connection *cn, struct st_command *command, } #endif + /* + Execute the query first time if second execution enable + */ + if(ps2_protocol_enabled && match_re(&ps2_re, query)) + { + if (do_stmt_execute(cn)) + { + handle_error(command, mysql_stmt_errno(stmt), + mysql_stmt_error(stmt), mysql_stmt_sqlstate(stmt), ds); + goto end; + } + } + /* Execute the query */ @@ -9298,6 +9317,13 @@ void init_re(void) "[[:space:]]*UNINSTALL[[:space:]]+|" "[[:space:]]*UPDATE[[:space:]]" ")"; + /* + Filter for queries that can be run for second + execution of prepare statement + */ + const char *ps2_re_str = + "^(" + "[[:space:]]*SELECT[[:space:]])"; /* Filter for queries that can be run using the @@ -9313,6 +9339,7 @@ void init_re(void) "[[:space:]]*SELECT[[:space:]])"; init_re_comp(&ps_re, ps_re_str); + init_re_comp(&ps2_re, ps2_re_str); init_re_comp(&sp_re, sp_re_str); init_re_comp(&view_re, view_re_str); } @@ -9349,6 +9376,7 @@ int match_re(regex_t *re, char *str) void free_re(void) { regfree(&ps_re); + regfree(&ps2_re); regfree(&sp_re); regfree(&view_re); } @@ -9700,6 +9728,9 @@ int main(int argc, char **argv) if (cursor_protocol) ps_protocol= 1; + /* Enable second execution of SELECT for ps-protocol + if ps-protocol is used */ + ps2_protocol_enabled= ps_protocol; ps_protocol_enabled= ps_protocol; sp_protocol_enabled= sp_protocol; view_protocol_enabled= view_protocol; @@ -10127,6 +10158,12 @@ int main(int argc, char **argv) case Q_ENABLE_PS_PROTOCOL: set_property(command, P_PS, ps_protocol); break; + case Q_DISABLE_PS2_PROTOCOL: + set_property(command, P_PS2, 0); + break; + case Q_ENABLE_PS2_PROTOCOL: + set_property(command, P_PS2, ps_protocol); + break; case Q_DISABLE_VIEW_PROTOCOL: set_property(command, P_VIEW, 0); /* Close only util connections */ diff --git a/mysql-test/include/column_compression_rpl.inc b/mysql-test/include/column_compression_rpl.inc index 7c8931a491f..e2bb5bbbf42 100644 --- a/mysql-test/include/column_compression_rpl.inc +++ b/mysql-test/include/column_compression_rpl.inc @@ -1,4 +1,6 @@ +--disable_ps2_protocol + --connection slave SET @saved_slave_type_conversions = @@slave_type_conversions; @@ -257,4 +259,4 @@ SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions; DROP TABLE t1,t2; --sync_slave_with_master - +--enable_ps2_protocol diff --git a/mysql-test/include/commit.inc b/mysql-test/include/commit.inc index 1844a5320f7..e08942d05fe 100644 --- a/mysql-test/include/commit.inc +++ b/mysql-test/include/commit.inc @@ -6,6 +6,7 @@ ## - $engine_type should be set ## +--disable_ps2_protocol set sql_mode=no_engine_substitution; eval set default_storage_engine = $engine_type; set autocommit=1; @@ -782,3 +783,4 @@ call p_verify_status_increment(0, 0, 0, 0); drop table t1, t2, t3; drop procedure p_verify_status_increment; drop function f1; +--enable_ps2_protocol diff --git a/mysql-test/include/ctype_numconv.inc b/mysql-test/include/ctype_numconv.inc index da87d946d9c..065aca0873a 100644 --- a/mysql-test/include/ctype_numconv.inc +++ b/mysql-test/include/ctype_numconv.inc @@ -463,6 +463,7 @@ select * from t1; show create table t1; drop table t1; +--disable_ps2_protocol # Ensure that row_count() value is reset after drop table. select 1; select hex(concat(row_count())); @@ -474,6 +475,7 @@ select hex(concat(found_rows())); create table t1 as select concat(found_rows()) as c1; show create table t1; drop table t1; +--enable_ps2_protocol create table t1 as select concat(uuid_short()) as c1; show create table t1; diff --git a/mysql-test/include/diff_tables.inc b/mysql-test/include/diff_tables.inc index a29156cfce9..a566a4d79c2 100644 --- a/mysql-test/include/diff_tables.inc +++ b/mysql-test/include/diff_tables.inc @@ -165,9 +165,11 @@ while ($_dt_tables) # Now that we have the comma-separated list of columns, we can write # the table to a file. + --disable_ps2_protocol --let $_dt_outfile= `SELECT @@datadir` --let $_dt_outfile= $_dt_outfile/diff_table-$_dt_connection-$_dt_database-$_dt_table eval SELECT * INTO OUTFILE '$_dt_outfile' FROM $_dt_database.$_dt_table ORDER BY `$_dt_column_list`; + --enable_ps2_protocol # Compare files. if ($_dt_prev_outfile) diff --git a/mysql-test/include/explain_utils.inc b/mysql-test/include/explain_utils.inc index 4333319c364..d729be94f49 100644 --- a/mysql-test/include/explain_utils.inc +++ b/mysql-test/include/explain_utils.inc @@ -26,6 +26,7 @@ --echo # query: $query --echo # select: $select --echo # +--disable_ps2_protocol --disable_view_protocol if ($select) { --disable_query_log @@ -160,3 +161,4 @@ SHOW STATUS WHERE (Variable_name LIKE 'Sort%' OR --echo --enable_view_protocol +--enable_ps2_protocol diff --git a/mysql-test/include/function_defaults.inc b/mysql-test/include/function_defaults.inc index 23822aa24dc..4ecc16bc36d 100644 --- a/mysql-test/include/function_defaults.inc +++ b/mysql-test/include/function_defaults.inc @@ -824,6 +824,7 @@ eval CREATE TABLE t2 ( i $datetime DEFAULT $current_timestamp ON UPDATE $current_timestamp NOT NULL ); +--disable_ps2_protocol SELECT 1 INTO OUTFILE 't3.dat' FROM dual; SELECT NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL @@ -831,6 +832,7 @@ INTO OUTFILE 't4.dat' FROM dual; SELECT 1, 2 INTO OUTFILE 't5.dat' FROM dual; +--enable_ps2_protocol --echo # Mon Aug 1 15:11:19 2011 UTC SET TIMESTAMP = 1312211479.918273; @@ -929,9 +931,11 @@ remove_file $MYSQLD_DATADIR/test/t5.dat; --echo # Mon Aug 1 15:11:19 2011 UTC SET TIMESTAMP = 1312211479.089786; +--disable_ps2_protocol SELECT 1 INTO OUTFILE "file1.dat" FROM dual; SELECT NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL INTO OUTFILE "file2.dat" FROM dual; +--enable_ps2_protocol --echo # Too short row diff --git a/mysql-test/include/grant_cache.inc b/mysql-test/include/grant_cache.inc index 467c1170563..69c520c3e61 100644 --- a/mysql-test/include/grant_cache.inc +++ b/mysql-test/include/grant_cache.inc @@ -54,6 +54,8 @@ set GLOBAL query_cache_type=ON; set LOCAL query_cache_type=ON; set GLOBAL query_cache_size=1355776; +--disable_ps2_protocol + reset query cache; flush status; connect (root,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK); @@ -171,6 +173,8 @@ show status like "Qcache_queries_in_cache"; show status like "Qcache_hits"; show status like "Qcache_not_cached"; +--enable_ps2_protocol + # Cleanup connection root; diff --git a/mysql-test/include/icp_tests.inc b/mysql-test/include/icp_tests.inc index 66fdc3e754c..965a4a5f5d2 100644 --- a/mysql-test/include/icp_tests.inc +++ b/mysql-test/include/icp_tests.inc @@ -869,6 +869,7 @@ SET optimizer_switch=@save_optimizer_switch; DROP TABLE t1,t2; +--disable_ps2_protocol --echo # check "Handler_pushed" status varuiables CREATE TABLE t1 ( c1 CHAR(1), @@ -890,6 +891,7 @@ SELECT * FROM t1 WHERE (c2='3' or c2='4') and c2 % 2 = 0 ; show status like "Handler_icp%"; DROP TABLE t1; +--enable_ps2_protocol # # MDEV-308 lp:1008516 - Failing assertion: templ->mysql_col_len == len diff --git a/mysql-test/include/query_cache.inc b/mysql-test/include/query_cache.inc index cd99cac799c..a75e5a9c5a7 100644 --- a/mysql-test/include/query_cache.inc +++ b/mysql-test/include/query_cache.inc @@ -14,6 +14,7 @@ # old name was innodb_cache.test # main code went into include/query_cache.inc # +--disable_ps2_protocol --disable_view_protocol SET global query_cache_type=ON; SET local query_cache_type=ON; @@ -192,3 +193,4 @@ drop table t2; SET global query_cache_type=default; --enable_view_protocol +--enable_ps2_protocol diff --git a/mysql-test/include/query_cache_partitions.inc b/mysql-test/include/query_cache_partitions.inc index d97d9db27b0..c6d97a508f0 100644 --- a/mysql-test/include/query_cache_partitions.inc +++ b/mysql-test/include/query_cache_partitions.inc @@ -44,13 +44,14 @@ flush status; show status like "Qcache_queries_in_cache"; show status like "Qcache_hits"; - +--disable_ps2_protocol SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; show status like "Qcache_queries_in_cache"; show status like "Qcache_hits"; +--enable_ps2_protocol drop table t1; @@ -79,12 +80,14 @@ flush status; show status like "Qcache_queries_in_cache"; show status like "Qcache_hits"; +--disable_ps2_protocol SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; show status like "Qcache_queries_in_cache"; show status like "Qcache_hits"; +--enable_ps2_protocol drop table t1; @@ -114,6 +117,7 @@ INSERT INTO t1 VALUES (1, now(), 0); show status like "Qcache_queries_in_cache"; show status like "Qcache_hits"; +--disable_ps2_protocol BEGIN; UPDATE `t1` SET `cool` = 1 WHERE `id` = 1; SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; @@ -126,6 +130,7 @@ SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; show status like "Qcache_queries_in_cache"; show status like "Qcache_hits"; +--enable_ps2_protocol drop table t1; diff --git a/mysql-test/include/query_cache_sql_prepare.inc b/mysql-test/include/query_cache_sql_prepare.inc index 1bc7c94a172..978213777a4 100644 --- a/mysql-test/include/query_cache_sql_prepare.inc +++ b/mysql-test/include/query_cache_sql_prepare.inc @@ -23,6 +23,8 @@ set GLOBAL query_cache_type=ON; set LOCAL query_cache_type=ON; +--disable_ps2_protocol + connect (con1,localhost,root,,test,$MASTER_MYPORT,); connection default; @@ -252,6 +254,7 @@ set @a=10; execute stmt1 using @a; show status like 'Qcache_hits'; +--enable_ps2_protocol drop table t1; disconnect con1; diff --git a/mysql-test/include/test_outfile.inc b/mysql-test/include/test_outfile.inc index b67e67a4dd4..e50847b67a3 100644 --- a/mysql-test/include/test_outfile.inc +++ b/mysql-test/include/test_outfile.inc @@ -1 +1,3 @@ +--disable_ps2_protocol eval select "Outfile OK" into outfile "$MYSQLTEST_VARDIR/tmp/outfile.test"; +--enable_ps2_protocol diff --git a/mysql-test/include/type_temporal_zero_default.inc b/mysql-test/include/type_temporal_zero_default.inc index 500d25ea18f..6553bfb6d86 100644 --- a/mysql-test/include/type_temporal_zero_default.inc +++ b/mysql-test/include/type_temporal_zero_default.inc @@ -34,8 +34,10 @@ SET sql_mode=DEFAULT; --eval CREATE TABLE t1 (a $type DEFAULT $defval, b $type DEFAULT $defval) --eval INSERT INTO t1 VALUES (DEFAULT,DEFAULT); --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_ps2_protocol --eval SELECT a INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/mdev-7824.txt' FROM t1 DELETE FROM t1; +--enable_ps2_protocol SET sql_mode=TRADITIONAL; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --error ER_INVALID_DEFAULT_VALUE_FOR_FIELD diff --git a/mysql-test/include/write_var_to_file.inc b/mysql-test/include/write_var_to_file.inc index 7982c6fab31..58bdac6f09e 100644 --- a/mysql-test/include/write_var_to_file.inc +++ b/mysql-test/include/write_var_to_file.inc @@ -46,7 +46,9 @@ if (`SELECT LENGTH(@@secure_file_priv) > 0`) --let $_wvtf_suffix= `SELECT UUID()` --let $_wvtf_tmp_file= $MYSQLTEST_VARDIR/_wvtf_$_wvtf_suffix + --disable_ps2_protocol --eval SELECT '$write_var' INTO DUMPFILE '$_wvtf_tmp_file' + --enable_ps2_protocol --copy_file $_wvtf_tmp_file $write_to_file --remove_file $_wvtf_tmp_file } diff --git a/mysql-test/main/analyze_stmt_slow_query_log.test b/mysql-test/main/analyze_stmt_slow_query_log.test index 44865b652cb..268203078f8 100644 --- a/mysql-test/main/analyze_stmt_slow_query_log.test +++ b/mysql-test/main/analyze_stmt_slow_query_log.test @@ -19,7 +19,9 @@ SET @@global.slow_query_log = ON; create table t1 (a int); INSERT INTO t1 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +--disable_ps2_protocol select * from t1 where a<3; +--enable_ps2_protocol drop table t1; let SLOW_LOG_FILE= `select @@slow_query_log_file`; diff --git a/mysql-test/main/auto_increment_ranges_innodb.test b/mysql-test/main/auto_increment_ranges_innodb.test index aaa64e2d6f9..3abd8d4d482 100644 --- a/mysql-test/main/auto_increment_ranges_innodb.test +++ b/mysql-test/main/auto_increment_ranges_innodb.test @@ -11,7 +11,9 @@ set default_storage_engine=innodb; # create table t1 (pk int auto_increment primary key, f varchar(20)); insert t1 (f) values ('a'), ('b'), ('c'), ('d'); +--disable_ps2_protocol select null, f into outfile 'load.data' from t1 limit 1; +--enable_ps2_protocol load data infile 'load.data' into table t1; insert t1 (f) values ('<==='); select * from t1; diff --git a/mysql-test/main/bootstrap.test b/mysql-test/main/bootstrap.test index 8eee907e166..b334db504f9 100644 --- a/mysql-test/main/bootstrap.test +++ b/mysql-test/main/bootstrap.test @@ -45,7 +45,9 @@ remove_file $MYSQLTEST_VARDIR/tmp/bootstrap_error.sql; --echo # --disable_query_log create table t1 select 2 as a, concat(repeat('MySQL', @@max_allowed_packet/10), ';') as b; +--disable_ps2_protocol eval select * into outfile '$MYSQLTEST_VARDIR/tmp/long_query.sql' from t1; +--enable_ps2_protocol --enable_query_log --source include/kill_mysqld.inc --error 1 diff --git a/mysql-test/main/bug39022.test b/mysql-test/main/bug39022.test index d293788e58e..2431a76ec25 100644 --- a/mysql-test/main/bug39022.test +++ b/mysql-test/main/bug39022.test @@ -6,6 +6,7 @@ --echo # Bug #39022: Mysql randomly crashing in lock_sec_rec_cons_read_sees --echo # +--disable_ps2_protocol call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction"); CREATE TABLE t1(a TINYINT NOT NULL,b TINYINT,PRIMARY KEY(b)) ENGINE=innodb; @@ -56,3 +57,4 @@ disconnect thread1; connection default; DROP TABLE t1,t2; +--enable_ps2_protocol diff --git a/mysql-test/main/cast.test b/mysql-test/main/cast.test index 025b5fa717d..073b5fe0be5 100644 --- a/mysql-test/main/cast.test +++ b/mysql-test/main/cast.test @@ -402,9 +402,11 @@ SET @@GLOBAL.max_allowed_packet=2048; # reconnect to make the new max packet size take effect --connect (newconn, localhost, root,,) +--disable_ps2_protocol SELECT CONVERT('a', BINARY(2049)); SELECT CONVERT('a', CHAR(2049)); SELECT length(CONVERT(repeat('a',2048), CHAR(2049))); +--enable_ps2_protocol connection default; disconnect newconn; diff --git a/mysql-test/main/check_constraint.test b/mysql-test/main/check_constraint.test index 194fdc04399..cfdddcab3a1 100644 --- a/mysql-test/main/check_constraint.test +++ b/mysql-test/main/check_constraint.test @@ -172,7 +172,10 @@ insert t1 (b) values (1); insert t1 (b) values (10); select * from t1 where a is null; set sql_auto_is_null=1; +#Enable after fix MDEV-31307 +--disable_ps2_protocol select * from t1 where a is null; +--enable_ps2_protocol --error ER_CONSTRAINT_FAILED insert t1 (b) values (1); drop table t1; diff --git a/mysql-test/main/column_compression.inc b/mysql-test/main/column_compression.inc index 89a96ef67ad..13952b739ae 100644 --- a/mysql-test/main/column_compression.inc +++ b/mysql-test/main/column_compression.inc @@ -8,6 +8,8 @@ eval CREATE TABLE t1(a $typec); ALTER TABLE t1 ADD KEY(a(10)); SHOW CREATE TABLE t1; +--disable_ps2_protocol + --echo # Make sure column was actually compressed INSERT INTO t1 VALUES(REPEAT('a', 1000)); SELECT LEFT(a, 10), LENGTH(a) FROM t1; @@ -94,6 +96,8 @@ SELECT * FROM t1 ORDER BY a; SELECT a+1 FROM t1 ORDER BY 1; SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME IN('Column_compressions', 'Column_decompressions'); +--enable_ps2_protocol + DROP TABLE t1; --echo # diff --git a/mysql-test/main/count_distinct2.test b/mysql-test/main/count_distinct2.test index 95086ad04aa..f5d16527af3 100644 --- a/mysql-test/main/count_distinct2.test +++ b/mysql-test/main/count_distinct2.test @@ -48,6 +48,7 @@ select count(distinct n1), count(distinct n2) from t1; select count(distinct n2), n1 from t1 group by n1; drop table t1; +--disable_ps2_protocol # test the conversion from tree to MyISAM create table t1 (n int default NULL); let $1=5000; @@ -82,5 +83,6 @@ flush status; select count(distinct s) from t1; show status like 'Created_tmp_disk_tables'; drop table t1; +--enable_ps2_protocol # End of 4.1 tests diff --git a/mysql-test/main/ctype_big5.test b/mysql-test/main/ctype_big5.test index c859670169c..96559db20f9 100644 --- a/mysql-test/main/ctype_big5.test +++ b/mysql-test/main/ctype_big5.test @@ -77,7 +77,9 @@ select hex(convert(_big5 0xC84041 using ucs2)); set names big5; create table t1 (a blob); insert into t1 values (0xEE00); +--disable_ps2_protocol select * into outfile 'test/t1.txt' from t1; +--enable_ps2_protocol delete from t1; let $MYSQLD_DATADIR= `select @@datadir`; --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR diff --git a/mysql-test/main/ctype_ucs.test b/mysql-test/main/ctype_ucs.test index 9bff79abe22..62653e3902f 100644 --- a/mysql-test/main/ctype_ucs.test +++ b/mysql-test/main/ctype_ucs.test @@ -75,7 +75,9 @@ DROP TABLE t1; --echo # Problem # 1 (original report): wrong parsing of ucs2 data SET character_set_connection=ucs2; +--disable_ps2_protocol SELECT '00' UNION SELECT '10' INTO OUTFILE 'tmpp.txt'; +--enable_ps2_protocol CREATE TABLE t1(a INT); LOAD DATA INFILE 'tmpp.txt' INTO TABLE t1 CHARACTER SET ucs2 (@b) SET a=REVERSE(@b); @@ -86,9 +88,10 @@ DROP TABLE t1; let $MYSQLD_DATADIR= `select @@datadir`; remove_file $MYSQLD_DATADIR/test/tmpp.txt; - +--disable_ps2_protocol --echo # Problem # 2 : if you write and read ucs2 data to a file they're lost SELECT '00' UNION SELECT '10' INTO OUTFILE 'tmpp2.txt' CHARACTER SET ucs2; +--enable_ps2_protocol CREATE TABLE t1(a INT); LOAD DATA INFILE 'tmpp2.txt' INTO TABLE t1 CHARACTER SET ucs2 (@b) SET a=REVERSE(@b); diff --git a/mysql-test/main/custom_aggregate_functions.test b/mysql-test/main/custom_aggregate_functions.test index 78374684290..a6097b37847 100644 --- a/mysql-test/main/custom_aggregate_functions.test +++ b/mysql-test/main/custom_aggregate_functions.test @@ -19,7 +19,9 @@ create table t1 (sal int(10),id int(10)); INSERT INTO t1 (sal,id) VALUES (5000,1); INSERT INTO t1 (sal,id) VALUES (2000,1); INSERT INTO t1 (sal,id) VALUES (1000,1); +--disable_ps2_protocol select f1(sal) from t1 where id>= 1; +--enable_ps2_protocol select * from t2; drop table t2; drop function f1; @@ -96,9 +98,12 @@ end| delimiter ;| +#Check after fix MDEV-31281 +--disable_ps2_protocol select f1(10); select f1(sal) from t1; select f1(sal) from t1 where 1=0; +--enable_ps2_protocol drop function f1; delimiter |; diff --git a/mysql-test/main/custom_aggregates_i_s.test b/mysql-test/main/custom_aggregates_i_s.test index c6b195f7974..adcaedc3a68 100644 --- a/mysql-test/main/custom_aggregates_i_s.test +++ b/mysql-test/main/custom_aggregates_i_s.test @@ -3,6 +3,8 @@ --source include/default_optimizer_switch.inc +--disable_ps2_protocol + flush status; show status like "%custom_aggregate%"; create table t2 (sal int(10)); @@ -73,6 +75,8 @@ with agg_sum as ( select * from agg_sum; show status like "%custom_aggregate%"; +--enable_ps2_protocol + drop table t2,t1,t3; drop function f1; drop function f2; diff --git a/mysql-test/main/debug_sync.test b/mysql-test/main/debug_sync.test index 89414939f59..8ac4e1054dd 100644 --- a/mysql-test/main/debug_sync.test +++ b/mysql-test/main/debug_sync.test @@ -381,6 +381,7 @@ DROP TABLE IF EXISTS t1; --enable_warnings # # Test. +--disable_ps2_protocol CREATE TABLE t1 (c1 INT) ENGINE=MyISAM; INSERT INTO t1 VALUES (1); SELECT GET_LOCK('mysqltest_lock', 100); @@ -417,6 +418,7 @@ disconnect con1; disconnect con2; connection default; DROP TABLE t1; +--enable_ps2_protocol # # Cleanup after test case. diff --git a/mysql-test/main/delete.test b/mysql-test/main/delete.test index 6d898ec769d..0b0e7ce4019 100644 --- a/mysql-test/main/delete.test +++ b/mysql-test/main/delete.test @@ -451,6 +451,7 @@ DELETE t1 FROM db1.t1, db2.t1; # Test multiple-table cross database deletes +--disable_ps2_protocol DELETE t1 FROM db1.t2 AS t1, db2.t2 AS t2 WHERE t2.a = 1 AND t1.a = t2.a; SELECT ROW_COUNT(); CALL count_rows(); @@ -462,6 +463,7 @@ DROP DATABASE db1; DROP DATABASE db2; DROP PROCEDURE count_rows; DROP TABLE t1, t2; +--enable_ps2_protocol --echo # --echo # Bug#46958: Assertion in Diagnostics_area::set_ok_status, trigger, diff --git a/mysql-test/main/derived.test b/mysql-test/main/derived.test index dca7243febb..374dc9b052f 100644 --- a/mysql-test/main/derived.test +++ b/mysql-test/main/derived.test @@ -896,11 +896,14 @@ select distinct t1.id, tt.id, tt.data (select t1.id, 'yes' as data from t1) as tt on t1.id = tt.id; +#Check after fix MDEV-31277 +--disable_ps2_protocol select distinct t1.id, tt.id, tt.data from t1 left join (select t1.id, 'yes' as data from t1 where id > 1) as tt on t1.id = tt.id; +--enable_ps2_protocol drop table t1; diff --git a/mysql-test/main/derived_cond_pushdown.test b/mysql-test/main/derived_cond_pushdown.test index fa22ba9513b..05032fb94a4 100644 --- a/mysql-test/main/derived_cond_pushdown.test +++ b/mysql-test/main/derived_cond_pushdown.test @@ -1895,9 +1895,9 @@ DELIMITER ;$$ CALL p1('a'); DROP PROCEDURE p1; - +--disable_ps2_protocol SELECT a FROM (SELECT "aa" a) t WHERE REGEXP_INSTR(t.a, (SELECT MAX('aa') FROM DUAL LIMIT 1)); - +--enable_ps2_protocol DELIMITER $$; CREATE OR REPLACE FUNCTION f1(a VARCHAR(10), b VARCHAR(10)) RETURNS INT diff --git a/mysql-test/main/derived_view.test b/mysql-test/main/derived_view.test index 5422fbcfd1d..1ff06e89aa6 100644 --- a/mysql-test/main/derived_view.test +++ b/mysql-test/main/derived_view.test @@ -42,6 +42,7 @@ explain extended select * from (select * from t1 where f1 in (2,3)) tt join (select * from t1 where f1 in (1,2)) aa on tt.f1=aa.f1; +--disable_ps2_protocol flush status; explain extended select * from (select * from t1 where f1 in (2,3)) tt where f11=2; @@ -49,6 +50,7 @@ show status like 'Handler_read%'; flush status; select * from (select * from t1 where f1 in (2,3)) tt where f11=2; show status like 'Handler_read%'; +--enable_ps2_protocol --echo for merged views create view v1 as select * from t1; @@ -69,6 +71,7 @@ explain extended select * from v3 join v4 on f1=f2; select * from v3 join v4 on f1=f2; +--disable_ps2_protocol flush status; explain extended select * from v4 where f2 in (1,3); show status like 'Handler_read%'; @@ -91,6 +94,7 @@ show status like 'Handler_read%'; flush status; select * from t1 join (select * from t2 group by f2) tt on f1=f2; show status like 'Handler_read%'; +--enable_ps2_protocol --echo for materialized views drop view v1,v2,v3; @@ -106,6 +110,7 @@ explain extended select * from t1 join v2 on f1=f2; select * from t1 join v2 on f1=f2; explain extended select * from t1,v3 as v31,v3 where t1.f1=v31.f1 and t1.f1=v3.f1; +--disable_ps2_protocol flush status; select * from t1,v3 as v31,v3 where t1.f1=v31.f1 and t1.f1=v3.f1; show status like 'Handler_read%'; @@ -116,6 +121,7 @@ show status like 'Handler_read%'; flush status; select * from t1 join v2 on f1=f2; show status like 'Handler_read%'; +--enable_ps2_protocol explain extended select * from v1 join v4 on f1=f2; explain format=json select * from v1 join v4 on f1=f2; @@ -159,6 +165,7 @@ join (select * from (select * from t1 where f1 < 7 group by f1) tt where f1 > 2) z on x.f1 = z.f1; +--disable_ps2_protocol flush status; select * from (select * from (select * from t1 where f1 < 7 group by f1) tt where f1 > 2) x @@ -167,6 +174,7 @@ join on x.f1 = z.f1; show status like 'Handler_read%'; flush status; +--enable_ps2_protocol --echo merged in merged derived join merged in merged derived explain extended select * from diff --git a/mysql-test/main/distinct.test b/mysql-test/main/distinct.test index 122034885bd..cd0092f864e 100644 --- a/mysql-test/main/distinct.test +++ b/mysql-test/main/distinct.test @@ -494,14 +494,18 @@ DROP TABLE IF EXISTS t2; CREATE TABLE t2 (fruit_id INT NOT NULL, fruit_name varchar(20) default NULL); +--disable_ps2_protocol SELECT DISTINCT fruit_id, fruit_name INTO OUTFILE '../../tmp/data1.tmp' FROM t1 WHERE fruit_name = 'APPLE'; +--enable_ps2_protocol LOAD DATA INFILE '../../tmp/data1.tmp' INTO TABLE t2; --error 0,1 --remove_file $MYSQLTEST_VARDIR/tmp/data1.tmp +--disable_ps2_protocol SELECT DISTINCT @v19:= fruit_id, @v20:= fruit_name INTO OUTFILE '../../tmp/data2.tmp' FROM t1 WHERE fruit_name = 'APPLE'; +--enable_ps2_protocol LOAD DATA INFILE '../../tmp/data2.tmp' INTO TABLE t2; --remove_file $MYSQLTEST_VARDIR/tmp/data2.tmp diff --git a/mysql-test/main/empty_table.test b/mysql-test/main/empty_table.test index 754671868ba..ad529483113 100644 --- a/mysql-test/main/empty_table.test +++ b/mysql-test/main/empty_table.test @@ -7,9 +7,11 @@ drop table if exists t1; --enable_warnings create table t1 (nr int(5) not null auto_increment,b blob,str char(10), primary key (nr)); +--disable_ps2_protocol select count(*) from t1; select * from t1; select * from t1 limit 0; +--enable_ps2_protocol show status like "Empty_queries"; drop table t1; @@ -17,8 +19,10 @@ drop table t1; # Accessing a non existing table should not increase Empty_queries # +--disable_ps2_protocol --error 1146 select * from t2; +--enable_ps2_protocol show status like "Empty_queries"; # End of 4.1 tests diff --git a/mysql-test/main/error_simulation.test b/mysql-test/main/error_simulation.test index 2c155bc9a22..c4e2d442727 100644 --- a/mysql-test/main/error_simulation.test +++ b/mysql-test/main/error_simulation.test @@ -80,10 +80,12 @@ SET optimizer_switch='outer_join_with_cache=off'; SET SESSION debug_dbug= '+d,only_one_Unique_may_be_created'; +--disable_ps2_protocol --replace_column 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x EXPLAIN SELECT * FROM t1 LEFT JOIN t2 ON ( t2.a < 10 OR t2.b < 10 ); SELECT * FROM t1 LEFT JOIN t2 ON ( t2.a < 10 OR t2.b < 10 ); +--enable_ps2_protocol SET debug_dbug= @saved_dbug; diff --git a/mysql-test/main/errors.test b/mysql-test/main/errors.test index 1948eebfcb3..cc5cad2a68e 100644 --- a/mysql-test/main/errors.test +++ b/mysql-test/main/errors.test @@ -94,8 +94,10 @@ end| delimiter ;| flush status; +--disable_ps2_protocol --error 1062 select f1(), f2(); +--enable_ps2_protocol show status like 'Com_insert'; select * from t1; select * from t2; diff --git a/mysql-test/main/fast_prefix_index_fetch_innodb.test b/mysql-test/main/fast_prefix_index_fetch_innodb.test index 68d3dc0648d..03b7275a1e3 100644 --- a/mysql-test/main/fast_prefix_index_fetch_innodb.test +++ b/mysql-test/main/fast_prefix_index_fetch_innodb.test @@ -38,6 +38,7 @@ select "no-op query"; let $count = query_get_value($show_count_statement, Value, 1); let $opt = query_get_value($show_opt_statement, Value, 1); +--disable_ps2_protocol --disable_query_log eval select $count - $base_count into @cluster_lookups; eval select $opt - $base_opt into @cluster_lookups_avoided; @@ -662,6 +663,8 @@ eval set @cluster_lookups_avoided = $opt - $base_opt; select @cluster_lookups; select @cluster_lookups_avoided; +--enable_ps2_protocol + DROP TABLE t1; --echo # diff --git a/mysql-test/main/features.test b/mysql-test/main/features.test index 1241bd50bdd..5dbc96165dd 100644 --- a/mysql-test/main/features.test +++ b/mysql-test/main/features.test @@ -8,6 +8,8 @@ drop table if exists t1; set sql_mode=""; +--disable_ps2_protocol + flush status; show status like "feature%"; @@ -114,7 +116,7 @@ select updatexml('
12
', '/','12') as upd1; --replace_result 4 2 show status like "feature_xml"; - +--enable_ps2_protocol --echo # --echo # Feature delayed_keys diff --git a/mysql-test/main/func_gconcat.test b/mysql-test/main/func_gconcat.test index e24dba5d04f..cc5236a18be 100644 --- a/mysql-test/main/func_gconcat.test +++ b/mysql-test/main/func_gconcat.test @@ -61,6 +61,7 @@ select grp,group_concat(c order by c) from t1 group by grp; # Test warnings +--disable_ps2_protocol set group_concat_max_len = 4; select grp,group_concat(c) from t1 group by grp; show warnings; @@ -72,6 +73,7 @@ set group_concat_max_len = 1024; select group_concat(sum(c)) from t1 group by grp; --error 1054 select grp,group_concat(c order by 2) from t1 group by grp; +--enable_ps2_protocol drop table t1; @@ -237,10 +239,12 @@ select group_concat(distinct b) from t1 group by a; select group_concat(b order by b) from t1 group by a; select group_concat(distinct b order by b) from t1 group by a; set local group_concat_max_len=4; +--disable_ps2_protocol select group_concat(b) from t1 group by a; select group_concat(distinct b) from t1 group by a; select group_concat(b order by b) from t1 group by a; select group_concat(distinct b order by b) from t1 group by a; +--enable_ps2_protocol # # long blobs @@ -256,10 +260,12 @@ select group_concat(distinct b) from t1 group by a; select group_concat(b order by b) from t1 group by a; select group_concat(distinct b order by b) from t1 group by a; set local group_concat_max_len=400; +--disable_ps2_protocol select group_concat(b) from t1 group by a; select group_concat(distinct b) from t1 group by a; select group_concat(b order by b) from t1 group by a; select group_concat(distinct b order by b) from t1 group by a; +--enable_ps2_protocol drop table t1; @@ -517,10 +523,12 @@ CREATE TABLE t1( a VARCHAR( 10 ), b INT ); INSERT INTO t1 VALUES ( repeat( 'a', 10 ), 1), ( repeat( 'b', 10 ), 2); SET group_concat_max_len = 20; +--disable_ps2_protocol SELECT GROUP_CONCAT( a ) FROM t1; SELECT GROUP_CONCAT( DISTINCT a ) FROM t1; SELECT GROUP_CONCAT( a ORDER BY b ) FROM t1; -SELECT GROUP_CONCAT( DISTINCT a ORDER BY b ) FROM t1; +SELECT GROUP_CONCAT( DISTINCT a ORDER BY b ) FROM t1; +--enable_ps2_protocol SET group_concat_max_len = DEFAULT; DROP TABLE t1; # Bug #23856:GROUP_CONCAT and ORDER BY: junk from previous rows for query on I_S @@ -787,7 +795,9 @@ INSERT INTO t1 VALUES ('555555', 5); SET group_concat_max_len = 5; SET @old_sql_mode = @@sql_mode, @@sql_mode = 'traditional'; +--disable_ps2_protocol SELECT GROUP_CONCAT(a), b FROM t1 GROUP BY b LIMIT 3; +--enable_ps2_protocol --error ER_CUT_VALUE_GROUP_CONCAT INSERT INTO t2 SELECT GROUP_CONCAT(a), b FROM t1 GROUP BY b; UPDATE t1 SET a = '11111' WHERE b = 1; @@ -864,6 +874,7 @@ CREATE TABLE t2 SELECT GROUP_CONCAT(UPPER(f1) ORDER BY f2) FROM t1; SHOW CREATE TABLE t2; DROP TABLE t2; +--disable_ps2_protocol SET group_concat_max_len= 1024; SELECT LENGTH(GROUP_CONCAT(f1 ORDER BY f2)) FROM t1; @@ -873,6 +884,7 @@ SELECT LENGTH(GROUP_CONCAT(f1 ORDER BY f2)) FROM t1 GROUP BY f2; INSERT INTO t1 VALUES (REPEAT('a', 499999), 3), (REPEAT('b', 500000), 4); SELECT LENGTH(GROUP_CONCAT(f1 ORDER BY f2)) FROM t1 GROUP BY f2; +--enable_ps2_protocol DROP TABLE t1; SET group_concat_max_len= DEFAULT; @@ -882,8 +894,10 @@ SET group_concat_max_len= DEFAULT; # set session group_concat_max_len=1024; set max_session_mem_used=16*1024*1024; # 8M..32M +--disable_ps2_protocol SELECT GROUP_CONCAT(concat(seq/1.1), concat(seq/1.1), concat(seq/1.1), concat(seq/1.1), concat(seq/1.1), concat(seq/1.1), concat(seq/1.1), concat(seq/1.1) ORDER BY 2,1,3,4,6,5,8,7) AS c FROM seq_1_to_200000; +--enable_ps2_protocol set max_session_mem_used=default; set session group_concat_max_len=default; diff --git a/mysql-test/main/func_like.test b/mysql-test/main/func_like.test index 7339743afe4..751e9c19e40 100644 --- a/mysql-test/main/func_like.test +++ b/mysql-test/main/func_like.test @@ -223,12 +223,15 @@ drop table t1; # # Item_func_like::fix_fields, ESCAPE, const_item() # +#Enable after fix MDEV-31282 +--disable_ps2_protocol create table t1(f1 int); insert into t1 values(1); --error ER_WRONG_ARGUMENTS update (select 1 like 2 escape (1 in (select 1 from t1))) x, t1 as d set d.f1 = 1; select * from (select 1 like 2 escape (1 in (select 1 from t1))) x; drop table t1; +--enable_ps2_protocol # # Item_func_like::walk diff --git a/mysql-test/main/func_math.test b/mysql-test/main/func_math.test index 9db00a54b80..96867b530d0 100644 --- a/mysql-test/main/func_math.test +++ b/mysql-test/main/func_math.test @@ -31,7 +31,9 @@ explain extended select log10(100),log10(18),log10(-4),log10(0),log10(NULL); select pow(10,log10(10)),power(2,4); explain extended select pow(10,log10(10)),power(2,4); set @@rand_seed1=10000000,@@rand_seed2=1000000; +--disable_ps2_protocol select rand(999999),rand(); +--enable_ps2_protocol explain extended select rand(999999),rand(); select pi(),format(sin(pi()/2),6),format(cos(pi()/2),6),format(abs(tan(pi())),6),format(cot(1),6),format(asin(1),6),format(acos(0),6),format(atan(1),6); explain extended select pi(),format(sin(pi()/2),6),format(cos(pi()/2),6),format(abs(tan(pi())),6),format(cot(1),6),format(asin(1),6),format(acos(0),6),format(atan(1),6); diff --git a/mysql-test/main/func_misc.test b/mysql-test/main/func_misc.test index a8a9bb9afe0..935f33350d9 100644 --- a/mysql-test/main/func_misc.test +++ b/mysql-test/main/func_misc.test @@ -54,6 +54,7 @@ drop table t1; # Bug#16501: IS_USED_LOCK does not appear to work # +--disable_ps2_protocol CREATE TABLE t1 (conn CHAR(7), connection_id INT); INSERT INTO t1 VALUES ('default', CONNECTION_ID()); @@ -85,6 +86,7 @@ disconnect con1; connection default; DROP TABLE t1; +--enable_ps2_protocol # # Bug #21531: EXPORT_SET() doesn't accept args with coercible character sets @@ -148,15 +150,19 @@ select avg(a) from table_26093; select benchmark(100, (select avg(a) from table_26093)); set @invoked := 0; +--disable_ps2_protocol select benchmark(100, (select avg(func_26093_a(a)) from table_26093)); +--enable_ps2_protocol # Returns only 10, since intermediate results are cached. select @invoked; set @invoked := 0; +--disable_ps2_protocol #enable after fix MDEV-27871 --disable_view_protocol select benchmark(100, (select avg(func_26093_b(a, rand())) from table_26093)); --enable_view_protocol +--enable_ps2_protocol # Returns 1000, due to rand() preventing caching. select @invoked; @@ -631,6 +637,7 @@ DROP TABLE t1; --echo # GET_LOCK, RELEASE_LOCK, IS_USED_LOCK functions test --echo # +--disable_ps2_protocol --disable_service_connection --echo # IS_USED_LOCK, IS_FREE_LOCK: the lock is not acquired @@ -794,6 +801,7 @@ select is_free_lock(repeat('a', 193)); select release_lock(repeat('a', 193)); --enable_service_connection +--enable_ps2_protocol --echo --echo # -- @@ -1224,8 +1232,10 @@ DROP TABLE t1; --echo # MDEV-20517 Assertion `!is_expensive()' failed in Item::value_depends_on_sql_mode_const_item --echo # +--disable_ps2_protocol SELECT ( 1 LIKE GET_LOCK( 'foo', 0 ) ) - 2; SELECT RELEASE_LOCK('foo'); +--enable_ps2_protocol --echo # --echo # End of 10.2 tests diff --git a/mysql-test/main/func_rollback.test b/mysql-test/main/func_rollback.test index e8af4ef2eff..0650ae09292 100644 --- a/mysql-test/main/func_rollback.test +++ b/mysql-test/main/func_rollback.test @@ -90,12 +90,16 @@ delimiter ;// --echo --echo # One f1_simple_insert execution per row, no NOT NULL violation +--disable_ps2_protocol SELECT f1_simple_insert(1); +--enable_ps2_protocol SELECT * FROM t1_not_null ORDER BY f1,f2; ROLLBACK; SELECT * FROM t1_not_null; # +--disable_ps2_protocol SELECT f1_simple_insert(1) FROM t1_select; +--enable_ps2_protocol SELECT * FROM t1_not_null ORDER BY f1,f2; ROLLBACK; SELECT * FROM t1_not_null; @@ -219,7 +223,9 @@ eval $f1_insert_select; --echo # - t1_not_null gets a row inserted --echo # is covered by the manual. # Non strict sqlmode + INSERT SELECT --> NULL adjusted to default +--disable_ps2_protocol SELECT f1_insert_select(2); +--enable_ps2_protocol SELECT * FROM t1_not_null ORDER BY f1,f2; ROLLBACK; SELECT * FROM t1_not_null ORDER BY f1,f2; @@ -295,7 +301,9 @@ eval $f1_insert_with_two_rows; --echo # - t1_not_null gets a row inserted --echo # is covered by the manual. # Non strict sqlmode + multiple-row INSERT --> NULL adjusted to default +--disable_ps2_protocol SELECT f1_insert_with_two_rows(); +--enable_ps2_protocol SELECT * FROM t1_not_null ORDER BY f1,f2; ROLLBACK; SELECT * FROM t1_not_null ORDER BY f1,f2; diff --git a/mysql-test/main/func_str.test b/mysql-test/main/func_str.test index da3483dd08a..f99a1d912e8 100644 --- a/mysql-test/main/func_str.test +++ b/mysql-test/main/func_str.test @@ -1518,7 +1518,9 @@ SELECT CONVERT(('' IN (REVERSE(CAST(('') AS DECIMAL)), '')), CHAR(3)); --echo # CREATE TABLE t1 ( a TEXT ); --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_ps2_protocol --eval SELECT 'aaaaaaaaaaaaaa' INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/bug58165.txt'; +--enable_ps2_protocol SELECT insert( substring_index( 'a', 'a', 'b' ), 1, 0, 'x' ); --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/bug58165.txt' INTO TABLE t1; diff --git a/mysql-test/main/func_time.test b/mysql-test/main/func_time.test index ed9ae20e9bd..b12136b0243 100644 --- a/mysql-test/main/func_time.test +++ b/mysql-test/main/func_time.test @@ -2282,9 +2282,11 @@ delimiter ;// SET @sav_slow_query_log= @@session.slow_query_log; +--disable_ps2_protocol # @@slow_query_log ON check SET @@session.slow_query_log= ON; SELECT current_timestamp(6),fn_sleep_before_now() INTO @ts_cur, @ts_func; +--enable_ps2_protocol SELECT a FROM t_ts LIMIT 1 into @ts_func; SELECT a FROM t_trig LIMIT 1 into @ts_trig; @@ -2296,9 +2298,11 @@ if (!`SELECT @ts_cur = @ts_func and @ts_func = @ts_trig`) DELETE FROM t_ts; DELETE FROM t_trig; +--disable_ps2_protocol # @@slow_query_log OFF check SET @@session.slow_query_log= OFF; SELECT current_timestamp(6),fn_sleep_before_now() INTO @ts_cur, @func_ts; +--enable_ps2_protocol SELECT a FROM t_ts LIMIT 1 into @ts_func; SELECT a FROM t_trig LIMIT 1 into @ts_trig; if (!`SELECT @ts_cur = @ts_func and @ts_func = @ts_trig`) @@ -2350,9 +2354,11 @@ SELECT --echo # MDEV-14032 SEC_TO_TIME executes side effect two times --echo # +--disable_ps2_protocol SET @a=10000000; SELECT SEC_TO_TIME(@a:=@a+1); SELECT @a; +--enable_ps2_protocol CREATE TABLE t1 (a TEXT); DELIMITER $$; @@ -2363,7 +2369,9 @@ BEGIN END; $$ DELIMITER ;$$ +--disable_ps2_protocol SELECT SEC_TO_TIME(f1()); +--enable_ps2_protocol SELECT * FROM t1; DROP TABLE t1; DROP FUNCTION f1; diff --git a/mysql-test/main/func_weight_string.test b/mysql-test/main/func_weight_string.test index 528aa5d4f0f..0209be51236 100644 --- a/mysql-test/main/func_weight_string.test +++ b/mysql-test/main/func_weight_string.test @@ -114,7 +114,9 @@ drop table t1; --echo # BUG#11898467 - SERVER CRASHES ON SELECT HEX(WEIGHT_STRING(STR AS [CHAR|BINARY](N))) IF N IS BIG --echo # SELECT HEX(WEIGHT_STRING('ab' AS CHAR(1000000000000000000))); +--disable_ps2_protocol SELECT HEX(WEIGHT_STRING('ab' AS BINARY(1000000000000000000))); +--enable_ps2_protocol disconnect conn1; connection default; diff --git a/mysql-test/main/grant2.test b/mysql-test/main/grant2.test index f98af8d8630..7efd9bdde78 100644 --- a/mysql-test/main/grant2.test +++ b/mysql-test/main/grant2.test @@ -838,7 +838,9 @@ SHOW CREATE TABLE t1; --echo # INSERT INTO t1 VALUES (1), (2), (3); --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_ps2_protocol --eval SELECT a INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/bug27480.txt' FROM t1 +--enable_ps2_protocol --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/bug27480.txt' INTO TABLE t1 --remove_file $MYSQLTEST_VARDIR/tmp/bug27480.txt diff --git a/mysql-test/main/group_by.test b/mysql-test/main/group_by.test index 9bbe1e0bf2b..c22fba552c0 100644 --- a/mysql-test/main/group_by.test +++ b/mysql-test/main/group_by.test @@ -1032,9 +1032,11 @@ EXPLAIN SELECT a FROM t1 IGNORE INDEX FOR JOIN (PRIMARY,i2); EXPLAIN SELECT a FROM t1 IGNORE INDEX FOR GROUP BY (PRIMARY,i2) GROUP BY a; --echo # Here's a proof it is really doing sorting: flush status; +--disable_ps2_protocol --disable_result_log SELECT a FROM t1 IGNORE INDEX FOR GROUP BY (PRIMARY,i2) GROUP BY a; --enable_result_log +--enable_ps2_protocol show status like 'Sort_%'; --echo # Proof ends. --echo # @@ -1045,9 +1047,11 @@ show status like 'Sort_%'; EXPLAIN SELECT a FROM t1 IGNORE INDEX FOR ORDER BY (PRIMARY,i2) ORDER BY a; --echo # Here's a proof it is really doing sorting: flush status; +--disable_ps2_protocol --disable_result_log SELECT a FROM t1 IGNORE INDEX FOR ORDER BY (PRIMARY,i2) ORDER BY a; --enable_result_log +--enable_ps2_protocol show status like 'Sort_%'; --echo # Proof ends. --echo # @@ -1400,7 +1404,9 @@ let $query0=SELECT col1 AS field1, col1 AS field2 # Needs to be range to exercise bug --eval EXPLAIN $query0; FLUSH STATUS; +--disable_ps2_protocol --eval $query0; +--enable_ps2_protocol SHOW SESSION STATUS LIKE 'Sort_scan%'; let $query=SELECT SQL_BIG_RESULT col1 AS field1, col1 AS field2 @@ -1409,7 +1415,9 @@ let $query=SELECT SQL_BIG_RESULT col1 AS field1, col1 AS field2 # Needs to be range to exercise bug --eval EXPLAIN $query FLUSH STATUS; +--disable_ps2_protocol --eval $query +--enable_ps2_protocol SHOW SESSION STATUS LIKE 'Sort_scan%'; CREATE VIEW v1 AS SELECT * FROM t1; @@ -1643,6 +1651,7 @@ DROP TABLE t1, t2; #the view protocol creates # an additional util connection and other statistics data +--disable_ps2_protocol --disable_view_protocol FLUSH STATUS; # this test case *must* use Aria temp tables @@ -1655,6 +1664,7 @@ DROP TABLE t1; --echo the value below *must* be 1 show status like 'Created_tmp_disk_tables'; --enable_view_protocol +--enable_ps2_protocol --echo # --echo # Bug #1002146: Unneeded filesort if usage of join buffer is not allowed diff --git a/mysql-test/main/group_min_max.test b/mysql-test/main/group_min_max.test index 3c5c1b5bb9b..49ce729c6b8 100644 --- a/mysql-test/main/group_min_max.test +++ b/mysql-test/main/group_min_max.test @@ -919,7 +919,7 @@ DROP TABLE t1,t2; # # Bug#24156: Loose index scan not used with CREATE TABLE ...SELECT and similar statements # - +--disable_ps2_protocol CREATE TABLE t1 (a INT, b INT, INDEX (a,b)); INSERT INTO t1 (a, b) VALUES (1,1), (1,2), (1,3), (1,4), (1,5), (2,2), (2,3), (2,1), (3,1), (4,1), (4,2), (4,3), (4,4), (4,5), (4,6); @@ -977,6 +977,7 @@ DELETE FROM t3 WHERE (SELECT (SELECT MAX(b) FROM t1 GROUP BY a HAVING a < 2) x SHOW STATUS LIKE 'handler_read__e%'; DROP TABLE t1,t2,t3; +--enable_ps2_protocol # # Bug#25602: queries with DISTINCT and SQL_BIG_RESULT hint diff --git a/mysql-test/main/handler_read_last.test b/mysql-test/main/handler_read_last.test index 2f18e302fa0..390d5f092fc 100644 --- a/mysql-test/main/handler_read_last.test +++ b/mysql-test/main/handler_read_last.test @@ -9,6 +9,7 @@ DROP TABLE IF EXISTS t1; CREATE TABLE t1 (a INT, INDEX (a)); INSERT INTO t1 VALUES (),(),(),(),(),(),(),(),(),(); +--disable_ps2_protocol FLUSH STATUS; SELECT a FROM t1 ORDER BY a LIMIT 1; SHOW STATUS LIKE 'HANDLER_READ%'; @@ -24,6 +25,7 @@ SHOW STATUS LIKE 'HANDLER_READ%'; FLUSH STATUS; SELECT a FROM t1 ORDER BY a DESC LIMIT 3; SHOW STATUS LIKE 'HANDLER_READ%'; +--enable_ps2_protocol DROP TABLE t1; diff --git a/mysql-test/main/having.test b/mysql-test/main/having.test index e39d824d3a2..618fcb57250 100644 --- a/mysql-test/main/having.test +++ b/mysql-test/main/having.test @@ -892,8 +892,10 @@ CREATE TABLE t1 (t INT, u INT, KEY(t)); INSERT INTO t1 VALUES(10, 10), (11, 11), (12, 12), (12, 13),(14, 15), (15, 16), (16, 17), (17, 17); ANALYZE TABLE t1; +--disable_ps2_protocol SELECT t, next_seq_value() r FROM t1 FORCE INDEX(t) GROUP BY t HAVING r = 1 ORDER BY t1.u; +--enable_ps2_protocol DROP TABLE t1; DROP FUNCTION next_seq_value; diff --git a/mysql-test/main/information_schema.test b/mysql-test/main/information_schema.test index 7b5884ef6b5..600c25256cf 100644 --- a/mysql-test/main/information_schema.test +++ b/mysql-test/main/information_schema.test @@ -1409,12 +1409,13 @@ set global init_connect=""; # # Bug#34517 SHOW GLOBAL STATUS does not work properly in embedded server. # - +--disable_ps2_protocol create table t0 select * from information_schema.global_status where VARIABLE_NAME='COM_SELECT'; SELECT 1; select a.VARIABLE_VALUE - b.VARIABLE_VALUE from t0 b, information_schema.global_status a where a.VARIABLE_NAME = b.VARIABLE_NAME; drop table t0; +--enable_ps2_protocol # # Bug#35275 INFORMATION_SCHEMA.TABLES.CREATE_OPTIONS omits KEY_BLOCK_SIZE diff --git a/mysql-test/main/information_schema_stats.test b/mysql-test/main/information_schema_stats.test index 49d46ee437d..fd5171c3fb4 100644 --- a/mysql-test/main/information_schema_stats.test +++ b/mysql-test/main/information_schema_stats.test @@ -1,3 +1,4 @@ +--disable_ps2_protocol # # MDEV-8633: information_schema.index_statistics doesn't delete item when drop table indexes or drop table; # @@ -45,3 +46,4 @@ drop table just_a_test; select * from information_schema.index_statistics where table_schema='test' and table_name='just_a_test'; select * from information_schema.table_statistics where table_schema='test' and table_name='just_a_test'; set global userstat=@save_userstat; +--enable_ps2_protocol diff --git a/mysql-test/main/innodb_ext_key.test b/mysql-test/main/innodb_ext_key.test index ddd51879a7a..c73d4815442 100644 --- a/mysql-test/main/innodb_ext_key.test +++ b/mysql-test/main/innodb_ext_key.test @@ -27,6 +27,7 @@ ANALYZE TABLE lineitem PERSISTENT FOR COLUMNS() INDEXES(); --enable_result_log --enable_query_log +--disable_ps2_protocol explain select count(*) from lineitem where l_orderkey=130 and l_shipdate='1992-07-01'; flush status; @@ -149,6 +150,7 @@ select o_orderkey, p_partkey where p_retailprice > 1100 and o_orderdate='1997-01-01' and o_orderkey=l_orderkey and p_partkey=l_partkey; show status like 'handler_read%'; +--enable_ps2_protocol --echo # --echo # Bug mdev-3851: ref access used instead of expected eq_ref access @@ -317,12 +319,14 @@ select A.a + 10 * B.a, A.a + 10 * B.a, A.a + 10 * B.a from t1 A, t1 B; +--disable_ps2_protocol --replace_column 9 # explain select * from t1, t2 where t2.a=t1.a and t2.b < 2; flush status; select * from t1, t2 where t2.a=t1.a and t2.b < 2; show status like 'handler_read%'; +--enable_ps2_protocol drop table t1,t2; diff --git a/mysql-test/main/insert.test b/mysql-test/main/insert.test index b27290bc91c..fce0d3c04d2 100644 --- a/mysql-test/main/insert.test +++ b/mysql-test/main/insert.test @@ -210,6 +210,7 @@ drop table t1; # (and thus for values returned by mysql_affected_rows()) # for various forms of INSERT # +--disable_ps2_protocol create table t1 (id int primary key, data int); insert into t1 values (1, 1), (2, 2), (3, 3); select row_count(); @@ -227,6 +228,7 @@ select row_count(); insert into t1 values (5, 5) on duplicate key update data= data + 10; select row_count(); drop table t1; +--enable_ps2_protocol # # Bug#25123: ON DUPLICATE KEY clause allows fields not from the insert table @@ -284,8 +286,10 @@ BEGIN END | delimiter ;| +--disable_ps2_protocol SELECT f1(); SELECT f2(); +--enable_ps2_protocol INSERT INTO t1 VALUES (3); INSERT DELAYED INTO t1 VALUES (4); @@ -592,7 +596,9 @@ CREATE ALGORITHM = MERGE VIEW v1 AS SELECT f1, f2 FROM t1 WHERE f1 = cast('' as REPLACE INTO v1 SET f2 = 1; SELECT * from t1; drop view v1; +--disable_ps2_protocol SELECT 0,0 INTO OUTFILE 't1.txt'; +--enable_ps2_protocol CREATE ALGORITHM = MERGE VIEW v1 AS SELECT f1, f2 FROM t1 WHERE f1 = 'x' WITH CHECK OPTION; --error ER_TRUNCATED_WRONG_VALUE LOAD DATA INFILE 't1.txt' INTO TABLE v1; diff --git a/mysql-test/main/invisible_field.test b/mysql-test/main/invisible_field.test index 558ca7aa3a2..0731c393399 100644 --- a/mysql-test/main/invisible_field.test +++ b/mysql-test/main/invisible_field.test @@ -251,7 +251,9 @@ DROP TABLE t1; create or replace table t1 (a int, b int invisible); insert into t1 values (1),(2); +--disable_ps2_protocol select * from t1 into outfile 'f'; +--enable_ps2_protocol load data infile 'f' into table t1; select a,b from t1; load data infile 'f' into table t1 (a,@v) SET b=@v; @@ -261,7 +263,9 @@ select a,b from t1; truncate table t1; insert into t1(a,b) values (1,1),(2,2); +--disable_ps2_protocol select a,b from t1 into outfile 'a'; +--enable_ps2_protocol load data infile 'a' into table t1(a,b); select a,b from t1; load data infile 'a' into table t1 (a,@v) SET b=@v; diff --git a/mysql-test/main/join.test b/mysql-test/main/join.test index b99f05f7c88..d968231ea5a 100644 --- a/mysql-test/main/join.test +++ b/mysql-test/main/join.test @@ -659,7 +659,9 @@ create table t3 (a int not null, primary key(a)); insert into t3 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); flush status; +--disable_ps2_protocol select * from t1, t2, t3 where t3.a=t1.a and t2.a=t1.b; +--enable_ps2_protocol explain select * from t1, t2, t3 where t3.a=t1.a and t2.a=t1.b; --echo We expect rnd_next=5, and read_key must be 0 because of short-cutting: show status like 'Handler_read%'; @@ -958,7 +960,9 @@ INSERT INTO t1 VALUES (3,'b'),(4,NULL),(5,'c'),(6,'cc'),(7,'d'), INSERT INTO t2 VALUES (2,NULL); ANALYZE TABLE t1,t2; FLUSH STATUS; +--disable_ps2_protocol SELECT * FROM t1 JOIN t2 ON t1.v = t2.v WHERE t2.v IS NULL ORDER BY 1; +--enable_ps2_protocol SHOW STATUS LIKE 'Handler_read_%'; DROP TABLE t1, t2; diff --git a/mysql-test/main/join_cache.test b/mysql-test/main/join_cache.test index 6a5ee8cb533..43ce3b97ad1 100644 --- a/mysql-test/main/join_cache.test +++ b/mysql-test/main/join_cache.test @@ -1645,6 +1645,7 @@ insert into t2 values (3,1, 'qwerty'),(3,4, 'qwerty'); insert into t2 values (4,1, 'qwerty'),(4,2, 'qwerty'),(4,3, 'qwerty'), (4,4, 'qwerty'); +--disable_ps2_protocol flush status; set join_cache_level=5; select t2.f1, t2.f2, t2.f3 from t1,t2 @@ -1678,6 +1679,8 @@ explain select t2.f1, t2.f2, t2.f3 from t1,t2 where t1.f1=t2.f1 and t2.f2 between t1.f1 and t2.f2; show status like "Handler_icp%"; +--enable_ps2_protocol + drop table t1,t2; set join_cache_level=@save_join_cache_level; @@ -4029,6 +4032,8 @@ insert into t1 values (1), (2); insert into t2 values (1), (2); insert into t3 values (2); +--disable_ps2_protocol + explain select count(*) from t1 straight_join t2 where c1 = c2-0 and c2 <= (select max(c3) from t3 where c3 = 2 and @counter:=@counter+1); @@ -4055,6 +4060,8 @@ where c1 = c2-0 and select @counter; +--enable_ps2_protocol + drop table t1,t2,t3; set expensive_subquery_limit=@save_expensive_subquery_limit; diff --git a/mysql-test/main/join_outer.test b/mysql-test/main/join_outer.test index 5e1e83e4049..857a9ced41b 100644 --- a/mysql-test/main/join_outer.test +++ b/mysql-test/main/join_outer.test @@ -685,9 +685,15 @@ create table t1 (a int, b varchar(20)); create table t2 (a int, c varchar(20)); insert into t1 values (1,"aaaaaaaaaa"),(2,"bbbbbbbbbb"); insert into t2 values (1,"cccccccccc"),(2,"dddddddddd"); +#Enable after fix MDEV-31276 +--disable_ps2_protocol select group_concat(t1.b,t2.c) from t1 left join t2 using(a) group by t1.a; +--enable_ps2_protocol select group_concat(t1.b,t2.c) from t1 inner join t2 using(a) group by t1.a; +#Enable after fix MDEV-31276 +--disable_ps2_protocol select group_concat(t1.b,t2.c) from t1 left join t2 using(a) group by a; +--enable_ps2_protocol select group_concat(t1.b,t2.c) from t1 inner join t2 using(a) group by a; drop table t1, t2; set group_concat_max_len=default; @@ -873,7 +879,8 @@ DROP TABLE t1,t2; # # Bug 28188: 'not exists' optimization for outer joins # - + +--disable_ps2_protocol CREATE TABLE t1 (id int PRIMARY KEY, a varchar(8)); CREATE TABLE t2 (id int NOT NULL, b int NOT NULL, INDEX idx(id)); INSERT INTO t1 VALUES @@ -889,7 +896,7 @@ SELECT t1.id, a FROM t1 LEFT JOIN t2 ON t1.id=t2.id WHERE t2.b IS NULL; show status like 'Handler_read%'; DROP TABLE t1,t2; - +--enable_ps2_protocol # # Bug 28571: outer join with false on condition over constant tables # @@ -1369,6 +1376,7 @@ drop table t1,t2,t3,t4; --echo # Bug#57024: Poor performance when conjunctive condition over the outer --echo # table is used in the on condition of an outer join --echo # +--disable_ps2_protocol --disable_view_protocol create table t1 (a int); insert into t1 values (NULL), (NULL), (NULL), (NULL); @@ -1411,6 +1419,7 @@ show status like "handler_read%"; drop table t1,t2,t3; --enable_view_protocol +--enable_ps2_protocol --echo # --echo # Bug#57688 Assertion `!table || (!table->write_set || bitmap_is_set(table->write_set, field @@ -2363,8 +2372,11 @@ create view v1 as select * from t1 left join ( select 'Y' AS Voted, ElectionID from t2 ) AS T on T.ElectionID = t1.Election limit 9; +#enable after fix MDEV-31277 +--disable_ps2_protocol # limit X causes merge algorithm select as opposed to temp table select * from v1; +--enable_ps2_protocol drop table t1, t2; drop view v1; @@ -2379,7 +2391,10 @@ create view v10 as select *, 'U' as u from t10 left join (select 'Y' as y, t20.b create table t30 (c int); insert into t30 values (1),(3); create view v20 as select * from t30 left join (select 'X' as x, v10.u, v10.y, v10.b from v10) dt2 on t30.c=dt2.b limit 6; +#check after fix MDEV-31277 +--disable_ps2_protocol select * from v20 limit 9; +--enable_ps2_protocol drop view v10, v20; drop table t10, t20, t30; @@ -2392,7 +2407,9 @@ create table t3 (c int); insert into t3 values (3),(1); create table t1 (a int); insert into t1 values (1),(2),(7),(1); - + +#check after fix MDEV-31277 +--disable_ps2_protocol select * from ( select * from @@ -2405,6 +2422,7 @@ select * from on dt1.a=dt2.b limit 9 ) dt; +--enable_ps2_protocol ## Same as dt3 above create view v3(x,c) as select * from (select 'X' as x, t3.c from t3) dt3; @@ -2418,7 +2436,10 @@ create view v0(y,b,x,c) as select * from v2 left join v3 on v2.b=v3.c; # Same as above select statement create view v1 as select 'Z' as z, t1.a, v0.* from t1 left join v0 on t1.a=v0.b limit 9; +#check after fix MDEV-31277 +--disable_ps2_protocol select * from v1; +--enable_ps2_protocol set statement join_cache_level=0 for select * from v1; diff --git a/mysql-test/main/key_cache.test b/mysql-test/main/key_cache.test index a99bb4ea04c..706c0a736dd 100644 --- a/mysql-test/main/key_cache.test +++ b/mysql-test/main/key_cache.test @@ -276,6 +276,7 @@ DROP TABLE t1; # Test usage of the KEY_CACHE table from information schema # for a simple key cache +--disable_ps2_protocol set global key_buffer_size=@save_key_buffer_size; set global key_cache_block_size=@save_key_cache_block_size; select @@key_buffer_size; @@ -536,6 +537,7 @@ set global keycache2.key_buffer_size=0; set global key_buffer_size=@save_key_buffer_size; set global key_cache_segments=@save_key_cache_segments; set global key_cache_file_hash_size=@save_key_cache_file_hash_size; +--enable_ps2_protocol # End of 5.2 tests diff --git a/mysql-test/main/limit_rows_examined.test b/mysql-test/main/limit_rows_examined.test index 2315580410f..16831a0cf5c 100644 --- a/mysql-test/main/limit_rows_examined.test +++ b/mysql-test/main/limit_rows_examined.test @@ -489,6 +489,7 @@ WHERE alias3.c IN ( SELECT 1 UNION SELECT 6 ) GROUP BY field1, field2, field3, field4, field5 LIMIT ROWS EXAMINED 120; +--disable_ps2_protocol FLUSH STATUS; SELECT a AS field1, alias2.d AS field2, alias2.f AS field3, alias2.e AS field4, b AS field5 FROM t1, t2 AS alias2, t2 AS alias3 @@ -506,6 +507,7 @@ GROUP BY field1, field2, field3, field4, field5 LIMIT ROWS EXAMINED 124; SHOW STATUS LIKE 'Handler_read%'; SHOW STATUS LIKE 'Handler_tmp%'; +--enable_ps2_protocol drop table t1, t2; @@ -550,10 +552,12 @@ INSERT INTO t2 VALUES (5, 0),(3, 4),(6, 1), (5, 8),(4, 9),(8, 1); +--disable_ps2_protocol SELECT (SELECT MAX(c) FROM t1, t2) FROM t2 WHERE c = (SELECT MAX(b) FROM t2) LIMIT ROWS EXAMINED 3; +--enable_ps2_protocol drop table t1, t2; diff --git a/mysql-test/main/loaddata.test b/mysql-test/main/loaddata.test index b1a7b323b8b..0a5e3c27007 100644 --- a/mysql-test/main/loaddata.test +++ b/mysql-test/main/loaddata.test @@ -36,6 +36,7 @@ drop table t1; # # Bug #12053 LOAD DATA INFILE ignores NO_AUTO_VALUE_ON_ZERO setting # +--disable_ps2_protocol SET @OLD_SQL_MODE=@@SQL_MODE, @@SQL_MODE=NO_AUTO_VALUE_ON_ZERO; create table t1(id integer not null auto_increment primary key); insert into t1 values(0); @@ -59,6 +60,7 @@ select * from t1; remove_file $MYSQLTEST_VARDIR/tmp/t1; SET @@SQL_MODE=@OLD_SQL_MODE; drop table t1; +--enable_ps2_protocol # # Bug #11203: LOAD DATA does not accept same characters for ESCAPED and @@ -92,7 +94,9 @@ INSERT INTO t1 (c1) VALUES SELECT * FROM t1; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_ps2_protocol eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t1' FIELDS ENCLOSED BY 'r' FROM t1; +--enable_ps2_protocol cat_file $MYSQLTEST_VARDIR/tmp/t1; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR @@ -183,7 +187,9 @@ create table t1(f1 int); insert into t1 values(1),(null); create table t2(f2 int auto_increment primary key); disable_query_log; +--disable_ps2_protocol eval select * into outfile '$MYSQLTEST_VARDIR/tmp/t1' from t1; +--enable_ps2_protocol SET @OLD_SQL_MODE=@@SQL_MODE, @@SQL_MODE=NO_AUTO_VALUE_ON_ZERO; eval load data infile '$MYSQLTEST_VARDIR/tmp/t1' into table t2; enable_query_log; @@ -200,16 +206,20 @@ create table t1(f1 int, f2 timestamp not null default current_timestamp); create table t2(f1 int); insert into t2 values(1),(2); disable_query_log; +--disable_ps2_protocol eval select * into outfile '$MYSQLTEST_VARDIR/tmp/t2' from t2; +--enable_ps2_protocol eval load data infile '$MYSQLTEST_VARDIR/tmp/t2' ignore into table t1; enable_query_log; select f1 from t1 where f2 <> '0000-00-00 00:00:00' order by f1; remove_file $MYSQLTEST_VARDIR/tmp/t2; delete from t1; disable_query_log; +--disable_ps2_protocol eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t2' FIELDS TERMINATED BY '' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\r\n' FROM t2; +--enable_ps2_protocol eval load data infile '$MYSQLTEST_VARDIR/tmp/t2' ignore into table t1 FIELDS TERMINATED BY '' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\r\n'; enable_query_log; @@ -228,7 +238,9 @@ INSERT INTO t1 (c1, c2, c3, c4) VALUES (10, '1970-02-01 01:02:03', 1.1E-100, 1.1 SELECT * FROM t1; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_ps2_protocol eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t1' FIELDS ENCLOSED BY '-' FROM t1; +--enable_ps2_protocol cat_file $MYSQLTEST_VARDIR/tmp/t1; echo EOF; @@ -365,8 +377,10 @@ SET @OLD_SQL_MODE=@@SESSION.SQL_MODE; SET sql_mode = ''; +--disable_ps2_protocol --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --eval SELECT '1 \\\\aa\n' INTO DUMPFILE '$file' +--enable_ps2_protocol CREATE TABLE t1 (id INT, val1 CHAR(3)) ENGINE=MyISAM; @@ -378,13 +392,17 @@ SELECT * FROM t1; # show we can write this with OUTFILE, forcing the parameters for now --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_ps2_protocol --eval SELECT * INTO OUTFILE '$file2' FIELDS ESCAPED BY '' TERMINATED BY ' ' FROM t1 +--enable_ps2_protocol --diff_files $file $file2 --remove_file $file2 # now show the OUTFILE defaults are correct with NO_BACKSLASH_ESCAPES --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_ps2_protocol --eval SELECT * INTO OUTFILE '$file2' FIELDS TERMINATED BY ' ' FROM t1 +--enable_ps2_protocol --diff_files $file $file2 --remove_file $file2 @@ -417,7 +435,9 @@ INSERT INTO t1 (id, val1) VALUES (3, '\tx'); --echo 1.1 NO_BACKSLASH_ESCAPES, use defaults for ESCAPED BY --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_ps2_protocol --eval SELECT * INTO OUTFILE '$file' FIELDS TERMINATED BY ' ' FROM t1 ORDER BY id +--enable_ps2_protocol --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --eval LOAD DATA INFILE '$file' INTO TABLE t2 FIELDS TERMINATED BY ' ' @@ -439,7 +459,9 @@ eval SELECT LOAD_FILE("$file"); --echo 1.2 NO_BACKSLASH_ESCAPES, override defaults for ESCAPED BY --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_ps2_protocol --eval SELECT * INTO OUTFILE '$file' FIELDS ESCAPED BY '\' TERMINATED BY ' ' FROM t1 ORDER BY id +--enable_ps2_protocol --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --eval LOAD DATA INFILE '$file' INTO TABLE t2 FIELDS ESCAPED BY '\' TERMINATED BY ' ' @@ -465,7 +487,9 @@ SET sql_mode = ''; --echo 2.1 !NO_BACKSLASH_ESCAPES, use defaults for ESCAPED BY --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_ps2_protocol --eval SELECT * INTO OUTFILE '$file' FIELDS TERMINATED BY ' ' FROM t1 ORDER BY id +--enable_ps2_protocol --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --eval LOAD DATA INFILE '$file' INTO TABLE t2 FIELDS TERMINATED BY ' ' @@ -493,7 +517,9 @@ SET sql_mode = ''; --echo 2.2 !NO_BACKSLASH_ESCAPES, override defaults for ESCAPED BY --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_ps2_protocol --eval SELECT * INTO OUTFILE '$file' FIELDS ESCAPED BY '' TERMINATED BY ' ' FROM t1 ORDER BY id +--enable_ps2_protocol --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --eval LOAD DATA INFILE '$file' INTO TABLE t2 FIELDS ESCAPED BY '' TERMINATED BY ' ' @@ -544,7 +570,9 @@ INSERT INTO t1 VALUES (1); SET NAMES latin1; SET character_set_filesystem=filename; select @@character_set_filesystem; +--disable_ps2_protocol SELECT * INTO OUTFILE 't-1' FROM t1; +--enable_ps2_protocol DELETE FROM t1; LOAD DATA INFILE 't-1' INTO TABLE t1; SELECT * FROM t1; @@ -566,7 +594,9 @@ select @@character_set_filesystem; --echo # CREATE TABLE t1(col0 LONGBLOB); +--disable_ps2_protocol SELECT 'test' INTO OUTFILE 't1.txt'; +--enable_ps2_protocol LOAD DATA INFILE 't1.txt' IGNORE INTO TABLE t1 SET col0=col0; SELECT * FROM t1; @@ -635,7 +665,9 @@ disconnect con1; --echo # CREATE TABLE t1(f1 INT); +--disable_ps2_protocol EVAL SELECT 0xE1BB30 INTO OUTFILE 't1.dat'; +--enable_ps2_protocol --disable_warnings LOAD DATA INFILE 't1.dat' IGNORE INTO TABLE t1 CHARACTER SET utf8; --enable_warnings @@ -649,9 +681,11 @@ remove_file $MYSQLD_DATADIR/test/t1.dat; --echo # WHEN ERROR OCCURS --echo # +--disable_ps2_protocol --let $file=$MYSQLTEST_VARDIR/tmp/bug11735141.txt --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --eval SELECT '1\n' INTO DUMPFILE '$file' +--enable_ps2_protocol create table t1(a point); --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR @@ -737,7 +771,9 @@ CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a), UNIQUE(b)); INSERT INTO t1 VALUES (1,1); CREATE TABLE t2 (c INT); CREATE VIEW v AS SELECT t1.* FROM t1 JOIN t2; +--disable_ps2_protocol SELECT a, b INTO OUTFILE '15645.data' FROM t1; +--enable_ps2_protocol --error ER_WRONG_USAGE LOAD DATA INFILE '15645.data' IGNORE INTO TABLE v (a,b); --error ER_WRONG_USAGE diff --git a/mysql-test/main/lock_multi.test b/mysql-test/main/lock_multi.test index 5cc7219b01d..a9a9341b82d 100644 --- a/mysql-test/main/lock_multi.test +++ b/mysql-test/main/lock_multi.test @@ -8,6 +8,7 @@ drop DATABASE if exists mysqltest_1; # Test to see if select will get the lock ahead of low priority update +--disable_ps2_protocol connect (locker,localhost,root,,); connect (locker2,localhost,root,,); connect (reader,localhost,root,,); @@ -87,6 +88,7 @@ select release_lock("mysqltest_lock"); connection writer; reap; drop table t1; +--enable_ps2_protocol # # Test problem when using locks with multi-updates diff --git a/mysql-test/main/log_slow.test b/mysql-test/main/log_slow.test index d2e314cf667..c92dc76a48a 100644 --- a/mysql-test/main/log_slow.test +++ b/mysql-test/main/log_slow.test @@ -44,6 +44,7 @@ show fields from mysql.slow_log; # # Check flush command # +--disable_ps2_protocol flush slow logs; @@ -115,6 +116,7 @@ select * from t; show session status like 'Slow_queries'; drop table t; +--enable_ps2_protocol --echo # --echo # End of 10.3 tests diff --git a/mysql-test/main/log_tables-big.test b/mysql-test/main/log_tables-big.test index fa8810ecd3b..0861c79126e 100644 --- a/mysql-test/main/log_tables-big.test +++ b/mysql-test/main/log_tables-big.test @@ -16,6 +16,7 @@ connect (con2,localhost,root,,); # # Bug #27638: slow logging to CSV table inserts bad query_time and lock_time values # +--disable_ps2_protocol connection con1; set session long_query_time=10; select get_lock('bug27638', 1); @@ -36,5 +37,6 @@ connection default; disconnect con1; disconnect con2; +--enable_ps2_protocol set @@global.log_output = @log_output.saved; diff --git a/mysql-test/main/log_tables.test b/mysql-test/main/log_tables.test index 97a143a8fa5..b63ad9f4a5c 100644 --- a/mysql-test/main/log_tables.test +++ b/mysql-test/main/log_tables.test @@ -1051,12 +1051,14 @@ INSERT INTO t1 VALUES (2,2,2); INSERT INTO t1 VALUES (3,3,3); INSERT INTO t1 VALUES (4,4,4); +--disable_ps2_protocol SELECT SQL_NO_CACHE 'Bug#31700 - SCAN',f1,f2,f3,SLEEP(1.1) FROM t1 WHERE f3=4; SELECT SQL_NO_CACHE 'Bug#31700 - KEY', f1,f2,f3,SLEEP(1.1) FROM t1 WHERE f2=3; SELECT SQL_NO_CACHE 'Bug#31700 - PK', f1,f2,f3,SLEEP(1.1) FROM t1 WHERE f1=2; --replace_column 1 TIMESTAMP SELECT start_time, rows_examined, rows_sent, sql_text FROM mysql.slow_log WHERE sql_text LIKE '%Bug#31700%' ORDER BY start_time; +--enable_ps2_protocol DROP TABLE t1; diff --git a/mysql-test/main/long_unique_bugs.test b/mysql-test/main/long_unique_bugs.test index c6cfd5f006a..0359ac7e7ed 100644 --- a/mysql-test/main/long_unique_bugs.test +++ b/mysql-test/main/long_unique_bugs.test @@ -12,7 +12,9 @@ insert into t1 () values (),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(), (),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(), (),(),(),(); +--disable_ps2_protocol select * into outfile 'load.data' from t1; +--enable_ps2_protocol create temporary table tmp (a varchar(1024), b int, c int, d int, e linestring, unique (e)); load data infile 'load.data' into table tmp; delete from tmp; @@ -223,7 +225,9 @@ drop table t1; --echo # CREATE TABLE t1 (data VARCHAR(4), unique(data) using hash) with system versioning; INSERT INTO t1 VALUES ('A'); +--disable_ps2_protocol SELECT * INTO OUTFILE 'load.data' from t1; +--enable_ps2_protocol --error ER_DUP_ENTRY LOAD DATA INFILE 'load.data' INTO TABLE t1; select * from t1; @@ -237,7 +241,9 @@ DROP TABLE t1; CREATE TABLE t1 (data VARCHAR(7961)) ENGINE=InnoDB; INSERT INTO t1 VALUES ('f'), ('o'), ('o'); +--disable_ps2_protocol SELECT * INTO OUTFILE 'load.data' from t1; +--enable_ps2_protocol ALTER IGNORE TABLE t1 ADD UNIQUE INDEX (data); SELECT * FROM t1; diff --git a/mysql-test/main/merge.test b/mysql-test/main/merge.test index c22cf3950c1..82d34f16493 100644 --- a/mysql-test/main/merge.test +++ b/mysql-test/main/merge.test @@ -2023,7 +2023,9 @@ BEGIN RETURN (SELECT MAX(c1) FROM tm1); END| DELIMITER ;| +--disable_ps2_protocol SELECT f1() FROM (SELECT 1 UNION SELECT 1) c1; +--enable_ps2_protocol DROP FUNCTION f1; DROP TABLE tm1, t1, t2; # diff --git a/mysql-test/main/myisam_mrr.test b/mysql-test/main/myisam_mrr.test index 11c9aa64ef1..66188622a82 100644 --- a/mysql-test/main/myisam_mrr.test +++ b/mysql-test/main/myisam_mrr.test @@ -273,6 +273,7 @@ drop table t1; --echo # --echo # Test of MRR handler counters --echo # +--disable_ps2_protocol flush status; show status like 'Handler_mrr%'; create table t0 (a int); @@ -321,6 +322,7 @@ show status like 'handler_mrr%'; set join_cache_level= @join_cache_level_save; set join_buffer_size= @join_buffer_size_save; +--enable_ps2_protocol drop table t0, t1; diff --git a/mysql-test/main/mysqldump.test b/mysql-test/main/mysqldump.test index 78f0976ce6a..2720b27a18c 100644 --- a/mysql-test/main/mysqldump.test +++ b/mysql-test/main/mysqldump.test @@ -2810,6 +2810,7 @@ drop database d; --echo # MDEV-21786: --echo # mysqldump will forget sequence definition details on --no-data dump --echo # +--disable_ps2_protocol create database d; CREATE SEQUENCE d.s1 START WITH 100 INCREMENT BY 10 MINVALUE=100 MAXVALUE=1100 CYCLE; @@ -2860,6 +2861,7 @@ show create sequence d2.s1; drop sequence d.s1, d.s2, d.s3, d.s4; drop database d; drop database d2; +--enable_ps2_protocol --echo # --echo # MDEV-20070 diff --git a/mysql-test/main/nested_profiling.test b/mysql-test/main/nested_profiling.test index ba89aefc647..eff348ea5dd 100644 --- a/mysql-test/main/nested_profiling.test +++ b/mysql-test/main/nested_profiling.test @@ -29,7 +29,9 @@ SET GLOBAL profiling=on; create user mysqltest1@localhost; connect (con1,localhost,mysqltest1,,); connection con1; +--disable_ps2_protocol SELECT @a, @b; +--enable_ps2_protocol --replace_column 2 # SHOW PROFILES; diff --git a/mysql-test/main/null.test b/mysql-test/main/null.test index bf1a9c3bd1f..7c5a32e4307 100644 --- a/mysql-test/main/null.test +++ b/mysql-test/main/null.test @@ -1084,6 +1084,7 @@ DROP TABLE t1; # Testing with side effects +--disable_ps2_protocol CREATE TABLE t1 (a INT); INSERT INTO t1 VALUES (1),(2),(3); SET @a=0; @@ -1092,6 +1093,7 @@ SELECT @a; SET @a=0; SELECT NULLIF(AVG(a),0), NULLIF(AVG(LAST_VALUE(@a:=@a+1,a)),0) FROM t1; SELECT @a; +--enable_ps2_protocol # There should not be cache in here: diff --git a/mysql-test/main/null_key.test b/mysql-test/main/null_key.test index 7eabd6d5dc3..0759e99b524 100644 --- a/mysql-test/main/null_key.test +++ b/mysql-test/main/null_key.test @@ -233,6 +233,7 @@ SELECT COUNT(*) FROM t3; EXPLAIN SELECT SQL_CALC_FOUND_ROWS * FROM t1 LEFT JOIN t2 ON t1.a=t2.a LEFT JOIN t3 ON t2.b=t3.b; FLUSH STATUS ; +--disable_ps2_protocol SELECT SQL_CALC_FOUND_ROWS * FROM t1 LEFT JOIN t2 ON t1.a=t2.a LEFT JOIN t3 ON t2.b=t3.b; @@ -240,6 +241,7 @@ SELECT SQL_CALC_FOUND_ROWS * FROM t1 LEFT JOIN t2 ON t1.a=t2.a SELECT FOUND_ROWS(); SHOW STATUS LIKE "handler_read%"; --enable_view_protocol +--enable_ps2_protocol DROP TABLE t1,t2,t3,t4; # End of 4.1 tests diff --git a/mysql-test/main/odbc.test b/mysql-test/main/odbc.test index f1d60e15bc8..4a125bfc72e 100644 --- a/mysql-test/main/odbc.test +++ b/mysql-test/main/odbc.test @@ -18,8 +18,11 @@ select {fn length("hello")}, { date "1997-10-20" }; create table t1 (a int not null auto_increment,b int not null,primary key (a,b)); insert into t1 SET A=NULL,B=1; insert into t1 SET a=null,b=2; +#Enable after fix MDEV-31307 +--disable_ps2_protocol select * from t1 where a is null and b=2; select * from t1 where a is null; +--enable_ps2_protocol explain select * from t1 where b is null; drop table t1; @@ -28,8 +31,11 @@ drop table t1; # CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY); INSERT INTO t1 VALUES (NULL); +#Enable after fix MDEV-31307 +--disable_ps2_protocol SELECT sql_no_cache a, last_insert_id() FROM t1 WHERE a IS NULL; SELECT sql_no_cache a, last_insert_id() FROM t1 WHERE a IS NULL; +--enable_ps2_protocol SELECT sql_no_cache a, last_insert_id() FROM t1; DROP TABLE t1; diff --git a/mysql-test/main/olap.test b/mysql-test/main/olap.test index 6f4048bf120..0a3d8e55858 100644 --- a/mysql-test/main/olap.test +++ b/mysql-test/main/olap.test @@ -450,6 +450,7 @@ DROP TABLE t; --echo # MDEV-14041 Server crashes in String::length on queries with functions and ROLLUP --echo # +--disable_ps2_protocol #enable view protocol after fix MDEV-28538 --disable_view_protocol @@ -460,6 +461,7 @@ SELECT HEX( RELEASE_LOCK( 'foo' ) ) AS f FROM t1 GROUP BY f WITH ROLLUP; DROP TABLE t1; --enable_view_protocol +--enable_ps2_protocol CREATE TABLE t1 (i INT); INSERT INTO t1 VALUES (1),(2); diff --git a/mysql-test/main/opt_trace.test b/mysql-test/main/opt_trace.test index 45db19ccf7b..6e3ce243e9b 100644 --- a/mysql-test/main/opt_trace.test +++ b/mysql-test/main/opt_trace.test @@ -21,6 +21,7 @@ create view v2 as select * from t1 where t1.a=1 group by t1.b; set optimizer_trace="enabled=on"; --echo # Mergeable views/derived tables +--disable_ps2_protocol --disable_view_protocol select * from v1; select * from information_schema.OPTIMIZER_TRACE; @@ -31,6 +32,7 @@ select * from information_schema.OPTIMIZER_TRACE; select * from v2; select * from information_schema.OPTIMIZER_TRACE; --enable_view_protocol +--enable_ps2_protocol drop table t1,t2; drop view v1,v2; drop function f1; diff --git a/mysql-test/main/opt_trace_security.test b/mysql-test/main/opt_trace_security.test index cf45a64d30b..414cd8f437a 100644 --- a/mysql-test/main/opt_trace_security.test +++ b/mysql-test/main/opt_trace_security.test @@ -66,7 +66,9 @@ grant show view on db1.v1 to 'bar'@'%'; --change_user foo select current_user(); set optimizer_trace="enabled=on"; +--disable_ps2_protocol select * from db1.v1; +--enable_ps2_protocol select * from information_schema.OPTIMIZER_TRACE; set optimizer_trace="enabled=off"; diff --git a/mysql-test/main/opt_tvc.test b/mysql-test/main/opt_tvc.test index f8469f22aa1..e08f0a3f664 100644 --- a/mysql-test/main/opt_tvc.test +++ b/mysql-test/main/opt_tvc.test @@ -347,6 +347,8 @@ DROP TABLE t1; --echo # MDEV-14835: conversion to TVC with BIGINT or YEAR values --echo # +#Enable after fix MDEV-31178 +--disable_ps2_protocol SET @@in_predicate_conversion_threshold= 2; CREATE TABLE t1 (a BIGINT); @@ -362,6 +364,7 @@ SELECT * FROM t2 WHERE y IN ('2009','2011'); DROP TABLE t1,t2; SET @@in_predicate_conversion_threshold= default; +--enable_ps2_protocol --echo # --echo # MDEV-17222: conversion to TVC with no names for constants diff --git a/mysql-test/main/order_by.test b/mysql-test/main/order_by.test index 3a5004d0aae..8aebc509ca7 100644 --- a/mysql-test/main/order_by.test +++ b/mysql-test/main/order_by.test @@ -1463,6 +1463,7 @@ SELECT * FROM t1 WHERE f1>10 ORDER BY f2, f0 LIMIT 0; SELECT * FROM t1 WHERE f1>10 ORDER BY f2, f0 LIMIT 10 OFFSET 10; SELECT * FROM t1 WHERE f1>10 ORDER BY f2, f0 LIMIT 0 OFFSET 10; +--disable_ps2_protocol ################ ## Test with SQL_CALC_FOUND_ROWS set sort_buffer_size= 32768; @@ -1509,6 +1510,7 @@ SELECT SQL_CALC_FOUND_ROWS * FROM t1 JOIN tmp on t1.f2=tmp.f2 WHERE t1.f2>20 ORDER BY tmp.f1, f0 LIMIT 30 OFFSET 30; SELECT FOUND_ROWS(); +--enable_ps2_protocol ################ ## Test views @@ -1533,6 +1535,7 @@ GROUP BY 1 ORDER BY 2,1 LIMIT 0; ################ ## Test SP +--disable_ps2_protocol delimiter |; CREATE PROCEDURE wl1393_sp_test() BEGIN @@ -1546,6 +1549,7 @@ END| CALL wl1393_sp_test()| DROP PROCEDURE wl1393_sp_test| delimiter ;| +--enable_ps2_protocol ################ ## Test with subqueries @@ -1880,6 +1884,7 @@ insert into t1 analyze table t1; --enable_result_log +--disable_ps2_protocol explain select b, count(*) num_cnt from t1 where a > 9750 group by b order by num_cnt; @@ -1899,6 +1904,7 @@ select b, count(*) num_cnt from t1 where a > 9750 group by b order by num_cnt limit 1; --enable_result_log show status like '%Handler_read%'; +--enable_ps2_protocol drop table t0, t1; diff --git a/mysql-test/main/order_by_sortkey.test b/mysql-test/main/order_by_sortkey.test index 43de028496e..4a875b60078 100644 --- a/mysql-test/main/order_by_sortkey.test +++ b/mysql-test/main/order_by_sortkey.test @@ -57,7 +57,9 @@ set sort_buffer_size= 32768; FLUSH STATUS; SHOW SESSION STATUS LIKE 'Sort%'; +--disable_ps2_protocol SELECT * FROM t1 ORDER BY f2 LIMIT 100; +--enable_ps2_protocol SHOW SESSION STATUS LIKE 'Sort%'; diff --git a/mysql-test/main/outfile.test b/mysql-test/main/outfile.test index 9f2fc22da99..7f8f31bc748 100644 --- a/mysql-test/main/outfile.test +++ b/mysql-test/main/outfile.test @@ -8,6 +8,7 @@ enable_query_log; # Save the initial number of concurrent sessions --source include/count_sessions.inc +--disable_ps2_protocol # # test of into outfile|dumpfile @@ -139,3 +140,4 @@ drop database mysqltest; # Wait till we reached the initial number of concurrent sessions --source include/wait_until_count_sessions.inc +--enable_ps2_protocol diff --git a/mysql-test/main/outfile_loaddata.test b/mysql-test/main/outfile_loaddata.test index f9e2a357ed3..fa2c5a47051 100644 --- a/mysql-test/main/outfile_loaddata.test +++ b/mysql-test/main/outfile_loaddata.test @@ -5,6 +5,7 @@ DROP TABLE IF EXISTS t1, t2; #enable view protocol after fix MDEV-27871 -- source include/no_view_protocol.inc +--disable_ps2_protocol --echo # --echo # Bug#31663 FIELDS TERMINATED BY special character --echo # @@ -291,7 +292,7 @@ let $length= 800; SELECT LENGTH(a) FROM t2; DROP TABLE t1, t2; - +--enable_ps2_protocol ########################################################################### --echo # End of 5.1 tests. diff --git a/mysql-test/main/partition.test b/mysql-test/main/partition.test index 40736d3a08f..9374ff78091 100644 --- a/mysql-test/main/partition.test +++ b/mysql-test/main/partition.test @@ -474,6 +474,7 @@ INSERT INTO `t2` VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13), EXPLAIN PARTITIONS SELECT c1 FROM t1 WHERE (c1 > 10 AND c1 < 13) OR (c1 > 17 AND c1 < 20); +--disable_ps2_protocol FLUSH STATUS; SELECT c1 FROM t1 WHERE (c1 > 10 AND c1 < 13) OR (c1 > 17 AND c1 < 20); SHOW STATUS LIKE 'Handler_read_%'; @@ -484,6 +485,7 @@ FLUSH STATUS; SELECT c1 FROM t2 WHERE (c1 > 10 AND c1 < 13) OR (c1 > 17 AND c1 < 20); SHOW STATUS LIKE 'Handler_read_%'; DROP TABLE t1,t2; +--enable_ps2_protocol # Bug#37329 Range scan on partitioned tables shows higher Handler_read_next # (marked as duplicate of Bug#35931) @@ -505,6 +507,7 @@ INSERT INTO `t2` VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13), EXPLAIN PARTITIONS SELECT c1 FROM t1 WHERE (c1 > 2 AND c1 < 5); +--disable_ps2_protocol FLUSH STATUS; SELECT c1 FROM t1 WHERE (c1 > 2 AND c1 < 5); SHOW STATUS LIKE 'Handler_read_%'; @@ -527,6 +530,7 @@ FLUSH STATUS; SELECT c1 FROM t2 WHERE (c1 > 12 AND c1 < 15); SHOW STATUS LIKE 'Handler_read_%'; DROP TABLE t1,t2; +--enable_ps2_protocol --error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED create table t1 (a int) partition by list ((a/3)*10 div 1) diff --git a/mysql-test/main/partition_explicit_prune.test b/mysql-test/main/partition_explicit_prune.test index 9d9b7e782ce..610bdf4435b 100644 --- a/mysql-test/main/partition_explicit_prune.test +++ b/mysql-test/main/partition_explicit_prune.test @@ -10,6 +10,7 @@ WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; --echo # Bug#13559657: PARTITION SELECTION DOES NOT WORK WITH VIEWS --echo # --disable_view_protocol +--disable_ps2_protocol CREATE TABLE t1 (a int) ENGINE = InnoDB PARTITION BY HASH (a) PARTITIONS 2; @@ -85,7 +86,6 @@ SELECT * FROM v1; SELECT * FROM t1; DROP VIEW v1; DROP TABLE t1; ---enable_service_connection --echo # Original tests for WL#5217 --echo # Must have InnoDB as engine to get the same statistics results. @@ -101,7 +101,6 @@ eval $get_handler_status_counts; eval $get_handler_status_counts; --echo # OK, seems to add number of variables processed before HANDLER_WRITE --echo # and number of variables + 1 evaluated in the previous call in RND_NEXT ---disable_service_connection CREATE TABLE t1 (a INT NOT NULL, b varchar (64), @@ -622,6 +621,7 @@ eval $get_handler_status_counts; SELECT * FROM t3 PARTITION (pNeg); DROP TABLE t1, t2, t3; +--enable_ps2_protocol --enable_view_protocol --echo # Test from superseeded WL# 2682 # Partition select tests. diff --git a/mysql-test/main/partition_range.test b/mysql-test/main/partition_range.test index 52497764241..d5ba34df376 100644 --- a/mysql-test/main/partition_range.test +++ b/mysql-test/main/partition_range.test @@ -963,6 +963,7 @@ ANALYZE TABLE t1,t2; EXPLAIN SELECT a, MAX(b) FROM t1 WHERE a IN (10,100) GROUP BY a; EXPLAIN SELECT a, MAX(b) FROM t2 WHERE a IN (10,100) GROUP BY a; +--disable_ps2_protocol FLUSH status; SELECT a, MAX(b) FROM t1 WHERE a IN (10, 100) GROUP BY a; --echo # Should be no more than 4 reads. @@ -972,6 +973,7 @@ FLUSH status; SELECT a, MAX(b) FROM t2 WHERE a IN (10, 100) GROUP BY a; --echo # Should be no more than 4 reads. SHOW status LIKE 'handler_read_key'; +--enable_ps2_protocol --echo # --echo # MDEV-18501 Partition pruning doesn't work for historical queries diff --git a/mysql-test/main/precedence.test b/mysql-test/main/precedence.test index b93aea72e65..7837b34afc2 100644 --- a/mysql-test/main/precedence.test +++ b/mysql-test/main/precedence.test @@ -4495,7 +4495,10 @@ select 2 BETWEEN 1 AND 3 IN (SELECT 0 UNION SELECT 1), 2 BETWEEN 1 AND (3 IN (SE create or replace view v1 as select 2 LIKE 1 ESCAPE 3 IN (SELECT 0 UNION SELECT 1), 2 LIKE 1 ESCAPE (3 IN (SELECT 0 UNION SELECT 1)), (2 LIKE 1 ESCAPE 3) IN (SELECT 0 UNION SELECT 1); Select view_definition from information_schema.views where table_schema='test' and table_name='v1'; +#Enable after fix MDEV-31282 +--disable_ps2_protocol select 2 LIKE 1 ESCAPE 3 IN (SELECT 0 UNION SELECT 1), 2 LIKE 1 ESCAPE (3 IN (SELECT 0 UNION SELECT 1)), (2 LIKE 1 ESCAPE 3) IN (SELECT 0 UNION SELECT 1) union select * from v1; +--enable_ps2_protocol create or replace view v1 as select 3 BETWEEN 1 AND 2 AND NULL, 3 BETWEEN (1 AND 2) AND NULL, 3 BETWEEN 1 AND (2 AND NULL), (3 BETWEEN 1 AND 2) AND NULL; Select view_definition from information_schema.views where table_schema='test' and table_name='v1'; diff --git a/mysql-test/main/preload.test b/mysql-test/main/preload.test index 69949fccedc..f03ec16bff6 100644 --- a/mysql-test/main/preload.test +++ b/mysql-test/main/preload.test @@ -56,6 +56,7 @@ insert into t1(b) select b from t2; select count(*) from t1; select count(*) from t2; +--disable_ps2_protocol flush tables; flush status; show status like "key_read%"; @@ -99,6 +100,7 @@ flush tables; flush status; show status like "key_read%"; load index into cache t3 key (b), t2 key (c) ; show status like "key_read%"; +--enable_ps2_protocol drop table t1, t2; diff --git a/mysql-test/main/profiling.test b/mysql-test/main/profiling.test index 714c68c00c7..8ba66e6617c 100644 --- a/mysql-test/main/profiling.test +++ b/mysql-test/main/profiling.test @@ -1,6 +1,7 @@ --source include/have_profiling.inc --source include/no_view_protocol.inc +--disable_ps2_protocol # Verify that the protocol isn't violated if we ask for profiling info # before profiling has recorded anything. show profiles; @@ -257,7 +258,7 @@ drop function if exists f1; #--eval select 1; select 2; select 3; ## two continuations, one starting #select state from information_schema.profiling where seq=1 order by query_id desc limit 3; - +--enable_ps2_protocol ## last thing in the file set session profiling = OFF; diff --git a/mysql-test/main/ps.test b/mysql-test/main/ps.test index e260803a8d3..a24d045d63b 100644 --- a/mysql-test/main/ps.test +++ b/mysql-test/main/ps.test @@ -466,6 +466,7 @@ deallocate prepare stmt; # Bug#6088 "FOUND_ROWS returns wrong values for prepared statements when # LIMIT is used" # +--disable_ps2_protocol create table t1 (a int); insert into t1 (a) values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10); prepare stmt from "select sql_calc_found_rows * from t1 limit 2"; @@ -477,6 +478,7 @@ execute stmt; select found_rows(); deallocate prepare stmt; drop table t1; +--enable_ps2_protocol # # Bug#6047 "permission problem when executing mysql_stmt_execute with derived @@ -558,13 +560,14 @@ drop table t1; # # Bug #6089: FOUND_ROWS returns wrong values when no table/view is used # - +--disable_ps2_protocol prepare stmt from "SELECT SQL_CALC_FOUND_ROWS 'foo' UNION SELECT 'bar' LIMIT 0"; execute stmt; SELECT FOUND_ROWS(); execute stmt; SELECT FOUND_ROWS(); deallocate prepare stmt; +--enable_ps2_protocol # # Bug#9096 "select doesn't return all matched records if prepared statements @@ -1412,11 +1415,13 @@ DEALLOCATE PREPARE b12651; # Bug #14956: ROW_COUNT() returns incorrect result after EXECUTE of prepared # statement # +--disable_ps2_protocol create table t1 (id int); prepare ins_call from "insert into t1 (id) values (1)"; execute ins_call; select row_count(); drop table t1; +--enable_ps2_protocol # # BUG#16474: SP crashed MySQL @@ -3568,8 +3573,10 @@ flush status; execute st; show status like '%Handler_read%'; flush status; +--disable_ps2_protocol select * from t1 use index() where a=3; show status like '%Handler_read%'; +--enable_ps2_protocol flush status; execute st; show status like '%Handler_read%'; diff --git a/mysql-test/main/ps_11bugs.test b/mysql-test/main/ps_11bugs.test index ccab833e878..1888de060fc 100644 --- a/mysql-test/main/ps_11bugs.test +++ b/mysql-test/main/ps_11bugs.test @@ -203,7 +203,9 @@ END| DELIMITER ;| +--disable_ps2_protocol SELECT * FROM t2 WHERE a = @@sort_buffer_size AND p1(@@sort_buffer_size + 1) > a - 1; +--enable_ps2_protocol DROP TABLE t2; DROP FUNCTION p1; diff --git a/mysql-test/main/query_cache.test b/mysql-test/main/query_cache.test index 81d35824e6d..f4913c99d1c 100644 --- a/mysql-test/main/query_cache.test +++ b/mysql-test/main/query_cache.test @@ -3,6 +3,7 @@ -- source include/no_valgrind_without_big.inc -- source include/no_view_protocol.inc +--disable_ps2_protocol set @save_query_cache_size=@@query_cache_size; # # Tests with query cache @@ -1805,3 +1806,4 @@ drop table t1; --echo restore defaults SET GLOBAL query_cache_type= default; SET GLOBAL query_cache_size=@save_query_cache_size; +--enable_ps2_protocol diff --git a/mysql-test/main/query_cache_merge.test b/mysql-test/main/query_cache_merge.test index 9b342d57a8e..c3267d628b9 100644 --- a/mysql-test/main/query_cache_merge.test +++ b/mysql-test/main/query_cache_merge.test @@ -38,6 +38,7 @@ while ($1) # prepare and execute, and we will get a constant validation # error. See WL#4165 for details. # +--disable_ps2_protocol --disable_view_protocol set @save_table_definition_cache= @@global.table_definition_cache; set @@global.table_definition_cache=512; @@ -54,6 +55,7 @@ drop table t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t2 SET @@global.query_cache_size=0; set @@global.table_definition_cache=@save_table_definition_cache; --enable_view_protocol +--enable_ps2_protocol # End of 4.1 tests diff --git a/mysql-test/main/query_cache_notembedded.test b/mysql-test/main/query_cache_notembedded.test index 03c9d9e4cd4..f660ca9d13e 100644 --- a/mysql-test/main/query_cache_notembedded.test +++ b/mysql-test/main/query_cache_notembedded.test @@ -113,6 +113,7 @@ disconnect root2; # query in QC from normal execution and SP (Bug#6897) # improved to also test Bug#3583 and Bug#12990 # +--disable_ps2_protocol flush query cache; reset query cache; flush status; @@ -191,6 +192,7 @@ drop procedure f2; drop procedure f3; drop procedure f4; drop table t1; +--enable_ps2_protocol # # Bug#14767 INSERT in SF + concurrent SELECT with query cache diff --git a/mysql-test/main/query_cache_with_views.test b/mysql-test/main/query_cache_with_views.test index e472a7dd478..6740c70883e 100644 --- a/mysql-test/main/query_cache_with_views.test +++ b/mysql-test/main/query_cache_with_views.test @@ -13,6 +13,8 @@ set @save_query_cache_type=@@global.query_cache_type; set GLOBAL query_cache_type=ON; set LOCAL query_cache_type=ON; set GLOBAL query_cache_size=1355776; + +--disable_ps2_protocol flush status; create table t1 (a int, b int); @@ -32,11 +34,13 @@ select * from v2; show status like "Qcache_queries_in_cache"; show status like "Qcache_inserts"; show status like "Qcache_hits"; +--enable_ps2_protocol drop view v1,v2; # SQL_CACHE option set query_cache_type=demand; +--disable_ps2_protocol flush status; # query with view will be cached, but direct acess to table will not create view v1 (c,d) as select sql_cache a,b from t1; @@ -61,6 +65,7 @@ show status like "Qcache_inserts"; show status like "Qcache_hits"; drop view v1; set query_cache_type=default; +--enable_ps2_protocol drop table t1; @@ -105,6 +110,7 @@ drop table t1; # # BUG#15119: returning temptable view from the query cache. # +--disable_ps2_protocol flush status; create table t1 (a int, b int); create algorithm=temptable view v1 as select * from t1; @@ -130,6 +136,7 @@ show status like "Qcache_queries_in_cache"; show status like "Qcache_inserts"; show status like "Qcache_hits"; drop table t1; +--enable_ps2_protocol --echo # --echo # Bug46615 Assertion in Query_cache::invalidate in INSERT in a VIEW of a MERGE table diff --git a/mysql-test/main/range_debug.test b/mysql-test/main/range_debug.test index ef331cdc84f..25783dbe285 100644 --- a/mysql-test/main/range_debug.test +++ b/mysql-test/main/range_debug.test @@ -10,7 +10,9 @@ insert into t2 select 2*(A.a + 10*(B.a + 10*C.a)) from t1 A, t1 B, t1 C; set in_predicate_conversion_threshold= 2000; set @a="select * from t2 force index (a) where a NOT IN(0"; +--disable_ps2_protocol select count(*) from (select @a:=concat(@a, ',', a) from t2 ) Z; +--enable_ps2_protocol set @a=concat(@a, ')'); insert into t2 values (11),(13),(15); diff --git a/mysql-test/main/range_vs_index_merge.test b/mysql-test/main/range_vs_index_merge.test index 81bf9c10b3a..c71811fa74d 100644 --- a/mysql-test/main/range_vs_index_merge.test +++ b/mysql-test/main/range_vs_index_merge.test @@ -698,6 +698,7 @@ DROP INDEX CityName on City; CREATE INDEX Name ON City(Name); CREATE INDEX Population ON City(Population); +--disable_ps2_protocol --disable_view_protocol --replace_column 9 # EXPLAIN @@ -759,6 +760,7 @@ SELECT * FROM City ORDER BY Population LIMIT 5; SHOW STATUS LIKE 'Handler_read_%'; --enable_view_protocol +--enable_ps2_protocol set optimizer_switch=@save_optimizer_switch; diff --git a/mysql-test/main/reset_connection.test b/mysql-test/main/reset_connection.test index dd4edc7a959..ff9b1450111 100644 --- a/mysql-test/main/reset_connection.test +++ b/mysql-test/main/reset_connection.test @@ -6,6 +6,7 @@ FLUSH STATUS; --disable_query_log --disable_service_connection +--disable_ps2_protocol let $i = 10; begin; while ($i) @@ -14,6 +15,7 @@ while ($i) SELECT 1; } commit; +--enable_ps2_protocol --enable_query_log --enable_result_log diff --git a/mysql-test/main/select.test b/mysql-test/main/select.test index ed8783d40f4..cff0038ae4d 100644 --- a/mysql-test/main/select.test +++ b/mysql-test/main/select.test @@ -2184,6 +2184,7 @@ drop table t2; # # Bug #11745: SELECT ... FROM DUAL with WHERE condition # +--disable_ps2_protocol --disable_view_protocol CREATE TABLE t1 (a int, b int, c int); INSERT INTO t1 @@ -2203,8 +2204,9 @@ select count(*) from t1 limit 2,3; select found_rows(); select SQL_CALC_FOUND_ROWS count(*) from t1 limit 2,3; select found_rows(); ---enable_view_protocol DROP TABLE t1; +--enable_view_protocol +--enable_ps2_protocol # # Bug 7672 Unknown column error in order clause @@ -3731,6 +3733,7 @@ DROP TABLE t1; # # Bug #32942 now() - interval '7200' second is NOT pre-calculated, causing "full table scan" # +--disable_ps2_protocol --disable_view_protocol CREATE TABLE t1 (a INT, b INT); CREATE TABLE t2 (a INT, c INT, KEY(a)); @@ -3746,6 +3749,8 @@ SELECT DISTINCT b FROM t1 LEFT JOIN t2 USING(a) WHERE c <= 3; SHOW STATUS LIKE 'Handler_read%'; DROP TABLE t1, t2; --enable_view_protocol +--enable_ps2_protocol + # # Bug#40953 SELECT query throws "ERROR 1062 (23000): Duplicate entry..." error # @@ -4104,7 +4109,9 @@ END;| delimiter ;| SET @cnt := 0; +--disable_ps2_protocol SELECT * FROM t1 WHERE a = f1(); +--enable_ps2_protocol SELECT @cnt; EXPLAIN EXTENDED SELECT * FROM t1 WHERE a = f1(); DROP TABLE t1, t2; diff --git a/mysql-test/main/select_found.test b/mysql-test/main/select_found.test index 4b6bdbb15e1..dac16fdb727 100644 --- a/mysql-test/main/select_found.test +++ b/mysql-test/main/select_found.test @@ -10,6 +10,7 @@ drop table if exists t1,t2; --enable_warnings +--disable_ps2_protocol create table t1 (a int not null auto_increment, b int not null, primary key(a)); insert into t1 (b) values (2),(3),(5),(5),(5),(6),(7),(9); select SQL_CALC_FOUND_ROWS * from t1; @@ -292,3 +293,4 @@ select found_rows(); select sql_calc_found_rows * from t1 order by c1 limit 2,1; select found_rows(); drop table t1; +--enable_ps2_protocol diff --git a/mysql-test/main/selectivity.test b/mysql-test/main/selectivity.test index b0c440718d1..7ba7065ef1c 100644 --- a/mysql-test/main/selectivity.test +++ b/mysql-test/main/selectivity.test @@ -1093,14 +1093,18 @@ set @save_use_stat_tables= @@use_stat_tables; set @@use_stat_tables='complementary'; set @@optimizer_use_condition_selectivity=4; SET @cnt= 0; +--disable_ps2_protocol SELECT * FROM t1 WHERE a = f1(); +--enable_ps2_protocol SELECT @cnt; set @@use_stat_tables='preferably'; analyze table t1 persistent for all; SET @cnt := 0; set @@optimizer_use_condition_selectivity=4; +--disable_ps2_protocol SELECT * FROM t1 WHERE a = f1(); +--enable_ps2_protocol SELECT @cnt; alter table t1 force; drop table t1; diff --git a/mysql-test/main/set_statement.test b/mysql-test/main/set_statement.test index aae7cea40d1..f9d7c098327 100644 --- a/mysql-test/main/set_statement.test +++ b/mysql-test/main/set_statement.test @@ -976,6 +976,7 @@ SET STATEMENT keycache1.key_buffer_size=1024 FOR SELECT 1; # # MDEV-6940: SET STATEMENT executed after SET GLOBAL does not work # +--disable_ps2_protocol --disable_view_protocol set @save_general_log=@@global.general_log; --echo # SET STATEMENT works (OK) @@ -1038,6 +1039,7 @@ set statement long_query_time=0.01,min_examined_row_limit=50 for select sleep(0. select sql_text from mysql.slow_log where sql_text not like 'set @@long_query_time%'; --echo #--- --enable_view_protocol +--enable_ps2_protocol # # log_slow_verbosity is impossible to check because results are not written # in TABLE mode diff --git a/mysql-test/main/set_statement_notembedded_binlog.test b/mysql-test/main/set_statement_notembedded_binlog.test index b0c00008d4f..22a0e5fc749 100644 --- a/mysql-test/main/set_statement_notembedded_binlog.test +++ b/mysql-test/main/set_statement_notembedded_binlog.test @@ -41,7 +41,9 @@ DELIMITER ;| call mtr.add_suppression("Unsafe statement written to the binary log using"); +--disable_ps2_protocol select f1() from t2; +--enable_ps2_protocol --replace_column 1 x 2 x 3 x 4 x 5 x show binlog events limit 16, 100; @@ -71,7 +73,9 @@ BEGIN end| DELIMITER ;| +--disable_ps2_protocol select f1() from t2; +--enable_ps2_protocol --replace_column 1 x 2 x 3 x 4 x 5 x show binlog events limit 13, 100; diff --git a/mysql-test/main/show_check.test b/mysql-test/main/show_check.test index 38bcb5f14e7..bc44a76322c 100644 --- a/mysql-test/main/show_check.test +++ b/mysql-test/main/show_check.test @@ -608,8 +608,10 @@ show tables; show status like 'slow_queries'; # Table scan query, to ensure that slow_queries does still get incremented # (mysqld is started with --log-queries-not-using-indexes) +--disable_ps2_protocol select 1 from information_schema.tables limit 1; show status like 'slow_queries'; +--enable_ps2_protocol create table t1 (a int); create trigger tr1 before insert on t1 for each row @@ -969,6 +971,7 @@ DROP FUNCTION f1; # # Bug#28808 log_queries_not_using_indexes variable dynamic change is ignored # +--disable_ps2_protocol flush status; show variables like "log_queries_not_using_indexes"; select 1 from information_schema.tables limit 1; @@ -981,6 +984,7 @@ set session log_queries_not_using_indexes=ON; show variables like "log_queries_not_using_indexes"; select 1 from information_schema.tables limit 1; show status like 'slow_queries'; +--enable_ps2_protocol # # Bug#30088 Can't disable myisam-recover by a value of "" diff --git a/mysql-test/main/show_profile.test b/mysql-test/main/show_profile.test index fe923d74a0e..969fb49a3eb 100644 --- a/mysql-test/main/show_profile.test +++ b/mysql-test/main/show_profile.test @@ -10,6 +10,7 @@ -- source include/no_view_protocol.inc --source include/have_profiling.inc +--disable_ps2_protocol SET profiling = 1; SELECT 1; --replace_column 2 # @@ -19,4 +20,4 @@ SHOW PROFILE FOR QUERY 1; SHOW PROFILE CPU FOR QUERY 1; --enable_result_log SET profiling = 0; - +--enable_ps2_protocol diff --git a/mysql-test/main/single_delete_update.test b/mysql-test/main/single_delete_update.test index 4a4ad5e5a8e..0f2dc189e94 100644 --- a/mysql-test/main/single_delete_update.test +++ b/mysql-test/main/single_delete_update.test @@ -6,6 +6,7 @@ # an additional util connection and other statistics data -- source include/no_view_protocol.inc +--disable_ps2_protocol --echo # --echo # Bug #30584: delete with order by and limit clauses does not use --echo # limit efficiently @@ -455,4 +456,4 @@ SHOW STATUS LIKE 'Handler_read_%'; SELECT * FROM t2 WHERE c = 10 ORDER BY a DESC, b DESC; DROP TABLE t1, t2; - +--enable_ps2_protocol diff --git a/mysql-test/main/sp-error.test b/mysql-test/main/sp-error.test index b3c999592df..07c82d4b616 100644 --- a/mysql-test/main/sp-error.test +++ b/mysql-test/main/sp-error.test @@ -8,9 +8,11 @@ drop table if exists t1, t2; --enable_warnings +--disable_ps2_protocol # Backup the mysql.proc table --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval SELECT * FROM mysql.proc INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/proc.txt'; +--enable_ps2_protocol # Make sure we don't have any procedures left. delete from mysql.proc; @@ -419,6 +421,7 @@ unlock tables| # Check that in functions we don't allow to update tables which # are used by statements which invoke these functions. # +--disable_ps2_protocol --disable_warnings drop function if exists f1| --enable_warnings @@ -442,7 +445,7 @@ select * from t1| # Cleanup delete from t1 where val= 17| drop function f1| - +--enable_ps2_protocol # # BUG#1965 @@ -2273,7 +2276,9 @@ begin return 1; end| delimiter ;| +--disable_ps2_protocol select f2(); +--enable_ps2_protocol drop function f2; --error ER_BAD_TABLE_ERROR @@ -3474,6 +3479,7 @@ DROP PROCEDURE p13; --echo # Bug#12731619: NESTED SP HANDLERS CAN TRIGGER ASSERTION --echo +--disable_ps2_protocol --disable_warnings DROP FUNCTION IF EXISTS f1; DROP TABLE IF EXISTS t1; @@ -3523,7 +3529,7 @@ SELECT * FROM t1; DROP FUNCTION f1; DROP TABLE t1; - +--enable_ps2_protocol --echo --echo # Check that handled SQL-conditions are properly cleared from DA. diff --git a/mysql-test/main/sp-prelocking.test b/mysql-test/main/sp-prelocking.test index fd754a9371c..94db36167fa 100644 --- a/mysql-test/main/sp-prelocking.test +++ b/mysql-test/main/sp-prelocking.test @@ -408,8 +408,10 @@ BEGIN END ! DELIMITER ;! +--disable_ps2_protocol --echo # Without the patch, an error was getting reported. SELECT f1(); +--enable_ps2_protocol DROP FUNCTION f1; DROP VIEW v1; diff --git a/mysql-test/main/sp-vars.test b/mysql-test/main/sp-vars.test index ba8cd4f5ca8..1d577814c1b 100644 --- a/mysql-test/main/sp-vars.test +++ b/mysql-test/main/sp-vars.test @@ -1015,7 +1015,9 @@ BEGIN END| delimiter ;| +--disable_ps2_protocol SELECT f1('_aBcDe_'); +--enable_ps2_protocol SELECT * FROM t1; @@ -1434,6 +1436,7 @@ end| create table t1 (a int)| insert into t1 (a) values (1), (2)| +--disable_ps2_protocol set @b=1| set @a=0| select f1(), @b from t1| @@ -1441,6 +1444,7 @@ select f1(), @b from t1| set @b:='test'| set @a=0| select f1(), @b from t1| +--enable_ps2_protocol delimiter ;| diff --git a/mysql-test/main/sp.test b/mysql-test/main/sp.test index 39bab1c40fa..84ad4ea7453 100644 --- a/mysql-test/main/sp.test +++ b/mysql-test/main/sp.test @@ -722,6 +722,7 @@ begin insert into test.t1 values (concat(x, "2"), y+2); end| +--disable_ps2_protocol # Check that file does not exists --error 1 --file_exists $MYSQLTEST_VARDIR/tmp/spout @@ -729,6 +730,7 @@ call into_outfile("ofile", 1)| --remove_file $MYSQLTEST_VARDIR/tmp/spout delete from t1| drop procedure into_outfile| +--enable_ps2_protocol --disable_warnings drop procedure if exists into_dumpfile| @@ -1148,6 +1150,7 @@ begin insert into t1 values ("a", 1), ("b", 2), ("c", 3); end| +--disable_ps2_protocol call rc()| select row_count()| --disable_ps_protocol @@ -1161,7 +1164,7 @@ select row_count()| select * from t1| select row_count()| drop procedure rc| - +--enable_ps2_protocol # # Let us test how well new locking scheme works. @@ -1661,6 +1664,7 @@ begin end if; return x; end| +--disable_ps2_protocol select * from t1 where data = getcount("bar")| select * from t3| select getcount("zip")| @@ -1669,6 +1673,7 @@ select * from t3| select getcount(id) from t1 where data = 3| select getcount(id) from t1 where data = 5| select * from t3| +--enable_ps2_protocol drop table t3| drop function getcount| @@ -3161,6 +3166,7 @@ begin insert into t3 values (1); end| +--disable_ps2_protocol call bug4905()| select row_count()| call bug4905()| @@ -3168,6 +3174,7 @@ select row_count()| call bug4905()| select row_count()| select * from t3| +--enable_ps2_protocol drop procedure bug4905| drop table t3| @@ -3765,8 +3772,10 @@ if (`select @@have_query_cache='YES'`) { --enable_query_log set @x = 1| insert into t1 values ("qc", 42)| +--disable_ps2_protocol select bug9902() from t1| select bug9902() from t1| +--enable_ps2_protocol select @x| --echo # Restore the old query cache size @@ -6234,7 +6243,9 @@ CREATE FUNCTION bug19862(x INT) RETURNS INT RETURN x+1; END| INSERT INTO t12 VALUES (1), (2)| +--disable_ps2_protocol SELECT bug19862(a) FROM t12 ORDER BY 1| +--enable_ps2_protocol SELECT * FROM t11| DROP TABLE t11, t12| DROP FUNCTION bug19862| @@ -6799,7 +6810,9 @@ END| CREATE FUNCTION bug23760_rc_test(in_var INT) RETURNS INT RETURN in_var| INSERT INTO bug23760 (num) VALUES (0), (1), (1), (2), (3), (5), (8)| +--disable_ps2_protocol SELECT ROW_COUNT()| +--enable_ps2_protocol CALL bug23760_test_row_count()| SELECT * FROM bug23760_log ORDER BY id| @@ -6809,14 +6822,18 @@ SELECT @save_max_sp_recursion| SET max_sp_recursion_depth= 5| SELECT @@max_sp_recursion_depth| CALL bug23760_test_row_count2(2)| +--disable_ps2_protocol SELECT ROW_COUNT()| +--enable_ps2_protocol SELECT * FROM bug23760_log ORDER BY id| SELECT * FROM bug23760 ORDER by ID| SET max_sp_recursion_depth= @save_max_sp_recursion| SELECT bug23760_rc_test(123)| INSERT INTO bug23760 (num) VALUES (13), (21), (34), (55)| +--disable_ps2_protocol SELECT bug23760_rc_test(ROW_COUNT())| +--enable_ps2_protocol DROP TABLE bug23760, bug23760_log| DROP PROCEDURE bug23760_update_log| diff --git a/mysql-test/main/sp_trans.test b/mysql-test/main/sp_trans.test index 7d6faba9789..1ceb54007e5 100644 --- a/mysql-test/main/sp_trans.test +++ b/mysql-test/main/sp_trans.test @@ -83,7 +83,9 @@ create function bug10015_4(i int) returns int insert into t2 values (i, m); return m; end| +--disable_ps2_protocol select *, bug10015_4(id) from t1| +--enable_ps2_protocol select * from t2| drop function bug10015_4| # Now let us test how statement rollback works @@ -327,10 +329,14 @@ commit| set autocommit= 1| # Let us test that savepoints work inside of functions # even in auto-commit mode +--disable_ps2_protocol select bug13825_3(0)| +--enable_ps2_protocol select * from t1| delete from t1| +--disable_ps2_protocol select bug13825_3(1)| +--enable_ps2_protocol select * from t1| delete from t1| # Curious case: rolling back to savepoint which is set by first diff --git a/mysql-test/main/statistics.test b/mysql-test/main/statistics.test index 8d9ef79b69f..e6b300b5db2 100644 --- a/mysql-test/main/statistics.test +++ b/mysql-test/main/statistics.test @@ -319,6 +319,7 @@ SELECT * FROM mysql.column_stats; SELECT * FROM mysql.index_stats; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_ps2_protocol eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/save_column_stats' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n' @@ -328,6 +329,7 @@ eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/save_index_stats' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n' FROM mysql.index_stats WHERE index_name IN ('idx1', 'idx4'); +--enable_ps2_protocol ALTER TABLE t1 CHANGE COLUMN b x varchar(30); SHOW CREATE TABLE t1; diff --git a/mysql-test/main/status2.test b/mysql-test/main/status2.test index ea674c2ed7c..339e853f2fc 100644 --- a/mysql-test/main/status2.test +++ b/mysql-test/main/status2.test @@ -3,6 +3,7 @@ --echo # --echo # Bug#24289 Status Variable "Questions" gets wrong values with Stored Routines --echo # +--disable_ps2_protocol FLUSH STATUS; DELIMITER $$; CREATE FUNCTION testQuestion() RETURNS INTEGER @@ -64,6 +65,7 @@ DROP TRIGGER trigg1; DROP FUNCTION testQuestion; DROP EVENT ev1; DROP TABLE t1,t2; +--enable_ps2_protocol --echo # --echo # End of 5.5 tests diff --git a/mysql-test/main/subselect.test b/mysql-test/main/subselect.test index 77da710a535..a17fc408500 100644 --- a/mysql-test/main/subselect.test +++ b/mysql-test/main/subselect.test @@ -1166,6 +1166,7 @@ DROP TABLE t1; # Bug#2198 SELECT INTO OUTFILE (with Sub-Select) Problem # +--disable_ps2_protocol create table t1 (a int, b decimal(13, 3)); insert into t1 values (1, 0.123); let $outfile_abs= $MYSQLTEST_VARDIR/tmp/subselect.out.file.1; @@ -1178,7 +1179,7 @@ eval load data infile "$outfile_rel" into table t1; --remove_file $outfile_abs select * from t1; drop table t1; - +--enable_ps2_protocol # # Bug#2479 dependant subquery with limit crash @@ -5843,6 +5844,7 @@ SELECT WHERE b = a AND (b = alias1.b OR EXISTS (SELECT * FROM t3))) AS m FROM t2 alias1, t1 alias2, t1 alias3; +--disable_ps2_protocol flush status; SELECT @@ -5870,6 +5872,7 @@ FROM t2 alias1, t1 alias2, t1 alias3; show status like "subquery_cache%"; show status like '%Handler_read%'; +--enable_ps2_protocol drop table t1, t2, t3; @@ -5915,8 +5918,10 @@ set global userstat=on; flush table_statistics; flush index_statistics; +--disable_ps2_protocol SELECT MIN(b) FROM ( SELECT * FROM t1, t2, t3 WHERE d = b ) AS alias1 WHERE SLEEP(0.1) OR c < 'p' OR b = ( SELECT MIN(b) FROM t2 ); +--enable_ps2_protocol --echo # The following shows that t2 was indeed scanned with a full scan. show table_statistics; diff --git a/mysql-test/main/subselect3.inc b/mysql-test/main/subselect3.inc index af7b45542bd..881cda2e736 100644 --- a/mysql-test/main/subselect3.inc +++ b/mysql-test/main/subselect3.inc @@ -57,7 +57,9 @@ select a, oref, a in ( create table t3 (a int); insert into t3 values (NULL), (NULL); flush status; +--disable_ps2_protocol select a in (select max(ie) from t1 where oref=4 group by grp) from t3; +--enable_ps2_protocol show status like 'Handler_read_rnd_next'; select ' ^ This must show 11' Z; @@ -92,6 +94,7 @@ select oref, a, a in (select a from t1 where oref=t2.oref) Z from t2; explain extended select oref, a, a in (select a from t1 where oref=t2.oref) Z from t2; +--disable_ps2_protocol flush status; select oref, a from t2 where a in (select a from t1 where oref=t2.oref); # This will only show access to t2: @@ -107,6 +110,7 @@ select oref, a, a in (select a from t1 where oref=t2.oref) Z from t2; show status like '%Handler_read%'; select 'No key lookups, seq reads: 29= 5 reads from t2 + 4 * 6 reads from t1.' Z; set @@optimizer_switch=@save_optimizer_switch; +--enable_ps2_protocol drop table t1, t2; @@ -637,7 +641,9 @@ DROP TABLE t1, t2; create table t1 (a int, b decimal(13, 3)); insert into t1 values (1, 0.123); +--disable_ps2_protocol select a, (select max(b) from t1) into outfile "subselect.out.file.1" from t1; +--enable_ps2_protocol delete from t1; load data infile "subselect.out.file.1" into table t1; select * from t1; @@ -805,6 +811,7 @@ FLUSH STATUS; set @save_optimizer_switch2=@@optimizer_switch; set optimizer_switch='subquery_cache=off'; +--disable_ps2_protocol --echo SELECT i1, i2 FROM t1 @@ -831,6 +838,7 @@ WHERE (i1, i2) --echo # Handler_read_rnd_next should be one more than baseline --echo # (read record from t1, but do not read from t2) SHOW STATUS LIKE '%Handler_read_rnd_next'; +--enable_ps2_protocol set @@optimizer_switch=@save_optimizer_switch2; DROP TABLE t1,t2; @@ -969,7 +977,9 @@ set @@max_heap_table_size= 16384; explain select count(*) from t0 A, t0 B, t0 C, t0 D where D.a in (select a from t1 E where a+1 < 10000 + A.a + B.a +C.a+D.a); flush status; +--disable_ps2_protocol select count(*) from t0 A, t0 B, t0 C, t0 D where D.a in (select a from t1 E where a+1 < 10000 + A.a + B.a +C.a+D.a); +--enable_ps2_protocol show status like 'Created_tmp_disk_tables'; set @save_max_heap_table_size=@@max_heap_table_size; set @@optimizer_switch=@save_optimizer_switch; diff --git a/mysql-test/main/subselect4.test b/mysql-test/main/subselect4.test index 3283779ff4b..1db2a576612 100644 --- a/mysql-test/main/subselect4.test +++ b/mysql-test/main/subselect4.test @@ -1766,7 +1766,8 @@ EXPLAIN SELECT MAX(a), 1 >= ALL ( SELECT b FROM t2 ) AS bb FROM t1; SELECT MAX(a), 1 >= ALL ( SELECT b FROM t2 ) AS bb FROM t1; - +#enable after fix MDEV-31270 +--disable_ps2_protocol EXPLAIN SELECT MAX(a), ( SELECT 1 FROM t2 where b = a) AS bb FROM t1; SELECT MAX(a), ( SELECT 1 FROM t2 where b = a) AS bb FROM t1; @@ -1778,6 +1779,7 @@ SELECT MAX(a), a in ( SELECT b FROM t2 ) AS bb FROM t1; EXPLAIN SELECT MAX(a), a >= ALL ( SELECT b FROM t2 ) AS bb FROM t1; SELECT MAX(a), a >= ALL ( SELECT b FROM t2 ) AS bb FROM t1; +--enable_ps2_protocol drop table t1, t2; diff --git a/mysql-test/main/subselect_cache.test b/mysql-test/main/subselect_cache.test index 6b6fc4773f1..d5bad32aa64 100644 --- a/mysql-test/main/subselect_cache.test +++ b/mysql-test/main/subselect_cache.test @@ -22,6 +22,7 @@ insert into t2 values (2,3),(3,4),(5,6),(4,1); --echo * Test subquery as top item in different clauses --echo * --echo #single value subquery test (SELECT list) +--disable_ps2_protocol flush status; select a, (select d from t2 where b=c) from t1; @@ -341,7 +342,7 @@ flush status; select a, b, (select exists (select * from t2 where b=d) from t2 where b=c) as SUNS1 from t1; show status like "subquery_cache%"; show status like '%Handler_read%'; - +--enable_ps2_protocol --echo #clean up drop table t1,t2; @@ -421,6 +422,7 @@ DROP TABLE t1; --echo #uncacheable queries test (random and side effect) +--disable_ps2_protocol flush status; CREATE TABLE t1 (a int); INSERT INTO t1 VALUES (2), (4), (1), (3); @@ -431,6 +433,7 @@ show status like "subquery_cache%"; select a, a in (select a from t1 where -1 < benchmark(a,100)) from t1 as ext; show status like "subquery_cache%"; drop table t1; +--enable_ps2_protocol --echo #test of sql_big_tables switch and outer table reference in subquery with grouping set big_tables=1; @@ -456,6 +459,7 @@ insert into t1 values (2,1), (3,1), (2,4), (3,4), (10,2), (20,2), (2,5), (3,5), (100,3), (200,3), (10,6), (20,6), (20,7), (100,8), (200,8); insert into t2 values (1,1),(3,3),(20,20); +--disable_ps2_protocol --echo aggregate function as parameter of subquery set optimizer_switch='subquery_cache=off'; flush status; @@ -480,6 +484,7 @@ flush status; select max(a), (select a from t2 where a=c) from t1 group by b; show status like "subquery_cache%"; show status like '%Handler_read%'; +--enable_ps2_protocol drop table t1,t2; @@ -494,6 +499,7 @@ insert into t1 values create table t2 (pk int, a int, primary key(pk)); insert into t2 select a,a from t0; +--disable_ps2_protocol set optimizer_switch='default,semijoin=on,materialization=on,subquery_cache=on'; flush status; select * from t1 where a in (select pk from t2); @@ -525,6 +531,7 @@ flush status; select * from t1 where a in (select pk from t2); show status like "subquery_cache%"; show status like '%Handler_read%'; +--enable_ps2_protocol drop table t0,t1,t2; @@ -1308,6 +1315,7 @@ CREATE TABLE `t4` ( ) ENGINE=MyISAM AUTO_INCREMENT=101 DEFAULT CHARSET=latin1; INSERT INTO `t4` VALUES (100,2,5,'2001-07-26','2001-07-26','11:49:25','11:49:25','2007-04-25 05:08:49','2007-04-25 05:08:49','f','f'); +--disable_ps2_protocol SET @@optimizer_switch = 'subquery_cache=off'; /* cache is off */ SELECT COUNT( DISTINCT table2 .`col_int_key` ) , ( @@ -1325,6 +1333,7 @@ FROM t3 SUBQUERY2_t1 JOIN t2 ON SUBQUERY2_t1 .`col_int_key` WHERE table1 .`col_varchar_key` ) , table2 .`col_varchar_nokey` field10 FROM t4 table1 JOIN ( t1 table2 STRAIGHT_JOIN t1 table3 ON table2 .`pk` ) ON table3 .`col_varchar_key` = table2 .`col_varchar_key` GROUP BY field10 ; +--enable_ps2_protocol drop table t1,t2,t3,t4; set @@optimizer_switch= default; diff --git a/mysql-test/main/subselect_sj_mat.test b/mysql-test/main/subselect_sj_mat.test index 362d090c004..b5657199ebd 100644 --- a/mysql-test/main/subselect_sj_mat.test +++ b/mysql-test/main/subselect_sj_mat.test @@ -523,6 +523,8 @@ where a1 in (select substring(b1,1,512) from t2_512 where b1 > '0'); # group_concat with a blob argument - depends on # the variable group_concat_max_len, and # convert_blob_length == max_len*collation->mbmaxlen > CONVERT_IF_BIGGER_TO_BLOB +#Check after fix MDEV-31276 +--disable_ps2_protocol explain extended select left(a1,7), left(a2,7) from t1_512 where a1 in (select group_concat(b1) from t2_512 group by b2); @@ -540,6 +542,7 @@ where a1 in (select group_concat(b1) from t2_512 group by b2); select left(a1,7), left(a2,7) from t1_512 where a1 in (select group_concat(b1) from t2_512 group by b2); +--enable_ps2_protocol drop table t1_512, t2_512, t3_512; @@ -605,6 +608,8 @@ where a1 in (select substring(b1,1,1024) from t2_1024 where b1 > '0'); # group_concat with a blob argument - depends on # the variable group_concat_max_len, and # convert_blob_length == max_len*collation->mbmaxlen > CONVERT_IF_BIGGER_TO_BLOB +#Check after fix MDEV-31276 +--disable_ps2_protocol explain extended select left(a1,7), left(a2,7) from t1_1024 where a1 in (select group_concat(b1) from t2_1024 group by b2); @@ -622,6 +627,7 @@ where a1 in (select group_concat(b1) from t2_1024 group by b2); select left(a1,7), left(a2,7) from t1_1024 where a1 in (select group_concat(b1) from t2_1024 group by b2); +--enable_ps2_protocol drop table t1_1024, t2_1024, t3_1024; @@ -687,6 +693,8 @@ where a1 in (select substring(b1,1,1025) from t2_1025 where b1 > '0'); # group_concat with a blob argument - depends on # the variable group_concat_max_len, and # convert_blob_length == max_len*collation->mbmaxlen > CONVERT_IF_BIGGER_TO_BLOB +#Check after fix MDEV-31276 +--disable_ps2_protocol explain extended select left(a1,7), left(a2,7) from t1_1025 where a1 in (select group_concat(b1) from t2_1025 group by b2); @@ -704,6 +712,7 @@ where a1 in (select group_concat(b1) from t2_1025 group by b2); select left(a1,7), left(a2,7) from t1_1025 where a1 in (select group_concat(b1) from t2_1025 group by b2); +--enable_ps2_protocol drop table t1_1025, t2_1025, t3_1025; diff --git a/mysql-test/main/tc_heuristic_recover.test b/mysql-test/main/tc_heuristic_recover.test index 8cbf7d61143..c240ff2df51 100644 --- a/mysql-test/main/tc_heuristic_recover.test +++ b/mysql-test/main/tc_heuristic_recover.test @@ -43,8 +43,10 @@ set debug_sync='ha_commit_trans_after_prepare WAIT_FOR go'; --echo # Prove that no COMMIT or ROLLBACK occurred yet. SELECT * FROM t1; +--disable_ps2_protocol SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; SELECT * FROM t1; +--enable_ps2_protocol # TODO: MDEV-12700 Allow innodb_read_only startup without prior slow shutdown. --source include/kill_mysqld.inc @@ -90,8 +92,10 @@ SELECT * FROM t1; SET TRANSACTION ISOLATION LEVEL READ COMMITTED; SELECT * FROM t1; +--disable_ps2_protocol SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; SELECT * FROM t1; +--enable_ps2_protocol # # Cleanup # diff --git a/mysql-test/main/trigger-compat.test b/mysql-test/main/trigger-compat.test index 4d9160c7728..9c102993a6f 100644 --- a/mysql-test/main/trigger-compat.test +++ b/mysql-test/main/trigger-compat.test @@ -68,9 +68,11 @@ let $MYSQLD_DATADIR = `select @@datadir`; eval LOAD DATA LOCAL INFILE '$MYSQLD_DATADIR/mysqltest_db1/t1.TRG' INTO TABLE patch; # remove original t1.TRG file so SELECT INTO OUTFILE won't fail --remove_file $MYSQLD_DATADIR/mysqltest_db1/t1.TRG +--disable_ps2_protocol eval SELECT SUBSTRING_INDEX(a,'definers=',1) INTO OUTFILE '$MYSQLD_DATADIR/mysqltest_db1/t1.TRG' FROM patch; +--enable_ps2_protocol DROP TABLE patch; --connection wl2818_definer_con --enable_query_log diff --git a/mysql-test/main/trigger-trans.test b/mysql-test/main/trigger-trans.test index 17656c3516e..b79743d49f3 100644 --- a/mysql-test/main/trigger-trans.test +++ b/mysql-test/main/trigger-trans.test @@ -91,6 +91,7 @@ begin end| delimiter ;| +--disable_ps2_protocol # Establish an alternative connection. --connect (connection_aux,localhost,root,,test,,) --connect (connection_update,localhost,root,,test,,) @@ -122,6 +123,8 @@ connection connection_aux; select release_lock("lock_bug26141_wait"); connection default; reap; +--enable_ps2_protocol + select * from t1; select * from t2; select * from t3; diff --git a/mysql-test/main/trigger_notembedded.test b/mysql-test/main/trigger_notembedded.test index 9f89e66bbfe..82e97dd3988 100644 --- a/mysql-test/main/trigger_notembedded.test +++ b/mysql-test/main/trigger_notembedded.test @@ -820,6 +820,7 @@ USE test; # # Bug #26162: Trigger DML ignores low_priority_updates setting # +--disable_ps2_protocol CREATE TABLE t1 (id INTEGER); CREATE TABLE t2 (id INTEGER); @@ -889,6 +890,7 @@ DROP TRIGGER t1_test; DROP TABLE t1,t2; SET SESSION LOW_PRIORITY_UPDATES=DEFAULT; SET GLOBAL LOW_PRIORITY_UPDATES=DEFAULT; +--enable_ps2_protocol --echo End of 5.0 tests. diff --git a/mysql-test/main/type_date.test b/mysql-test/main/type_date.test index cbc3c67bf64..81cad6b5af5 100644 --- a/mysql-test/main/type_date.test +++ b/mysql-test/main/type_date.test @@ -787,6 +787,7 @@ DROP TABLE t1; --echo # --echo # MDEV-29890 Update with inner join false row count result --echo # +--disable_ps2_protocol set sql_mode='NO_ZERO_DATE'; create table t1 (a1 bigint primary key, a2 date not null, a3 bigint not null); create table t2 (b1 bigint primary key); @@ -800,6 +801,7 @@ set sql_mode='NO_ZERO_DATE'; update t1 inner join t2 on t1.a3 = t2.b1 set t1.a2 = t1.a2 + interval 1 day; drop table t1, t2; set sql_mode=default; +--enable_ps2_protocol --echo # --echo # End of 10.4 tests diff --git a/mysql-test/main/type_datetime.test b/mysql-test/main/type_datetime.test index 5816977029d..4a14bee4319 100644 --- a/mysql-test/main/type_datetime.test +++ b/mysql-test/main/type_datetime.test @@ -287,6 +287,7 @@ drop table t1; # Bug#28261: Wrong DATETIME comparison result when the GET_USER_VAR function # is involved. # +--disable_ps2_protocol create table t1(f1 date); insert into t1 values('01-01-01'),('02-02-02'),('01-01-01'),('02-02-02'); set @bug28261=''; @@ -294,6 +295,7 @@ select if(@bug28261 = f1, '', @bug28261:= f1) from t1; select if(@bug28261 = f1, '', @bug28261:= f1) from t1; select if(@bug28261 = f1, '', @bug28261:= f1) from t1; drop table t1; +--enable_ps2_protocol # # Bug#28778: Wrong result of BETWEEN when comparing a DATETIME field with an diff --git a/mysql-test/main/type_newdecimal.test b/mysql-test/main/type_newdecimal.test index 070b465b71a..366199e8aa8 100644 --- a/mysql-test/main/type_newdecimal.test +++ b/mysql-test/main/type_newdecimal.test @@ -1215,7 +1215,9 @@ CREATE TABLE t1 (a int DEFAULT NULL, b int DEFAULT NULL); INSERT INTO t1 VALUES (3,30), (1,10), (2,10); SET @a= CAST(1 AS decimal); +--disable_ps2_protocol SELECT 1 FROM t1 GROUP BY @b := @a, @b; +--enable_ps2_protocol DROP TABLE t1; diff --git a/mysql-test/main/type_timestamp.test b/mysql-test/main/type_timestamp.test index c8517656071..3df9aa4671b 100644 --- a/mysql-test/main/type_timestamp.test +++ b/mysql-test/main/type_timestamp.test @@ -403,12 +403,14 @@ INSERT INTO t2 VALUES( '2010-02-01 09:31:11' ); --echo # The bug would cause the range optimizer's comparison to use an open --echo # interval here. This reveals itself only in the number of reads --echo # performed. +--disable_ps2_protocol FLUSH STATUS; --replace_column 1 x 2 x 3 x 5 x 6 x 7 x 8 x 9 x 10 x EXPLAIN SELECT * FROM t2 WHERE a < '2010-02-01 09:31:02.0'; SELECT * FROM t2 WHERE a < '2010-02-01 09:31:02.0'; SHOW STATUS LIKE 'Handler_read_next'; +--enable_ps2_protocol DROP TABLE t1, t2; @@ -740,7 +742,9 @@ FLUSH TABLES; # 0xFF - record flags # 0x77777777 - TIMESTAMP integer part # 0xFFFFFF - TIMESTAMP bad fractional part +--disable_ps2_protocol --eval SELECT CONCAT(0xFF,0x77777777,0xFFFFFF) INTO OUTFILE '$MYSQLD_DATADIR/test/t1.MYD' FIELDS TERMINATED BY '' ESCAPED BY '' LINES TERMINATED BY '' +--enable_ps2_protocol --eval SELECT HEX(LOAD_FILE('$MYSQLD_DATADIR/test/t1.MYD')) AS MYD --enable_query_log SELECT a, CAST(a AS DATETIME) AS dt0, CAST(a AS DATETIME(6)) AS dt6 FROM t1; diff --git a/mysql-test/main/type_year.test b/mysql-test/main/type_year.test index c4fb45a60fc..c281bdb7d97 100644 --- a/mysql-test/main/type_year.test +++ b/mysql-test/main/type_year.test @@ -185,7 +185,10 @@ insert t1 values (0,2000); select a from t1 where a=2000; # constant. select a from t1 where a=1000+1000; # still a constant. # select a from t1 where a=(select 2000); # even this is a constant +#Check after fix MDEV-31277 +--disable_ps2_protocol select a from t1 where a=(select 2000 from dual where 1); # constant, but "expensive" +--enable_ps2_protocol select a from t1 where a=y2k(); # constant, but "expensive" select a from t1 where a=b; # not a constant drop table t1; diff --git a/mysql-test/main/union.test b/mysql-test/main/union.test index 31c02edb324..278958d800c 100644 --- a/mysql-test/main/union.test +++ b/mysql-test/main/union.test @@ -22,6 +22,7 @@ select 't1',b,count(*) from t1 group by b UNION select 't2',b,count(*) from t2 g --error ER_TABLENAME_NOT_ALLOWED_HERE (select a,b from t1 limit 2) union all (select a,b from t2 order by a limit 1) order by t1.b; explain extended (select a,b from t1 limit 2) union all (select a,b from t2 order by a limit 1) order by b desc; +--disable_ps2_protocol --disable_view_protocol select count(*) from ( (select a,b from t1 limit 2) union all (select a,b from t2 order by a)) q; @@ -32,6 +33,7 @@ select a,b from t1 union all select a,b from t2) q; select sql_calc_found_rows a,b from t1 union all select a,b from t2 limit 2; select found_rows(); --enable_view_protocol +--enable_ps2_protocol # # Test some error conditions with UNION # @@ -206,6 +208,7 @@ insert into t1 values (1),(2),(3); create table t2 (a int); insert into t2 values (3),(4),(5); +--disable_ps2_protocol --disable_view_protocol # Test global limits SELECT COUNT(*) FROM ( @@ -233,14 +236,17 @@ SELECT COUNT(*) FROM ( (SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 1) UNION SELECT * FROM t2 LIMIT 1; select found_rows(); --enable_view_protocol +--enable_ps2_protocol # In these case found_rows() should work --error ER_PARSE_ERROR SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 1 UNION all SELECT * FROM t2 LIMIT 2; +--disable_ps2_protocol --disable_view_protocol SELECT SQL_CALC_FOUND_ROWS * FROM t1 UNION all SELECT * FROM t2 LIMIT 2; select found_rows(); --enable_view_protocol +--enable_ps2_protocol # The following examples will not be exact SELECT COUNT(*) FROM ( @@ -248,16 +254,20 @@ SELECT * FROM t1 UNION SELECT * FROM t2) q; SELECT SQL_CALC_FOUND_ROWS * FROM t1 UNION SELECT * FROM t2 LIMIT 2; SELECT COUNT(*) FROM ( (SELECT * FROM t1 LIMIT 1) UNION all SELECT * FROM t2) q; +--disable_ps2_protocol --disable_view_protocol (SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 1) UNION all SELECT * FROM t2 LIMIT 2; select found_rows(); --enable_view_protocol +--enable_ps2_protocol SELECT COUNT(*) FROM ( SELECT * FROM t1 UNION all SELECT * FROM t2) q; +--disable_ps2_protocol --disable_view_protocol SELECT SQL_CALC_FOUND_ROWS * FROM t1 UNION SELECT * FROM t2 LIMIT 100; select found_rows(); --enable_view_protocol +--enable_ps2_protocol --error ER_PARSE_ERROR SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 100 UNION SELECT * FROM t2; SELECT COUNT(*) FROM ( @@ -273,10 +283,12 @@ SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 1 UNION SELECT * FROM t2 LIMIT 2; SELECT COUNT(*) FROM ( (SELECT * FROM t1 LIMIT 1) UNION SELECT * FROM t2) q; (SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 1) UNION SELECT * FROM t2 LIMIT 2; +--disable_ps2_protocol --disable_view_protocol SELECT SQL_CALC_FOUND_ROWS * FROM t1 UNION SELECT * FROM t2 LIMIT 2,2; select found_rows(); --enable_view_protocol +--enable_ps2_protocol SELECT COUNT(*) FROM ( SELECT * FROM t1 UNION SELECT * FROM t2) q; --error ER_PARSE_ERROR @@ -508,6 +520,7 @@ insert t1 select a+1, a+b from t1; insert t1 select a+1, a+b from t1; insert t1 select a+1, a+b from t1; FLUSH STATUS; +--disable_ps2_protocol --disable_view_protocol show status like 'Slow_queries'; select count(*) from t1 where a=7; @@ -523,6 +536,7 @@ flush status; select a from t1 where b not in (1,2,3) union select a from t1 where b not in (4,5,6); show status like 'Slow_queries'; --enable_view_protocol +--enable_ps2_protocol drop table t1; # @@ -1096,6 +1110,7 @@ DROP TABLE t1; -- echo # Bug#32858: Error: "Incorrect usage of UNION and INTO" does not take -- echo # subselects into account -- echo # +--disable_ps2_protocol CREATE TABLE t1 (a INT); INSERT INTO t1 VALUES (1); @@ -1141,6 +1156,7 @@ SELECT ( SELECT a UNION SELECT a ) INTO DUMPFILE 'union.out.file4' FROM t1; DROP TABLE t1; remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.1/data/test union.out.fil*; +--enable_ps2_protocol --echo # --echo # Bug #49734: Crash on EXPLAIN EXTENDED UNION ... ORDER BY @@ -1367,11 +1383,13 @@ INSERT INTO t17059925 VALUES (1), (2), (3); INSERT INTO t2 VALUES (4), (5), (6); INSERT INTO t3 VALUES (7), (8), (9); TRUNCATE table mysql.slow_log; ---sorted_result +--disable_ps2_protocol --disable_view_protocol +--sorted_result SELECT * FROM t17059925 UNION SELECT * FROM t2 UNION SELECT * FROM t3; SELECT sql_text, rows_examined FROM mysql.slow_log WHERE sql_text LIKE '%SELECT%t17059925%'; --enable_view_protocol +--enable_ps_protocol DROP TABLE t17059925, t2, t3; ## Reset to initial values diff --git a/mysql-test/main/update.test b/mysql-test/main/update.test index 147d69d50c9..0dbc3c333ee 100644 --- a/mysql-test/main/update.test +++ b/mysql-test/main/update.test @@ -234,11 +234,13 @@ create table t1 ( a int, b int default 0, index (a) ); insert into t1 (a) values (0),(0),(0),(0),(0),(0),(0),(0); # the view protocol creates an additional statistics data +--disable_ps2_protocol --disable_view_protocol flush status; select a from t1 order by a limit 1; show status like 'handler_read%'; --enable_view_protocol +--enable_ps2_protocol flush status; update t1 set a=9999 order by a limit 1; @@ -344,6 +346,7 @@ INSERT INTO t1(user_id) SELECT user_id FROM t1; INSERT INTO t1(user_id) SELECT user_id FROM t1; INSERT INTO t1(user_id) SELECT user_id FROM t1; +--disable_ps2_protocol flush status; SELECT user_id FROM t1 WHERE request_id=9999999999999; show status like '%Handler_read%'; @@ -353,6 +356,7 @@ UPDATE t1 SET user_id=null WHERE request_id=9999999999999; show status like '%Handler_read%'; UPDATE t1 SET user_id=null WHERE request_id=999999999999999999999999999999; show status like '%Handler_read%'; +--enable_ps2_protocol DROP TABLE t1; diff --git a/mysql-test/main/user_var.test b/mysql-test/main/user_var.test index dad50c439b6..a6003d14554 100644 --- a/mysql-test/main/user_var.test +++ b/mysql-test/main/user_var.test @@ -25,6 +25,7 @@ explain select @vv1:=i from t1 where i=@vv1; explain select * from t1 where i=@vv1; drop table t1,t2; +--disable_ps2_protocol # Check types of variables set @a=0,@b=0; select @a:=10, @b:=1, @a > @b, @a < @b; @@ -74,6 +75,7 @@ set @a=0; select @a,@a:="hello",@a,@a:=3,@a,@a:="hello again" from t1 group by i; select @a,@a:="hello",@a,@a:=3,@a,@a:="hello again" from t1 group by i; drop table t1; +--enable_ps2_protocol # # Bug #2244: User variables didn't copy collation and derivation @@ -263,7 +265,7 @@ drop table t1; # # Bug#26020: User-Defined Variables are not consistent with columns data types # - +--disable_ps2_protocol create table t1(b bigint); insert into t1 (b) values (10), (30), (10); set @var := 0; @@ -281,6 +283,7 @@ insert into t1 values (2), (3), (3), (4); set @lastid=-1; select @lastid != id, @lastid, @lastid := id from t1; drop table t1; +--enable_ps2_protocol # # Bug#42009: SELECT into variable gives different results to direct SELECT @@ -333,8 +336,10 @@ DROP TABLE t1; CREATE TABLE t1(a INT); INSERT INTO t1 VALUES (0),(0); +--disable_ps2_protocol --echo # BUG#55615 : should not crash SELECT (@a:=(SELECT @a:=1 FROM t1 LIMIT 1)) AND COUNT(1) FROM t1 GROUP BY @a; +--enable_ps2_protocol --echo # BUG#55564 : should not crash SELECT IF( @v:=LEAST((SELECT 1 FROM t1 t2 LEFT JOIN t1 ON (@v) GROUP BY t1.a), a), diff --git a/mysql-test/main/userstat-badlogin-4824.test b/mysql-test/main/userstat-badlogin-4824.test index 12cca9f12b3..0a7490bc29c 100644 --- a/mysql-test/main/userstat-badlogin-4824.test +++ b/mysql-test/main/userstat-badlogin-4824.test @@ -12,6 +12,7 @@ create user foo@localhost identified by 'foo'; flush user_statistics; set global userstat=1; +--disable_ps2_protocol connect(foo, localhost, foo, foo); select 1; disconnect foo; @@ -33,6 +34,7 @@ connection default; --replace_result 41 18 select user, bytes_received from information_schema.user_statistics where user = 'foo'; +--enable_ps2_protocol drop user foo@localhost; set global userstat=@save_userstat; diff --git a/mysql-test/main/userstat.test b/mysql-test/main/userstat.test index 6d486810db1..4aa10819d33 100644 --- a/mysql-test/main/userstat.test +++ b/mysql-test/main/userstat.test @@ -7,6 +7,7 @@ -- source include/have_log_bin.inc -- source include/have_perfschema.inc +--disable_ps2_protocol select variable_value from information_schema.global_status where variable_name="handler_read_key" into @global_read_key; show columns from information_schema.client_statistics; show columns from information_schema.user_statistics; @@ -125,6 +126,7 @@ select f() from information_schema.table_statistics; select f() from information_schema.index_statistics; set global userstat= 0; drop function f; +--enable_ps2_protocol --echo # --echo # End of 10.2 tests diff --git a/mysql-test/main/variables.test b/mysql-test/main/variables.test index 846d2665013..6030123bfb0 100644 --- a/mysql-test/main/variables.test +++ b/mysql-test/main/variables.test @@ -173,7 +173,9 @@ select * from information_schema.session_variables where variable_name like 'cha select @@timestamp>0; set @@rand_seed1=10000000,@@rand_seed2=1000000; +--disable_ps2_protocol select ROUND(RAND(),5); +--enable_ps2_protocol --echo diff --git a/mysql-test/main/view.test b/mysql-test/main/view.test index 385ca523436..d1981c7978c 100644 --- a/mysql-test/main/view.test +++ b/mysql-test/main/view.test @@ -2066,7 +2066,9 @@ set @tmp=@@optimizer_switch; set @@optimizer_switch='derived_merge=OFF'; create table t1(f1 char(1)); create view v1 as select * from t1; +--disable_ps2_protocol select * from (select f1 as f2, f1 as f3 from v1) v where v.f2='a'; +--enable_ps2_protocol --disable_ps_protocol show status like "Created_tmp%"; --enable_ps_protocol @@ -4148,6 +4150,7 @@ drop table t1,t2,t3,t4,t5,t6; --echo # Bug #59696 Optimizer does not use equalities for conditions over view --echo # +--disable_ps2_protocol CREATE TABLE t1 (a int NOT NULL); INSERT INTO t1 VALUES (9), (2), (8), (1), (3), (4), (2), (5), @@ -4173,6 +4176,7 @@ SHOW STATUS LIKE 'Handler_read_%'; DROP VIEW v; DROP TABLE t1, t2; +--enable_ps2_protocol --echo # --echo # Bug#702403: crash with multiple equalities and a view @@ -4595,10 +4599,14 @@ CREATE PROCEDURE p1() SELECT COUNT(*), GET_LOCK('blocker', 100) FROM v1; --disable_result_log CALL p1(); --enable_result_log +--disable_ps2_protocol SELECT RELEASE_LOCK('blocker'); +--enable_ps2_protocol connection con3; +--disable_ps2_protocol SELECT GET_LOCK('blocker', 100); +--enable_ps2_protocol connection default; --echo # Try to CALL p1() again, this time it should block on "blocker". @@ -4621,14 +4629,18 @@ let $wait_condition= WHERE state = "Waiting for table metadata lock" AND info = "DROP VIEW v1"; --source include/wait_condition.inc --echo # Now allow CALL p1() to complete +--disable_ps2_protocol SELECT RELEASE_LOCK('blocker'); +--enable_ps2_protocol connection default; --echo # Reaping: CALL p1() --disable_result_log --reap --enable_result_log +--disable_ps2_protocol SELECT RELEASE_LOCK('blocker'); +--enable_ps2_protocol connection con2; --echo # Reaping: DROP VIEW v1 @@ -6491,6 +6503,8 @@ DROP TABLE t1, t2; --echo # MDEV-23291: SUM column from a derived table returns invalid values --echo # +#Enable ps2 protocol after fix MDEV-31175 +--disable_ps2_protocol CREATE TABLE t1(a INT, b INT); INSERT INTO t1 VALUES (1,1), (2,2); @@ -6502,6 +6516,7 @@ SELECT sum(z) FROM v1; DROP TABLE t1; DROP VIEW v1; +--enable_ps2_protocol --echo # --echo # MDEV-26299: Some views force server (and mysqldump) to generate diff --git a/mysql-test/main/win.test b/mysql-test/main/win.test index 939c36e7c5e..9f6251a07cc 100644 --- a/mysql-test/main/win.test +++ b/mysql-test/main/win.test @@ -1016,6 +1016,7 @@ drop table t1; --echo # MDEV-9848: Window functions: reuse sorting and/or scanning --echo # +--disable_ps2_protocol create table t1 (a int, b int, c int); insert into t1 values (1,3,1), @@ -1065,6 +1066,7 @@ select from t1; drop table t1; +--enable_ps2_protocol --echo # @@ -2549,7 +2551,8 @@ drop table t1; --echo # --echo # MDEV-25630: Crash with window function in left expr of IN subquery --echo # - +#Enable after fix MDEV-31281 +--disable_ps2_protocol CREATE TABLE t1 (i int); INSERT INTO t1 VALUES (1),(2),(3); SELECT lag(i) over (ORDER BY i) IN ( SELECT 1 FROM t1 a) FROM t1; @@ -2559,6 +2562,7 @@ CREATE TABLE t1 (i int); INSERT INTO t1 VALUES (1),(2),(3); SELECT sum(i) over () IN ( SELECT 1 FROM t1 a) FROM t1; DROP TABLE t1; +--enable_ps2_protocol --echo # --echo # MDEV-25565: 2-nd call of SP with SELECT from view / derived table / CTE diff --git a/mysql-test/main/win_i_s.test b/mysql-test/main/win_i_s.test index d9b0f190285..89d28b7b5c4 100644 --- a/mysql-test/main/win_i_s.test +++ b/mysql-test/main/win_i_s.test @@ -1,3 +1,4 @@ +--disable_ps2_protocol show status like '%window%'; create table t1 (a int, b int); @@ -16,3 +17,4 @@ from (select a, b, rank() over (order by a) as r1 from t1) t_a, show status like '%window%'; drop table t1; +--enable_ps2_protocol diff --git a/mysql-test/suite/archive/rnd_pos.test b/mysql-test/suite/archive/rnd_pos.test index 8c7a0e16a79..f0a8c9ad2f3 100644 --- a/mysql-test/suite/archive/rnd_pos.test +++ b/mysql-test/suite/archive/rnd_pos.test @@ -11,7 +11,9 @@ explain partitions select c1,c3 from t1 order by c2; set max_length_for_sort_data = 4; explain partitions select c1,c3 from t1 order by c2; flush status; +--disable_ps2_protocol select c1,c3 from t1 order by c2; +--enable_ps2_protocol set max_length_for_sort_data = default; --disable_ps_protocol show status where variable_name like '%tmp%' and value != 0; @@ -22,7 +24,9 @@ explain partitions select c1,c3 from t1 order by c2; set max_length_for_sort_data = 4; explain partitions select c1,c3 from t1 order by c2; flush status; +--disable_ps2_protocol select c1,c3 from t1 order by c2; +--enable_ps2_protocol set max_length_for_sort_data = default; --disable_ps_protocol show status where variable_name like '%tmp%' and value != 0; diff --git a/mysql-test/suite/binlog/include/database.test b/mysql-test/suite/binlog/include/database.test index 097a501cc34..e61198b2da2 100644 --- a/mysql-test/suite/binlog/include/database.test +++ b/mysql-test/suite/binlog/include/database.test @@ -44,7 +44,9 @@ CREATE TABLE t2(c1 INT); let $prefix= `SELECT UUID()`; --echo # Create a file in the database directory --replace_result $prefix FAKE_FILE +--disable_ps2_protocol eval SELECT 'hello' INTO OUTFILE 'fake_file.$prefix'; +--enable_ps2_protocol --echo --echo # 'DROP DATABASE' will fail if there is any other file in the the diff --git a/mysql-test/suite/binlog/t/binlog_stm_row.test b/mysql-test/suite/binlog/t/binlog_stm_row.test index bade737c114..bef6b6e6a2c 100644 --- a/mysql-test/suite/binlog/t/binlog_stm_row.test +++ b/mysql-test/suite/binlog/t/binlog_stm_row.test @@ -41,6 +41,7 @@ INSERT INTO t2 VALUES(2); --echo # lock that will prevent the source table from being modified. --echo # +--disable_ps2_protocol --connection con1 SELECT GET_LOCK('Bug#34306', 120); --connection con2 @@ -87,6 +88,7 @@ INSERT INTO t2 VALUES (4); SELECT RELEASE_LOCK('Bug#34306'); --connection con2 --reap +--enable_ps2_protocol --disconnect con1 --disconnect con2 diff --git a/mysql-test/suite/binlog/t/binlog_unsafe.test b/mysql-test/suite/binlog/t/binlog_unsafe.test index 673712ff209..5e5d4c26954 100644 --- a/mysql-test/suite/binlog/t/binlog_unsafe.test +++ b/mysql-test/suite/binlog/t/binlog_unsafe.test @@ -573,7 +573,9 @@ END| RESET MASTER; CALL proc_insert_delayed(); +--disable_ps2_protocol SELECT func_limit(); +--enable_ps2_protocol source include/show_binlog_events.inc; SET @@session.binlog_format = @old_binlog_format; diff --git a/mysql-test/suite/compat/oracle/t/sequence.test b/mysql-test/suite/compat/oracle/t/sequence.test index 719c4bcd45b..9bd8cec5852 100644 --- a/mysql-test/suite/compat/oracle/t/sequence.test +++ b/mysql-test/suite/compat/oracle/t/sequence.test @@ -2,6 +2,7 @@ SET sql_mode=ORACLE; +--disable_ps2_protocol CREATE SEQUENCE s1; SHOW CREATE SEQUENCE s1; SELECT s1.currval; @@ -13,12 +14,14 @@ SELECT nextval(s1); EXPLAIN EXTENDED SELECT s1.currval; SELECT lastval(s1); DROP SEQUENCE s1; - +--enable_ps2_protocol CREATE SEQUENCE s1; CREATE VIEW v1 AS SELECT s1.nextval AS a; SELECT VIEW_DEFINITION FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME='v1'; +--disable_ps2_protocol SELECT * FROM v1; +--enable_ps2_protocol SHOW CREATE VIEW v1; DROP VIEW v1; DROP SEQUENCE s1; @@ -35,9 +38,11 @@ DROP SEQUENCE s1; --echo # --echo # MDEV-12533 sql_mode=ORACLE: Add support for database qualified sequence names in NEXTVAL and CURRVAL --echo # +--disable_ps2_protocol CREATE SEQUENCE s1; SELECT test.s1.nextval; SELECT test.s1.currval; SELECT .s1.nextval; SELECT .s1.currval; DROP SEQUENCE s1; +--enable_ps2_protocol diff --git a/mysql-test/suite/compat/oracle/t/sp-package.test b/mysql-test/suite/compat/oracle/t/sp-package.test index 401a46ad206..a48939f6e61 100644 --- a/mysql-test/suite/compat/oracle/t/sp-package.test +++ b/mysql-test/suite/compat/oracle/t/sp-package.test @@ -2,6 +2,7 @@ SET sql_mode=ORACLE; +--disable_ps2_protocol --echo # --echo # Creating a body of a non-existing package @@ -3013,6 +3014,7 @@ DELIMITER ;$$ SELECT db2.pkg1.var1(); CALL db2.pkg1.p2_db1_pkg1_p1; +--enable_ps2_protocol DROP DATABASE db1; DROP DATABASE db2; diff --git a/mysql-test/suite/federated/federatedx_create_handlers.test b/mysql-test/suite/federated/federatedx_create_handlers.test index f827c141f3d..19af71e02a9 100644 --- a/mysql-test/suite/federated/federatedx_create_handlers.test +++ b/mysql-test/suite/federated/federatedx_create_handlers.test @@ -94,9 +94,12 @@ DEFAULT CHARSET=latin1; INSERT INTO federated.t3 VALUES ('yyy'), ('www'), ('yyy'), ('xxx'), ('www'), ('yyy'), ('www'); +#Enable after fix MDEV-31361 +--disable_ps2_protocol SELECT * FROM federated.t3, (SELECT * FROM federated.t1 WHERE id > 3) t WHERE federated.t3.name=t.name; +--enable_ps2_protocol EXPLAIN SELECT * @@ -164,7 +167,9 @@ select * from federated.t4; select name into @var from federated.t1 where id=3 limit 1 ; select @var; +--disable_ps2_protocol select name into outfile 'tmp.txt' from federated.t1; +--enable_ps2_protocol let $path=`select concat(@@datadir, 'test/tmp.txt')`; remove_file $path; diff --git a/mysql-test/suite/funcs_1/storedproc/storedproc_10.inc b/mysql-test/suite/funcs_1/storedproc/storedproc_10.inc index 930322e203a..db8f45d0be7 100644 --- a/mysql-test/suite/funcs_1/storedproc/storedproc_10.inc +++ b/mysql-test/suite/funcs_1/storedproc/storedproc_10.inc @@ -266,6 +266,7 @@ BEGIN END// delimiter ;// +--disable_ps2_protocol CALL sp_ins_1(); SELECT row_count(); --sorted_result @@ -296,7 +297,7 @@ CALL sp_with_rowcount(); SELECT row_count(); --sorted_result SELECT * FROM temp; - +--enable_ps2_protocol # cleanup DROP PROCEDURE sp_ins_1; diff --git a/mysql-test/suite/funcs_1/t/is_basics_mixed.test b/mysql-test/suite/funcs_1/t/is_basics_mixed.test index bed3f633212..591a5ca566b 100644 --- a/mysql-test/suite/funcs_1/t/is_basics_mixed.test +++ b/mysql-test/suite/funcs_1/t/is_basics_mixed.test @@ -185,12 +185,14 @@ let $OUTFILE = $MYSQLTEST_VARDIR/tmp/datadict.out; --error 0,1 remove_file $OUTFILE; --replace_result $OUTFILE +--disable_ps2_protocol eval SELECT table_name,table_schema INTO OUTFILE '$OUTFILE' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n' FROM information_schema.tables WHERE table_schema = 'db_datadict' ORDER BY table_name; +--enable_ps2_protocol cat_file $OUTFILE; remove_file $OUTFILE; # diff --git a/mysql-test/suite/funcs_1/t/row_count_func.test b/mysql-test/suite/funcs_1/t/row_count_func.test index 3a76a6cac7c..fb207681bc6 100644 --- a/mysql-test/suite/funcs_1/t/row_count_func.test +++ b/mysql-test/suite/funcs_1/t/row_count_func.test @@ -18,12 +18,16 @@ INSERT INTO t1 VALUES (1), (2), (3); --enable_info --echo SELECT * FROM t1 INTO OUTFILE "MYSQL_TMP_DIR/bug21818.txt"; --disable_query_log # to avoid $MYSQL_TMP_DIR in query log +--disable_ps2_protocol --eval SELECT * FROM t1 INTO OUTFILE "$MYSQL_TMP_DIR/bug21818.txt" +--enable_ps2_protocol --enable_query_log --disable_info --echo +--disable_ps2_protocol SELECT ROW_COUNT(); +--enable_ps2_protocol --echo --echo # -- Check 2. @@ -33,7 +37,9 @@ SELECT a FROM t1 LIMIT 1 INTO @a; --disable_info --echo +--disable_ps2_protocol SELECT ROW_COUNT(); +--enable_ps2_protocol --enable_warnings --echo @@ -48,7 +54,9 @@ CREATE DATABASE mysqltest1; --disable_info --echo +--disable_ps2_protocol SELECT ROW_COUNT(); +--enable_ps2_protocol DROP DATABASE mysqltest1; @@ -65,7 +73,9 @@ DELETE FROM t1; --disable_info --echo +--disable_ps2_protocol SELECT ROW_COUNT(); +--enable_ps2_protocol --remove_file $MYSQL_TMP_DIR/bug21818.txt @@ -77,7 +87,9 @@ ALTER TABLE t1 ADD COLUMN b VARCHAR(255); --disable_info --echo +--disable_ps2_protocol SELECT ROW_COUNT(); +--enable_ps2_protocol --echo DROP TABLE t1; @@ -109,7 +121,9 @@ INSERT INTO t1 VALUES (1), (2), (3); --error ER_SP_DOES_NOT_EXIST SELECT f1(); +--disable_ps2_protocol SELECT ROW_COUNT(); +--enable_ps2_protocol DROP TABLE t1; diff --git a/mysql-test/suite/funcs_1/views/views_master.inc b/mysql-test/suite/funcs_1/views/views_master.inc index 573d72022fb..526e9e3426e 100644 --- a/mysql-test/suite/funcs_1/views/views_master.inc +++ b/mysql-test/suite/funcs_1/views/views_master.inc @@ -2912,6 +2912,7 @@ while ($run) # be wrong, please edit the while loop above and set $debug to 1. #-------------------------------------------------------------------------- # 1.1 Check of top level VIEW +--disable_ps2_protocol let $toplevel= `SELECT @max_level`; eval SHOW CREATE VIEW test3.v$toplevel; eval SELECT * FROM test3.v$toplevel; @@ -2924,7 +2925,7 @@ eval SHOW CREATE VIEW test3.v$toplevel; eval SELECT * FROM test3.v$toplevel; --error ER_VIEW_INVALID eval EXPLAIN SELECT * FROM test3.v$toplevel; - +--enable_ps2_protocol # 2. Complicated nested VIEWs # parameter @max_level = nesting level @@ -3054,8 +3055,10 @@ let $toplevel= `SELECT @max_level`; # Show should be easy eval SHOW CREATE VIEW test1.v$toplevel; # SELECT is much more complicated +--disable_ps2_protocol eval SELECT CAST(f1 AS SIGNED INTEGER) AS f1, CAST(f2 AS CHAR) AS f2 FROM test1.v$toplevel; +--enable_ps2_protocol let $message= The output of following EXPLAIN is deactivated, because the result differs on some platforms FIXME Is this a bug ? ; diff --git a/mysql-test/suite/gcol/inc/gcol_ins_upd.inc b/mysql-test/suite/gcol/inc/gcol_ins_upd.inc index e745708c22a..95ed11a3dff 100644 --- a/mysql-test/suite/gcol/inc/gcol_ins_upd.inc +++ b/mysql-test/suite/gcol/inc/gcol_ins_upd.inc @@ -620,7 +620,9 @@ CREATE TABLE t1 ( ); INSERT IGNORE INTO t1 (b) VALUES (b'101110001110100'),(b'011101'); +--disable_ps2_protocol SELECT pk, b INTO OUTFILE 'load.data' FROM t1; +--enable_ps2_protocol --error ER_DATA_TOO_LONG LOAD DATA INFILE 'load.data' REPLACE INTO TABLE t1 (pk, b); diff --git a/mysql-test/suite/gcol/inc/gcol_keys.inc b/mysql-test/suite/gcol/inc/gcol_keys.inc index cf0612b0d0c..473086f6e04 100644 --- a/mysql-test/suite/gcol/inc/gcol_keys.inc +++ b/mysql-test/suite/gcol/inc/gcol_keys.inc @@ -776,7 +776,9 @@ CREATE TABLE t1 ( ); INSERT IGNORE INTO t1 (b) VALUES (b'101110001110100'),(b'011101'); +--disable_ps2_protocol SELECT pk, b INTO OUTFILE 'load.data' FROM t1; +--enable_ps2_protocol --error ER_DATA_TOO_LONG LOAD DATA INFILE 'load.data' REPLACE INTO TABLE t1 (pk, b); diff --git a/mysql-test/suite/gcol/t/gcol_bugfixes.test b/mysql-test/suite/gcol/t/gcol_bugfixes.test index a1f277199eb..4c1b00a878a 100644 --- a/mysql-test/suite/gcol/t/gcol_bugfixes.test +++ b/mysql-test/suite/gcol/t/gcol_bugfixes.test @@ -674,7 +674,9 @@ DROP TABLE t1; CREATE TABLE t1 (id INT PRIMARY KEY, a VARCHAR(2333), va VARCHAR(171) AS (a)) ENGINE=InnoDB; INSERT INTO t1 (id,a) VALUES (1,REPEAT('x',200)); +--disable_ps2_protocol SELECT id, va INTO OUTFILE 'load_t1' FROM t1; +--enable_ps2_protocol --error ER_DATA_TOO_LONG LOAD DATA INFILE 'load_t1' REPLACE INTO TABLE t1 (id,va); SELECT * FROM t1; @@ -687,7 +689,9 @@ DROP TABLE t1; CREATE TABLE t1 (id BIGINT PRIMARY KEY, a VARCHAR(2333), va VARCHAR(171) AS (a)) ENGINE=InnoDB; INSERT INTO t1 (id,a) VALUES (1,REPEAT('x',200)); +--disable_ps2_protocol SELECT id, va INTO OUTFILE 'load_t1' FROM t1; +--enable_ps2_protocol --error ER_DATA_TOO_LONG LOAD DATA INFILE 'load_t1' REPLACE INTO TABLE t1 (id,va); SELECT * FROM t1; @@ -707,7 +711,9 @@ CREATE TABLE t1 (id INT PRIMARY KEY, ts TIMESTAMP DEFAULT '1971-01-01 00:00:00', c VARBINARY(8) DEFAULT '', vc VARCHAR(3) AS (c) STORED); INSERT IGNORE INTO t1 (id,c) VALUES (1,'foobar'); +--disable_ps2_protocol SELECT id, ts, vc INTO OUTFILE 'load_t1' FROM t1; +--enable_ps2_protocol --error 0,ER_DATA_TOO_LONG LOAD DATA INFILE 'load_t1' REPLACE INTO TABLE t1 (id, ts, vc); INSERT IGNORE INTO t1 (id) VALUES (2); diff --git a/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test b/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test index 253ad4095f7..d0a0be76178 100644 --- a/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test +++ b/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test @@ -273,7 +273,9 @@ engine innodb; insert ignore into t1 (b) values ('foo'); +--disable_ps2_protocol select * into outfile 'load.data' from t1; +--enable_ps2_protocol load data infile 'load.data' replace into table t1; set debug_sync= "now WAIT_FOR latch_released"; @@ -290,7 +292,9 @@ engine innodb; insert ignore into t1 (b) values ('foo'); +--disable_ps2_protocol select * into outfile 'load.data' from t1; +--enable_ps2_protocol load data infile 'load.data' replace into table t1; set debug_sync= "now WAIT_FOR got_no_such_table"; diff --git a/mysql-test/suite/handler/handler.inc b/mysql-test/suite/handler/handler.inc index c29ee0c693d..c48cf451d0f 100644 --- a/mysql-test/suite/handler/handler.inc +++ b/mysql-test/suite/handler/handler.inc @@ -1055,6 +1055,7 @@ commit; --echo # If we have to wait on an exclusive locks while having --echo # an open HANDLER, ER_LOCK_DEADLOCK is reported. --echo # +--disable_ps2_protocol create table t1 (a int, key a(a)); handler t1 open; connection con1; @@ -1074,6 +1075,7 @@ select release_lock('lock1'); connection default; reap; select release_lock('lock1'); +--enable_ps2_protocol --echo # Demonstrate that there is no deadlock with FLUSH TABLE, --echo # even though it is waiting for the other table to go away diff --git a/mysql-test/suite/innodb/t/alter_kill.test b/mysql-test/suite/innodb/t/alter_kill.test index 2313d63db69..a8a151ab1e2 100644 --- a/mysql-test/suite/innodb/t/alter_kill.test +++ b/mysql-test/suite/innodb/t/alter_kill.test @@ -164,10 +164,14 @@ let SEARCH_PATTERN= \[ERROR\] InnoDB: Tablespace [0-9]+ was not found at .*test. -- source include/restart_mysqld.inc SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +--disable_ps2_protocol SELECT * FROM bug16735660; +--enable_ps2_protocol XA RECOVER; XA ROLLBACK 'x'; +--disable_ps2_protocol SELECT * FROM bug16735660; +--enable_ps2_protocol DROP TABLE bug16735660; diff --git a/mysql-test/suite/innodb/t/foreign_key.test b/mysql-test/suite/innodb/t/foreign_key.test index 4caa4cc2431..c4b2b8331b0 100644 --- a/mysql-test/suite/innodb/t/foreign_key.test +++ b/mysql-test/suite/innodb/t/foreign_key.test @@ -439,7 +439,9 @@ end| delimiter ;| flush tables; flush status; +--disable_ps2_protocol select foo(); +--enable_ps2_protocol show status like '%opened_tab%'; drop function foo; drop table t2, t1; diff --git a/mysql-test/suite/innodb/t/innodb-autoinc-56228.test b/mysql-test/suite/innodb/t/innodb-autoinc-56228.test index 28141f812b2..a02f7b4383a 100644 --- a/mysql-test/suite/innodb/t/innodb-autoinc-56228.test +++ b/mysql-test/suite/innodb/t/innodb-autoinc-56228.test @@ -25,7 +25,9 @@ END // DELIMITER ;// +--disable_ps_protocol SELECT bug56228(); +--enable_ps2_protocol DROP FUNCTION bug56228; DROP TEMPORARY TABLE t2_56228; diff --git a/mysql-test/suite/innodb/t/innodb_bug14007649.test b/mysql-test/suite/innodb/t/innodb_bug14007649.test index 9326e1c53ef..9b332b9b08b 100644 --- a/mysql-test/suite/innodb/t/innodb_bug14007649.test +++ b/mysql-test/suite/innodb/t/innodb_bug14007649.test @@ -22,7 +22,9 @@ start transaction; update t1 set f2 = 4 where f1 = 1 and f2 is null; -- echo (b) Number of rows updated: +--disable_ps2_protocol select row_count(); +--enable_ps2_protocol insert into t1 values (3, 1, null); @@ -40,7 +42,9 @@ SET SESSION debug_dbug="+d,bug14007649"; update t1 set f2 = 6 where f1 = 1 and f2 is null; -- echo (a) Number of rows updated: +--disable_ps2_protocol select row_count(); +--enable_ps2_protocol -- echo (a) After the update statement is executed. select rowid, f1, f2 from t1; diff --git a/mysql-test/suite/innodb/t/innodb_bug59641.test b/mysql-test/suite/innodb/t/innodb_bug59641.test index e0d3431e45b..36001133a88 100644 --- a/mysql-test/suite/innodb/t/innodb_bug59641.test +++ b/mysql-test/suite/innodb/t/innodb_bug59641.test @@ -36,13 +36,17 @@ CONNECT (con3,localhost,root,,); --let $shutdown_timeout=0 --source include/restart_mysqld.inc SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +--disable_ps2_protocol SELECT * FROM t; +--enable_ps2_protocol COMMIT; --source include/restart_mysqld.inc SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +--disable_ps2_protocol SELECT * FROM t; +--enable_ps2_protocol COMMIT; --sorted_result XA RECOVER; diff --git a/mysql-test/suite/innodb/t/innodb_force_recovery.test b/mysql-test/suite/innodb/t/innodb_force_recovery.test index cfda405e216..356f9e8bc60 100644 --- a/mysql-test/suite/innodb/t/innodb_force_recovery.test +++ b/mysql-test/suite/innodb/t/innodb_force_recovery.test @@ -160,7 +160,9 @@ connection default; let $status=`SHOW ENGINE INNODB STATUS`; SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +--disable_ps2_protocol select * from t2; +--enable_ps2_protocol SET TRANSACTION ISOLATION LEVEL REPEATABLE READ; select * from t2; SET SESSION innodb_lock_wait_timeout=1; diff --git a/mysql-test/suite/innodb/t/instant_alter_bugs.test b/mysql-test/suite/innodb/t/instant_alter_bugs.test index 7bb6f0fd89a..debd5d30562 100644 --- a/mysql-test/suite/innodb/t/instant_alter_bugs.test +++ b/mysql-test/suite/innodb/t/instant_alter_bugs.test @@ -128,7 +128,9 @@ INSERT INTO t1 (f1,f2,f3,f4,f5,f6,f7,f8) VALUES INSERT INTO t1 (f1,f2,f3,f4,f5,f6,f7,f8) VALUES ('impact', 'b', 'h', 185, 'fj', 7, 7, 3); ALTER TABLE t1 ADD COLUMN filler VARCHAR(255) DEFAULT ''; +--disable_ps2_protocol SELECT * INTO OUTFILE 'load.data' FROM t1; +--enable_ps2_protocol UPDATE IGNORE t1 SET pk = 0; LOAD DATA INFILE 'load.data' REPLACE INTO TABLE t1; HANDLER t1 OPEN AS h; diff --git a/mysql-test/suite/innodb/t/monitor.test b/mysql-test/suite/innodb/t/monitor.test index f1cf4b0c39e..8ea56fd53bc 100644 --- a/mysql-test/suite/innodb/t/monitor.test +++ b/mysql-test/suite/innodb/t/monitor.test @@ -356,6 +356,7 @@ primary key (a(1), c(1)), key(b)) engine = innodb; insert into monitor_test values("13", 2, "aa"); +--disable_ps2_protocol select a from monitor_test where b < 1 for update; # should have icp_attempts = 1 and icp_out_of_range = 1 @@ -367,6 +368,7 @@ select a from monitor_test where b < 3 for update; select name, count from information_schema.innodb_metrics where name like "icp%"; +--enable_ps2_protocol drop table monitor_test; set global innodb_monitor_disable = All; diff --git a/mysql-test/suite/innodb/t/read_only_recover_committed.test b/mysql-test/suite/innodb/t/read_only_recover_committed.test index 5c4eac86c26..0f6fb5ac29c 100644 --- a/mysql-test/suite/innodb/t/read_only_recover_committed.test +++ b/mysql-test/suite/innodb/t/read_only_recover_committed.test @@ -55,7 +55,9 @@ ROLLBACK; --disconnect con2 SELECT * FROM t; SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +--disable_ps2_protocol SELECT * FROM t; +--enable_ps2_protocol # refused on MySQL 5.6, MariaDB 10.0, 10.1, but not MariaDB 10.2+ UPDATE t SET a=3 WHERE a=1; --let $restart_parameters= --innodb-read-only diff --git a/mysql-test/suite/innodb/t/table_index_statistics.inc b/mysql-test/suite/innodb/t/table_index_statistics.inc index ba585320fc9..01f8af06c86 100644 --- a/mysql-test/suite/innodb/t/table_index_statistics.inc +++ b/mysql-test/suite/innodb/t/table_index_statistics.inc @@ -9,6 +9,7 @@ FLUSH TABLE_STATISTICS; SET @userstat_old= @@userstat; SET GLOBAL userstat=ON; +--disable_ps2_protocol CREATE TABLE t1 (id int(10), PRIMARY KEY (id)); INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); SELECT COUNT(*) FROM t1; @@ -33,6 +34,7 @@ SELECT ROWS_READ FROM INFORMATION_SCHEMA.INDEX_STATISTICS WHERE TABLE_NAME='t1'; SELECT COUNT(*) FROM t1; SELECT ROWS_READ FROM INFORMATION_SCHEMA.TABLE_STATISTICS WHERE TABLE_NAME='t1'; SELECT ROWS_READ FROM INFORMATION_SCHEMA.INDEX_STATISTICS WHERE TABLE_NAME='t1'; +--enable_ps2_protocol DROP TABLE t1; diff --git a/mysql-test/suite/innodb/t/temp_table_savepoint.test b/mysql-test/suite/innodb/t/temp_table_savepoint.test index c8a4bc870a7..b935fff3cca 100644 --- a/mysql-test/suite/innodb/t/temp_table_savepoint.test +++ b/mysql-test/suite/innodb/t/temp_table_savepoint.test @@ -290,7 +290,10 @@ select count(*) from t4 where c1 = 140; select count(*) from t5 where c1 = 140; --replace_result $MYSQLTEST_VARDIR VARDIR +--disable_ps2_protocol eval select * into outfile "$MYSQLTEST_VARDIR/tmp/t1.outfile" from t1; +--enable_ps2_protocol + create temporary table temp_1 engine = innodb as select * from t1 where 1=2; select count(*) from temp_1; diff --git a/mysql-test/suite/innodb/t/xa_recovery.test b/mysql-test/suite/innodb/t/xa_recovery.test index f0fbb1a94c3..da9626ebd29 100644 --- a/mysql-test/suite/innodb/t/xa_recovery.test +++ b/mysql-test/suite/innodb/t/xa_recovery.test @@ -47,7 +47,9 @@ DROP TABLE t2; disconnect con1; SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +--disable_ps2_protocol SELECT * FROM t1; +--enable_ps2_protocol XA ROLLBACK 'x'; SELECT * FROM t1; diff --git a/mysql-test/suite/innodb_gis/t/0.test b/mysql-test/suite/innodb_gis/t/0.test index b5d82f2ae69..c482d881732 100644 --- a/mysql-test/suite/innodb_gis/t/0.test +++ b/mysql-test/suite/innodb_gis/t/0.test @@ -25,7 +25,9 @@ connect (con1,localhost,root,,); connection con1; set @g1 = ST_GeomFromText('Polygon((0 0,0 100,100 100,100 0,0 0))'); set transaction isolation level read uncommitted; +--disable_ps2_protocol select count(*) from t1 where ST_Within(t1.c2, @g1); +--enable_ps2_protocol disconnect con1; --source include/wait_until_disconnected.inc diff --git a/mysql-test/suite/mariabackup/apply-log-only-incr.test b/mysql-test/suite/mariabackup/apply-log-only-incr.test index c2d23c88a3e..a9e53548366 100644 --- a/mysql-test/suite/mariabackup/apply-log-only-incr.test +++ b/mysql-test/suite/mariabackup/apply-log-only-incr.test @@ -61,7 +61,9 @@ rmdir $incremental_dir; SELECT COUNT(*) FROM t; SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +--disable_ps2_protocol SELECT COUNT(*) FROM t; +--enable_ps2_protocol --let $restart_parameters= --source include/restart_mysqld.inc diff --git a/mysql-test/suite/parts/t/optimizer.test b/mysql-test/suite/parts/t/optimizer.test index f93c36823ca..0cc326da979 100644 --- a/mysql-test/suite/parts/t/optimizer.test +++ b/mysql-test/suite/parts/t/optimizer.test @@ -34,6 +34,7 @@ INSERT INTO t2 SELECT * FROM t1; EXPLAIN SELECT a, MAX(b) FROM t1 WHERE a IN (10,100) GROUP BY a; EXPLAIN SELECT a, MAX(b) FROM t2 WHERE a IN (10,100) GROUP BY a; +--disable_ps2_protocol FLUSH status; SELECT a, MAX(b) FROM t1 WHERE a IN (10, 100) GROUP BY a; --echo # Should be no more than 4 reads. @@ -43,5 +44,6 @@ FLUSH status; SELECT a, MAX(b) FROM t2 WHERE a IN (10, 100) GROUP BY a; --echo # Should be no more than 4 reads. SHOW status LIKE 'handler_read_key'; +--enable_ps2_protocol DROP TABLE t1, t2; diff --git a/mysql-test/suite/perfschema/include/table_io_basic_dml.inc b/mysql-test/suite/perfschema/include/table_io_basic_dml.inc index 4fe2fd9dfb3..5457566b296 100644 --- a/mysql-test/suite/perfschema/include/table_io_basic_dml.inc +++ b/mysql-test/suite/perfschema/include/table_io_basic_dml.inc @@ -5,6 +5,7 @@ # $table_item = . must be set before sourcing this script. # +--disable_ps2_protocol insert into marker set a = 1; eval insert into $table_item set a = 'foo', b = 1; insert into marker set a = 1; @@ -33,4 +34,4 @@ insert into marker set a = 1; eval truncate table $table_item; --enable_abort_on_error insert into marker set a = 1; - +--enable_ps2_protocol diff --git a/mysql-test/suite/perfschema/t/indexed_table_io.test b/mysql-test/suite/perfschema/t/indexed_table_io.test index 1a7597113d2..13edfbfb144 100644 --- a/mysql-test/suite/perfschema/t/indexed_table_io.test +++ b/mysql-test/suite/perfschema/t/indexed_table_io.test @@ -54,6 +54,7 @@ select count(*) from test.index_tab; # Testing Code +--disable_ps2_protocol # For getting avg(a) inspection of # - all rows (test.no_index_tab) # - all unique index values (test.index_tab, assuming the optimizer decides to @@ -102,6 +103,7 @@ update performance_schema.setup_consumers set enabled='YES'; delete from test.index_tab where a = 51; update performance_schema.setup_consumers set enabled='NO'; eval $table_io_select 'index_tab'; +--enable_ps2_protocol # In case of failures, this will tell if table io are lost. show status like 'performance_schema_%'; diff --git a/mysql-test/suite/perfschema/t/multi_table_io.test b/mysql-test/suite/perfschema/t/multi_table_io.test index d835f36be4b..50bc4f6b8b6 100644 --- a/mysql-test/suite/perfschema/t/multi_table_io.test +++ b/mysql-test/suite/perfschema/t/multi_table_io.test @@ -27,6 +27,7 @@ let $schema_to_dump= 'test','test1'; # Start event recording update performance_schema.setup_consumers set enabled = 'YES'; +--disable_ps2_protocol # INSERT ... SELECT ... insert into test1.t2 select * from test.t1; insert into marker set a = 1; @@ -42,6 +43,7 @@ insert into marker set a = 1; # DELETE delete from test.t1, test1.t2 using test.t1 inner join test1.t2 where test.t1.col1 = test1.t2.col1; +--enable_ps2_protocol # Stop event recording + pull results --source ../include/table_io_result_helper.inc diff --git a/mysql-test/suite/perfschema/t/query_cache.test b/mysql-test/suite/perfschema/t/query_cache.test index 4c130813611..9db60de1a90 100644 --- a/mysql-test/suite/perfschema/t/query_cache.test +++ b/mysql-test/suite/perfschema/t/query_cache.test @@ -22,6 +22,7 @@ flush query cache; reset query cache; flush status; +--disable_ps2_protocol select * from t1; show status like "Qcache_queries_in_cache"; @@ -47,6 +48,7 @@ select spins from performance_schema.events_waits_current order by event_name li --replace_result CYCLE {CYCLE_OR_NANOSECOND} NANOSECOND {CYCLE_OR_NANOSECOND} select * from performance_schema.setup_timers where name='wait'; +--enable_ps2_protocol show status like "Qcache_queries_in_cache"; show status like "Qcache_inserts"; diff --git a/mysql-test/suite/perfschema/t/trigger_table_io.test b/mysql-test/suite/perfschema/t/trigger_table_io.test index 090d64e330e..2b374c79d15 100644 --- a/mysql-test/suite/perfschema/t/trigger_table_io.test +++ b/mysql-test/suite/perfschema/t/trigger_table_io.test @@ -37,6 +37,7 @@ update performance_schema.setup_consumers set enabled = 'YES'; # Code to test +--disable_ps2_protocol insert into marker set a = 1; insert into t1 set a = 1, v = 10; insert into marker set a = 1; @@ -63,6 +64,7 @@ insert into marker set a = 1; select * from t1; insert into marker set a = 1; select * from t2; +--enable_ps2_protocol # Stop recording events + pull results --source ../include/table_io_result_helper.inc diff --git a/mysql-test/suite/plugins/t/qc_info.test b/mysql-test/suite/plugins/t/qc_info.test index 8803e907b89..de3e9d59b01 100644 --- a/mysql-test/suite/plugins/t/qc_info.test +++ b/mysql-test/suite/plugins/t/qc_info.test @@ -4,8 +4,10 @@ set @save_query_cache_size=@@global.query_cache_size; # test that hits are correctly incremented reset query cache; +--disable_ps2_protocol select * from t1; select * from t1; +--enable_ps2_protocol select hits, statement_text from information_schema.query_cache_info; drop table t1; diff --git a/mysql-test/suite/plugins/t/qc_info_init.inc b/mysql-test/suite/plugins/t/qc_info_init.inc index c3f700f08d0..add7aea8e95 100644 --- a/mysql-test/suite/plugins/t/qc_info_init.inc +++ b/mysql-test/suite/plugins/t/qc_info_init.inc @@ -9,7 +9,9 @@ set global query_cache_size=1355776; create table t1 (a int not null); insert into t1 values (1),(2),(3); +--disable_ps2_protocol select * from t1; +--enable_ps2_protocol select statement_schema, statement_text, result_blocks_count, result_blocks_size from information_schema.query_cache_info; select @@time_zone into @time_zone; @@ -25,7 +27,9 @@ select @@group_concat_max_len into @group_concat_max_len; select Name into @new_time_zone from mysql.time_zone_name limit 1; set time_zone=@new_time_zone,default_week_format=4,character_set_client='binary',character_set_results='utf32',collation_connection='utf32_bin',sql_mode='STRICT_ALL_TABLES',div_precision_increment=7,lc_time_names='ar_SD',autocommit=0, group_concat_max_len=513, max_sort_length=1011; --disable_result_log +--disable_ps2_protocol select * from t1; +--enable_ps2_protocol --enable_result_log set time_zone= @time_zone, default_week_format= @default_week_format, character_set_client= @character_set_client,character_set_results= @character_set_results, sql_mode= @sql_mode, div_precision_increment= @div_precision_increment, lc_time_names= @lc_time_names, autocommit= @autocommit, group_concat_max_len= @group_concat_max_len, max_sort_length= @max_sort_length; diff --git a/mysql-test/suite/plugins/t/server_audit.test b/mysql-test/suite/plugins/t/server_audit.test index 5048ccc2446..47d6fdacdcf 100644 --- a/mysql-test/suite/plugins/t/server_audit.test +++ b/mysql-test/suite/plugins/t/server_audit.test @@ -5,6 +5,7 @@ if (!$SERVER_AUDIT_SO) { skip No SERVER_AUDIT plugin; } +--disable_ps2_protocol # An unfortunate wait for check-testcase.test to complete disconnect. let count_sessions= 1; source include/wait_until_count_sessions.inc; @@ -234,6 +235,7 @@ uninstall plugin server_audit; --replace_regex /[0-9]* [0-9][0-9]:[0-9][0-9]:[0-9][0-9]\,[^,]*\,/TIME,HOSTNAME,/ /\,[1-9][0-9]*\,/,1,/ /\,[1-9][0-9]*/,ID/ cat_file $MYSQLD_DATADIR/server_audit.log; remove_file $MYSQLD_DATADIR/server_audit.log; +--enable_ps2_protocol --echo # --echo # MDEV-27631 Assertion `global_status_var.global_memory_used == 0' failed in mysqld_exit diff --git a/mysql-test/suite/plugins/t/show_all_plugins.test b/mysql-test/suite/plugins/t/show_all_plugins.test index f8f375976fe..77723d32170 100644 --- a/mysql-test/suite/plugins/t/show_all_plugins.test +++ b/mysql-test/suite/plugins/t/show_all_plugins.test @@ -12,7 +12,9 @@ show status like '%libraries%'; #show status like '%libraries%'; --replace_result .dll .so --replace_column 5 MYSQL_VERSION_ID +--disable_ps2_protocol eval select * from information_schema.all_plugins where plugin_library='$HA_EXAMPLE_SO'; +--enable_ps2_protocol show status like '%libraries%'; --sorted_result --replace_result .dll .so diff --git a/mysql-test/suite/plugins/t/thread_pool_server_audit.test b/mysql-test/suite/plugins/t/thread_pool_server_audit.test index 7347d8f99ff..c12ef29ff20 100644 --- a/mysql-test/suite/plugins/t/thread_pool_server_audit.test +++ b/mysql-test/suite/plugins/t/thread_pool_server_audit.test @@ -7,6 +7,7 @@ if (!$SERVER_AUDIT_SO) { install plugin server_audit soname 'server_audit'; +--disable_ps2_protocol show variables like 'server_audit%'; set global server_audit_file_path=null; set global server_audit_incl_users=null; @@ -140,6 +141,7 @@ set global server_audit_file_path='nonexisting_dir/'; show status like 'server_audit_current_log'; show variables like 'server_audit%'; uninstall plugin server_audit; +--enable_ps2_protocol let $MYSQLD_DATADIR= `SELECT @@datadir`; # replace the timestamp and the hostname with constant values diff --git a/mysql-test/suite/rpl/include/rpl_insert_id.test b/mysql-test/suite/rpl/include/rpl_insert_id.test index 32d861bd45a..aca14078850 100644 --- a/mysql-test/suite/rpl/include/rpl_insert_id.test +++ b/mysql-test/suite/rpl/include/rpl_insert_id.test @@ -182,9 +182,11 @@ drop trigger t1_bi; # Check that nested call doesn't affect outer context. select last_insert_id(); +--disable_ps2_protocol --disable_warnings ONCE select bug15728_insert(); select last_insert_id(); +--enable_ps2_protocol insert into t1 (last_id) values (bug15728()); # This should be exactly one greater than in the previous call. select last_insert_id(); @@ -440,8 +442,10 @@ delimiter ;| INSERT INTO t1 VALUES (NULL, -1); CALL p1(); +--disable_ps2_protocol --disable_warnings ONCE SELECT f1(); +--enable_ps2_protocol INSERT INTO t1 VALUES (NULL, f2()), (NULL, LAST_INSERT_ID()), (NULL, LAST_INSERT_ID()), (NULL, f2()), (NULL, f2()); INSERT INTO t1 VALUES (NULL, f2()); @@ -458,7 +462,9 @@ connection master1; INSERT INTO t1 (i) VALUES (NULL); connection master; +--disable_ps2_protocol SELECT f3(); +--enable_ps2_protocol SELECT * FROM t1 ORDER BY i; SELECT * FROM t2 ORDER BY i; @@ -510,8 +516,10 @@ insert into t2 (id) values(1),(2),(3); delete from t2; set sql_log_bin=1; #inside SELECT, then inside INSERT +--disable_ps2_protocol --disable_warnings ONCE select insid(); +--enable_ps2_protocol set sql_log_bin=0; insert into t2 (id) values(5),(6),(7); delete from t2 where id>=5; diff --git a/mysql-test/suite/rpl/include/rpl_mixing_engines.inc b/mysql-test/suite/rpl/include/rpl_mixing_engines.inc index c71c45a57c5..c78a6a0e5d8 100644 --- a/mysql-test/suite/rpl/include/rpl_mixing_engines.inc +++ b/mysql-test/suite/rpl/include/rpl_mixing_engines.inc @@ -213,6 +213,7 @@ if ($commands == 'clean') --let $commands= } +--disable_ps2_protocol while ($commands != '') { --disable_query_log @@ -633,5 +634,6 @@ while ($commands != '') inc $trans_id; } } +--enable_ps2_protocol --let $commands= $rme_initial_commands diff --git a/mysql-test/suite/rpl/include/rpl_row_UUID.test b/mysql-test/suite/rpl/include/rpl_row_UUID.test index 368596d4fbc..11eb3c6b748 100644 --- a/mysql-test/suite/rpl/include/rpl_row_UUID.test +++ b/mysql-test/suite/rpl/include/rpl_row_UUID.test @@ -40,7 +40,9 @@ end| delimiter ;| # test both in SELECT and in INSERT +--disable_ps2_protocol select fn1(0); +--enable_ps2_protocol eval create table t2 (a int) engine=$engine_type; insert into t2 values(fn1(2)); diff --git a/mysql-test/suite/rpl/include/rpl_row_img_sequence.inc b/mysql-test/suite/rpl/include/rpl_row_img_sequence.inc index be5b7600f0a..d9ed6f278b9 100644 --- a/mysql-test/suite/rpl/include/rpl_row_img_sequence.inc +++ b/mysql-test/suite/rpl/include/rpl_row_img_sequence.inc @@ -54,7 +54,9 @@ FLUSH LOGS; --echo # Pt.2 Ensure NEXTVAL replicates and binlogs correctly --connection server_1 +--disable_ps2_protocol SELECT NEXTVAL(s1); +--enable_ps2_protocol --source include/save_master_gtid.inc --echo # Validate NEXTVAL replicated correctly to other servers diff --git a/mysql-test/suite/rpl/include/rpl_row_sp003.test b/mysql-test/suite/rpl/include/rpl_row_sp003.test index a8f25485f26..829e42f23c2 100644 --- a/mysql-test/suite/rpl/include/rpl_row_sp003.test +++ b/mysql-test/suite/rpl/include/rpl_row_sp003.test @@ -14,6 +14,7 @@ DROP TABLE IF EXISTS test.t1; # Begin test section 1 +--disable_ps2_protocol eval CREATE TABLE test.t1(a INT,PRIMARY KEY(a))ENGINE=$engine_type; delimiter |; @@ -70,6 +71,7 @@ connection slave; SELECT * FROM test.t1; connection master; #show binlog events from 720; +--enable_ps2_protocol DROP PROCEDURE IF EXISTS test.p1; DROP PROCEDURE IF EXISTS test.p2; diff --git a/mysql-test/suite/rpl/t/rpl_auto_increment_bug45679.test b/mysql-test/suite/rpl/t/rpl_auto_increment_bug45679.test index 32f08be7c4d..25bfa134dbb 100644 --- a/mysql-test/suite/rpl/t/rpl_auto_increment_bug45679.test +++ b/mysql-test/suite/rpl/t/rpl_auto_increment_bug45679.test @@ -34,7 +34,9 @@ begin end// delimiter ;// +--disable_ps2_protocol select multi_part_pk_with_autoinc (3); +--enable_ps2_protocol --echo *** autoincrement field is not the first in PK warning must be there: *** show warnings; diff --git a/mysql-test/suite/rpl/t/rpl_binlog_errors.test b/mysql-test/suite/rpl/t/rpl_binlog_errors.test index bf92736a2af..a5988efcb21 100644 --- a/mysql-test/suite/rpl/t/rpl_binlog_errors.test +++ b/mysql-test/suite/rpl/t/rpl_binlog_errors.test @@ -58,7 +58,9 @@ SET @old_debug= @@global.debug_dbug; -- let $load_file= $MYSQLTEST_VARDIR/tmp/bug_46166.data -- let $MYSQLD_DATADIR= `select @@datadir` -- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_ps2_protocol -- eval SELECT repeat('x',8192) INTO OUTFILE '$load_file' +--enable_ps2_protocol ### ACTION: create a small file (< 4096 bytes) that will be later used ### in LOAD DATA INFILE to check for absence of binlog errors @@ -67,7 +69,9 @@ SET @old_debug= @@global.debug_dbug; -- let $load_file2= $MYSQLTEST_VARDIR/tmp/bug_46166-2.data -- let $MYSQLD_DATADIR= `select @@datadir` -- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_ps2_protocol -- eval SELECT repeat('x',10) INTO OUTFILE '$load_file2' +--enable_ps2_protocol RESET MASTER; diff --git a/mysql-test/suite/rpl/t/rpl_drop_db.test b/mysql-test/suite/rpl/t/rpl_drop_db.test index 372afaa63c6..68d2ec46e4e 100644 --- a/mysql-test/suite/rpl/t/rpl_drop_db.test +++ b/mysql-test/suite/rpl/t/rpl_drop_db.test @@ -10,7 +10,9 @@ drop database if exists mysqltest1; create database mysqltest1; create table mysqltest1.t1 (n int); insert into mysqltest1.t1 values (1); +--disable_ps2_protocol select * from mysqltest1.t1 into outfile 'mysqltest1/f1.txt'; +--enable_ps2_protocol create table mysqltest1.t2 (n int); create table mysqltest1.t3 (n int); --replace_result \\ / 66 39 93 39 17 39 247 39 41 39 "File exists" "Directory not empty" diff --git a/mysql-test/suite/rpl/t/rpl_gtid_basic.test b/mysql-test/suite/rpl/t/rpl_gtid_basic.test index 5975c6f03c3..9cedebcfd38 100644 --- a/mysql-test/suite/rpl/t/rpl_gtid_basic.test +++ b/mysql-test/suite/rpl/t/rpl_gtid_basic.test @@ -211,6 +211,7 @@ SELECT * FROM t1; --echo *** Test @@LAST_GTID and MASTER_GTID_WAIT() *** +--disable_ps2_protocol --connection server_1 DROP TABLE t1; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB; @@ -396,7 +397,7 @@ INSERT INTO t1 VALUES (7); reap; --connection s7 reap; - +--enable_ps2_protocol --echo *** Test gtid_slave_pos when used with GTID *** diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_local.test b/mysql-test/suite/rpl/t/rpl_loaddata_local.test index 20962d74e98..01f5607ba0b 100644 --- a/mysql-test/suite/rpl/t/rpl_loaddata_local.test +++ b/mysql-test/suite/rpl/t/rpl_loaddata_local.test @@ -27,7 +27,9 @@ set SQL_LOG_BIN=1; enable_query_log; let $MYSQLD_DATADIR= `select @@datadir`; --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR +--disable_ps2_protocol eval select * into outfile '$MYSQLD_DATADIR/rpl_loaddatalocal.select_outfile' from t1; +--enable_ps2_protocol #This will generate a 20KB file, now test LOAD DATA LOCAL truncate table t1; --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR @@ -50,7 +52,9 @@ connection master; create table t1(a int); insert into t1 values (1), (2), (2), (3); --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR +--disable_ps2_protocol eval select * into outfile '$MYSQLD_DATADIR/rpl_loaddatalocal.select_outfile' from t1; +--enable_ps2_protocol drop table t1; create table t1(a int primary key); --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR @@ -79,7 +83,9 @@ SET sql_mode='ignore_space'; CREATE TABLE t1(a int); insert into t1 values (1), (2), (3), (4); --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR +--disable_ps2_protocol eval select * into outfile '$MYSQLD_DATADIR/rpl_loaddatalocal.select_outfile' from t1; +--enable_ps2_protocol truncate table t1; --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR eval load data local infile '$MYSQLD_DATADIR/rpl_loaddatalocal.select_outfile' into table t1; @@ -111,7 +117,9 @@ CREATE TABLE t1(a int); INSERT INTO t1 VALUES (1), (2), (3), (4); --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR +--disable_ps2_protocol eval SELECT * INTO OUTFILE '$MYSQLD_DATADIR/bug43746.sql' FROM t1; +--enable_ps2_protocol TRUNCATE TABLE t1; --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR @@ -159,7 +167,9 @@ sync_slave_with_master; connection master; --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR +--disable_ps2_protocol eval SELECT * INTO OUTFILE '$MYSQLD_DATADIR/bug59267.sql' FROM t1; +--enable_ps2_protocol TRUNCATE TABLE t1; --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR @@ -204,7 +214,9 @@ CREATE VIEW v1 AS SELECT * FROM t2 WHERE f1 IN (SELECT f1 FROM t3 WHERE (t3.f2 IS NULL)); --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR +--disable_ps2_protocol eval SELECT 1 INTO OUTFILE '$MYSQLD_DATADIR/bug60580.csv' FROM DUAL; +--enable_ps2_protocol --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR eval LOAD DATA LOCAL INFILE '$MYSQLD_DATADIR/bug60580.csv' INTO TABLE t1 (@f1) SET f2 = (SELECT f1 FROM v1 WHERE f1=@f1); diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_map.test b/mysql-test/suite/rpl/t/rpl_loaddata_map.test index 655bcc39cb9..0df424aa1ac 100644 --- a/mysql-test/suite/rpl/t/rpl_loaddata_map.test +++ b/mysql-test/suite/rpl/t/rpl_loaddata_map.test @@ -37,7 +37,9 @@ while($rows) eval insert into t1 values (null); dec $rows; } +--disable_ps2_protocol eval select * into outfile '$MYSQLTEST_VARDIR/tmp/bug30435_5k.txt' from t1; +--enable_ps2_protocol DROP TABLE t1; SET @@sql_log_bin= 1; diff --git a/mysql-test/suite/rpl/t/rpl_loadfile.test b/mysql-test/suite/rpl/t/rpl_loadfile.test index 9cd64530690..a49b3c30b87 100644 --- a/mysql-test/suite/rpl/t/rpl_loadfile.test +++ b/mysql-test/suite/rpl/t/rpl_loadfile.test @@ -69,7 +69,9 @@ connection master; let $file= $MYSQLTEST_VARDIR/tmp/bug_39701.data; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_ps2_protocol --eval SELECT repeat('x',20) INTO OUTFILE '$file' +--enable_ps2_protocol disable_warnings; DROP TABLE IF EXISTS t1; diff --git a/mysql-test/suite/rpl/t/rpl_misc_functions.test b/mysql-test/suite/rpl/t/rpl_misc_functions.test index 7189e5c44ba..7211acd508c 100644 --- a/mysql-test/suite/rpl/t/rpl_misc_functions.test +++ b/mysql-test/suite/rpl/t/rpl_misc_functions.test @@ -26,7 +26,9 @@ insert into t1 values(3, 0, 0, 0, password('does_this_work?')); --disable_warnings insert into t1 values(4, connection_id(), rand()*1000, rand()*1000, password('does_this_still_work?')); --enable_warnings +--disable_ps2_protocol select * into outfile 'rpl_misc_functions.outfile' from t1; +--enable_ps2_protocol let $MYSQLD_DATADIR= `select @@datadir`; sync_slave_with_master; create temporary table t2 like t1; @@ -90,7 +92,9 @@ INSERT INTO t1 (col_a) VALUES (test_replication_sf()); --sync_slave_with_master # Dump table on slave +--disable_ps2_protocol select * from t1 into outfile "../../tmp/t1_slave.txt"; +--enable_ps2_protocol # Load data from slave into temp table on master connection master; diff --git a/mysql-test/suite/rpl/t/rpl_mix_found_rows.test b/mysql-test/suite/rpl/t/rpl_mix_found_rows.test index c8b2eaef53b..af206c55d49 100644 --- a/mysql-test/suite/rpl/t/rpl_mix_found_rows.test +++ b/mysql-test/suite/rpl/t/rpl_mix_found_rows.test @@ -75,7 +75,9 @@ END $$ --delimiter ; SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a < 5 ORDER BY a LIMIT 1; +--disable_ps2_protocol SELECT log_rows(2,1), log_rows(2,2); +--enable_ps2_protocol CREATE TABLE t2 (a INT, b INT); diff --git a/mysql-test/suite/rpl/t/rpl_parallel_seq.test b/mysql-test/suite/rpl/t/rpl_parallel_seq.test index e975d079e52..f0dc4fe4485 100644 --- a/mysql-test/suite/rpl/t/rpl_parallel_seq.test +++ b/mysql-test/suite/rpl/t/rpl_parallel_seq.test @@ -16,7 +16,9 @@ SET @@session.binlog_row_image=FULL; SET @@session.debug_dbug="+d,binlog_force_commit_id"; SET @commit_id=7; SET @@gtid_seq_no=100; +--disable_ps2_protocol SELECT NEXT VALUE FOR s1; +--enable_ps2_protocol INSERT INTO s1 VALUES(2, 1, 10, 1, 2, 1, 1, 0); SET @@session.debug_dbug=""; diff --git a/mysql-test/suite/rpl/t/rpl_row_func001.test b/mysql-test/suite/rpl/t/rpl_row_func001.test index 6ff97388b31..2327ba9a48c 100644 --- a/mysql-test/suite/rpl/t/rpl_row_func001.test +++ b/mysql-test/suite/rpl/t/rpl_row_func001.test @@ -33,8 +33,10 @@ return 0; end// delimiter ;// +--disable_ps2_protocol select test.f1(1); select test.f1(2); +--enable_ps2_protocol select * from test.t1; save_master_pos; diff --git a/mysql-test/suite/rpl/t/rpl_slow_query_log.test b/mysql-test/suite/rpl/t/rpl_slow_query_log.test index df88d42ed68..84ccdd7e9cb 100644 --- a/mysql-test/suite/rpl/t/rpl_slow_query_log.test +++ b/mysql-test/suite/rpl/t/rpl_slow_query_log.test @@ -49,6 +49,7 @@ TRUNCATE mysql.slow_log; source include/start_slave.inc; +--disable_ps2_protocol connection master; CREATE TABLE t1 (a int, b int); @@ -341,3 +342,4 @@ DROP TABLE t1; SET @@global.log_output= @old_log_output; SET @@global.long_query_time= @old_long_query_time; --source include/rpl_end.inc +--enable_ps2_protocol diff --git a/mysql-test/suite/rpl/t/rpl_sp.test b/mysql-test/suite/rpl/t/rpl_sp.test index 637dda47489..9c946a3fe8c 100644 --- a/mysql-test/suite/rpl/t/rpl_sp.test +++ b/mysql-test/suite/rpl/t/rpl_sp.test @@ -195,7 +195,9 @@ end| delimiter ;| delete t1,t2 from t1,t2; +--disable_ps2_protocol select fn1(20); +--enable_ps2_protocol insert into t2 values(fn1(21)); --sorted_result select * from t1; diff --git a/mysql-test/suite/rpl/t/rpl_sp_effects.test b/mysql-test/suite/rpl/t/rpl_sp_effects.test index 05bd49330ed..08d806b1b3c 100644 --- a/mysql-test/suite/rpl/t/rpl_sp_effects.test +++ b/mysql-test/suite/rpl/t/rpl_sp_effects.test @@ -91,7 +91,9 @@ SELECT * FROM t1 ORDER BY a; create table t2(a int); insert into t2 values (10),(11); +--disable_ps2_protocol SELECT a,f1(a) FROM t2 ORDER BY a; +--enable_ps2_protocol # This shouldn't put separate 'call f1(3)' into binlog: insert into t2 select f1(3); @@ -110,7 +112,9 @@ delete from t2; delete from t1; insert into t2 values(1),(2); create view v1 as select f1(a) as f from t2; +--disable_ps2_protocol select * from v1 order by f; +--enable_ps2_protocol SELECT 'master:',a FROM t1 ORDER BY a; sync_slave_with_master; @@ -192,7 +196,9 @@ delimiter ;// set @x=10; set @y=20; set @z=100; +--disable_ps2_protocol select f1(); +--enable_ps2_protocol set @x=30; call p1(); @@ -238,10 +244,12 @@ DELIMITER ;// call sp_bug26199(b'1110'); call sp_bug26199('\0'); +--disable_ps2_protocol select sf_bug26199(b'1111111'); SET STATEMENT sql_mode = '' FOR select sf_bug26199(b'101111111'); select sf_bug26199('\''); +--enable_ps2_protocol select hex(b) from t2; sync_slave_with_master; diff --git a/mysql-test/suite/rpl/t/rpl_stm_found_rows.test b/mysql-test/suite/rpl/t/rpl_stm_found_rows.test index 9d76879a4ac..c1b7e02319b 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_found_rows.test +++ b/mysql-test/suite/rpl/t/rpl_stm_found_rows.test @@ -35,14 +35,18 @@ SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1; # Instead of # INSERT INTO logtbl VALUES(1, 1, FOUND_ROWS()); # we write +--disable_ps2_protocol SELECT FOUND_ROWS() INTO @a; +--enable_ps2_protocol INSERT INTO logtbl VALUES(1,1,@a); SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a < 5 ORDER BY a LIMIT 1; # Instead of # INSERT INTO logtbl VALUES(1, 2, FOUND_ROWS()); # we write +--disable_ps2_protocol SELECT FOUND_ROWS() INTO @a; +--enable_ps2_protocol INSERT INTO logtbl VALUES(1,2,@a); SELECT * FROM logtbl WHERE sect = 1 ORDER BY sect,test; @@ -78,7 +82,9 @@ END $$ --delimiter ; SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1; +--disable_ps2_protocol SELECT FOUND_ROWS() INTO @found_rows; +--enable_ps2_protocol CALL just_log(2,3,@found_rows); SELECT * FROM logtbl WHERE sect = 2 ORDER BY sect,test; @@ -98,8 +104,10 @@ END $$ --delimiter ; SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1; +--disable_ps2_protocol SELECT FOUND_ROWS() INTO @found_rows; SELECT log_rows(3,1,@found_rows), log_rows(3,2,@found_rows); +--enable_ps2_protocol SELECT * FROM logtbl WHERE sect = 3 ORDER BY sect,test; sync_slave_with_master; diff --git a/mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test b/mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test index 31b80732c60..50277b1b799 100644 --- a/mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test +++ b/mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test @@ -238,7 +238,9 @@ begin return 100; end| delimiter ;| +--disable_ps2_protocol select foo4(); +--enable_ps2_protocol prepare stmt1 from 'select foo4()'; execute stmt1; @@ -253,7 +255,9 @@ begin return 100; end| delimiter ;| +--disable_ps2_protocol select foo5(); +--enable_ps2_protocol prepare stmt1 from 'select foo5()'; execute stmt1; @@ -268,8 +272,10 @@ begin return 100; end| delimiter ;| +--disable_ps2_protocol select foo6("foo6_1_"); select foo6(concat("foo6_2_",UUID())); +--enable_ps2_protocol prepare stmt1 from 'select foo6(concat("foo6_3_",UUID()))'; execute stmt1; @@ -376,7 +382,9 @@ begin return 1; end| delimiter ;| +--disable_ps2_protocol select f("try_41_"); +--enable_ps2_protocol # Two operations which compensate each other except that their net # effect is that they advance the auto_increment counter of t2 on slave: sync_slave_with_master; @@ -386,7 +394,9 @@ delete from t2 where a>=2; connection master; # this is the call which didn't replicate well +--disable_ps2_protocol select f("try_42_"); +--enable_ps2_protocol sync_slave_with_master; # now use prepared statement and test again, just to see that the RBB @@ -410,7 +420,9 @@ connection master; create table t12 select * from t1; # save for comparing later drop table t1; create table t1 (a int, b varchar(100), key(a)); +--disable_ps2_protocol select f("try_45_"); +--enable_ps2_protocol # restore table's key create table t13 select * from t1; @@ -435,7 +447,9 @@ begin return 1; end| delimiter ;| +--disable_ps2_protocol select f1("try_46_"),f2("try_47_"); +--enable_ps2_protocol sync_slave_with_master; insert into t2 values(2,null),(3,null),(4,null); @@ -443,7 +457,9 @@ delete from t2 where a>=2; connection master; # Test with SELECT and INSERT +--disable_ps2_protocol select f1("try_48_"),f2("try_49_"); +--enable_ps2_protocol insert into t3 values(concat("try_50_",f1("try_51_"),f2("try_52_"))); sync_slave_with_master; @@ -460,7 +476,9 @@ begin return y; end| delimiter ;| +--disable_ps2_protocol select f1("try_53_"),f2("try_54_"); +--enable_ps2_protocol sync_slave_with_master; # And now, a normal statement with a trigger (no stored functions) diff --git a/mysql-test/suite/rpl/t/rpl_variables.test b/mysql-test/suite/rpl/t/rpl_variables.test index 1b83d5d57d7..f6e88c5ae61 100644 --- a/mysql-test/suite/rpl/t/rpl_variables.test +++ b/mysql-test/suite/rpl/t/rpl_variables.test @@ -468,8 +468,9 @@ BEGIN END| DELIMITER ;| +--disable_ps2_protocol SELECT func(); - +--enable_ps2_protocol --echo ==== Insert variables from a trigger ==== diff --git a/mysql-test/suite/rpl/t/rpl_variables_stm.test b/mysql-test/suite/rpl/t/rpl_variables_stm.test index 1cc3cde3280..ffbb3e7749a 100644 --- a/mysql-test/suite/rpl/t/rpl_variables_stm.test +++ b/mysql-test/suite/rpl/t/rpl_variables_stm.test @@ -372,9 +372,11 @@ BEGIN END| DELIMITER ;| +--disable_ps2_protocol --disable_warnings SELECT func(); --enable_warnings +--enable_ps2_protocol --echo ==== Insert variables from a trigger ==== diff --git a/mysql-test/suite/rpl/t/rpl_view_multi.test b/mysql-test/suite/rpl/t/rpl_view_multi.test index c8af44bfc6e..50b9c184d91 100644 --- a/mysql-test/suite/rpl/t/rpl_view_multi.test +++ b/mysql-test/suite/rpl/t/rpl_view_multi.test @@ -27,6 +27,7 @@ drop view if exists v1; --echo # Syncing slave with master --sync_slave_with_master +--disable_ps2_protocol connect (master2,127.0.0.1,root,,test,$MASTER_MYPORT,); connection master; @@ -122,6 +123,7 @@ select * from t2; --echo # So we have same result on slave. select * from t1; select * from t2; +--enable_ps2_protocol connection master; drop table t1, t2; diff --git a/mysql-test/suite/rpl/t/sequence.test b/mysql-test/suite/rpl/t/sequence.test index 436a0b1cdab..5c6a8e1ea23 100644 --- a/mysql-test/suite/rpl/t/sequence.test +++ b/mysql-test/suite/rpl/t/sequence.test @@ -27,7 +27,9 @@ set @@default_storage_engine="aria"; CREATE SEQUENCE s1 cache=10; create table t1 select * from s1; +--disable_ps2_protocol select NEXT VALUE for s1,seq from seq_1_to_20; +--enable_ps2_protocol insert into t1 select * from s1; do setval(s1,5, 1, 0); insert into t1 select * from s1; diff --git a/mysql-test/suite/sql_sequence/alter.test b/mysql-test/suite/sql_sequence/alter.test index a5e6245d609..e6bbaba614a 100644 --- a/mysql-test/suite/sql_sequence/alter.test +++ b/mysql-test/suite/sql_sequence/alter.test @@ -7,6 +7,7 @@ drop table if exists t1; --echo # Test alter sequence --echo # +--disable_ps2_protocol CREATE SEQUENCE t1 nocache engine=myisam; select * from t1; select next value for t1; @@ -161,3 +162,4 @@ CREATE SEQUENCE s; ALTER TABLE s ORDER BY cache_size; SELECT NEXTVAL(s); DROP SEQUENCE s; +--enable_ps2_protocol diff --git a/mysql-test/suite/sql_sequence/alter_notembedded.test b/mysql-test/suite/sql_sequence/alter_notembedded.test index a7c37b53473..5bd54a7c721 100644 --- a/mysql-test/suite/sql_sequence/alter_notembedded.test +++ b/mysql-test/suite/sql_sequence/alter_notembedded.test @@ -10,6 +10,7 @@ create database s_db; create sequence s_db.s1; grant select on s_db.s1 to normal_1@'%' identified by 'pass'; +--disable_ps2_protocol connect(m_normal_1, localhost, normal_1, pass, s_db); select * from s1; --error ER_TABLEACCESS_DENIED_ERROR @@ -30,6 +31,7 @@ alter sequence s1 restart 50; select nextval(s1); --error ER_TABLEACCESS_DENIED_ERROR drop sequence s1; +--enable_ps2_protocol connection default; disconnect m_normal_1; diff --git a/mysql-test/suite/sql_sequence/aria.test b/mysql-test/suite/sql_sequence/aria.test index 8e8a50ef412..daca8aff71c 100644 --- a/mysql-test/suite/sql_sequence/aria.test +++ b/mysql-test/suite/sql_sequence/aria.test @@ -8,6 +8,7 @@ set @@default_storage_engine="aria"; +--disable_ps2_protocol CREATE SEQUENCE t1 cache=10; show create sequence t1; select NEXT VALUE for t1,seq from seq_1_to_20; @@ -41,3 +42,4 @@ select next value for t2; alter table t2 rename to t1; select next value for t1; drop table t1; +--enable_ps2_protocol diff --git a/mysql-test/suite/sql_sequence/auto_increment.test b/mysql-test/suite/sql_sequence/auto_increment.test index 335bef7ea37..11f772b67b9 100644 --- a/mysql-test/suite/sql_sequence/auto_increment.test +++ b/mysql-test/suite/sql_sequence/auto_increment.test @@ -4,6 +4,7 @@ # tests with auto_increment_increment and auto_increment_offset # +--disable_ps2_protocol set global auto_increment_increment= 2, auto_increment_offset= 2; create sequence s start with -3 minvalue= -1000 increment 0; @@ -24,6 +25,7 @@ select nextval(s); flush tables; select nextval(s); drop sequence s; +--enable_ps2_protocol # Clean up diff --git a/mysql-test/suite/sql_sequence/binlog.test b/mysql-test/suite/sql_sequence/binlog.test index 6a12e670a1e..70d28038a82 100644 --- a/mysql-test/suite/sql_sequence/binlog.test +++ b/mysql-test/suite/sql_sequence/binlog.test @@ -11,10 +11,12 @@ reset master; # get rid of previous tests binlog --enable_query_log create or replace sequence s1 cache 3; +--disable_ps2_protocol select next value for s1, minimum_value from s1 where maximum_value> 1; select next value for s1, minimum_value from s1 where maximum_value> 2; select next value for s1, minimum_value from s1 where maximum_value> 3; select next value for s1, minimum_value from s1 where maximum_value> 4; +--enable_ps2_protocol # # Alter sequence diff --git a/mysql-test/suite/sql_sequence/concurrent_create.test b/mysql-test/suite/sql_sequence/concurrent_create.test index b27a6d3bdb9..e9a61e63b78 100644 --- a/mysql-test/suite/sql_sequence/concurrent_create.test +++ b/mysql-test/suite/sql_sequence/concurrent_create.test @@ -69,7 +69,9 @@ FLUSH TABLES; --disconnect con1 --connection default +--disable_ps2_protocol SELECT NEXTVAL(s1); +--enable_ps2_protocol COMMIT; # Cleanup diff --git a/mysql-test/suite/sql_sequence/create.test b/mysql-test/suite/sql_sequence/create.test index aa58b0c5fec..fa85c0a8f0a 100644 --- a/mysql-test/suite/sql_sequence/create.test +++ b/mysql-test/suite/sql_sequence/create.test @@ -379,6 +379,7 @@ drop view v1; # CREATE TEMPORARY SEQUENCE # +--disable_ps2_protocol CREATE TEMPORARY SEQUENCE t1; select next value for t1; drop temporary table t1; @@ -411,6 +412,7 @@ select previous value for t1; drop temporary sequence t1; select previous value for t1; drop sequence t1; +--enable_ps2_protocol # # Check that we can't create anything with the sequence engine diff --git a/mysql-test/suite/sql_sequence/default.test b/mysql-test/suite/sql_sequence/default.test index 28eb71e39cc..f965089d992 100644 --- a/mysql-test/suite/sql_sequence/default.test +++ b/mysql-test/suite/sql_sequence/default.test @@ -29,10 +29,12 @@ INSERT into t1 values(default(a),10); INSERT into t1 values(default(a),default(a)); update t1 set a=default(a), b=12 where b=2; select * from t1; +--disable_ps2_protocol select default(a), a, b from t1; select * from s1; select * from t1 where default(a) > 0; select * from s1; +--enable_ps2_protocol --echo # --echo # View @@ -70,7 +72,9 @@ UNLOCK TABLES; LOCK TABLE t1 WRITE, s1 WRITE; insert into t1 (b) values (5),(6); +--disable_ps2_protocol select default(a) from t1; +--enable_ps2_protocol UNLOCK TABLES; LOCK TABLE t1 READ; diff --git a/mysql-test/suite/sql_sequence/grant.test b/mysql-test/suite/sql_sequence/grant.test index 3a911d79671..fb8a9f813a6 100644 --- a/mysql-test/suite/sql_sequence/grant.test +++ b/mysql-test/suite/sql_sequence/grant.test @@ -22,6 +22,7 @@ connect(read_write,localhost,read_write,,mysqltest_1); connect(alter,localhost,alter,,mysqltest_1); connect(only_alter, localhost, only_alter,,mysqltest_1); +--disable_ps2_protocol connection normal; create sequence s1; select next value for s1; @@ -52,6 +53,7 @@ select next value for s1; alter sequence s1 restart= 11; --error ER_TABLEACCESS_DENIED_ERROR select * from s1; +--enable_ps2_protocol # # Cleanup diff --git a/mysql-test/suite/sql_sequence/gtid.test b/mysql-test/suite/sql_sequence/gtid.test index 63ed7ec5264..230fbef8070 100644 --- a/mysql-test/suite/sql_sequence/gtid.test +++ b/mysql-test/suite/sql_sequence/gtid.test @@ -6,6 +6,7 @@ --source include/master-slave.inc --source include/have_innodb.inc +--disable_ps2_protocol connection master; create database s_db; grant all on s_db.* to normal_1@'%' identified by 'pass'; @@ -704,5 +705,6 @@ drop user normal_2@'%'; drop user normal_3@'%'; drop user normal_4@'%'; drop user normal_5@'%'; +--enable_ps2_protocol --source include/rpl_end.inc diff --git a/mysql-test/suite/sql_sequence/next.test b/mysql-test/suite/sql_sequence/next.test index a80f9fad561..18b52961a54 100644 --- a/mysql-test/suite/sql_sequence/next.test +++ b/mysql-test/suite/sql_sequence/next.test @@ -5,6 +5,7 @@ # Test sequence generation # +--disable_ps2_protocol CREATE SEQUENCE t1 start with 1 minvalue 1 maxvalue 10 increment by 1 cache 2 cycle; show create table t1; select next value for t1; @@ -297,3 +298,4 @@ SELECT SETVAL (v,0); UNLOCK TABLES; DROP VIEW v; +--disable_ps2_protocol diff --git a/mysql-test/suite/sql_sequence/other.test b/mysql-test/suite/sql_sequence/other.test index 0fbb2d0e2f9..a811853751a 100644 --- a/mysql-test/suite/sql_sequence/other.test +++ b/mysql-test/suite/sql_sequence/other.test @@ -9,6 +9,7 @@ --echo # Create and check --echo # +--disable_ps2_protocol create sequence s1 engine=innodb; check table s1; select next value for s1; @@ -27,6 +28,7 @@ check table s1; select next value for s1; select * from s1; drop sequence s1; +--enable_ps2_protocol --echo # --echo # INSERT @@ -45,7 +47,9 @@ insert into s1 values(0,9223372036854775806,1,1,1,1000,0,0); select * from s1; insert into s1 values(1000,1,9223372036854775806,1,1,1000,0,0); select * from s1; +--disable_ps2_protocol select next value for s1; +--enable_ps2_protocol select * from s1; --error ER_SEQUENCE_INVALID_DATA insert into s2 values(0, 1, 10, 1, 2, 1, 1, 0); @@ -98,6 +102,7 @@ drop table s1; --echo # Many sequence calls with innodb --echo # +--disable_ps2_protocol create sequence s1 cache=1000 engine=innodb; start transaction; select count(nextval(s1)) from seq_1_to_2000; @@ -120,11 +125,13 @@ connection default; select * from s1; commit; drop sequence s1; +--enable_ps2_protocol --echo # --echo # Flush tables with read lock --echo # +--disable_ps2_protocol create sequence s1; select next value for s1; flush tables with read lock; @@ -134,6 +141,7 @@ create sequence s2; select next value for s1; unlock tables; drop sequence s1; +--enable_ps2_protocol --echo # --echo # MDEV-14761 diff --git a/mysql-test/suite/sql_sequence/read_only.test b/mysql-test/suite/sql_sequence/read_only.test index 73103384882..141a310c040 100644 --- a/mysql-test/suite/sql_sequence/read_only.test +++ b/mysql-test/suite/sql_sequence/read_only.test @@ -39,6 +39,8 @@ select * from s1; --let $restart_parameters= --source include/restart_mysqld.inc select * from s1; +--disable_ps2_protocol select next value for s1; +--enable_ps2_protocol select * from s1; drop sequence s1; diff --git a/mysql-test/suite/sql_sequence/replication.test b/mysql-test/suite/sql_sequence/replication.test index e26fde8a329..35feb3d8fd8 100644 --- a/mysql-test/suite/sql_sequence/replication.test +++ b/mysql-test/suite/sql_sequence/replication.test @@ -9,6 +9,7 @@ --source include/master-slave.inc --source include/have_innodb.inc +--disable_ps2_protocol connection master; create database s_db; use s_db; @@ -868,6 +869,7 @@ select * from t1; select * from s1; connection master; drop table t1,s1; +--enable_ps2_protocol # # Cleanup diff --git a/mysql-test/suite/sql_sequence/replication_mixed.test b/mysql-test/suite/sql_sequence/replication_mixed.test index 0096ab5acd8..4796c84835f 100644 --- a/mysql-test/suite/sql_sequence/replication_mixed.test +++ b/mysql-test/suite/sql_sequence/replication_mixed.test @@ -9,7 +9,9 @@ --echo # CREATE SEQUENCE s1 ENGINE=InnoDB; +--disable_ps2_protocol SELECT NEXTVAL(s1); +--enable_ps2_protocol CREATE TABLE t1 ENGINE=InnoDB SELECT LASTVAL(s1) AS a; INSERT INTO t1 VALUES (NEXTVAL(s1)); INSERT INTO t1 VALUES (LASTVAL(s1)); diff --git a/mysql-test/suite/sql_sequence/setval.test b/mysql-test/suite/sql_sequence/setval.test index 1993bdbe077..712e7a77be7 100644 --- a/mysql-test/suite/sql_sequence/setval.test +++ b/mysql-test/suite/sql_sequence/setval.test @@ -7,6 +7,7 @@ drop table if exists t1; --echo # Test setval function --echo # +--disable_ps2_protocol CREATE SEQUENCE t1 cache 10 engine=myisam; select next_not_cached_value,cycle_count from t1; do setval(t1,10); @@ -151,6 +152,6 @@ SELECT SETVAL(s, 10); # Cleanup DROP SEQUENCE s; - +--enable_ps2_protocol --echo # End of 10.3 tests diff --git a/mysql-test/suite/sql_sequence/slave_nextval.test b/mysql-test/suite/sql_sequence/slave_nextval.test index 70da1044540..41aca150625 100644 --- a/mysql-test/suite/sql_sequence/slave_nextval.test +++ b/mysql-test/suite/sql_sequence/slave_nextval.test @@ -5,6 +5,7 @@ # MDEV-14092 NEXTVAL() fails on slave # +--disable_ps2_protocol CREATE SEQUENCE s; INSERT INTO s VALUES (1,1,4,1,1,1,0,0); show create sequence s; @@ -125,6 +126,7 @@ END $ --connection master DROP SEQUENCE s; DROP PROCEDURE pr; +--enable_ps2_protocol # # Cleanup diff --git a/mysql-test/suite/sql_sequence/temporary.test b/mysql-test/suite/sql_sequence/temporary.test index aeacf6e9497..e57dc693304 100644 --- a/mysql-test/suite/sql_sequence/temporary.test +++ b/mysql-test/suite/sql_sequence/temporary.test @@ -11,7 +11,9 @@ create temporary sequence s1 engine=innodb; alter table s1 engine myisam; +--disable_ps2_protocol select nextval(s1); +--enable_ps2_protocol select * from s1; drop temporary sequence s1; @@ -28,6 +30,7 @@ DROP TEMPORARY SEQUENCE s1; --echo # MDEV-13007 ALTER .. ENGINE on temporary sequence may go wrong --echo # +--disable_ps2_protocol create temporary sequence s1 engine=aria; alter table s1 engine myisam; select nextval(s1); @@ -41,3 +44,4 @@ alter table s1 engine innodb; select nextval(s1); select nextval(s1); drop temporary sequence s1; +--enable_ps2_protocol diff --git a/mysql-test/suite/sql_sequence/view.test b/mysql-test/suite/sql_sequence/view.test index 5b970432a34..affac002878 100644 --- a/mysql-test/suite/sql_sequence/view.test +++ b/mysql-test/suite/sql_sequence/view.test @@ -8,9 +8,11 @@ create sequence s1; create view v1 as select * from s1; create view v2 as select next value for s1; +--disable_ps2_protocol select * from v1; select * from v2; select * from v2; +--enable_ps2_protocol --error ER_NOT_SEQUENCE select next value for v1; drop sequence s1; diff --git a/mysql-test/suite/sys_vars/t/group_concat_max_len_func.test b/mysql-test/suite/sys_vars/t/group_concat_max_len_func.test index b053ee229d7..50ba211e3ca 100644 --- a/mysql-test/suite/sys_vars/t/group_concat_max_len_func.test +++ b/mysql-test/suite/sys_vars/t/group_concat_max_len_func.test @@ -78,14 +78,17 @@ connect (test_con2,localhost,root,,); connection test_con1; --echo ## Accessing data and using group_concat on column whose value is greater than 4 ## +--disable_ps2_protocol SELECT id, rollno, GROUP_CONCAT(name) FROM t1 GROUP BY rollno; +--enable_ps2_protocol --echo ## Changing session value of variable and verifying its behavior, ## --echo ## warning should come here ## SET @@session.group_concat_max_len = 10; +--disable_ps2_protocol SELECT id, rollno, GROUP_CONCAT(name) FROM t1 GROUP BY rollno; - +--enable_ps2_protocol --echo '#--------------------FN_DYNVARS_034_03-------------------------#' ############################################################################## @@ -103,8 +106,9 @@ SET @@session.group_concat_max_len = 20; --echo ## Verifying value of name column, it should not me more than 20 characters ## --echo ## Warning should come here ## +--disable_ps2_protocol SELECT id, rollno, GROUP_CONCAT(name) FROM t1 GROUP BY rollno; - +--enable_ps2_protocol --echo '#--------------------FN_DYNVARS_034_04-------------------------#' ############################################################################### diff --git a/mysql-test/suite/sys_vars/t/log_disabled_statements_func.test b/mysql-test/suite/sys_vars/t/log_disabled_statements_func.test index a7a088cdcd9..1e5602eabf1 100644 --- a/mysql-test/suite/sys_vars/t/log_disabled_statements_func.test +++ b/mysql-test/suite/sys_vars/t/log_disabled_statements_func.test @@ -22,7 +22,9 @@ select @@log_disabled_statements; TRUNCATE TABLE mysql.general_log; check table t1; CALL slow(); +--disable_ps2_protocol SELECT count(if(sleep(1) >= 0,0,NULL)) from t1 where j>'b and part2'; +--enable_ps2_protocol --echo --> SELECT argument FROM mysql.general_log where command_type <> "Close stmt" and command_type <> "Prepare" and argument not like "%general_log%"; @@ -32,7 +34,9 @@ TRUNCATE TABLE mysql.general_log; SET SESSION log_disabled_statements=""; check table t1; CALL slow(); +--disable_ps2_protocol SELECT count(if(sleep(1) >= 0,0,NULL)) from t1 where j>'b and part3'; +--enable_ps2_protocol --echo --> SELECT argument FROM mysql.general_log where command_type <> "Close stmt" and command_type <> "Prepare" and argument not like "%general_log%"; @@ -42,7 +46,9 @@ TRUNCATE TABLE mysql.general_log; SET SESSION log_disabled_statements="sp,slave"; check table t1; CALL slow(); +--disable_ps2_protocol SELECT count(if(sleep(1) >= 0,0,NULL)) from t1 where j>'b and part4'; +--enable_ps2_protocol --echo --> SELECT argument FROM mysql.general_log where command_type <> "Close stmt" and command_type <> "Prepare" and argument not like "%general_log%"; diff --git a/mysql-test/suite/sys_vars/t/log_slow_admin_statements_func.test b/mysql-test/suite/sys_vars/t/log_slow_admin_statements_func.test index 97822a0f23a..b8a76a84bbd 100644 --- a/mysql-test/suite/sys_vars/t/log_slow_admin_statements_func.test +++ b/mysql-test/suite/sys_vars/t/log_slow_admin_statements_func.test @@ -50,7 +50,9 @@ CHECK TABLE log_slow_admin_statements EXTENDED; DROP TABLE log_slow_admin_statements; # ALTER, OPTIMIZE, CHECK and DROP operations should be logged in slow query log. +--disable_ps2_protocol SELECT sql_text FROM mysql.slow_log WHERE sql_text LIKE '%TABLE log_slow_admin_statements%'; +--enable_ps2_protocol SET @@global.log_output= @old_log_output; SET @@global.slow_query_log= @old_slow_query_log; diff --git a/mysql-test/suite/sys_vars/t/log_slow_disabled_statements_func.test b/mysql-test/suite/sys_vars/t/log_slow_disabled_statements_func.test index 483948c840e..db9bc8fb48f 100644 --- a/mysql-test/suite/sys_vars/t/log_slow_disabled_statements_func.test +++ b/mysql-test/suite/sys_vars/t/log_slow_disabled_statements_func.test @@ -38,6 +38,7 @@ DELIMITER ;$ SET SESSION long_query_time = 0; +--disable_ps2_protocol SELECT @@log_slow_disabled_statements; TRUNCATE TABLE mysql.slow_log; ALTER TABLE t1 add column extra int; @@ -77,6 +78,7 @@ SELECT count(if(sleep(1) >= 0,0,NULL)) from t1 where j>'b and part5'; --echo --> SELECT sql_text FROM mysql.slow_log where sql_text <> "Close stmt" and sql_text <> "Prepare"; --echo <-- +--enable_ps2_protocol DROP TABLE t1,t2; DROP PROCEDURE slow; diff --git a/mysql-test/suite/sys_vars/t/query_cache_limit_func.test b/mysql-test/suite/sys_vars/t/query_cache_limit_func.test index c115524d49d..e0105c89866 100644 --- a/mysql-test/suite/sys_vars/t/query_cache_limit_func.test +++ b/mysql-test/suite/sys_vars/t/query_cache_limit_func.test @@ -114,7 +114,9 @@ SET @@GLOBAL.query_cache_limit = 0; #fetching results# --echo ** fetching results ** +--disable_ps2_protocol SELECT * FROM t; +--enable_ps2_protocol # Check status after setting value# --echo ** Check status after setting value ** diff --git a/mysql-test/suite/sys_vars/t/secure_file_priv.test b/mysql-test/suite/sys_vars/t/secure_file_priv.test index a5a465d8c98..74c07d160f1 100644 --- a/mysql-test/suite/sys_vars/t/secure_file_priv.test +++ b/mysql-test/suite/sys_vars/t/secure_file_priv.test @@ -25,7 +25,9 @@ my $protected_file= dirname($ENV{MYSQLTEST_VARDIR}).'/bug50373.txt'; # test runs). unlink $protected_file; open(FILE, ">", "$ENV{MYSQL_TMP_DIR}/bug50373.inc") or die; +print FILE "--disable_ps2_protocol\n"; print FILE "SELECT * FROM t1 INTO OUTFILE '".$protected_file."';\n"; +print FILE "--enable_ps2_protocol\n"; print FILE "DELETE FROM t1;\n"; print FILE "LOAD DATA INFILE '".$protected_file."' INTO TABLE t1;\n"; print FILE "SELECT * FROM t1;\n"; diff --git a/mysql-test/suite/sys_vars/t/sql_buffer_result_func.test b/mysql-test/suite/sys_vars/t/sql_buffer_result_func.test index 380f2568b9c..77f947c9913 100644 --- a/mysql-test/suite/sys_vars/t/sql_buffer_result_func.test +++ b/mysql-test/suite/sys_vars/t/sql_buffer_result_func.test @@ -51,14 +51,18 @@ SHOW STATUS LIKE 'Created_tmp_tables'; --enable_ps_protocol --echo Expected value : 0. +--disable_ps2_protocol SELECT * FROM t1; +--enable_ps2_protocol --disable_ps_protocol SHOW STATUS LIKE 'Created_tmp_tables'; --enable_ps_protocol --echo Expected value : 1. +--disable_ps2_protocol SELECT * FROM t1; +--enable_ps2_protocol --disable_ps_protocol SHOW STATUS LIKE 'Created_tmp_tables'; diff --git a/mysql-test/suite/sys_vars/t/tmp_disk_table_size_func.test b/mysql-test/suite/sys_vars/t/tmp_disk_table_size_func.test index 6b3d2e1fa1b..c78eac199c3 100644 --- a/mysql-test/suite/sys_vars/t/tmp_disk_table_size_func.test +++ b/mysql-test/suite/sys_vars/t/tmp_disk_table_size_func.test @@ -15,6 +15,7 @@ SET @start_tmp_disk_table_size=@@session.tmp_disk_table_size; set @@session.tmp_memory_table_size=1000; set @@session.tmp_disk_table_size=3000000; +--disable_ps2_protocol create table t1 (a int primary key, b varchar(2000)); insert into t1 select seq,repeat(char(mod(seq,62)+64),seq) from seq_1_to_2000; insert into t1 values (20000,"A"); @@ -25,3 +26,4 @@ set @@session.tmp_disk_table_size=1000000; select count(*) as c from t1 group by b having c>1; show status like "created_tmp_disk%"; drop table t1; +--enable_ps2_protocol diff --git a/mysql-test/suite/vcol/inc/vcol_trigger_sp.inc b/mysql-test/suite/vcol/inc/vcol_trigger_sp.inc index 8be139471f1..c7dedcdd74c 100644 --- a/mysql-test/suite/vcol/inc/vcol_trigger_sp.inc +++ b/mysql-test/suite/vcol/inc/vcol_trigger_sp.inc @@ -197,6 +197,7 @@ DELIMITER ;| --echo # Inserts set @a=0,@b=0,@c=0; +--disable_ps2_protocol insert into t1 (a) values(1); insert into t1 (a,b) values(2, "*2*"); insert into t1 (a,b,c) values(3, "*3*", "**3**"); @@ -219,6 +220,7 @@ update t1 set a=a+100, b=NULL where a=3; update t1 set a=a+100, b="invisible", c=NULL where a=4; select @a,@b,@c; select * from t1; +--enable_ps2_protocol drop trigger t1_ins; drop trigger t1_update; diff --git a/mysql-test/suite/vcol/t/load_data.test b/mysql-test/suite/vcol/t/load_data.test index f4b3b60397e..1b662818cd2 100644 --- a/mysql-test/suite/vcol/t/load_data.test +++ b/mysql-test/suite/vcol/t/load_data.test @@ -5,7 +5,9 @@ create table t1 ( c1 varchar(10), c2 varchar(10), c3 int ); insert into t1 values ("a" , "b", 1), ("a" , "b", 2); create table t2 like t1 ; alter table t2 add column c4 bigint unsigned as (CONV(LEFT(MD5(concat(c1,c2,c3)), 16), 16, 10)) persistent unique key; +--disable_ps2_protocol select * into outfile 't1.csv' from t1; +--enable_ps2_protocol load data infile 't1.csv' ignore into table t2 ; select * from t2; insert into t2 (c1,c2,c3) values ("a" , "b", 4); diff --git a/mysql-test/suite/vcol/t/vcol_keys_myisam.test b/mysql-test/suite/vcol/t/vcol_keys_myisam.test index 6c3a94d2086..2a5aa3cd479 100644 --- a/mysql-test/suite/vcol/t/vcol_keys_myisam.test +++ b/mysql-test/suite/vcol/t/vcol_keys_myisam.test @@ -281,7 +281,9 @@ drop table t1; CREATE TABLE t1 (i INT, d1 DATE, d2 DATE NOT NULL, t TIMESTAMP, KEY(t)) ENGINE=MyISAM; INSERT INTO t1 VALUES (1,'2023-03-16','2023-03-15','2012-12-12 12:12:12'); ALTER TABLE t1 MODIFY t FLOAT AS (i) PERSISTENT; +--disable_ps2_protocol SELECT i, d1, d2 INTO OUTFILE 'load_t1' FROM t1; +--enable_ps2_protocol DELETE FROM t1; LOAD DATA INFILE 'load_t1' INTO TABLE t1 (i,d1,d2); SELECT * FROM t1 WHERE d2 < d1; diff --git a/mysql-test/suite/vcol/t/wrong_arena.test b/mysql-test/suite/vcol/t/wrong_arena.test index 296cb68f5c0..4b6f941563e 100644 --- a/mysql-test/suite/vcol/t/wrong_arena.test +++ b/mysql-test/suite/vcol/t/wrong_arena.test @@ -21,7 +21,10 @@ connect con1, localhost, root; disable_warnings; insert t1 (a) values ('2010-10-10 10:10:10'); enable_warnings; +#Enable after fix MDEV-31359 +--disable_ps2_protocol select * from t1; +--enable_ps2_protocol disconnect con1; connection default; disable_warnings; diff --git a/mysql-test/suite/versioning/t/foreign.test b/mysql-test/suite/versioning/t/foreign.test index 532086b791d..db3a98e03ec 100644 --- a/mysql-test/suite/versioning/t/foreign.test +++ b/mysql-test/suite/versioning/t/foreign.test @@ -396,15 +396,21 @@ INSERT INTO t2 VALUES (1,'against'),(2,'q'); SET SQL_MODE= ''; SET timestamp = 2; +--disable_ps2_protocol SELECT * INTO OUTFILE 't1.data' FROM t1; +--enable_ps2_protocol SET timestamp = 3; UPDATE t1 SET f13 = 'q'; SET timestamp = 4; LOAD DATA INFILE 't1.data' REPLACE INTO TABLE t1; +--disable_ps2_protocol SELECT * INTO OUTFILE 't1.data.2' FROM t1; +--enable_ps2_protocol SET timestamp = 5; LOAD DATA INFILE 't1.data.2' REPLACE INTO TABLE t1; +--disable_ps2_protocol SELECT * INTO OUTFILE 't2.data' FROM t2; +--enable_ps2_protocol SET timestamp = 6; LOAD DATA INFILE 't2.data' REPLACE INTO TABLE t2; SET FOREIGN_KEY_CHECKS = OFF; @@ -547,7 +553,9 @@ delete from t0; --error ER_ROW_IS_REFERENCED_2 replace t0 values (1); +--disable_ps2_protocol select * into outfile 'load_t0' from t0 ; +--enable_ps2_protocol --error ER_ROW_IS_REFERENCED_2 load data infile 'load_t0' replace into table t0; diff --git a/mysql-test/suite/versioning/t/load_data.test b/mysql-test/suite/versioning/t/load_data.test index 4db6eee6c4d..6668a4ff9f7 100644 --- a/mysql-test/suite/versioning/t/load_data.test +++ b/mysql-test/suite/versioning/t/load_data.test @@ -4,7 +4,9 @@ CREATE TABLE t1 (a INT, b INT, c INT, vc INT AS (c), UNIQUE(a), UNIQUE(b)) WITH SYSTEM VERSIONING; INSERT IGNORE INTO t1 (a,b,c) VALUES (1,2,3); +--disable_ps2_protocol SELECT a, b, c FROM t1 INTO OUTFILE '15330.data'; +--enable_ps2_protocol LOAD DATA INFILE '15330.data' IGNORE INTO TABLE t1 (a,b,c); LOAD DATA INFILE '15330.data' REPLACE INTO TABLE t1 (a,b,c); diff --git a/mysql-test/suite/versioning/t/partition.test b/mysql-test/suite/versioning/t/partition.test index f834984576e..0ccb64d332c 100644 --- a/mysql-test/suite/versioning/t/partition.test +++ b/mysql-test/suite/versioning/t/partition.test @@ -699,7 +699,9 @@ create or replace table t1 ( insert into t1 () values (),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(); +--disable_ps2_protocol select * into outfile 'load.data' from t1; +--enable_ps2_protocol load data infile 'load.data' replace into table t1; --error ER_RECORD_FILE_FULL load data infile 'load.data' replace into table t1; @@ -1041,7 +1043,9 @@ partition by system_time limit 100 ( partition pn current); insert into t1 select seq from seq_0_to_49; +--disable_ps2_protocol select x into outfile 'MDEV-20077.data' from t1; +--enable_ps2_protocol load data infile 'MDEV-20077.data' replace into table t1 (x); load data infile 'MDEV-20077.data' replace into table t1 (x); diff --git a/storage/connect/mysql-test/connect/t/infoschema-9739.test b/storage/connect/mysql-test/connect/t/infoschema-9739.test index 16f837cafcc..02b264e6d0b 100644 --- a/storage/connect/mysql-test/connect/t/infoschema-9739.test +++ b/storage/connect/mysql-test/connect/t/infoschema-9739.test @@ -5,5 +5,7 @@ --source windows.inc create table t1 (i int) engine=Connect table_type=XML option_list='xmlsup=domdoc'; +--disable_ps2_protocol select * from information_schema.tables where table_schema='test' and create_options like '%table_type=XML%'; +--enable_ps2_protocol drop table t1; diff --git a/storage/connect/mysql-test/connect/t/infoschema2-9739.test b/storage/connect/mysql-test/connect/t/infoschema2-9739.test index 76681bc91ed..a4c149148db 100644 --- a/storage/connect/mysql-test/connect/t/infoschema2-9739.test +++ b/storage/connect/mysql-test/connect/t/infoschema2-9739.test @@ -5,5 +5,7 @@ --source have_libxml2.inc create table t1 (i int) engine=Connect table_type=XML option_list='xmlsup=libxml2'; +--disable_ps2_protocol select * from information_schema.tables where table_schema='test' and create_options like '%table_type=XML%'; +--enable_ps2_protocol drop table t1; diff --git a/storage/connect/mysql-test/connect/t/json_udf.test b/storage/connect/mysql-test/connect/t/json_udf.test index d45131f32ba..96fe836e60b 100644 --- a/storage/connect/mysql-test/connect/t/json_udf.test +++ b/storage/connect/mysql-test/connect/t/json_udf.test @@ -33,7 +33,9 @@ SELECT Json_Array_Add(Json_Make_Array(56, 3.1416, 'foo', NULL), 'One more') Arra SELECT Json_Array_Add(JsonValue('one value'), 'One more'); #--error ER_CANT_INITIALIZE_UDF SELECT Json_Array_Add('one value', 'One more'); +--disable_ps2_protocol SELECT Json_Array_Add('one value' json_, 'One more'); +--enable_ps2_protocol #--error ER_CANT_INITIALIZE_UDF SELECT Json_Array_Add(5 json_, 'One more'); SELECT Json_Array_Add('[5,3,8,7,9]' json_, 4, 0); diff --git a/storage/connect/mysql-test/connect/t/json_udf_bin.test b/storage/connect/mysql-test/connect/t/json_udf_bin.test index cbbfca9d2d2..d8c7c0fb398 100644 --- a/storage/connect/mysql-test/connect/t/json_udf_bin.test +++ b/storage/connect/mysql-test/connect/t/json_udf_bin.test @@ -112,7 +112,9 @@ SELECT Json_Serialize(Jbin_Array_Add(Jbin_File('not_exist.json'), 'd')); SELECT Json_Serialize(Jbin_Array_Add(Jbin_File('bt1.json'), 'd')); SELECT Json_File('bt1.json', 2); --echo # This does modify the file +--disable_ps2_protocol SELECT Json_Array_Add(Jbin_File('bt1.json'), 'd'); +--enable_ps2_protocol SELECT Json_File('bt1.json', 2); --echo # Back to the original file SELECT Jfile_Make(Jbin_Array('a','b','c'), 'bt1.json'); @@ -120,31 +122,45 @@ SELECT Json_Make_Object(Jbin_Array_Add(Jbin_Array('a','b','c'), 'd') "Jbin_foo") SELECT Json_Make_Object(Jbin_Array_Add(Jbin_File('bt1.json'), 'd')) AS "Result"; SELECT Json_Make_Object(Jbin_Array_Add(Jbin_File('bt1.json'), 'd') "Jbin_bt1") AS "Result"; --echo # This does modify the file +--disable_ps2_protocol SELECT Json_Make_Object(Json_Array_Add(Jbin_File('bt1.json'), 'd') "Jfile_bt1") AS "Result"; +--enable_ps2_protocol SELECT Json_File('bt1.json'); SELECT Json_File(Json_Array_Delete(Jbin_File('bt1.json'), 3), 2); SELECT Json_Make_Object(Jbin_Array_Add(Jbin_File('bt1.json'), 'd') "Jbin_bt1", n "t1") AS "Result" from t1; +--disable_ps2_protocol SELECT Json_File(Json_Array_Add(Jbin_Array_Add(Jbin_File('bt1.json'), 'd'), 'e')) AS "Result"; +--enable_ps2_protocol SELECT Jfile_Make(Jbin_Array('a','b','c'), 'bt1.json'); +--disable_ps2_protocol SELECT Json_File(Json_Array_Add(Jbin_Array_Add(Jbin_File('bt1.json'), 'd'), 'e')) AS "Result" from t1; +--enable_ps2_protocol SELECT Jfile_Make(Jbin_Array('a','b','c'), 'bt1.json'); +--disable_ps2_protocol SELECT Json_Array_Add(Jbin_Array_Add(Jbin_File('bt1.json'), 'd'), n) AS "Result" from t1; +--enable_ps2_protocol --echo # Show modified file SELECT Json_File('bt1.json'); SELECT Jfile_Make(Jbin_Array('a','b','c'), 'bt1.json'); +--disable_ps2_protocol SELECT Json_Array_Add(Jbin_File('bt1.json'), n) AS "Result" from t1; +--enable_ps2_protocol --echo # Show modified file SELECT Json_File('bt1.json'); SELECT Jfile_Make(Jbin_Array('a','b','c'), 'bt1.json'); +--disable_ps2_protocol SELECT Json_File(Jbin_Item_Merge(Jbin_File('bt1.json'), Jbin_Array('d','e','f'))); SELECT Json_File(Json_Item_Merge(Jbin_File('bt1.json'), Jbin_Array('d','e','f'))); +--enable_ps2_protocol SELECT Jfile_Make(Jbin_Array('a','b','c'), 'bt1.json'); --echo # Test DELETE from file +--disable_ps2_protocol SELECT Json_Make_Object(Jbin_Array_Delete(Jbin_File('bt1.json'), 1)) AS "Result"; SELECT Json_Make_Object(Jbin_Array_Delete(Jbin_File('bt1.json'), 2) "Jbin_bt1") AS "Result"; SELECT Json_Make_Object(Jbin_Array_Delete(Jbin_File('bt1.json'), 0) "Jbin_bt1", n "t1") AS "Result" from t1; SELECT Json_Make_Object(Jbin_Array_Delete(Jbin_File('bt1.json'), 3 - n) "Jbin_bt1") AS "Result" from t1; SELECT Json_Make_Object(Json_Array_Delete(Jbin_File('bt1.json'), 3 - n) "Jbin_bt1") AS "Result" from t1; +--enable_ps2_protocol --echo # Show modified file SELECT Json_File('bt1.json'); --echo # Object file @@ -181,9 +197,11 @@ SELECT Json_Serialize(Jbin_Object_List(Jbin_File('bt2.json'))) "Key list"; # Test documentation examples # SELECT Jfile_Make('{"a":1, "b":[44, 55]}' json_, 'bt3.json', 0); +--disable_ps2_protocol SELECT Json_Array_Add(Json_File('bt3.json', '$.b'), 66); SELECT Json_Array_Add(Json_File('bt3.json'), 66, '$.b'); SELECT Json_Array_Add(Jbin_File('bt3.json', '$.b'), 66); +--enable_ps2_protocol SELECT Json_File('bt3.json', 3); SELECT Jfile_Make('{"a":1, "b":[44, 55]}' json_, 'bt3.json', 0); # diff --git a/storage/connect/mysql-test/connect/t/mysql_exec.test b/storage/connect/mysql-test/connect/t/mysql_exec.test index 4aad23cd588..afa3613fbe7 100644 --- a/storage/connect/mysql-test/connect/t/mysql_exec.test +++ b/storage/connect/mysql-test/connect/t/mysql_exec.test @@ -13,6 +13,7 @@ eval CREATE TABLE t1 ( message VARCHAR(255) FLAG=2) ENGINE=CONNECT TABLE_TYPE=MYSQL CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/test' OPTION_LIST='Execsrc=1,maxerr=2'; +--disable_ps2_protocol SELECT * FROM t1 WHERE command IN ('Warning','Note', 'drop table if exists t1', 'create table t1 (id int key auto_increment, msg varchar(32) not null)', @@ -22,6 +23,7 @@ SELECT * FROM t1 WHERE command IN ('Warning','Note', 'insert ignore into t1(id) values(NULL)', "update t1 set msg = 'Four' where id = 4", 'select * from t1'); +--enable_ps2_protocol --echo # --echo # Checking Using Procedure diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_found_rows.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_found_rows.test index 08acc357d3b..4d5bc7ea8e5 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_found_rows.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_found_rows.test @@ -41,7 +41,9 @@ INSERT INTO diaries VALUES(6, 2011, 12, 2, "åˆé›ª", "今日ã®å¤©æ°—ã¯é›ªï¼") SELECT SQL_CALC_FOUND_ROWS * FROM diaries WHERE MATCH(content) AGAINST("今日 天気" IN BOOLEAN MODE) ORDER BY day LIMIT 0,5; +--disable_ps2_protocol SELECT FOUND_ROWS(); +--enable_ps2_protocol DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_after_insert_multithread.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_after_insert_multithread.test index 4857286ac98..6078e908c7f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_after_insert_multithread.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_after_insert_multithread.test @@ -43,7 +43,9 @@ CONNECTION default; enable_query_log; SHOW STATUS LIKE 'mroonga_count_skip'; +--disable_ps2_protocol SELECT COUNT(*) FROM diaries WHERE MATCH(title) AGAINST("mroonga" IN BOOLEAN MODE); +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_count_skip'; DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_after_insert_single_thread.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_after_insert_single_thread.test index d0116e7f1c5..c699c20e565 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_after_insert_single_thread.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_after_insert_single_thread.test @@ -32,7 +32,9 @@ INSERT INTO diaries VALUES("It's funny."); INSERT INTO diaries VALUES("Happy birthday!"); SHOW STATUS LIKE 'mroonga_count_skip'; +--disable_ps2_protocol SELECT COUNT(*) FROM diaries WHERE MATCH(title) AGAINST("mroonga" IN BOOLEAN MODE); +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_count_skip'; DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_disabled.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_disabled.test index d84112b4952..c911694c1ba 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_disabled.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_disabled.test @@ -38,8 +38,10 @@ INSERT INTO diaries VALUES(5, "ã¯ã‚Œ", "天気ãŒã‚ˆã„ã®ã¯ä»Šæ—¥ã¾ã§ã¿ãŸ SET mroonga_enable_optimization=FALSE; +--disable_ps2_protocol SELECT COUNT(*) FROM diaries WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE); +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_count_skip'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_and.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_and.test index 691497be13e..4881ae43f46 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_and.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_and.test @@ -35,7 +35,9 @@ INSERT INTO users (id, age) VALUES (2, 29); INSERT INTO users (id, age) VALUES (2, 29); INSERT INTO users (id, age) VALUES (3, 29); +--disable_ps2_protocol SELECT COUNT(*) FROM users WHERE id = 2 AND age = 29; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_count_skip'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_between.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_between.test index 76675fdeb76..34c8bd0ae51 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_between.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_between.test @@ -34,7 +34,9 @@ INSERT INTO users (age) VALUES (30); INSERT INTO users (age) VALUES (31); INSERT INTO users (age) VALUES (32),(33),(34),(35),(36),(37); +--disable_ps2_protocol SELECT COUNT(*) FROM users WHERE age BETWEEN 28 AND 30; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_count_skip'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_equal.test index b422e06e5fd..dedf4543d76 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_equal.test @@ -33,7 +33,9 @@ INSERT INTO users (age) VALUES (29); INSERT INTO users (age) VALUES (29); INSERT INTO users (age) VALUES (29); +--disable_ps2_protocol SELECT COUNT(*) FROM users WHERE age = 29; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_count_skip'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_full_text_search_in_boolean_mode.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_full_text_search_in_boolean_mode.test index b59ca7f552f..b99e9b7a3fb 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_full_text_search_in_boolean_mode.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_full_text_search_in_boolean_mode.test @@ -33,8 +33,10 @@ INSERT INTO memos (content) VALUES ('Mroonga is good.'); INSERT INTO memos (content) VALUES ('Mroonga is very good.'); INSERT INTO memos (content) VALUES ('Mroonga uses Groonga.'); +--disable_ps2_protocol SELECT COUNT(*) FROM memos WHERE MATCH(content) AGAINST('+Groonga' IN BOOLEAN MODE); +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_count_skip'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_full_text_search_in_natural_language_mode.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_full_text_search_in_natural_language_mode.test index c8de7b95cbc..e4cba0d2c43 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_full_text_search_in_natural_language_mode.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_full_text_search_in_natural_language_mode.test @@ -33,8 +33,10 @@ INSERT INTO memos (content) VALUES ('Mroonga is good.'); INSERT INTO memos (content) VALUES ('Mroonga is very good.'); INSERT INTO memos (content) VALUES ('Mroonga uses Groonga.'); +--disable_ps2_protocol SELECT COUNT(*) FROM memos WHERE MATCH(content) AGAINST('Groonga'); +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_count_skip'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_greater.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_greater.test index fb5c336cd4c..904bf0c534d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_greater.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_greater.test @@ -34,7 +34,9 @@ INSERT INTO users (age) VALUES (30); INSERT INTO users (age) VALUES (31); INSERT INTO users (age) VALUES (1),(2),(3),(4),(5),(6); +--disable_ps2_protocol SELECT COUNT(*) FROM users WHERE age > 29; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_count_skip'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_greater_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_greater_equal.test index c897d8d88de..40571d7c234 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_greater_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_greater_equal.test @@ -34,7 +34,9 @@ INSERT INTO users (age) VALUES (30); INSERT INTO users (age) VALUES (31); INSERT INTO users (age) VALUES (1),(2),(3),(4),(5),(6); +--disable_ps2_protocol SELECT COUNT(*) FROM users WHERE age >= 29; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_count_skip'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_less.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_less.test index f03156d545b..ddfee173ccf 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_less.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_less.test @@ -34,7 +34,9 @@ INSERT INTO users (age) VALUES (30); INSERT INTO users (age) VALUES (31); INSERT INTO users (age) VALUES (32),(33),(34),(35),(36),(37); +--disable_ps2_protocol SELECT COUNT(*) FROM users WHERE age < 29; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_count_skip'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_less_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_less_equal.test index 20863705bf4..0c5af3cdd52 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_less_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_less_equal.test @@ -34,7 +34,9 @@ INSERT INTO users (age) VALUES (30); INSERT INTO users (age) VALUES (31); INSERT INTO users (age) VALUES (32),(33),(34),(35),(36),(37); +--disable_ps2_protocol SELECT COUNT(*) FROM users WHERE age <= 29; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_count_skip'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_not_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_not_equal.test index 3948d218a69..f75c8b4e4fd 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_not_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_not_equal.test @@ -33,7 +33,9 @@ INSERT INTO users (age) VALUES (29); INSERT INTO users (age) VALUES (29); INSERT INTO users (age) VALUES (29); +--disable_ps2_protocol SELECT COUNT(*) FROM users WHERE age <> 29; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_count_skip'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_multiple_conditions.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_multiple_conditions.test index 917d6a1b4d6..07387cea956 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_multiple_conditions.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_multiple_conditions.test @@ -32,7 +32,9 @@ INSERT INTO users (id, age) VALUES (1, 29); INSERT INTO users (id, age) VALUES (2, 29); INSERT INTO users (id, age) VALUES (3, 29); +--disable_ps2_protocol SELECT COUNT(*) FROM users WHERE id = 3 AND age = 29; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_count_skip'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_between.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_between.test index 25d6c734fe1..1aef072cb1b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_between.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_between.test @@ -33,7 +33,9 @@ INSERT INTO users (id) VALUES (4); INSERT INTO users (id) VALUES (5); INSERT INTO users (id) VALUES (32),(33),(34),(35),(36),(37); +--disable_ps2_protocol SELECT COUNT(*) FROM users WHERE id BETWEEN 2 AND 4; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_count_skip'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_equal.test index c0db5729425..24fe09a0402 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_equal.test @@ -32,7 +32,9 @@ INSERT INTO users (id) VALUES (3); INSERT INTO users (id) VALUES (4); INSERT INTO users (id) VALUES (5); +--disable_ps2_protocol SELECT COUNT(*) FROM users WHERE id = 3; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_count_skip'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_greater.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_greater.test index f91cf19310f..be77d4c8bf6 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_greater.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_greater.test @@ -33,7 +33,10 @@ INSERT INTO users (id) VALUES (4); INSERT INTO users (id) VALUES (5); INSERT INTO users (id) VALUES (-1),(-2),(-3),(-4); +--disable_ps2_protocol SELECT COUNT(*) FROM users WHERE id > 3; +--enable_ps2_protocol + SHOW STATUS LIKE 'mroonga_count_skip'; DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_greater_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_greater_equal.test index dd374012257..f82a322a623 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_greater_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_greater_equal.test @@ -33,7 +33,9 @@ INSERT INTO users (id) VALUES (4); INSERT INTO users (id) VALUES (5); INSERT INTO users (id) VALUES (-1),(-2),(-3),(-4); +--disable_ps2_protocol SELECT COUNT(*) FROM users WHERE id >= 3; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_count_skip'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_less.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_less.test index 529dfde678e..741d1bca68d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_less.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_less.test @@ -32,7 +32,9 @@ INSERT INTO users (id) VALUES (3); INSERT INTO users (id) VALUES (4); INSERT INTO users (id) VALUES (5); +--disable_ps2_protocol SELECT COUNT(*) FROM users WHERE id < 3; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_count_skip'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_less_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_less_equal.test index d2a863ae43b..248ace5678e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_less_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_less_equal.test @@ -32,7 +32,9 @@ INSERT INTO users (id) VALUES (3); INSERT INTO users (id) VALUES (4); INSERT INTO users (id) VALUES (5); +--disable_ps2_protocol SELECT COUNT(*) FROM users WHERE id <= 3; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_count_skip'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_not_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_not_equal.test index 7e8c3180ccf..277c4afacc5 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_not_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_not_equal.test @@ -32,7 +32,9 @@ INSERT INTO users (id) VALUES (3); INSERT INTO users (id) VALUES (4); INSERT INTO users (id) VALUES (5); +--disable_ps2_protocol SELECT COUNT(*) FROM users WHERE id <> 3; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_count_skip'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_not_optimized_disabled.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_not_optimized_disabled.test index c0dab28363b..79fb9ddf3f5 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_not_optimized_disabled.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_not_optimized_disabled.test @@ -45,10 +45,12 @@ INSERT INTO diaries VALUES(7, 2011, 12, 2, "åˆé›ª", "今日ã®å¤©æ°—ã¯é›ªï¼") SET mroonga_enable_optimization=FALSE; +--disable_ps2_protocol SELECT * FROM diaries WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) AND month = 11 ORDER BY day LIMIT 1,2; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_not_optimized_multiple_match_againsts.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_not_optimized_multiple_match_againsts.test index ce1f63604e7..6de18c57547 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_not_optimized_multiple_match_againsts.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_not_optimized_multiple_match_againsts.test @@ -44,11 +44,13 @@ INSERT INTO memos VALUES(8, "title 1-a", "content b-1"); INSERT INTO memos VALUES(9, "title 2-b", "content b-2"); INSERT INTO memos VALUES(7, "title 2-c", "content b-3"); +--disable_ps2_protocol SELECT * FROM memos WHERE MATCH(title) AGAINST("+1" IN BOOLEAN MODE) AND MATCH(content) AGAINST("+a" IN BOOLEAN MODE) ORDER BY id LIMIT 1,3; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_not_optimized_no_limit.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_not_optimized_no_limit.test index 99abc0469fb..0e0fe6454ae 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_not_optimized_no_limit.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_not_optimized_no_limit.test @@ -43,9 +43,11 @@ INSERT INTO diaries VALUES(5, 2011, 11, 13, "ã¯ã‚Œ", "天気ãŒã‚ˆã„ã®ã¯ä»Š INSERT INTO diaries VALUES(6, 2011, 12, 1, "ä¹…ã—ã¶ã‚Š", "å¤©æ°—ãŒæ‚ªã„ã‹ã‚‰ãšã£ã¨ç•™å®ˆç•ªã€‚"); INSERT INTO diaries VALUES(7, 2011, 12, 2, "åˆé›ª", "今日ã®å¤©æ°—ã¯é›ªï¼"); +--disable_ps2_protocol SELECT * FROM diaries WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) ORDER BY day; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_cp932.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_cp932.test index 19c2bc4009a..9da4c7e30d2 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_cp932.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_cp932.test @@ -34,10 +34,12 @@ INSERT INTO memos VALUES(2, " INSERT INTO memos VALUES(3, "¡“ú‚̓Tƒ{ƒeƒ“‚ð‚à‚ç‚Á‚½B"); INSERT INTO memos VALUES(1, "¡“ú‚Í“V‹C‚ª‚æ‚­‚Ă悩‚Á‚½B"); +--disable_ps2_protocol SELECT * FROM memos WHERE MATCH(“à—e) AGAINST("¡“ú" IN BOOLEAN MODE) ORDER BY ޝ•ÊŽq LIMIT 1; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_between.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_between.test index 9ad4a6966b4..a6903197c52 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_between.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_between.test @@ -37,10 +37,12 @@ INSERT INTO diaries VALUES(3, "2011-11-11 12:23:32", "I will do something today! INSERT INTO diaries VALUES(4, "2011-11-11 12:23:33", "I don't want to anything today..."); INSERT INTO diaries VALUES(5, "2011-11-11 12:23:34", "I'm sleepy today."); +--disable_ps2_protocol SELECT * FROM diaries WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND date BETWEEN "2011-11-11 12:23:31" AND "2011-11-11 12:23:33" ORDER BY id LIMIT 1,2; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_between_over.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_between_over.test index 170e979613e..add0056dbee 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_between_over.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_between_over.test @@ -37,10 +37,12 @@ INSERT INTO diaries VALUES(3, "2011-11-11 12:23:32", "I will do something today! INSERT INTO diaries VALUES(4, "2011-11-11 12:23:33", "I don't want to anything today..."); INSERT INTO diaries VALUES(5, "2011-11-11 12:23:34", "I'm sleepy today."); +--disable_ps2_protocol SELECT * FROM diaries WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND date BETWEEN "2011-11-11 12:23:31" AND "2011-11-11 12:23:43" ORDER BY id LIMIT 1,2; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_equal.test index 32555b2a448..306a7bfb591 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_equal.test @@ -37,10 +37,12 @@ INSERT INTO diaries VALUES(3, "2011-11-11 12:23:34", "I will do something today! INSERT INTO diaries VALUES(4, "2011-11-11 12:23:34", "I don't want to anything today..."); INSERT INTO diaries VALUES(5, "2011-11-11 12:23:34", "I'm sleepy today."); +--disable_ps2_protocol SELECT * FROM diaries WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND date = "2011-11-11 12:23:34" ORDER BY id LIMIT 1,2; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_greater_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_greater_than.test index 9c4c8754750..5a07338662e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_greater_than.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_greater_than.test @@ -37,10 +37,12 @@ INSERT INTO diaries VALUES(3, "2011-11-11 12:23:32", "I will do something today! INSERT INTO diaries VALUES(4, "2011-11-11 12:23:33", "I don't want to anything today..."); INSERT INTO diaries VALUES(5, "2011-11-11 12:23:34", "I'm sleepy today."); +--disable_ps2_protocol SELECT * FROM diaries WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND date > "2011-11-11 12:23:31" ORDER BY id LIMIT 1,2; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_greater_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_greater_than_or_equal.test index 375080ca70b..997035c419b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_greater_than_or_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_greater_than_or_equal.test @@ -37,10 +37,12 @@ INSERT INTO diaries VALUES(3, "2011-11-11 12:23:32", "I will do something today! INSERT INTO diaries VALUES(4, "2011-11-11 12:23:33", "I don't want to anything today..."); INSERT INTO diaries VALUES(5, "2011-11-11 12:23:34", "I'm sleepy today."); +--disable_ps2_protocol SELECT * FROM diaries WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND date >= "2011-11-11 12:23:31" ORDER BY id LIMIT 1,2; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_less_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_less_than.test index cdd4a2ba19d..d3395d3fe9a 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_less_than.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_less_than.test @@ -37,10 +37,12 @@ INSERT INTO diaries VALUES(3, "2011-11-11 12:23:32", "I will do something today! INSERT INTO diaries VALUES(4, "2011-11-11 12:23:33", "I don't want to anything today..."); INSERT INTO diaries VALUES(5, "2011-11-11 12:23:34", "I'm sleepy today."); +--disable_ps2_protocol SELECT * FROM diaries WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND date < "2011-11-11 12:23:33" ORDER BY id LIMIT 1,2; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_less_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_less_than_or_equal.test index b0af56e0e19..37ec453d37d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_less_than_or_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_less_than_or_equal.test @@ -37,10 +37,12 @@ INSERT INTO diaries VALUES(3, "2011-11-11 12:23:32", "I will do something today! INSERT INTO diaries VALUES(4, "2011-11-11 12:23:33", "I don't want to anything today..."); INSERT INTO diaries VALUES(5, "2011-11-11 12:23:34", "I'm sleepy today."); +--disable_ps2_protocol SELECT * FROM diaries WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND date <= "2011-11-11 12:23:33" ORDER BY id LIMIT 1,2; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_duplicated_order_by_columns.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_duplicated_order_by_columns.test index e9d1ca2909e..7c8df7a9072 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_duplicated_order_by_columns.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_duplicated_order_by_columns.test @@ -33,10 +33,12 @@ CREATE TABLE ids ( INSERT INTO ids VALUES (1, 'first'); +--disable_ps2_protocol SELECT * FROM ids WHERE MATCH(text) AGAINST('+first' IN BOOLEAN MODE) ORDER BY id, id LIMIT 1; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_enum_name.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_enum_name.test index 3a4f4faa2fb..36d2a40fb8b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_enum_name.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_enum_name.test @@ -37,10 +37,12 @@ INSERT INTO memos VALUES(2, 'Mroonga', 'Mroonga is great!'); INSERT INTO memos VALUES(3, 'Mroonga', 'Mroonga is a MySQL storage engine.'); INSERT INTO memos VALUES(4, 'Mroonga', 'Mroonga is based on Groonga.'); +--disable_ps2_protocol SELECT * FROM memos WHERE MATCH(content) AGAINST("+Groonga" IN BOOLEAN MODE) AND tag = 'Mroonga' ORDER BY id LIMIT 1; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_enum_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_enum_value.test index b8126b3fc83..599d157d054 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_enum_value.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_enum_value.test @@ -37,10 +37,12 @@ INSERT INTO memos VALUES(2, 'Mroonga', 'Mroonga is great!'); INSERT INTO memos VALUES(3, 'Mroonga', 'Mroonga is a MySQL storage engine.'); INSERT INTO memos VALUES(4, 'Mroonga', 'Mroonga is based on Groonga.'); +--disable_ps2_protocol SELECT * FROM memos WHERE MATCH(content) AGAINST("+Groonga" IN BOOLEAN MODE) AND tag = 2 ORDER BY id LIMIT 1; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_have_primary_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_have_primary_key.test index 64f5a605567..94097ec99a3 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_have_primary_key.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_have_primary_key.test @@ -41,7 +41,9 @@ INSERT INTO diaries VALUES(4, 2011, 11, 11, "帰りé“", "今日ã¯å¤©æ°—ãŒã‚ˆ INSERT INTO diaries VALUES(5, 2011, 12, 1, "ä¹…ã—ã¶ã‚Š", "å¤©æ°—ãŒæ‚ªã„ã‹ã‚‰ãšã£ã¨ç•™å®ˆç•ªã€‚"); INSERT INTO diaries VALUES(6, 2011, 12, 2, "åˆé›ª", "今日ã®å¤©æ°—ã¯é›ªï¼"); +--disable_ps2_protocol SELECT * FROM diaries WHERE MATCH(content) AGAINST("今日 天気" IN BOOLEAN MODE) ORDER BY day LIMIT 0,5; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_between.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_between.test index 2fa838ea069..922d6edcfe0 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_between.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_between.test @@ -36,10 +36,12 @@ INSERT INTO memos VALUES(3, "I will do something today!"); INSERT INTO memos VALUES(4, "I don't want to anything today..."); INSERT INTO memos VALUES(5, "I'm sleepy today."); +--disable_ps2_protocol SELECT * FROM memos WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND id BETWEEN 2 AND 4 ORDER BY id LIMIT 1,2; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_between_over.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_between_over.test index 5981c99f870..afd60af4b99 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_between_over.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_between_over.test @@ -36,10 +36,12 @@ INSERT INTO memos VALUES(3, "I will do something today!"); INSERT INTO memos VALUES(4, "I don't want to anything today..."); INSERT INTO memos VALUES(5, "I'm sleepy today."); +--disable_ps2_protocol SELECT * FROM memos WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND id BETWEEN 2 AND 6 ORDER BY id LIMIT 1,2; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_equal.test index f2158a8224f..495dc1bb25c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_equal.test @@ -43,10 +43,12 @@ INSERT INTO diaries VALUES(5, 2011, 11, 13, "ã¯ã‚Œ", "天気ãŒã‚ˆã„ã®ã¯ä»Š INSERT INTO diaries VALUES(6, 2011, 12, 1, "ä¹…ã—ã¶ã‚Š", "å¤©æ°—ãŒæ‚ªã„ã‹ã‚‰ãšã£ã¨ç•™å®ˆç•ªã€‚"); INSERT INTO diaries VALUES(7, 2011, 12, 2, "åˆé›ª", "今日ã®å¤©æ°—ã¯é›ªï¼"); +--disable_ps2_protocol SELECT * FROM diaries WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) AND month = 11 ORDER BY day LIMIT 1,2; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_greater_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_greater_than.test index 856c9f71055..8c4167202b5 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_greater_than.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_greater_than.test @@ -43,10 +43,12 @@ INSERT INTO diaries VALUES(5, 2011, 11, 13, "ã¯ã‚Œ", "天気ãŒã‚ˆã„ã®ã¯ä»Š INSERT INTO diaries VALUES(6, 2011, 12, 1, "ä¹…ã—ã¶ã‚Š", "å¤©æ°—ãŒæ‚ªã„ã‹ã‚‰ãšã£ã¨ç•™å®ˆç•ªã€‚"); INSERT INTO diaries VALUES(7, 2011, 12, 2, "åˆé›ª", "今日ã®å¤©æ°—ã¯é›ªï¼"); +--disable_ps2_protocol SELECT * FROM diaries WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) AND day > 10 ORDER BY day LIMIT 1,2; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_greater_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_greater_than_or_equal.test index 6115bf68a79..04674ee8477 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_greater_than_or_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_greater_than_or_equal.test @@ -43,10 +43,12 @@ INSERT INTO diaries VALUES(5, 2011, 11, 13, "ã¯ã‚Œ", "天気ãŒã‚ˆã„ã®ã¯ä»Š INSERT INTO diaries VALUES(6, 2011, 12, 1, "ä¹…ã—ã¶ã‚Š", "å¤©æ°—ãŒæ‚ªã„ã‹ã‚‰ãšã£ã¨ç•™å®ˆç•ªã€‚"); INSERT INTO diaries VALUES(7, 2011, 12, 2, "åˆé›ª", "今日ã®å¤©æ°—ã¯é›ªï¼"); +--disable_ps2_protocol SELECT * FROM diaries WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) AND day >= 10 ORDER BY day LIMIT 1,2; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_less_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_less_than.test index f5001bdf980..7917405a04b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_less_than.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_less_than.test @@ -43,10 +43,12 @@ INSERT INTO diaries VALUES(5, 2011, 11, 13, "ã¯ã‚Œ", "天気ãŒã‚ˆã„ã®ã¯ä»Š INSERT INTO diaries VALUES(6, 2011, 12, 1, "ä¹…ã—ã¶ã‚Š", "å¤©æ°—ãŒæ‚ªã„ã‹ã‚‰ãšã£ã¨ç•™å®ˆç•ªã€‚"); INSERT INTO diaries VALUES(7, 2011, 12, 2, "åˆé›ª", "今日ã®å¤©æ°—ã¯é›ªï¼"); +--disable_ps2_Protocol SELECT * FROM diaries WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) AND day < 12 ORDER BY day LIMIT 1,2; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_less_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_less_than_or_equal.test index 790e8f14bd1..5da40dea8c4 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_less_than_or_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_less_than_or_equal.test @@ -43,10 +43,12 @@ INSERT INTO diaries VALUES(5, 2011, 11, 13, "ã¯ã‚Œ", "天気ãŒã‚ˆã„ã®ã¯ä»Š INSERT INTO diaries VALUES(6, 2011, 12, 1, "ä¹…ã—ã¶ã‚Š", "å¤©æ°—ãŒæ‚ªã„ã‹ã‚‰ãšã£ã¨ç•™å®ˆç•ªã€‚"); INSERT INTO diaries VALUES(7, 2011, 12, 2, "åˆé›ª", "今日ã®å¤©æ°—ã¯é›ªï¼"); +--disable_ps2_protocol SELECT * FROM diaries WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) AND day <= 12 ORDER BY day LIMIT 1,2; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_no_primary_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_no_primary_key.test index 2aad7f0f7b5..69a13e226c9 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_no_primary_key.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_no_primary_key.test @@ -41,7 +41,9 @@ INSERT INTO diaries VALUES(4, 2011, 11, 11, "帰りé“", "今日ã¯å¤©æ°—ãŒã‚ˆ INSERT INTO diaries VALUES(5, 2011, 12, 1, "ä¹…ã—ã¶ã‚Š", "å¤©æ°—ãŒæ‚ªã„ã‹ã‚‰ãšã£ã¨ç•™å®ˆç•ªã€‚"); INSERT INTO diaries VALUES(6, 2011, 12, 2, "åˆé›ª", "今日ã®å¤©æ°—ã¯é›ªï¼"); +--disable_ps2_protocol SELECT * FROM diaries WHERE MATCH(content) AGAINST("今日 天気" IN BOOLEAN MODE) ORDER BY day LIMIT 0,5; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_no_where_clause.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_no_where_clause.test index 72889f96be5..2ccdc9db6e1 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_no_where_clause.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_no_where_clause.test @@ -30,7 +30,9 @@ insert into t1 values(5,50,"aa ii uu ii oo",null); show status like 'mroonga_fast_order_limit'; +--disable_ps2_protocol select *, match(c3) against("ii") from t1 order by c1 desc limit 2; +--enable_ps2_protocol show status like 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_asc.test index c58d7353d0b..02037064163 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_asc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_asc.test @@ -43,9 +43,11 @@ INSERT INTO diaries VALUES(5, 2011, 11, 13, "ã¯ã‚Œ", "天気ãŒã‚ˆã„ã®ã¯ä»Š INSERT INTO diaries VALUES(6, 2011, 12, 1, "ä¹…ã—ã¶ã‚Š", "å¤©æ°—ãŒæ‚ªã„ã‹ã‚‰ãšã£ã¨ç•™å®ˆç•ªã€‚"); INSERT INTO diaries VALUES(7, 2011, 12, 2, "åˆé›ª", "今日ã®å¤©æ°—ã¯é›ªï¼"); +--disable_ps2_protocol SELECT * FROM diaries WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) ORDER BY day ASC LIMIT 1; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_desc.test index a979e88cb15..51dad46b05a 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_desc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_desc.test @@ -43,9 +43,11 @@ INSERT INTO diaries VALUES(5, 2011, 11, 13, "ã¯ã‚Œ", "天気ãŒã‚ˆã„ã®ã¯ä»Š INSERT INTO diaries VALUES(6, 2011, 12, 1, "ä¹…ã—ã¶ã‚Š", "å¤©æ°—ãŒæ‚ªã„ã‹ã‚‰ãšã£ã¨ç•™å®ˆç•ªã€‚"); INSERT INTO diaries VALUES(7, 2011, 12, 2, "åˆé›ª", "今日ã®å¤©æ°—ã¯é›ªï¼"); +--disable_ps2_protocol SELECT * FROM diaries WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) ORDER BY day DESC LIMIT 1; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_id.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_id.test index 6bf3c6a8ceb..0bb6a7fc366 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_id.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_id.test @@ -44,10 +44,12 @@ INSERT INTO diaries VALUES(NULL, 5, 2011, 11, 13, "ã¯ã‚Œ", "天気ãŒã‚ˆã„ã® INSERT INTO diaries VALUES(NULL, 6, 2011, 12, 1, "ä¹…ã—ã¶ã‚Š", "å¤©æ°—ãŒæ‚ªã„ã‹ã‚‰ãšã£ã¨ç•™å®ˆç•ªã€‚"); INSERT INTO diaries VALUES(NULL, 7, 2011, 12, 2, "åˆé›ª", "今日ã®å¤©æ°—ã¯é›ªï¼"); +--disable_ps2_protocol SELECT * FROM diaries WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) ORDER BY _id LIMIT 1; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_match_against.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_match_against.test index bd86c6a2778..4f8d5cf6683 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_match_against.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_match_against.test @@ -43,10 +43,12 @@ INSERT INTO diaries VALUES(5, 2011, 11, 13, "ã¯ã‚Œ", "天気ãŒã‚ˆã„ã®ã¯ä»Š INSERT INTO diaries VALUES(6, 2011, 12, 1, "ä¹…ã—ã¶ã‚Š", "å¤©æ°—ãŒæ‚ªã„ã‹ã‚‰ãšã£ã¨ç•™å®ˆç•ªã€‚"); INSERT INTO diaries VALUES(7, 2011, 12, 2, "åˆé›ª", "今日ã®å¤©æ°—ã¯é›ªï¼"); +--disable_ps2_protocol SELECT * FROM diaries WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) ORDER BY MATCH(content) AGAINST("今日" IN BOOLEAN MODE) LIMIT 1; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_select_match_against.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_select_match_against.test index 5272037098c..0b0476d6882 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_select_match_against.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_select_match_against.test @@ -43,11 +43,13 @@ INSERT INTO diaries VALUES(5, 2011, 11, 13, "ã¯ã‚Œ", "天気ãŒã‚ˆã„ã®ã¯ä»Š INSERT INTO diaries VALUES(6, 2011, 12, 1, "ä¹…ã—ã¶ã‚Š", "å¤©æ°—ãŒæ‚ªã„ã‹ã‚‰ãšã£ã¨ç•™å®ˆç•ªã€‚"); INSERT INTO diaries VALUES(7, 2011, 12, 2, "åˆé›ª", "今日ã®å¤©æ°—ã¯é›ªï¼"); +--disable_ps2_protocol SELECT *, MATCH(content) AGAINST("今日" IN BOOLEAN MODE) FROM diaries WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) ORDER BY MATCH(content) AGAINST("今日" IN BOOLEAN MODE) LIMIT 1; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_between.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_between.test index 23bb71032d3..56ba51a3f49 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_between.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_between.test @@ -37,10 +37,12 @@ INSERT INTO memos VALUES(3, "1:23:32", "I will do something today!"); INSERT INTO memos VALUES(4, "1:23:33", "I don't want to anything today..."); INSERT INTO memos VALUES(5, "1:23:34", "I'm sleepy today."); +--disable_ps2_protocol SELECT * FROM memos WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND writing_time BETWEEN "1:23:31" AND "1:23:33" ORDER BY id LIMIT 1,2; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_between_over.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_between_over.test index 2450f8a2d0c..dfb6d3161f9 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_between_over.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_between_over.test @@ -37,10 +37,12 @@ INSERT INTO memos VALUES(3, "1:23:32", "I will do something today!"); INSERT INTO memos VALUES(4, "1:23:33", "I don't want to anything today..."); INSERT INTO memos VALUES(5, "1:23:34", "I'm sleepy today."); +--disable_ps2_protocol SELECT * FROM memos WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND writing_time BETWEEN "1:23:31" AND "1:23:43" ORDER BY id LIMIT 1,2; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_equal.test index 46dc7cb5d48..e1c1111fb31 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_equal.test @@ -37,10 +37,12 @@ INSERT INTO memos VALUES(3, "1:23:34", "I will do something today!"); INSERT INTO memos VALUES(4, "1:23:34", "I don't want to anything today..."); INSERT INTO memos VALUES(5, "1:23:34", "I'm sleepy today."); +--disable_ps2_protocol SELECT * FROM memos WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND writing_time = "1:23:34" ORDER BY id LIMIT 1,2; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_greater_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_greater_than.test index 62acda78dc5..fed76bc5486 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_greater_than.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_greater_than.test @@ -37,10 +37,12 @@ INSERT INTO memos VALUES(3, "1:23:32", "I will do something today!"); INSERT INTO memos VALUES(4, "1:23:33", "I don't want to anything today..."); INSERT INTO memos VALUES(5, "1:23:34", "I'm sleepy today."); +--disable_ps2_protocol SELECT * FROM memos WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND writing_time > "1:23:31" ORDER BY id LIMIT 1,2; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_greater_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_greater_than_or_equal.test index ee706c5f3e0..32fadbeedc6 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_greater_than_or_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_greater_than_or_equal.test @@ -37,10 +37,12 @@ INSERT INTO memos VALUES(3, "1:23:32", "I will do something today!"); INSERT INTO memos VALUES(4, "1:23:33", "I don't want to anything today..."); INSERT INTO memos VALUES(5, "1:23:34", "I'm sleepy today."); +--disable_ps2_protocol SELECT * FROM memos WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND writing_time >= "1:23:31" ORDER BY id LIMIT 1,2; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_less_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_less_than.test index 01764064cc7..849726da6e6 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_less_than.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_less_than.test @@ -37,10 +37,12 @@ INSERT INTO memos VALUES(3, "1:23:32", "I will do something today!"); INSERT INTO memos VALUES(4, "1:23:33", "I don't want to anything today..."); INSERT INTO memos VALUES(5, "1:23:34", "I'm sleepy today."); +--disable_ps2_protocol SELECT * FROM memos WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND writing_time < "1:23:33" ORDER BY id LIMIT 1,2; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_less_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_less_than_or_equal.test index 51423125bbf..ecfc743437d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_less_than_or_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_less_than_or_equal.test @@ -37,10 +37,12 @@ INSERT INTO memos VALUES(3, "1:23:32", "I will do something today!"); INSERT INTO memos VALUES(4, "1:23:33", "I don't want to anything today..."); INSERT INTO memos VALUES(5, "1:23:34", "I'm sleepy today."); +--disable_ps2_protocol SELECT * FROM memos WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND writing_time <= "1:23:33" ORDER BY id LIMIT 1,2; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_varchar_equal_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_varchar_equal_with_index.test index c3456c25827..5fc4342efe4 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_varchar_equal_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_varchar_equal_with_index.test @@ -44,10 +44,12 @@ INSERT INTO diaries VALUES(5, 2011, 11, 13, "ã¯ã‚Œ", "天気ãŒã‚ˆã„ã®ã¯ä»Š INSERT INTO diaries VALUES(6, 2011, 12, 1, "ä¹…ã—ã¶ã‚Š", "å¤©æ°—ãŒæ‚ªã„ã‹ã‚‰ãšã£ã¨ç•™å®ˆç•ªã€‚"); INSERT INTO diaries VALUES(7, 2011, 12, 2, "åˆé›ª", "今日ã®å¤©æ°—ã¯é›ªï¼"); +--disable_ps2_protocol SELECT * FROM diaries WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) AND title = "hello" ORDER BY day LIMIT 1; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_varchar_equal_without_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_varchar_equal_without_index.test index 2ce06201ee3..8536e559c29 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_varchar_equal_without_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_varchar_equal_without_index.test @@ -43,10 +43,12 @@ INSERT INTO diaries VALUES(5, 2011, 11, 13, "ã¯ã‚Œ", "天気ãŒã‚ˆã„ã®ã¯ä»Š INSERT INTO diaries VALUES(6, 2011, 12, 1, "ä¹…ã—ã¶ã‚Š", "å¤©æ°—ãŒæ‚ªã„ã‹ã‚‰ãšã£ã¨ç•™å®ˆç•ªã€‚"); INSERT INTO diaries VALUES(7, 2011, 12, 2, "åˆé›ª", "今日ã®å¤©æ°—ã¯é›ªï¼"); +--disable_ps2_protocol SELECT * FROM diaries WHERE MATCH(content) AGAINST("今日" IN BOOLEAN MODE) AND title = "hello" ORDER BY day LIMIT 1; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_between.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_between.test index c07368fb4da..4d2b8a52cd9 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_between.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_between.test @@ -41,10 +41,12 @@ INSERT INTO mroonga_releases (release_title, release_year) INSERT INTO mroonga_releases (release_title, release_year) VALUES ("Mroonga 4.0 will be released", "2014"); +--disable_ps2_protocol SELECT * FROM mroonga_releases WHERE release_year BETWEEN "11" AND "2013" AND MATCH(release_title) AGAINST("Mroonga" IN BOOLEAN MODE) ORDER BY id DESC LIMIT 1,2; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_between_over.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_between_over.test index 599cc8fa097..5b253483fc0 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_between_over.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_between_over.test @@ -41,10 +41,12 @@ INSERT INTO mroonga_releases (release_title, release_year) INSERT INTO mroonga_releases (release_title, release_year) VALUES ("Mroonga 4.0 will be released", "2014"); +--disable_ps2_protocol SELECT * FROM mroonga_releases WHERE release_year BETWEEN "11" AND "2015" AND MATCH(release_title) AGAINST("Mroonga" IN BOOLEAN MODE) ORDER BY id DESC LIMIT 1,2; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_equal.test index 35ce60663fb..bdb848dec06 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_equal.test @@ -43,10 +43,12 @@ INSERT INTO mroonga_releases (release_title, release_year) INSERT INTO mroonga_releases (release_title, release_year) VALUES ("Mroonga 4.0 will be released", "2014"); +--disable_ps2_protocol SELECT * FROM mroonga_releases WHERE release_year = "11" AND MATCH(release_title) AGAINST("Mroonga" IN BOOLEAN MODE) ORDER BY id DESC LIMIT 1,2; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_greater_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_greater_than.test index 88bb6a27ffc..9bc429fe563 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_greater_than.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_greater_than.test @@ -41,10 +41,12 @@ INSERT INTO mroonga_releases (release_title, release_year) INSERT INTO mroonga_releases (release_title, release_year) VALUES ("Mroonga 4.0 will be released", "2014"); +--disable_ps2_protocol SELECT * FROM mroonga_releases WHERE release_year > "11" AND MATCH(release_title) AGAINST("Mroonga" IN BOOLEAN MODE) ORDER BY id ASC LIMIT 2; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_greater_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_greater_than_or_equal.test index 64b9f831caf..76c01606949 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_greater_than_or_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_greater_than_or_equal.test @@ -41,10 +41,12 @@ INSERT INTO mroonga_releases (release_title, release_year) INSERT INTO mroonga_releases (release_title, release_year) VALUES ("Mroonga 4.0 will be released", "2014"); +--disable_ps2_protocol SELECT * FROM mroonga_releases WHERE release_year >= "11" AND MATCH(release_title) AGAINST("Mroonga" IN BOOLEAN MODE) ORDER BY id ASC LIMIT 2; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_less_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_less_than.test index 5f3f89fe77a..fb8130b5864 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_less_than.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_less_than.test @@ -41,10 +41,12 @@ INSERT INTO mroonga_releases (release_title, release_year) INSERT INTO mroonga_releases (release_title, release_year) VALUES ("Mroonga 4.0 will be released", "2014"); +--disable_ps2_protocol SELECT * FROM mroonga_releases WHERE release_year < "13" AND MATCH(release_title) AGAINST("Mroonga" IN BOOLEAN MODE) ORDER BY id DESC LIMIT 1,2; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_less_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_less_than_or_equal.test index 5db8d96eadb..270dce85258 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_less_than_or_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_less_than_or_equal.test @@ -41,10 +41,12 @@ INSERT INTO mroonga_releases (release_title, release_year) INSERT INTO mroonga_releases (release_title, release_year) VALUES ("Mroonga 4.0 will be released", "2014"); +--disable_ps2_protocol SELECT * FROM mroonga_releases WHERE release_year <= "13" AND MATCH(release_title) AGAINST("Mroonga" IN BOOLEAN MODE) ORDER BY id DESC LIMIT 1,2; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_enable_operations_recording_insert.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_enable_operations_recording_insert.test index 2a77a0133a5..970f04582f0 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_enable_operations_recording_insert.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_enable_operations_recording_insert.test @@ -29,7 +29,9 @@ CREATE TABLE diaries ( SELECT mroonga_command('truncate mroonga_operations'); INSERT INTO diaries VALUES("Unlogged: Research for Mroonga"); +--disable_ps2_protocol SELECT mroonga_command('load --table mroonga_operations --values "[{}]"'); +--enable_ps2_protocol SELECT mroonga_command('select mroonga_operations --output_columns _id'); SET GLOBAL mroonga_enable_operations_recording = false; @@ -37,7 +39,9 @@ FLUSH TABLES; SELECT mroonga_command('truncate mroonga_operations'); INSERT INTO diaries VALUES("Logged: Research for Mroonga"); +--disable_ps2_protocol SELECT mroonga_command('load --table mroonga_operations --values "[{}]"'); +--enable_ps2_protocol SELECT mroonga_command('select mroonga_operations --output_columns _id'); DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_TODO_SPLIT_ME.test index a47e73f5bfb..b00f1ea5169 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_TODO_SPLIT_ME.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_TODO_SPLIT_ME.test @@ -36,6 +36,7 @@ insert into t1 values(3,30,"ii si ii se ii"); insert into t1 values(4,40,"ta ti tu te to"); insert into t1 values(5,50,"aa ii uu ii oo"); +--disable_ps2_protocol select c3, match(c3) against("ii") from t1 where match(c3) against("ii") order by match(c3) against("ii") desc; show status like 'mroonga_fast_order_limit'; @@ -54,6 +55,7 @@ show status like 'mroonga_fast_order_limit'; select count(*) from t1 where match(c3) against("ii") limit 1; show status like 'mroonga_fast_order_limit'; +--enable_ps2_protocol drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_no_direction.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_no_direction.test index 21180eb9593..8b579dc3ea0 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_no_direction.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_no_direction.test @@ -37,11 +37,13 @@ INSERT INTO memos VALUES(5, "Mroonga is great"); SHOW STATUS LIKE 'mroonga_fast_order_limit'; +--disable_ps2_protocol SELECT id, content FROM memos WHERE MATCH(content) AGAINST("+Mroonga" IN BOOLEAN MODE) ORDER BY id LIMIT 2; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_no_where_clause.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_no_where_clause.test index d40328299b6..824c373bf95 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_no_where_clause.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_no_where_clause.test @@ -37,7 +37,9 @@ insert into t1 values(5,50,"aa ii uu ii oo"); show status like 'mroonga_fast_order_limit'; +--disable_ps2_protocol select *, match(c3) against("ii") from t1 order by c1 desc limit 1; +--enable_ps2_protocol show status like 'mroonga_fast_order_limit'; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_order_by_primary_key.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_order_by_primary_key.test index 2513df8e734..4d2236b7c12 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_order_by_primary_key.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_order_by_primary_key.test @@ -37,11 +37,13 @@ INSERT INTO memos VALUES(5, "Groonga is fast"); SHOW STATUS LIKE 'mroonga_fast_order_limit'; +--disable_ps2_protocol SELECT id, content FROM memos WHERE MATCH(content) AGAINST("+Mroonga" IN BOOLEAN MODE) ORDER BY id DESC LIMIT 2; +--enable_ps2_protocol SHOW STATUS LIKE 'mroonga_fast_order_limit'; diff --git a/storage/spider/mysql-test/spider/bg/t/basic_sql.test b/storage/spider/mysql-test/spider/bg/t/basic_sql.test index 5bb040047fc..6421198fa95 100644 --- a/storage/spider/mysql-test/spider/bg/t/basic_sql.test +++ b/storage/spider/mysql-test/spider/bg/t/basic_sql.test @@ -889,7 +889,9 @@ if ($USE_CHILD_GROUP2) } } --connection master_1 +--disable_ps2_protocol SELECT found_rows(); +--enable_ps2_protocol --echo --echo select high_priority diff --git a/storage/spider/mysql-test/spider/bg/t/direct_aggregate.test b/storage/spider/mysql-test/spider/bg/t/direct_aggregate.test index d65f4c5a624..ca96d4bd41f 100644 --- a/storage/spider/mysql-test/spider/bg/t/direct_aggregate.test +++ b/storage/spider/mysql-test/spider/bg/t/direct_aggregate.test @@ -126,6 +126,7 @@ if ($USE_CHILD_GROUP2) } } --connection master_1 +--disable_ps2_protocol eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; SELECT COUNT(*) FROM ta_l; eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; @@ -137,6 +138,7 @@ SELECT MAX(a) FROM ta_l WHERE a < 5; eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; SELECT MIN(a) FROM ta_l WHERE a > 1; eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; +--enable_ps2_protocol if ($USE_CHILD_GROUP2) { if (!$OUTPUT_CHILD_GROUP2) diff --git a/storage/spider/mysql-test/spider/bg/t/direct_aggregate_part.test b/storage/spider/mysql-test/spider/bg/t/direct_aggregate_part.test index aebf210c745..d6d4623afc5 100644 --- a/storage/spider/mysql-test/spider/bg/t/direct_aggregate_part.test +++ b/storage/spider/mysql-test/spider/bg/t/direct_aggregate_part.test @@ -132,6 +132,7 @@ if ($HAVE_PARTITION) (4, 'd', '2003-11-30 05:01:03'), (5, 'c', '2001-12-31 23:59:59'); --enable_query_log + --disable_ps2_protocol eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; SELECT COUNT(*) FROM ta_l2; eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; @@ -143,6 +144,7 @@ if ($HAVE_PARTITION) eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; SELECT MIN(a) FROM ta_l2 WHERE a > 1; eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; + --enable_ps2_protocol if ($USE_CHILD_GROUP2) { if (!$OUTPUT_CHILD_GROUP2) diff --git a/storage/spider/mysql-test/spider/bg/t/ha.test b/storage/spider/mysql-test/spider/bg/t/ha.test index c12930e4aed..00dcf776836 100644 --- a/storage/spider/mysql-test/spider/bg/t/ha.test +++ b/storage/spider/mysql-test/spider/bg/t/ha.test @@ -477,7 +477,9 @@ if ($USE_CHILD_GROUP3) } --connection master_1 +--disable_ps2_protocol eval $MASTER_1_CHANGE_HA_MON; +--enable_ps2_protocol --echo --echo active standby test @@ -841,7 +843,9 @@ if ($USE_CHILD_GROUP3) } --connection master_1 +--disable_ps2_protocol eval $MASTER_1_CHANGE_HA_MON; +--enable_ps2_protocol --echo --echo deinit diff --git a/storage/spider/mysql-test/spider/bg/t/spider_fixes.test b/storage/spider/mysql-test/spider/bg/t/spider_fixes.test index 04e806fb612..cfca9a04e6b 100644 --- a/storage/spider/mysql-test/spider/bg/t/spider_fixes.test +++ b/storage/spider/mysql-test/spider/bg/t/spider_fixes.test @@ -152,8 +152,10 @@ if ($USE_CHILD_GROUP2) } } --connection master_1 +--disable_ps2_protocol SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l WHERE a < 5 ORDER BY a DESC LIMIT 3; +--enable_ps2_protocol if ($USE_CHILD_GROUP2) { if (!$OUTPUT_CHILD_GROUP2) @@ -194,8 +196,10 @@ if ($USE_CHILD_GROUP2) } } --connection master_1 +--disable_ps2_protocol SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l WHERE a <= 5 ORDER BY a DESC LIMIT 3; +--enable_ps2_protocol if ($USE_CHILD_GROUP2) { if (!$OUTPUT_CHILD_GROUP2) @@ -917,7 +921,9 @@ SELECT a, b, c FROM ta_l_int ORDER BY a; --echo direct order limit --connection master_1 eval $MASTER_1_CHECK_DIRECT_ORDER_LIMIT_STATUS; +--disable_ps2_protocol SELECT a, b, c FROM ta_l_int ORDER BY a LIMIT 3; +--enable_ps2_protocol eval $MASTER_1_CHECK_DIRECT_ORDER_LIMIT_STATUS; diff --git a/storage/spider/mysql-test/spider/bugfix/t/checksum_table_with_quick_mode_3.test b/storage/spider/mysql-test/spider/bugfix/t/checksum_table_with_quick_mode_3.test index 5dc4a88c842..de2dd90a500 100644 --- a/storage/spider/mysql-test/spider/bugfix/t/checksum_table_with_quick_mode_3.test +++ b/storage/spider/mysql-test/spider/bugfix/t/checksum_table_with_quick_mode_3.test @@ -52,7 +52,9 @@ TRUNCATE TABLE mysql.general_log; CHECKSUM TABLE tbl_a EXTENDED; --connection child2_1 +--disable_ps2_protocol eval $CHILD2_1_SELECT_ARGUMENT1; +--enable_ps2_protocol eval $CHILD2_1_SELECT_TABLES; --echo diff --git a/storage/spider/mysql-test/spider/bugfix/t/cp932_column.test b/storage/spider/mysql-test/spider/bugfix/t/cp932_column.test index 8bd0d40cb60..119179702ec 100644 --- a/storage/spider/mysql-test/spider/bugfix/t/cp932_column.test +++ b/storage/spider/mysql-test/spider/bugfix/t/cp932_column.test @@ -59,7 +59,9 @@ SET NAMES utf8; --connection child2_1 SET NAMES cp932; +--disable_ps2_protocol eval $CHILD2_1_SELECT_ARGUMENT1; +--enable_ps2_protocol eval $CHILD2_1_SELECT_TABLES; SET NAMES utf8; diff --git a/storage/spider/mysql-test/spider/bugfix/t/delete_with_float_column.inc b/storage/spider/mysql-test/spider/bugfix/t/delete_with_float_column.inc index 349808824e7..a4def9b3dc8 100644 --- a/storage/spider/mysql-test/spider/bugfix/t/delete_with_float_column.inc +++ b/storage/spider/mysql-test/spider/bugfix/t/delete_with_float_column.inc @@ -78,7 +78,9 @@ sync_with_master; SET SESSION sql_log_bin= 0; --connection child2_1 +--disable_ps2_protocol eval $CHILD2_1_SELECT_ARGUMENT1; +--enable_ps2_protocol eval $CHILD2_1_SELECT_TABLES; --connection slave1_1 diff --git a/storage/spider/mysql-test/spider/bugfix/t/direct_sql_with_comma_pwd.test b/storage/spider/mysql-test/spider/bugfix/t/direct_sql_with_comma_pwd.test index 0b7d51190a7..ede4144a524 100644 --- a/storage/spider/mysql-test/spider/bugfix/t/direct_sql_with_comma_pwd.test +++ b/storage/spider/mysql-test/spider/bugfix/t/direct_sql_with_comma_pwd.test @@ -19,7 +19,9 @@ eval CREATE TEMPORARY TABLE tmp_a ( ) $MASTER_1_ENGINE2; --enable_query_log +--disable_ps2_protocol eval $DIRECT_SQL_COMMAND; +--enable_ps2_protocol SELECT pkey FROM tmp_a; --echo diff --git a/storage/spider/mysql-test/spider/bugfix/t/direct_sql_with_tmp_table.test b/storage/spider/mysql-test/spider/bugfix/t/direct_sql_with_tmp_table.test index 139af5c83c9..01fcc20bbe1 100644 --- a/storage/spider/mysql-test/spider/bugfix/t/direct_sql_with_tmp_table.test +++ b/storage/spider/mysql-test/spider/bugfix/t/direct_sql_with_tmp_table.test @@ -19,7 +19,9 @@ eval CREATE TEMPORARY TABLE tmp_a ( ) $MASTER_1_ENGINE2; --enable_query_log +--disable_ps2_protocol eval $DIRECT_SQL_COMMAND; +--enable_ps2_protocol SELECT pkey FROM tmp_a; --echo diff --git a/storage/spider/mysql-test/spider/bugfix/t/group_by_order_by_limit.test b/storage/spider/mysql-test/spider/bugfix/t/group_by_order_by_limit.test index f1de6d5d25f..96c2ea6c849 100644 --- a/storage/spider/mysql-test/spider/bugfix/t/group_by_order_by_limit.test +++ b/storage/spider/mysql-test/spider/bugfix/t/group_by_order_by_limit.test @@ -66,6 +66,7 @@ TRUNCATE TABLE mysql.general_log; --connection child2_2 TRUNCATE TABLE mysql.general_log; +--disable_ps2_protocol --connection master_1 SELECT skey, count(*) cnt FROM tbl_a GROUP BY skey ORDER BY cnt DESC, skey DESC LIMIT 5; @@ -76,6 +77,7 @@ eval $CHILD2_1_SELECT_TABLES; --connection child2_2 eval $CHILD2_2_SELECT_ARGUMENT1; eval $CHILD2_2_SELECT_TABLES; +--enable_ps2_protocol --echo --echo deinit diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_19866.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_19866.test index 05b753ae8bb..0b8ce69cd73 100644 --- a/storage/spider/mysql-test/spider/bugfix/t/mdev_19866.test +++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_19866.test @@ -63,6 +63,7 @@ TRUNCATE TABLE mysql.general_log; TRUNCATE TABLE mysql.general_log; --connection master_1 +--disable_ps2_protocol SELECT * FROM tbl_a; SELECT * FROM tbl_a WHERE pkey = 1; SELECT * FROM tbl_a; @@ -76,6 +77,7 @@ eval $CHILD2_1_SELECT_TABLES; --connection child2_2 eval $CHILD2_2_SELECT_ARGUMENT1; eval $CHILD2_2_SELECT_TABLES; +--enable_ps2_protocol --echo --echo deinit diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_20100.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_20100.test index 3f522b4f6f5..3d1ccf3ce6a 100644 --- a/storage/spider/mysql-test/spider/bugfix/t/mdev_20100.test +++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_20100.test @@ -57,6 +57,7 @@ INSERT INTO tbl_a (a, b, c) VALUES TRUNCATE TABLE mysql.general_log; --connection master_1 +--disable_ps2_protocol SELECT a, b, c FROM tbl_a PARTITION (pt2) WHERE b = 'c'; SELECT a, b, c FROM tbl_a PARTITION (pt1,pt2); SELECT a, b, c FROM tbl_a PARTITION (pt3) WHERE b = 'c'; @@ -65,9 +66,12 @@ SELECT a, b, c FROM tbl_a PARTITION (pt1) WHERE b = 'c'; SELECT a, b, c FROM tbl_a PARTITION (pt1,pt3); SELECT a, b, c FROM tbl_a PARTITION (pt1) WHERE b = 'c'; SELECT a, b, c FROM tbl_a PARTITION (pt2,pt3); +--enable_ps2_protocol --connection child2_1 +--disable_ps2_protocol eval $CHILD2_1_SELECT_ARGUMENT1; +--enable_ps2_protocol --disable_ps_protocol eval $CHILD2_1_SELECT_TABLES; --enable_ps_protocol diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_20502.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_20502.test index 2d6ff5b4663..1cd1c689372 100644 --- a/storage/spider/mysql-test/spider/bugfix/t/mdev_20502.test +++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_20502.test @@ -47,6 +47,7 @@ INSERT INTO tbl_a (val) VALUES (1); --connection child2_1 TRUNCATE TABLE mysql.general_log; +--disable_ps2_protocol --connection master_1 SELECT id, 0 AS const, val FROM tbl_a; SELECT 1+2, id, 0 AS const, val, val+10, (SELECT tbl_a.val+1 FROM tbl_a) AS sq @@ -60,6 +61,7 @@ FROM tbl_a GROUP BY val; --connection child2_1 eval $CHILD2_1_SELECT_ARGUMENT1; eval $CHILD2_1_SELECT_TABLES; +--enable_ps2_protocol --echo --echo deinit diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_21884.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_21884.test index 16836cfce28..c1a9aaa4e9d 100644 --- a/storage/spider/mysql-test/spider/bugfix/t/mdev_21884.test +++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_21884.test @@ -75,11 +75,15 @@ INSERT INTO tb_l (a, b, c) VALUES TRUNCATE TABLE mysql.general_log; --connection master_1 +--disable_ps2_protocol SELECT STRAIGHT_JOIN b.a, b.b FROM tb_l a, tbl_a b WHERE a.a = b.a; +--enable_ps2_protocol --connection child2_1 SET NAMES utf8; +--disable_ps2_protocol eval $CHILD2_1_SELECT_ARGUMENT1; +--enable_ps2_protocol --disable_ps_protocol eval $CHILD2_1_SELECT_TABLES; --enable_ps_protocol diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_27172.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_27172.test index d544a0b400e..0b2e065702d 100644 --- a/storage/spider/mysql-test/spider/bugfix/t/mdev_27172.test +++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_27172.test @@ -48,6 +48,7 @@ eval CREATE TABLE tbl_a ( KEY k (greeting) ) $MASTER_1_ENGINE $MASTER_1_CHARSET COMMENT='table "tbl_a", srv "s_2_1"'; +--disable_ps2_protocol INSERT INTO tbl_a VALUES (1, "Hi!"),(2, "Aloha!"),(3, "Aloha!!!"); SELECT * FROM tbl_a WHERE greeting = "Aloha!" AND CASE greeting WHEN "Aloha!" THEN "one" ELSE 'more' END = "one"; # hack to disable GBH @@ -76,6 +77,7 @@ SELECT * FROM tbl_c WHERE greeting = "Aloha!" --connection child2_1 SELECT argument FROM mysql.general_log WHERE argument LIKE 'select %'; +--enable_ps2_protocol --connection child2_1 SET @@global.general_log = @general_log_backup; diff --git a/storage/spider/mysql-test/spider/bugfix/t/quick_mode_0.test b/storage/spider/mysql-test/spider/bugfix/t/quick_mode_0.test index 235edc10d12..3fd9e623887 100644 --- a/storage/spider/mysql-test/spider/bugfix/t/quick_mode_0.test +++ b/storage/spider/mysql-test/spider/bugfix/t/quick_mode_0.test @@ -73,6 +73,7 @@ TRUNCATE TABLE mysql.general_log; --connection child2_2 TRUNCATE TABLE mysql.general_log; +--disable_ps2_protocol --connection master_1 SELECT a.pkey FROM tbl_a a, tbl_b b WHERE a.pkey = b.pkey; @@ -135,6 +136,7 @@ eval $CHILD2_1_SELECT_TABLES; --replace_regex /tmp_spider_bka_0x[0-9a-f]*/tmp_spider_bka_xxxx/ eval $CHILD2_2_SELECT_ARGUMENT1; eval $CHILD2_2_SELECT_TABLES; +--enable_ps2_protocol --echo --echo deinit diff --git a/storage/spider/mysql-test/spider/bugfix/t/quick_mode_1.test b/storage/spider/mysql-test/spider/bugfix/t/quick_mode_1.test index 01fa0cb5128..940fa61c598 100644 --- a/storage/spider/mysql-test/spider/bugfix/t/quick_mode_1.test +++ b/storage/spider/mysql-test/spider/bugfix/t/quick_mode_1.test @@ -73,6 +73,7 @@ TRUNCATE TABLE mysql.general_log; --connection child2_2 TRUNCATE TABLE mysql.general_log; +--disable_ps2_protocol --connection master_1 SELECT a.pkey FROM tbl_a a, tbl_b b WHERE a.pkey = b.pkey; @@ -135,6 +136,7 @@ eval $CHILD2_1_SELECT_TABLES; --replace_regex /tmp_spider_bka_0x[0-9a-f]*/tmp_spider_bka_xxxx/ eval $CHILD2_2_SELECT_ARGUMENT1; eval $CHILD2_2_SELECT_TABLES; +--enable_ps2_protocol --echo --echo deinit diff --git a/storage/spider/mysql-test/spider/bugfix/t/quick_mode_2.test b/storage/spider/mysql-test/spider/bugfix/t/quick_mode_2.test index 3ea8138e755..e9270a2ee93 100644 --- a/storage/spider/mysql-test/spider/bugfix/t/quick_mode_2.test +++ b/storage/spider/mysql-test/spider/bugfix/t/quick_mode_2.test @@ -73,6 +73,7 @@ TRUNCATE TABLE mysql.general_log; --connection child2_2 TRUNCATE TABLE mysql.general_log; +--disable_ps2_protocol --connection master_1 SELECT a.pkey FROM tbl_a a, tbl_b b WHERE a.pkey = b.pkey; @@ -135,6 +136,7 @@ eval $CHILD2_1_SELECT_TABLES; --replace_regex /tmp_spider_bka_0x[0-9a-f]*/tmp_spider_bka_xxxx/ eval $CHILD2_2_SELECT_ARGUMENT1; eval $CHILD2_2_SELECT_TABLES; +--enable_ps2_protocol --echo --echo deinit diff --git a/storage/spider/mysql-test/spider/bugfix/t/quick_mode_3.test b/storage/spider/mysql-test/spider/bugfix/t/quick_mode_3.test index bc926b0a296..ad042aadfed 100644 --- a/storage/spider/mysql-test/spider/bugfix/t/quick_mode_3.test +++ b/storage/spider/mysql-test/spider/bugfix/t/quick_mode_3.test @@ -74,6 +74,7 @@ TRUNCATE TABLE mysql.general_log; --connection child2_2 TRUNCATE TABLE mysql.general_log; +--disable_ps2_protocol --connection master_1 SELECT a.pkey FROM tbl_a a, tbl_b b WHERE a.pkey = b.pkey; @@ -136,6 +137,7 @@ eval $CHILD2_1_SELECT_TABLES; --replace_regex /tmp_spider_bka_0x[0-9a-f]*/tmp_spider_bka_xxxx/ eval $CHILD2_2_SELECT_ARGUMENT1; eval $CHILD2_2_SELECT_TABLES; +--enable_ps2_protocol --echo --echo deinit diff --git a/storage/spider/mysql-test/spider/bugfix/t/return_found_rows_insert.test b/storage/spider/mysql-test/spider/bugfix/t/return_found_rows_insert.test index 2beb9d9d7e4..d4c0db1e7cc 100644 --- a/storage/spider/mysql-test/spider/bugfix/t/return_found_rows_insert.test +++ b/storage/spider/mysql-test/spider/bugfix/t/return_found_rows_insert.test @@ -56,7 +56,9 @@ exec $MYSQL -v -v -u root -h localhost -P $MASTER_1_MYPORT -S $MASTER_1_MYSOCK - --enable_query_log --connection child2_1 +--disable_ps2_protocol eval $CHILD2_1_SELECT_ARGUMENT1; +--enable_ps2_protocol eval $CHILD2_1_SELECT_TABLES; TRUNCATE TABLE mysql.general_log; @@ -67,7 +69,9 @@ exec $MYSQL -v -v -u root -h localhost -P $MASTER_1_MYPORT -S $MASTER_1_MYSOCK - --enable_query_log --connection child2_1 +--disable_ps2_protocol eval $CHILD2_1_SELECT_ARGUMENT1; +--enable_ps2_protocol eval $CHILD2_1_SELECT_TABLES; TRUNCATE TABLE mysql.general_log; @@ -78,7 +82,9 @@ exec $MYSQL -v -v -u root -h localhost -P $MASTER_1_MYPORT -S $MASTER_1_MYSOCK - --enable_query_log --connection child2_1 +--disable_ps2_protocol eval $CHILD2_1_SELECT_ARGUMENT1; +--enable_ps2_protocol eval $CHILD2_1_SELECT_TABLES; --echo diff --git a/storage/spider/mysql-test/spider/bugfix/t/return_found_rows_update.test b/storage/spider/mysql-test/spider/bugfix/t/return_found_rows_update.test index 50d9f345dfb..a5f63978a22 100644 --- a/storage/spider/mysql-test/spider/bugfix/t/return_found_rows_update.test +++ b/storage/spider/mysql-test/spider/bugfix/t/return_found_rows_update.test @@ -58,7 +58,9 @@ exec $MYSQL -v -v -u root -h localhost --default-character-set=latin1 -P $MASTER --enable_query_log --connection child2_1 +--disable_ps2_protocol eval $CHILD2_1_SELECT_ARGUMENT1; +--enable_ps2_protocol eval $CHILD2_1_SELECT_TABLES; --echo diff --git a/storage/spider/mysql-test/spider/bugfix/t/select_by_null.test b/storage/spider/mysql-test/spider/bugfix/t/select_by_null.test index 1f540b2a15f..feb7df57f02 100644 --- a/storage/spider/mysql-test/spider/bugfix/t/select_by_null.test +++ b/storage/spider/mysql-test/spider/bugfix/t/select_by_null.test @@ -52,7 +52,9 @@ TRUNCATE TABLE mysql.general_log; SELECT pkey FROM tbl_a WHERE NULL; --connection child2_1 +--disable_ps2_protocol eval $CHILD2_1_SELECT_ARGUMENT1; +--enable_ps2_protocol eval $CHILD2_1_SELECT_TABLES; --echo diff --git a/storage/spider/mysql-test/spider/bugfix/t/select_with_backquote.test b/storage/spider/mysql-test/spider/bugfix/t/select_with_backquote.test index 4c4d687cf89..b511b05bf01 100644 --- a/storage/spider/mysql-test/spider/bugfix/t/select_with_backquote.test +++ b/storage/spider/mysql-test/spider/bugfix/t/select_with_backquote.test @@ -48,6 +48,7 @@ FLUSH TABLES; --connection child2_1 TRUNCATE TABLE mysql.general_log; +--disable_ps2_protocol --connection master_1 SET NAMES utf8; SELECT `pkey`, LEFT(`txt_utf8`, 4) FROM `auto_test_local`.`tbl_a` ORDER BY LEFT(`txt_utf8`, 4) LIMIT 3; @@ -56,6 +57,7 @@ SELECT `pkey`, LEFT(`txt_utf8`, 4) FROM `auto_test_local`.`tbl_a` ORDER BY LEFT( SET NAMES utf8; eval $CHILD2_1_SELECT_ARGUMENT1; eval $CHILD2_1_SELECT_TABLES; +--enable_ps2_protocol --echo --echo deinit diff --git a/storage/spider/mysql-test/spider/bugfix/t/slave_trx_isolation.test b/storage/spider/mysql-test/spider/bugfix/t/slave_trx_isolation.test index 652fbb1c11c..c586f670bd3 100644 --- a/storage/spider/mysql-test/spider/bugfix/t/slave_trx_isolation.test +++ b/storage/spider/mysql-test/spider/bugfix/t/slave_trx_isolation.test @@ -70,7 +70,10 @@ sync_with_master; SET SESSION sql_log_bin= 0; --connection child2_1 + +--disable_ps2_protocol eval $CHILD2_1_SELECT_ARGUMENT1; +--enable_ps2_protocol eval $CHILD2_1_SELECT_TABLES; --connection slave1_1 diff --git a/storage/spider/mysql-test/spider/bugfix/t/sql_mode.inc b/storage/spider/mysql-test/spider/bugfix/t/sql_mode.inc index ae7c15c5081..90b8b749767 100644 --- a/storage/spider/mysql-test/spider/bugfix/t/sql_mode.inc +++ b/storage/spider/mysql-test/spider/bugfix/t/sql_mode.inc @@ -44,12 +44,14 @@ INSERT INTO tbl_a (pkey) VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); --connection child2_1 TRUNCATE TABLE mysql.general_log; +--disable_ps2_protocol --connection master_1 SELECT * FROM tbl_a ORDER BY pkey; --connection child2_1 eval $CHILD2_1_SELECT_ARGUMENT1; eval $CHILD2_1_SELECT_TABLES; +--enable_ps2_protocol --echo --echo deinit diff --git a/storage/spider/mysql-test/spider/bugfix/t/wrapper_mariadb.test b/storage/spider/mysql-test/spider/bugfix/t/wrapper_mariadb.test index 4f980140a31..d32af31674a 100644 --- a/storage/spider/mysql-test/spider/bugfix/t/wrapper_mariadb.test +++ b/storage/spider/mysql-test/spider/bugfix/t/wrapper_mariadb.test @@ -45,6 +45,7 @@ INSERT INTO tbl_a (pkey) VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); --connection child2_1 TRUNCATE TABLE mysql.general_log; +--disable_ps2_protocol --connection master_1 SELECT * FROM tbl_a ORDER BY pkey; @@ -53,6 +54,7 @@ SELECT * FROM tbl_a ORDER BY pkey; replace_regex /order by t0.`pkey`/order by `pkey`/; eval $CHILD2_1_SELECT_ARGUMENT1; eval $CHILD2_1_SELECT_TABLES; +--enable_ps2_protocol --echo --echo deinit diff --git a/storage/spider/mysql-test/spider/bugfix/t/xa_cmd.test b/storage/spider/mysql-test/spider/bugfix/t/xa_cmd.test index 9ae528071e3..1e831453e41 100644 --- a/storage/spider/mysql-test/spider/bugfix/t/xa_cmd.test +++ b/storage/spider/mysql-test/spider/bugfix/t/xa_cmd.test @@ -49,7 +49,9 @@ XA PREPARE 'test'; XA COMMIT 'test'; --connection child2_1 +--disable_ps2_protocol eval $CHILD2_1_SELECT_ARGUMENT1; +--enable_ps2_protocol eval $CHILD2_1_SELECT_TABLES; --echo diff --git a/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel.inc b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel.inc index 13e5053d64c..83c3ffd6c54 100644 --- a/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel.inc +++ b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel.inc @@ -60,6 +60,7 @@ INSERT INTO tbl_a (pkey) VALUES (20),(21),(22),(23),(24),(25),(26),(27),(28),(29 --echo --echo select test 1 +--disable_ps2_protocol --connection child2_1 TRUNCATE TABLE mysql.general_log; LOCK TABLE tbl_a WRITE; @@ -88,6 +89,7 @@ eval $CHILD2_2_SELECT_TABLES; --connection master_1 reap; +--enable_ps2_protocol --echo --echo deinit diff --git a/storage/spider/mysql-test/spider/handler/t/basic_sql.test b/storage/spider/mysql-test/spider/handler/t/basic_sql.test index 5bb040047fc..6421198fa95 100644 --- a/storage/spider/mysql-test/spider/handler/t/basic_sql.test +++ b/storage/spider/mysql-test/spider/handler/t/basic_sql.test @@ -889,7 +889,9 @@ if ($USE_CHILD_GROUP2) } } --connection master_1 +--disable_ps2_protocol SELECT found_rows(); +--enable_ps2_protocol --echo --echo select high_priority diff --git a/storage/spider/mysql-test/spider/handler/t/direct_aggregate.test b/storage/spider/mysql-test/spider/handler/t/direct_aggregate.test index d65f4c5a624..ca96d4bd41f 100644 --- a/storage/spider/mysql-test/spider/handler/t/direct_aggregate.test +++ b/storage/spider/mysql-test/spider/handler/t/direct_aggregate.test @@ -126,6 +126,7 @@ if ($USE_CHILD_GROUP2) } } --connection master_1 +--disable_ps2_protocol eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; SELECT COUNT(*) FROM ta_l; eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; @@ -137,6 +138,7 @@ SELECT MAX(a) FROM ta_l WHERE a < 5; eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; SELECT MIN(a) FROM ta_l WHERE a > 1; eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; +--enable_ps2_protocol if ($USE_CHILD_GROUP2) { if (!$OUTPUT_CHILD_GROUP2) diff --git a/storage/spider/mysql-test/spider/handler/t/direct_aggregate_part.test b/storage/spider/mysql-test/spider/handler/t/direct_aggregate_part.test index aebf210c745..d6d4623afc5 100644 --- a/storage/spider/mysql-test/spider/handler/t/direct_aggregate_part.test +++ b/storage/spider/mysql-test/spider/handler/t/direct_aggregate_part.test @@ -132,6 +132,7 @@ if ($HAVE_PARTITION) (4, 'd', '2003-11-30 05:01:03'), (5, 'c', '2001-12-31 23:59:59'); --enable_query_log + --disable_ps2_protocol eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; SELECT COUNT(*) FROM ta_l2; eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; @@ -143,6 +144,7 @@ if ($HAVE_PARTITION) eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; SELECT MIN(a) FROM ta_l2 WHERE a > 1; eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; + --enable_ps2_protocol if ($USE_CHILD_GROUP2) { if (!$OUTPUT_CHILD_GROUP2) diff --git a/storage/spider/mysql-test/spider/handler/t/ha.test b/storage/spider/mysql-test/spider/handler/t/ha.test index c12930e4aed..00dcf776836 100644 --- a/storage/spider/mysql-test/spider/handler/t/ha.test +++ b/storage/spider/mysql-test/spider/handler/t/ha.test @@ -477,7 +477,9 @@ if ($USE_CHILD_GROUP3) } --connection master_1 +--disable_ps2_protocol eval $MASTER_1_CHANGE_HA_MON; +--enable_ps2_protocol --echo --echo active standby test @@ -841,7 +843,9 @@ if ($USE_CHILD_GROUP3) } --connection master_1 +--disable_ps2_protocol eval $MASTER_1_CHANGE_HA_MON; +--enable_ps2_protocol --echo --echo deinit diff --git a/storage/spider/mysql-test/spider/handler/t/spider_fixes.test b/storage/spider/mysql-test/spider/handler/t/spider_fixes.test index 04e806fb612..8c49c74f720 100644 --- a/storage/spider/mysql-test/spider/handler/t/spider_fixes.test +++ b/storage/spider/mysql-test/spider/handler/t/spider_fixes.test @@ -152,8 +152,10 @@ if ($USE_CHILD_GROUP2) } } --connection master_1 +--disable_ps2_protocol SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l WHERE a < 5 ORDER BY a DESC LIMIT 3; +--enable_ps2_protocol if ($USE_CHILD_GROUP2) { if (!$OUTPUT_CHILD_GROUP2) @@ -194,8 +196,10 @@ if ($USE_CHILD_GROUP2) } } --connection master_1 +--disable_ps2_protocol SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l WHERE a <= 5 ORDER BY a DESC LIMIT 3; +--enable_ps2_protocol if ($USE_CHILD_GROUP2) { if (!$OUTPUT_CHILD_GROUP2) @@ -916,10 +920,11 @@ SELECT a, b, c FROM ta_l_int ORDER BY a; --echo 2.25 --echo direct order limit --connection master_1 +--disable_ps2_protocol eval $MASTER_1_CHECK_DIRECT_ORDER_LIMIT_STATUS; SELECT a, b, c FROM ta_l_int ORDER BY a LIMIT 3; eval $MASTER_1_CHECK_DIRECT_ORDER_LIMIT_STATUS; - +--enable_ps2_protocol --echo --echo 2.26 diff --git a/storage/spider/mysql-test/spider/oracle/t/basic_sql.test b/storage/spider/mysql-test/spider/oracle/t/basic_sql.test index 5bb040047fc..6421198fa95 100644 --- a/storage/spider/mysql-test/spider/oracle/t/basic_sql.test +++ b/storage/spider/mysql-test/spider/oracle/t/basic_sql.test @@ -889,7 +889,9 @@ if ($USE_CHILD_GROUP2) } } --connection master_1 +--disable_ps2_protocol SELECT found_rows(); +--enable_ps2_protocol --echo --echo select high_priority diff --git a/storage/spider/mysql-test/spider/oracle/t/direct_aggregate.test b/storage/spider/mysql-test/spider/oracle/t/direct_aggregate.test index d65f4c5a624..ca96d4bd41f 100644 --- a/storage/spider/mysql-test/spider/oracle/t/direct_aggregate.test +++ b/storage/spider/mysql-test/spider/oracle/t/direct_aggregate.test @@ -126,6 +126,7 @@ if ($USE_CHILD_GROUP2) } } --connection master_1 +--disable_ps2_protocol eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; SELECT COUNT(*) FROM ta_l; eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; @@ -137,6 +138,7 @@ SELECT MAX(a) FROM ta_l WHERE a < 5; eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; SELECT MIN(a) FROM ta_l WHERE a > 1; eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; +--enable_ps2_protocol if ($USE_CHILD_GROUP2) { if (!$OUTPUT_CHILD_GROUP2) diff --git a/storage/spider/mysql-test/spider/oracle/t/direct_aggregate_part.test b/storage/spider/mysql-test/spider/oracle/t/direct_aggregate_part.test index aebf210c745..d6d4623afc5 100644 --- a/storage/spider/mysql-test/spider/oracle/t/direct_aggregate_part.test +++ b/storage/spider/mysql-test/spider/oracle/t/direct_aggregate_part.test @@ -132,6 +132,7 @@ if ($HAVE_PARTITION) (4, 'd', '2003-11-30 05:01:03'), (5, 'c', '2001-12-31 23:59:59'); --enable_query_log + --disable_ps2_protocol eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; SELECT COUNT(*) FROM ta_l2; eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; @@ -143,6 +144,7 @@ if ($HAVE_PARTITION) eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; SELECT MIN(a) FROM ta_l2 WHERE a > 1; eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; + --enable_ps2_protocol if ($USE_CHILD_GROUP2) { if (!$OUTPUT_CHILD_GROUP2) diff --git a/storage/spider/mysql-test/spider/oracle/t/ha.test b/storage/spider/mysql-test/spider/oracle/t/ha.test index c12930e4aed..00dcf776836 100644 --- a/storage/spider/mysql-test/spider/oracle/t/ha.test +++ b/storage/spider/mysql-test/spider/oracle/t/ha.test @@ -477,7 +477,9 @@ if ($USE_CHILD_GROUP3) } --connection master_1 +--disable_ps2_protocol eval $MASTER_1_CHANGE_HA_MON; +--enable_ps2_protocol --echo --echo active standby test @@ -841,7 +843,9 @@ if ($USE_CHILD_GROUP3) } --connection master_1 +--disable_ps2_protocol eval $MASTER_1_CHANGE_HA_MON; +--enable_ps2_protocol --echo --echo deinit diff --git a/storage/spider/mysql-test/spider/oracle/t/spider_fixes.test b/storage/spider/mysql-test/spider/oracle/t/spider_fixes.test index 04e806fb612..cfca9a04e6b 100644 --- a/storage/spider/mysql-test/spider/oracle/t/spider_fixes.test +++ b/storage/spider/mysql-test/spider/oracle/t/spider_fixes.test @@ -152,8 +152,10 @@ if ($USE_CHILD_GROUP2) } } --connection master_1 +--disable_ps2_protocol SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l WHERE a < 5 ORDER BY a DESC LIMIT 3; +--enable_ps2_protocol if ($USE_CHILD_GROUP2) { if (!$OUTPUT_CHILD_GROUP2) @@ -194,8 +196,10 @@ if ($USE_CHILD_GROUP2) } } --connection master_1 +--disable_ps2_protocol SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l WHERE a <= 5 ORDER BY a DESC LIMIT 3; +--enable_ps2_protocol if ($USE_CHILD_GROUP2) { if (!$OUTPUT_CHILD_GROUP2) @@ -917,7 +921,9 @@ SELECT a, b, c FROM ta_l_int ORDER BY a; --echo direct order limit --connection master_1 eval $MASTER_1_CHECK_DIRECT_ORDER_LIMIT_STATUS; +--disable_ps2_protocol SELECT a, b, c FROM ta_l_int ORDER BY a LIMIT 3; +--enable_ps2_protocol eval $MASTER_1_CHECK_DIRECT_ORDER_LIMIT_STATUS; diff --git a/storage/spider/mysql-test/spider/oracle2/t/basic_sql.test b/storage/spider/mysql-test/spider/oracle2/t/basic_sql.test index 5bb040047fc..6421198fa95 100644 --- a/storage/spider/mysql-test/spider/oracle2/t/basic_sql.test +++ b/storage/spider/mysql-test/spider/oracle2/t/basic_sql.test @@ -889,7 +889,9 @@ if ($USE_CHILD_GROUP2) } } --connection master_1 +--disable_ps2_protocol SELECT found_rows(); +--enable_ps2_protocol --echo --echo select high_priority diff --git a/storage/spider/mysql-test/spider/oracle2/t/direct_aggregate.test b/storage/spider/mysql-test/spider/oracle2/t/direct_aggregate.test index d65f4c5a624..ca96d4bd41f 100644 --- a/storage/spider/mysql-test/spider/oracle2/t/direct_aggregate.test +++ b/storage/spider/mysql-test/spider/oracle2/t/direct_aggregate.test @@ -126,6 +126,7 @@ if ($USE_CHILD_GROUP2) } } --connection master_1 +--disable_ps2_protocol eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; SELECT COUNT(*) FROM ta_l; eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; @@ -137,6 +138,7 @@ SELECT MAX(a) FROM ta_l WHERE a < 5; eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; SELECT MIN(a) FROM ta_l WHERE a > 1; eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; +--enable_ps2_protocol if ($USE_CHILD_GROUP2) { if (!$OUTPUT_CHILD_GROUP2) diff --git a/storage/spider/mysql-test/spider/oracle2/t/direct_aggregate_part.test b/storage/spider/mysql-test/spider/oracle2/t/direct_aggregate_part.test index aebf210c745..d6d4623afc5 100644 --- a/storage/spider/mysql-test/spider/oracle2/t/direct_aggregate_part.test +++ b/storage/spider/mysql-test/spider/oracle2/t/direct_aggregate_part.test @@ -132,6 +132,7 @@ if ($HAVE_PARTITION) (4, 'd', '2003-11-30 05:01:03'), (5, 'c', '2001-12-31 23:59:59'); --enable_query_log + --disable_ps2_protocol eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; SELECT COUNT(*) FROM ta_l2; eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; @@ -143,6 +144,7 @@ if ($HAVE_PARTITION) eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; SELECT MIN(a) FROM ta_l2 WHERE a > 1; eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; + --enable_ps2_protocol if ($USE_CHILD_GROUP2) { if (!$OUTPUT_CHILD_GROUP2) diff --git a/storage/spider/mysql-test/spider/oracle2/t/ha.test b/storage/spider/mysql-test/spider/oracle2/t/ha.test index c12930e4aed..00dcf776836 100644 --- a/storage/spider/mysql-test/spider/oracle2/t/ha.test +++ b/storage/spider/mysql-test/spider/oracle2/t/ha.test @@ -477,7 +477,9 @@ if ($USE_CHILD_GROUP3) } --connection master_1 +--disable_ps2_protocol eval $MASTER_1_CHANGE_HA_MON; +--enable_ps2_protocol --echo --echo active standby test @@ -841,7 +843,9 @@ if ($USE_CHILD_GROUP3) } --connection master_1 +--disable_ps2_protocol eval $MASTER_1_CHANGE_HA_MON; +--enable_ps2_protocol --echo --echo deinit diff --git a/storage/spider/mysql-test/spider/oracle2/t/spider_fixes.test b/storage/spider/mysql-test/spider/oracle2/t/spider_fixes.test index 04e806fb612..cfca9a04e6b 100644 --- a/storage/spider/mysql-test/spider/oracle2/t/spider_fixes.test +++ b/storage/spider/mysql-test/spider/oracle2/t/spider_fixes.test @@ -152,8 +152,10 @@ if ($USE_CHILD_GROUP2) } } --connection master_1 +--disable_ps2_protocol SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l WHERE a < 5 ORDER BY a DESC LIMIT 3; +--enable_ps2_protocol if ($USE_CHILD_GROUP2) { if (!$OUTPUT_CHILD_GROUP2) @@ -194,8 +196,10 @@ if ($USE_CHILD_GROUP2) } } --connection master_1 +--disable_ps2_protocol SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l WHERE a <= 5 ORDER BY a DESC LIMIT 3; +--enable_ps2_protocol if ($USE_CHILD_GROUP2) { if (!$OUTPUT_CHILD_GROUP2) @@ -917,7 +921,9 @@ SELECT a, b, c FROM ta_l_int ORDER BY a; --echo direct order limit --connection master_1 eval $MASTER_1_CHECK_DIRECT_ORDER_LIMIT_STATUS; +--disable_ps2_protocol SELECT a, b, c FROM ta_l_int ORDER BY a LIMIT 3; +--enable_ps2_protocol eval $MASTER_1_CHECK_DIRECT_ORDER_LIMIT_STATUS; diff --git a/storage/spider/mysql-test/spider/regression/e1121/t/direct_join_by_pkey_key.test b/storage/spider/mysql-test/spider/regression/e1121/t/direct_join_by_pkey_key.test index 39b5b5535bb..ec4639ed666 100644 --- a/storage/spider/mysql-test/spider/regression/e1121/t/direct_join_by_pkey_key.test +++ b/storage/spider/mysql-test/spider/regression/e1121/t/direct_join_by_pkey_key.test @@ -61,7 +61,9 @@ INSERT INTO tbl_b (bkey,akey) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,4),(6,3),( TRUNCATE TABLE mysql.general_log; --connection master_1 +--disable_ps2_protocol SELECT a.val, a.akey FROM tbl_a a, tbl_b b WHERE a.akey = b.akey AND b.bkey = 5; +--enable_ps2_protocol --connection child2_1 --disable_ps_protocol diff --git a/storage/spider/mysql-test/spider/regression/e1121/t/direct_join_by_pkey_pkey.test b/storage/spider/mysql-test/spider/regression/e1121/t/direct_join_by_pkey_pkey.test index 652f7d15177..52d9b52ddb5 100644 --- a/storage/spider/mysql-test/spider/regression/e1121/t/direct_join_by_pkey_pkey.test +++ b/storage/spider/mysql-test/spider/regression/e1121/t/direct_join_by_pkey_pkey.test @@ -61,7 +61,9 @@ INSERT INTO tbl_b (bkey,akey) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,4),(6,3),( TRUNCATE TABLE mysql.general_log; --connection master_1 +--disable_ps2_protocol SELECT a.val, a.akey FROM tbl_a a, tbl_b b WHERE a.akey = b.akey AND b.bkey = 5; +--enable_ps2_protocol --connection child2_1 --disable_ps_protocol diff --git a/storage/spider/mysql-test/spider/regression/e1121/t/load_data.inc b/storage/spider/mysql-test/spider/regression/e1121/t/load_data.inc index 8c1aa4e651f..080ba735a32 100644 --- a/storage/spider/mysql-test/spider/regression/e1121/t/load_data.inc +++ b/storage/spider/mysql-test/spider/regression/e1121/t/load_data.inc @@ -41,7 +41,9 @@ eval CREATE TABLE tbl_a ( INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9); --disable_query_log --echo SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey; +--disable_ps2_protocol eval SELECT pkey,val INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey; +--enable_ps2_protocol --enable_query_log eval $COMMAND_BEFORE_LOAD_DATA; @@ -54,12 +56,16 @@ TRUNCATE TABLE mysql.general_log; --connection master_1 --disable_query_log --echo LOAD DATA $OPTION_LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' $OPTION_WORD INTO TABLE tbl_a; +--disable_ps2_protocol eval LOAD DATA $OPTION_LOCAL INFILE '$MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' $OPTION_WORD INTO TABLE tbl_a; +--enable_ps2_protocol --enable_query_log --remove_file $MYSQLTEST_VARDIR/tmp/spider_outfile.tsv --connection child2_1 +--disable_ps2_protocol eval $CHILD2_1_SELECT_ARGUMENT1; +--enable_ps2_protocol eval $CHILD2_1_SELECT_TABLES; --echo diff --git a/storage/spider/mysql-test/spider/regression/e112122/t/group_by_order_by_limit_ok.test b/storage/spider/mysql-test/spider/regression/e112122/t/group_by_order_by_limit_ok.test index 2a70098ed1b..868886a284e 100644 --- a/storage/spider/mysql-test/spider/regression/e112122/t/group_by_order_by_limit_ok.test +++ b/storage/spider/mysql-test/spider/regression/e112122/t/group_by_order_by_limit_ok.test @@ -66,6 +66,7 @@ TRUNCATE TABLE mysql.general_log; --connection child2_2 TRUNCATE TABLE mysql.general_log; +--disable_ps2_protocol --connection master_1 SELECT skey, count(*) cnt FROM tbl_a GROUP BY skey ORDER BY cnt DESC, skey DESC LIMIT 5; @@ -76,6 +77,7 @@ eval $CHILD2_1_SELECT_TABLES; --connection child2_2 eval $CHILD2_2_SELECT_ARGUMENT1; eval $CHILD2_2_SELECT_TABLES; +--enable_ps2_protocol --echo --echo deinit diff --git a/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part.inc b/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part.inc index e66550f9a90..fd31047ab58 100644 --- a/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part.inc +++ b/storage/spider/mysql-test/spider/regression/e112122/t/load_data_part.inc @@ -54,7 +54,9 @@ eval CREATE TABLE tbl_a ( INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9); --disable_query_log --echo SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey; +--disable_ps_protocol eval SELECT pkey,val INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey; +--enable_ps2_protocol --enable_query_log eval $COMMAND_BEFORE_LOAD_DATA; @@ -70,10 +72,13 @@ TRUNCATE TABLE mysql.general_log; --connection master_1 --disable_query_log --echo LOAD DATA $OPTION_LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' $OPTION_WORD INTO TABLE tbl_a; +--disable_ps2_protocol eval LOAD DATA $OPTION_LOCAL INFILE '$MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' $OPTION_WORD INTO TABLE tbl_a; +--enable_ps2_protocol --enable_query_log --remove_file $MYSQLTEST_VARDIR/tmp/spider_outfile.tsv +--disable_ps2_protocol --connection child2_1 eval $CHILD2_1_SELECT_ARGUMENT1; eval $CHILD2_1_SELECT_TABLES; @@ -81,6 +86,7 @@ eval $CHILD2_1_SELECT_TABLES; --connection child2_2 eval $CHILD2_2_SELECT_ARGUMENT1; eval $CHILD2_2_SELECT_TABLES; +--enable_ps2_protocol --echo --echo deinit diff --git a/storage/spider/mysql-test/spider/t/auto_increment.test b/storage/spider/mysql-test/spider/t/auto_increment.test index 12d93ca3e72..c5f272f5c44 100644 --- a/storage/spider/mysql-test/spider/t/auto_increment.test +++ b/storage/spider/mysql-test/spider/t/auto_increment.test @@ -144,6 +144,7 @@ if ($USE_CHILD_GROUP2) } } --connection master_1 +--disable_ps2_protocol SELECT * FROM tbl_a; if ($USE_CHILD_GROUP2) { @@ -164,6 +165,7 @@ if ($USE_CHILD_GROUP2) --enable_result_log } } +--enable_ps2_protocol --echo --echo deinit diff --git a/storage/spider/mysql-test/spider/t/basic_sql.test b/storage/spider/mysql-test/spider/t/basic_sql.test index 1298b10f19a..ee77eacd885 100644 --- a/storage/spider/mysql-test/spider/t/basic_sql.test +++ b/storage/spider/mysql-test/spider/t/basic_sql.test @@ -889,7 +889,9 @@ if ($USE_CHILD_GROUP2) } } --connection master_1 +--disable_ps2_protocol SELECT found_rows(); +--enable_ps2_protocol --echo --echo select high_priority diff --git a/storage/spider/mysql-test/spider/t/checksum_table_with_quick_mode_3.test b/storage/spider/mysql-test/spider/t/checksum_table_with_quick_mode_3.test index d108fda7e41..e0fa7a84674 100644 --- a/storage/spider/mysql-test/spider/t/checksum_table_with_quick_mode_3.test +++ b/storage/spider/mysql-test/spider/t/checksum_table_with_quick_mode_3.test @@ -96,7 +96,9 @@ if ($USE_CHILD_GROUP2) --connection child2_1 if ($USE_GENERAL_LOG) { + --disable_ps2_protocol eval $CHILD2_1_SELECT_ARGUMENT1; + --enable_ps2_protocol } eval $CHILD2_1_SELECT_TABLES; if (!$OUTPUT_CHILD_GROUP2) diff --git a/storage/spider/mysql-test/spider/t/direct_aggregate.test b/storage/spider/mysql-test/spider/t/direct_aggregate.test index d65f4c5a624..ca96d4bd41f 100644 --- a/storage/spider/mysql-test/spider/t/direct_aggregate.test +++ b/storage/spider/mysql-test/spider/t/direct_aggregate.test @@ -126,6 +126,7 @@ if ($USE_CHILD_GROUP2) } } --connection master_1 +--disable_ps2_protocol eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; SELECT COUNT(*) FROM ta_l; eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; @@ -137,6 +138,7 @@ SELECT MAX(a) FROM ta_l WHERE a < 5; eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; SELECT MIN(a) FROM ta_l WHERE a > 1; eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; +--enable_ps2_protocol if ($USE_CHILD_GROUP2) { if (!$OUTPUT_CHILD_GROUP2) diff --git a/storage/spider/mysql-test/spider/t/direct_aggregate_part.test b/storage/spider/mysql-test/spider/t/direct_aggregate_part.test index aebf210c745..d6d4623afc5 100644 --- a/storage/spider/mysql-test/spider/t/direct_aggregate_part.test +++ b/storage/spider/mysql-test/spider/t/direct_aggregate_part.test @@ -132,6 +132,7 @@ if ($HAVE_PARTITION) (4, 'd', '2003-11-30 05:01:03'), (5, 'c', '2001-12-31 23:59:59'); --enable_query_log + --disable_ps2_protocol eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; SELECT COUNT(*) FROM ta_l2; eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; @@ -143,6 +144,7 @@ if ($HAVE_PARTITION) eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; SELECT MIN(a) FROM ta_l2 WHERE a > 1; eval $MASTER_1_CHECK_DIRECT_AGGREGATE_STATUS; + --enable_ps2_protocol if ($USE_CHILD_GROUP2) { if (!$OUTPUT_CHILD_GROUP2) diff --git a/storage/spider/mysql-test/spider/t/direct_join.test b/storage/spider/mysql-test/spider/t/direct_join.test index 3f7c692d2c2..634b958f9f9 100644 --- a/storage/spider/mysql-test/spider/t/direct_join.test +++ b/storage/spider/mysql-test/spider/t/direct_join.test @@ -155,6 +155,7 @@ if ($USE_CHILD_GROUP2) } --connection master_1 +--disable_ps2_protocol SELECT a.a, c.b, c.c FROM tbl_a a, tbl_b b, tbl_c c WHERE a.a = b.a and a.a = c.a ORDER BY a.b DESC LIMIT 1,2; if ($USE_CHILD_GROUP2) @@ -176,6 +177,7 @@ if ($USE_CHILD_GROUP2) --enable_result_log } } +--enable_ps2_protocol --echo --echo Test JOIN on a constant table. @@ -301,6 +303,7 @@ if ($USE_CHILD_GROUP2) } --connection master_1 +--disable_ps2_protocol SELECT count(0) FROM tbl_person tp INNER JOIN tbl_ncd_cm_person tncp ON tp.id = tncp.person_id WHERE 1 = 1 AND tp.hr_status != "99" AND tp.hr_status != "2" AND tp.region_code LIKE CONCAT(CONCAT('%', '51041110620301', '%')) AND tp.id = '24FC3F0A5119432BAE13DD65AABAA39C' AND tncp.diseaseKind_id = '52A0328740914BCE86ED10A4D2521816' AND tp.region = 510411; if ($USE_CHILD_GROUP2) { @@ -322,6 +325,7 @@ if ($USE_CHILD_GROUP2) --enable_result_log } } +--enable_ps2_protocol --echo --echo deinit diff --git a/storage/spider/mysql-test/spider/t/direct_join_using.test b/storage/spider/mysql-test/spider/t/direct_join_using.test index 819e56ff21c..3ecfb292c89 100644 --- a/storage/spider/mysql-test/spider/t/direct_join_using.test +++ b/storage/spider/mysql-test/spider/t/direct_join_using.test @@ -155,6 +155,7 @@ if ($USE_CHILD_GROUP2) } --connection master_1 +--disable_ps2_protocol SELECT a.a, c.b, c.c FROM tbl_a a join tbl_b b using(a) join tbl_c c using(a) ORDER BY a.b DESC; if ($USE_CHILD_GROUP2) @@ -176,6 +177,7 @@ if ($USE_CHILD_GROUP2) --enable_result_log } } +--enable_ps2_protocol --echo --echo deinit diff --git a/storage/spider/mysql-test/spider/t/direct_left_join.test b/storage/spider/mysql-test/spider/t/direct_left_join.test index e09b6a12488..c9784b047ed 100644 --- a/storage/spider/mysql-test/spider/t/direct_left_join.test +++ b/storage/spider/mysql-test/spider/t/direct_left_join.test @@ -155,6 +155,7 @@ if ($USE_CHILD_GROUP2) } --connection master_1 +--disable_ps2_protocol SELECT a.a, c.b, c.c FROM tbl_a a left join tbl_b b on a.a = b.a left join tbl_c c on a.a = c.a ORDER BY a.b DESC; if ($USE_CHILD_GROUP2) @@ -176,6 +177,7 @@ if ($USE_CHILD_GROUP2) --enable_result_log } } +--enable_ps2_protocol --echo --echo deinit diff --git a/storage/spider/mysql-test/spider/t/direct_left_join_nullable.test b/storage/spider/mysql-test/spider/t/direct_left_join_nullable.test index dc67a01b4b2..7c69d73d335 100644 --- a/storage/spider/mysql-test/spider/t/direct_left_join_nullable.test +++ b/storage/spider/mysql-test/spider/t/direct_left_join_nullable.test @@ -170,6 +170,7 @@ if ($USE_CHILD_GROUP2) } --connection master_1 +--disable_ps2_protocol SELECT a.a, c.b, c.c, d.a FROM tbl_d a left join tbl_c b on a.a = b.a left join tbl_b c on b.c = c.c left join tbl_a d on c.b = d.b ORDER BY a.a DESC; if ($USE_CHILD_GROUP2) @@ -191,6 +192,7 @@ if ($USE_CHILD_GROUP2) --enable_result_log } } +--enable_ps2_protocol --echo --echo deinit diff --git a/storage/spider/mysql-test/spider/t/direct_left_right_join_nullable.test b/storage/spider/mysql-test/spider/t/direct_left_right_join_nullable.test index 9d5a990e0ba..dd407482713 100644 --- a/storage/spider/mysql-test/spider/t/direct_left_right_join_nullable.test +++ b/storage/spider/mysql-test/spider/t/direct_left_right_join_nullable.test @@ -170,6 +170,7 @@ if ($USE_CHILD_GROUP2) } --connection master_1 +--disable_ps2_protocol SELECT a.a, c.b, c.c, d.a FROM tbl_a a left join tbl_b b on a.a = b.a left join tbl_c c on b.c = c.c right join tbl_d d on c.b = d.b ORDER BY d.a DESC; if ($USE_CHILD_GROUP2) @@ -191,6 +192,7 @@ if ($USE_CHILD_GROUP2) --enable_result_log } } +--enable_ps2_protocol --echo --echo deinit diff --git a/storage/spider/mysql-test/spider/t/direct_left_right_left_join_nullable.test b/storage/spider/mysql-test/spider/t/direct_left_right_left_join_nullable.test index 90e3666957d..3de0c310464 100644 --- a/storage/spider/mysql-test/spider/t/direct_left_right_left_join_nullable.test +++ b/storage/spider/mysql-test/spider/t/direct_left_right_left_join_nullable.test @@ -170,6 +170,7 @@ if ($USE_CHILD_GROUP2) } --connection master_1 +--disable_ps2_protocol SELECT a.a, c.b, c.c, d.a FROM tbl_a a left join tbl_b b on a.a = b.a right join tbl_c c on b.c = c.c left join tbl_d d on c.b = d.b ORDER BY d.a DESC; if ($USE_CHILD_GROUP2) @@ -191,6 +192,7 @@ if ($USE_CHILD_GROUP2) --enable_result_log } } +--enable_ps2_protocol --echo --echo deinit diff --git a/storage/spider/mysql-test/spider/t/direct_right_join.test b/storage/spider/mysql-test/spider/t/direct_right_join.test index 0c0496651d6..d124f75a230 100644 --- a/storage/spider/mysql-test/spider/t/direct_right_join.test +++ b/storage/spider/mysql-test/spider/t/direct_right_join.test @@ -155,6 +155,7 @@ if ($USE_CHILD_GROUP2) } --connection master_1 +--disable_ps2_protocol SELECT a.a, c.b, c.c FROM tbl_a a right join tbl_b b on a.a = b.a right join tbl_c c on a.a = c.a ORDER BY a.b DESC; if ($USE_CHILD_GROUP2) @@ -176,6 +177,7 @@ if ($USE_CHILD_GROUP2) --enable_result_log } } +--enable_ps2_protocol --echo --echo deinit diff --git a/storage/spider/mysql-test/spider/t/direct_right_join_nullable.test b/storage/spider/mysql-test/spider/t/direct_right_join_nullable.test index 3ab4a30ea84..cdb2d4e6e58 100644 --- a/storage/spider/mysql-test/spider/t/direct_right_join_nullable.test +++ b/storage/spider/mysql-test/spider/t/direct_right_join_nullable.test @@ -170,6 +170,7 @@ if ($USE_CHILD_GROUP2) } --connection master_1 +--disable_ps2_protocol SELECT a.a, c.b, c.c, d.a FROM tbl_a a right join tbl_b b on a.a = b.a right join tbl_c c on b.c = c.c right join tbl_d d on c.b = d.b ORDER BY d.a DESC; if ($USE_CHILD_GROUP2) @@ -191,6 +192,7 @@ if ($USE_CHILD_GROUP2) --enable_result_log } } +--enable_ps2_protocol --echo --echo deinit diff --git a/storage/spider/mysql-test/spider/t/direct_right_left_join_nullable.test b/storage/spider/mysql-test/spider/t/direct_right_left_join_nullable.test index fefe255890d..cff40bfdeef 100644 --- a/storage/spider/mysql-test/spider/t/direct_right_left_join_nullable.test +++ b/storage/spider/mysql-test/spider/t/direct_right_left_join_nullable.test @@ -170,6 +170,7 @@ if ($USE_CHILD_GROUP2) } --connection master_1 +--disable_ps2_protocol SELECT a.a, c.b, c.c, d.a FROM tbl_a a right join tbl_b b on a.a = b.a right join tbl_c c on b.c = c.c left join tbl_d d on c.b = d.b ORDER BY d.a DESC; if ($USE_CHILD_GROUP2) @@ -191,6 +192,7 @@ if ($USE_CHILD_GROUP2) --enable_result_log } } +--enable_ps2_protocol --echo --echo deinit diff --git a/storage/spider/mysql-test/spider/t/direct_right_left_right_join_nullable.test b/storage/spider/mysql-test/spider/t/direct_right_left_right_join_nullable.test index 48882d27939..cd677a4bb8d 100644 --- a/storage/spider/mysql-test/spider/t/direct_right_left_right_join_nullable.test +++ b/storage/spider/mysql-test/spider/t/direct_right_left_right_join_nullable.test @@ -170,6 +170,7 @@ if ($USE_CHILD_GROUP2) } --connection master_1 +--disable_ps2_protocol SELECT a.a, c.b, c.c, d.a FROM tbl_a a right join tbl_b b on a.a = b.a left join tbl_c c on b.c = c.c right join tbl_d d on c.b = d.b ORDER BY d.a DESC; if ($USE_CHILD_GROUP2) @@ -191,6 +192,7 @@ if ($USE_CHILD_GROUP2) --enable_result_log } } +--enable_ps2_protocol --echo --echo deinit diff --git a/storage/spider/mysql-test/spider/t/ha.test b/storage/spider/mysql-test/spider/t/ha.test index c12930e4aed..00dcf776836 100644 --- a/storage/spider/mysql-test/spider/t/ha.test +++ b/storage/spider/mysql-test/spider/t/ha.test @@ -477,7 +477,9 @@ if ($USE_CHILD_GROUP3) } --connection master_1 +--disable_ps2_protocol eval $MASTER_1_CHANGE_HA_MON; +--enable_ps2_protocol --echo --echo active standby test @@ -841,7 +843,9 @@ if ($USE_CHILD_GROUP3) } --connection master_1 +--disable_ps2_protocol eval $MASTER_1_CHANGE_HA_MON; +--enable_ps2_protocol --echo --echo deinit diff --git a/storage/spider/mysql-test/spider/t/partition_cond_push.test b/storage/spider/mysql-test/spider/t/partition_cond_push.test index 4bcfc2aa386..e47209ef220 100644 --- a/storage/spider/mysql-test/spider/t/partition_cond_push.test +++ b/storage/spider/mysql-test/spider/t/partition_cond_push.test @@ -154,6 +154,7 @@ if ($USE_CHILD_GROUP2) } } --connection master_1 +--disable_ps2_protocol SELECT value FROM tbl_a WHERE value < 100; if ($USE_CHILD_GROUP2) { @@ -186,6 +187,7 @@ if ($USE_CHILD_GROUP2) --enable_result_log } } +--enable_ps2_protocol --echo --echo deinit diff --git a/storage/spider/mysql-test/spider/t/partition_fulltext.test b/storage/spider/mysql-test/spider/t/partition_fulltext.test index cd9f9b05e9d..1b31fa05534 100644 --- a/storage/spider/mysql-test/spider/t/partition_fulltext.test +++ b/storage/spider/mysql-test/spider/t/partition_fulltext.test @@ -158,6 +158,7 @@ if ($USE_CHILD_GROUP2) } } --connection master_1 +--disable_ps2_protocol SELECT pkey, words FROM tbl_a WHERE match(words) against('+ghi' in boolean mode); if ($USE_CHILD_GROUP2) { @@ -190,6 +191,7 @@ if ($USE_CHILD_GROUP2) --enable_result_log } } +--enable_ps2_protocol --echo --echo deinit diff --git a/storage/spider/mysql-test/spider/t/partition_join_pushdown_for_single_partition.test b/storage/spider/mysql-test/spider/t/partition_join_pushdown_for_single_partition.test index f4e155be5e2..753014d5da7 100644 --- a/storage/spider/mysql-test/spider/t/partition_join_pushdown_for_single_partition.test +++ b/storage/spider/mysql-test/spider/t/partition_join_pushdown_for_single_partition.test @@ -156,6 +156,7 @@ insert into tbl_a values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); insert into tbl_b values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); --connection master_1 +--disable_ps2_protocol SELECT sum(a.value), count(b.value2) FROM tbl_a a, tbl_b b WHERE a.value = b.value2 AND a.value = 5; SELECT sum(a.value), count(b.value2) FROM tbl_a a, tbl_b b WHERE a.value = 5 and b.value2 = 5; if ($USE_CHILD_GROUP2) @@ -189,6 +190,7 @@ if ($USE_CHILD_GROUP2) --enable_result_log } } +--enable_ps2_protocol --echo --echo deinit diff --git a/storage/spider/mysql-test/spider/t/partition_mrr.test b/storage/spider/mysql-test/spider/t/partition_mrr.test index 2816d65cadb..e2278855393 100644 --- a/storage/spider/mysql-test/spider/t/partition_mrr.test +++ b/storage/spider/mysql-test/spider/t/partition_mrr.test @@ -168,6 +168,7 @@ if ($USE_CHILD_GROUP2) } } --connection master_1 +--disable_ps2_protocol SELECT a.pkey FROM tbl_a a, tbl_b b WHERE a.pkey = b.pkey; if ($USE_CHILD_GROUP2) { @@ -203,6 +204,7 @@ if ($USE_CHILD_GROUP2) --enable_result_log } } +--enable_ps2_protocol --echo --echo deinit diff --git a/storage/spider/mysql-test/spider/t/pushdown_not_like.test b/storage/spider/mysql-test/spider/t/pushdown_not_like.test index 95e4fa6eea8..b39bb7785f6 100644 --- a/storage/spider/mysql-test/spider/t/pushdown_not_like.test +++ b/storage/spider/mysql-test/spider/t/pushdown_not_like.test @@ -104,6 +104,7 @@ if ($USE_CHILD_GROUP2) } --connection master_1 +--disable_ps2_protocol select * from ta_l where b not like 'a%'; if ($USE_CHILD_GROUP2) { @@ -113,7 +114,7 @@ if ($USE_CHILD_GROUP2) SELECT argument FROM mysql.general_log WHERE argument LIKE '%select%'; } } - +--enable_ps2_protocol --echo --echo deinit diff --git a/storage/spider/mysql-test/spider/t/quick_mode_0.test b/storage/spider/mysql-test/spider/t/quick_mode_0.test index 6945d97a049..070d9e40548 100644 --- a/storage/spider/mysql-test/spider/t/quick_mode_0.test +++ b/storage/spider/mysql-test/spider/t/quick_mode_0.test @@ -123,6 +123,7 @@ if ($USE_CHILD_GROUP2) } } --connection master_1 +--disable_ps2_protocol SELECT a.pkey FROM tbl_a a, tbl_b b WHERE a.pkey = b.pkey; if ($USE_CHILD_GROUP2) { @@ -151,6 +152,7 @@ if ($USE_CHILD_GROUP2) --enable_result_log } } +--enable_ps2_protocol --connection master_1 eval $MASTER_1_SET_QUICK_PAGE_BYTE_6; @@ -181,6 +183,7 @@ if ($USE_CHILD_GROUP2) } } --connection master_1 +--disable_ps2_protocol SELECT a.pkey FROM tbl_a a, tbl_b b WHERE a.pkey = b.pkey; if ($USE_CHILD_GROUP2) { @@ -209,6 +212,7 @@ if ($USE_CHILD_GROUP2) --enable_result_log } } +--enable_ps2_protocol --connection master_1 eval $MASTER_1_SET_QUICK_PAGE_BYTE_0; @@ -239,6 +243,7 @@ if ($USE_CHILD_GROUP2) } } --connection master_1 +--disable_ps2_protocol SELECT a.pkey FROM tbl_a a, tbl_b b WHERE a.pkey = b.pkey; if ($USE_CHILD_GROUP2) { @@ -267,6 +272,7 @@ if ($USE_CHILD_GROUP2) --enable_result_log } } +--enable_ps2_protocol --echo --echo deinit diff --git a/storage/spider/mysql-test/spider/t/quick_mode_1.test b/storage/spider/mysql-test/spider/t/quick_mode_1.test index d382d5dbe95..a2c2bf87844 100644 --- a/storage/spider/mysql-test/spider/t/quick_mode_1.test +++ b/storage/spider/mysql-test/spider/t/quick_mode_1.test @@ -123,6 +123,7 @@ if ($USE_CHILD_GROUP2) } } --connection master_1 +--disable_ps2_protocol SELECT a.pkey FROM tbl_a a, tbl_b b WHERE a.pkey = b.pkey; if ($USE_CHILD_GROUP2) { @@ -151,6 +152,7 @@ if ($USE_CHILD_GROUP2) --enable_result_log } } +--enable_ps2_protocol --connection master_1 eval $MASTER_1_SET_QUICK_PAGE_BYTE_6; @@ -181,6 +183,7 @@ if ($USE_CHILD_GROUP2) } } --connection master_1 +--disable_ps2_protocol SELECT a.pkey FROM tbl_a a, tbl_b b WHERE a.pkey = b.pkey; if ($USE_CHILD_GROUP2) { @@ -209,6 +212,7 @@ if ($USE_CHILD_GROUP2) --enable_result_log } } +--enable_ps2_protocol --connection master_1 eval $MASTER_1_SET_QUICK_PAGE_BYTE_0; @@ -239,6 +243,7 @@ if ($USE_CHILD_GROUP2) } } --connection master_1 +--disable_ps2_protocol SELECT a.pkey FROM tbl_a a, tbl_b b WHERE a.pkey = b.pkey; if ($USE_CHILD_GROUP2) { @@ -267,6 +272,7 @@ if ($USE_CHILD_GROUP2) --enable_result_log } } +--enable_ps2_protocol --echo --echo deinit diff --git a/storage/spider/mysql-test/spider/t/quick_mode_2.test b/storage/spider/mysql-test/spider/t/quick_mode_2.test index ebb889868a6..12a48a904a2 100644 --- a/storage/spider/mysql-test/spider/t/quick_mode_2.test +++ b/storage/spider/mysql-test/spider/t/quick_mode_2.test @@ -123,6 +123,7 @@ if ($USE_CHILD_GROUP2) } } --connection master_1 +--disable_ps2_protocol SELECT a.pkey FROM tbl_a a, tbl_b b WHERE a.pkey = b.pkey; if ($USE_CHILD_GROUP2) { @@ -151,6 +152,7 @@ if ($USE_CHILD_GROUP2) --enable_result_log } } +--enable_ps2_protocol --connection master_1 eval $MASTER_1_SET_QUICK_PAGE_BYTE_6; @@ -181,6 +183,7 @@ if ($USE_CHILD_GROUP2) } } --connection master_1 +--disable_ps2_protocol SELECT a.pkey FROM tbl_a a, tbl_b b WHERE a.pkey = b.pkey; if ($USE_CHILD_GROUP2) { @@ -209,6 +212,7 @@ if ($USE_CHILD_GROUP2) --enable_result_log } } +--enable_ps2_protocol --connection master_1 eval $MASTER_1_SET_QUICK_PAGE_BYTE_0; @@ -239,6 +243,7 @@ if ($USE_CHILD_GROUP2) } } --connection master_1 +--disable_ps2_protocol SELECT a.pkey FROM tbl_a a, tbl_b b WHERE a.pkey = b.pkey; if ($USE_CHILD_GROUP2) { @@ -267,6 +272,7 @@ if ($USE_CHILD_GROUP2) --enable_result_log } } +--enable_ps2_protocol --echo --echo deinit diff --git a/storage/spider/mysql-test/spider/t/quick_mode_3.test b/storage/spider/mysql-test/spider/t/quick_mode_3.test index 5992284f301..65851a5bf3e 100644 --- a/storage/spider/mysql-test/spider/t/quick_mode_3.test +++ b/storage/spider/mysql-test/spider/t/quick_mode_3.test @@ -123,6 +123,7 @@ if ($USE_CHILD_GROUP2) } } --connection master_1 +--disable_ps2_protocol SELECT a.pkey FROM tbl_a a, tbl_b b WHERE a.pkey = b.pkey; if ($USE_CHILD_GROUP2) { @@ -151,6 +152,7 @@ if ($USE_CHILD_GROUP2) --enable_result_log } } +--enable_ps2_protocol --connection master_1 eval $MASTER_1_SET_QUICK_PAGE_BYTE_6; @@ -181,6 +183,7 @@ if ($USE_CHILD_GROUP2) } } --connection master_1 +--disable_ps2_protocol SELECT a.pkey FROM tbl_a a, tbl_b b WHERE a.pkey = b.pkey; if ($USE_CHILD_GROUP2) { @@ -209,6 +212,7 @@ if ($USE_CHILD_GROUP2) --enable_result_log } } +--enable_ps2_protocol --connection master_1 eval $MASTER_1_SET_QUICK_PAGE_BYTE_0; @@ -239,6 +243,7 @@ if ($USE_CHILD_GROUP2) } } --connection master_1 +--disable_ps2_protocol SELECT a.pkey FROM tbl_a a, tbl_b b WHERE a.pkey = b.pkey; if ($USE_CHILD_GROUP2) { @@ -267,6 +272,7 @@ if ($USE_CHILD_GROUP2) --enable_result_log } } +--enable_ps2_protocol --echo --echo deinit diff --git a/storage/spider/mysql-test/spider/t/slave_trx_isolation.test b/storage/spider/mysql-test/spider/t/slave_trx_isolation.test index 507e5340779..6fc02e7157a 100644 --- a/storage/spider/mysql-test/spider/t/slave_trx_isolation.test +++ b/storage/spider/mysql-test/spider/t/slave_trx_isolation.test @@ -106,10 +106,12 @@ if ($USE_CHILD_GROUP2) --disable_result_log } --connection child2_1 + --disable_ps2_protocol if ($USE_GENERAL_LOG) { eval $CHILD2_1_SELECT_ARGUMENT1; } + --enable_ps2_protocol eval $CHILD2_1_SELECT_TABLES; if (!$OUTPUT_CHILD_GROUP2) { diff --git a/storage/spider/mysql-test/spider/t/spider_fixes.test b/storage/spider/mysql-test/spider/t/spider_fixes.test index 04e806fb612..cfca9a04e6b 100644 --- a/storage/spider/mysql-test/spider/t/spider_fixes.test +++ b/storage/spider/mysql-test/spider/t/spider_fixes.test @@ -152,8 +152,10 @@ if ($USE_CHILD_GROUP2) } } --connection master_1 +--disable_ps2_protocol SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l WHERE a < 5 ORDER BY a DESC LIMIT 3; +--enable_ps2_protocol if ($USE_CHILD_GROUP2) { if (!$OUTPUT_CHILD_GROUP2) @@ -194,8 +196,10 @@ if ($USE_CHILD_GROUP2) } } --connection master_1 +--disable_ps2_protocol SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l WHERE a <= 5 ORDER BY a DESC LIMIT 3; +--enable_ps2_protocol if ($USE_CHILD_GROUP2) { if (!$OUTPUT_CHILD_GROUP2) @@ -917,7 +921,9 @@ SELECT a, b, c FROM ta_l_int ORDER BY a; --echo direct order limit --connection master_1 eval $MASTER_1_CHECK_DIRECT_ORDER_LIMIT_STATUS; +--disable_ps2_protocol SELECT a, b, c FROM ta_l_int ORDER BY a LIMIT 3; +--enable_ps2_protocol eval $MASTER_1_CHECK_DIRECT_ORDER_LIMIT_STATUS; diff --git a/storage/spider/mysql-test/spider/t/timestamp.test b/storage/spider/mysql-test/spider/t/timestamp.test index 225851a9d13..47d637bb0c5 100644 --- a/storage/spider/mysql-test/spider/t/timestamp.test +++ b/storage/spider/mysql-test/spider/t/timestamp.test @@ -171,6 +171,7 @@ if ($USE_CHILD_GROUP2) } } --connection master_1 +--disable_ps2_protocol SELECT *, unix_timestamp(col_ts) FROM tbl_a; if ($USE_CHILD_GROUP2) { @@ -191,6 +192,7 @@ if ($USE_CHILD_GROUP2) --enable_result_log } } +--enable_ps2_protocol --echo --echo DELETEs @@ -214,6 +216,7 @@ if ($USE_CHILD_GROUP2) } --connection master_1 DELETE FROM tbl_a WHERE col_ts='1970-01-01 01:00:01'; +--disable_ps2_protocol SELECT *, unix_timestamp(col_ts) FROM tbl_a; if ($USE_CHILD_GROUP2) { @@ -234,6 +237,7 @@ if ($USE_CHILD_GROUP2) --enable_result_log } } +--enable_ps2_protocol if ($USE_CHILD_GROUP2) { if (!$OUTPUT_CHILD_GROUP2) @@ -256,6 +260,7 @@ if ($USE_CHILD_GROUP2) SET @@timestamp=1; INSERT INTO tbl_a VALUES (1, now(), now()); SET @@timestamp=0; +--disable_ps2_protocol SELECT *, unix_timestamp(col_ts) FROM tbl_a; if ($USE_CHILD_GROUP2) { @@ -276,6 +281,7 @@ if ($USE_CHILD_GROUP2) --enable_result_log } } +--enable_ps2_protocol --echo --echo UPDATEs @@ -299,6 +305,7 @@ if ($USE_CHILD_GROUP2) } --connection master_1 UPDATE tbl_a SET col_ts=col_dt; +--disable_ps2_protocol SELECT *, unix_timestamp(col_ts) FROM tbl_a; if ($USE_CHILD_GROUP2) { @@ -319,6 +326,7 @@ if ($USE_CHILD_GROUP2) --enable_result_log } } +--enable_ps2_protocol --echo --echo Lookups @@ -341,6 +349,7 @@ if ($USE_CHILD_GROUP2) } } --connection master_1 +--disable_ps2_protocol SELECT *, unix_timestamp(col_ts) FROM tbl_a WHERE col_ts > '2018-01-01'; SELECT *, unix_timestamp(col_ts) FROM tbl_a WHERE col_ts < '2018-10-28 02:30:00'; SELECT *, unix_timestamp(col_ts) FROM tbl_a WHERE '2018-10-28 02:30:00' > col_ts; @@ -367,6 +376,7 @@ if ($USE_CHILD_GROUP2) --enable_result_log } } +--enable_ps2_protocol --echo --echo Drop the index on the timestamp column @@ -419,6 +429,7 @@ if ($USE_CHILD_GROUP2) } } --connection master_1 +--disable_ps2_protocol SELECT *, unix_timestamp(col_ts) FROM tbl_a WHERE col_ts > '2018-01-01'; SELECT *, unix_timestamp(col_ts) FROM tbl_a WHERE col_ts < '2018-10-28 02:30:00'; SELECT *, unix_timestamp(col_ts) FROM tbl_a WHERE '2018-10-28 02:30:00' > col_ts; @@ -445,6 +456,7 @@ if ($USE_CHILD_GROUP2) --enable_result_log } } +--enable_ps2_protocol --echo --echo Test the TIMESTAMP function @@ -471,6 +483,7 @@ if ($USE_CHILD_GROUP2) } } --connection master_1 +--disable_ps2_protocol SELECT * FROM tbl_f; SELECT TIMESTAMP(col_d, col_t) FROM tbl_f; SELECT TIMESTAMP('2018-06-25', col_t) FROM tbl_f; @@ -495,6 +508,7 @@ if ($USE_CHILD_GROUP2) --enable_result_log } } +--enable_ps2_protocol --echo --echo Restore Time Zone settings diff --git a/storage/spider/mysql-test/spider/t/udf_pushdown.inc b/storage/spider/mysql-test/spider/t/udf_pushdown.inc index 160e8af21b2..df9742a35b8 100644 --- a/storage/spider/mysql-test/spider/t/udf_pushdown.inc +++ b/storage/spider/mysql-test/spider/t/udf_pushdown.inc @@ -1,8 +1,10 @@ --echo --echo ##### test SELECTs ##### --connection master_1 +--disable_ps2_protocol SELECT * FROM ta_l WHERE id = plusone(1); SELECT * FROM ta_l WHERE id IN (plusone(1), plusone(2)) AND a = plusone(32); +--enable_ps2_protocol if ($USE_CHILD_GROUP2) { diff --git a/storage/tokudb/mysql-test/rpl/extra/rpl_tests/rpl_parallel_load_tokudb.test b/storage/tokudb/mysql-test/rpl/extra/rpl_tests/rpl_parallel_load_tokudb.test index 2f97bd39cfb..f354d49190a 100644 --- a/storage/tokudb/mysql-test/rpl/extra/rpl_tests/rpl_parallel_load_tokudb.test +++ b/storage/tokudb/mysql-test/rpl/extra/rpl_tests/rpl_parallel_load_tokudb.test @@ -272,7 +272,9 @@ let $MYSQLD_DATADIR= `select @@datadir`; use test; let $benchmark_file= `select replace(concat("benchmark_",uuid(),".out"),"-","_")`; --replace_regex /benchmark_.*.out/benchmark.out/ +--disable_ps2_protocol eval select * from test1.benchmark into outfile '$benchmark_file'; +--enable_ps2_protocol select ts from test0.benchmark where state like 'master started load' into @m_0; select ts from test0.benchmark where state like 'master ends load' into @m_1; select ts from test0.benchmark where state like 'slave takes on load' into @s_m0; @@ -282,10 +284,11 @@ select ts from test0.benchmark where state like 'slave ends load' into @s_1; select ts from test0.benchmark where state like 'slave is processing load' into @s_0; let $delta_file= `select replace(concat("delta_",uuid(),".out"),"-","_")`; --replace_regex /delta_.*.out/delta.out/ +--disable_ps2_protocol eval select time_to_sec(@m_1) - time_to_sec(@m_0) as 'delta_m', time_to_sec(@s_1) - time_to_sec(@s_0) as 'delta_s', time_to_sec(@s_m1) - time_to_sec(@s_m0) as 'delta_sm' into outfile '$delta_file'; - +--enable_ps2_protocol # # Consistency verification diff --git a/storage/tokudb/mysql-test/tokudb/t/ext_key_1_innodb.test b/storage/tokudb/mysql-test/tokudb/t/ext_key_1_innodb.test index 766d0c107db..535f887c929 100644 --- a/storage/tokudb/mysql-test/tokudb/t/ext_key_1_innodb.test +++ b/storage/tokudb/mysql-test/tokudb/t/ext_key_1_innodb.test @@ -9,6 +9,7 @@ create table t (id int not null, x int not null, y int not null, primary key(id) insert into t values (0,0,0),(1,1,1),(2,2,2),(3,2,3),(4,2,4); +--disable_ps2_protocol explain select x,id from t force index (x) where x=0 and id=0; flush status; select x,id from t force index (x) where x=0 and id=0; @@ -38,5 +39,6 @@ explain select x,id from t force index (x) where x=2 and id=0; flush status; select x,id from t force index (x) where x=2 and id=0; show status like 'handler_read%'; +--enable_ps2_protocol drop table t; diff --git a/storage/tokudb/mysql-test/tokudb/t/ext_key_1_tokudb.test b/storage/tokudb/mysql-test/tokudb/t/ext_key_1_tokudb.test index 254207ec9a1..e9c82405262 100644 --- a/storage/tokudb/mysql-test/tokudb/t/ext_key_1_tokudb.test +++ b/storage/tokudb/mysql-test/tokudb/t/ext_key_1_tokudb.test @@ -8,6 +8,7 @@ create table t (id int not null, x int not null, y int not null, primary key(id) insert into t values (0,0,0),(1,1,1),(2,2,2),(3,2,3),(4,2,4); +--disable_ps2_protocol explain select x,id from t force index (x) where x=0 and id=0; flush status; select x,id from t force index (x) where x=0 and id=0; @@ -37,5 +38,6 @@ explain select x,id from t force index (x) where x=2 and id=0; flush status; select x,id from t force index (x) where x=2 and id=0; show status like 'handler_read%'; +--enable_ps2_protocol drop table t; diff --git a/storage/tokudb/mysql-test/tokudb/t/ext_key_2_innodb.test b/storage/tokudb/mysql-test/tokudb/t/ext_key_2_innodb.test index 92c1c90861e..e5722dce563 100644 --- a/storage/tokudb/mysql-test/tokudb/t/ext_key_2_innodb.test +++ b/storage/tokudb/mysql-test/tokudb/t/ext_key_2_innodb.test @@ -9,6 +9,7 @@ create table t (a int not null, b int not null, c int not null, d int not null, insert into t values (0,0,0,0),(0,1,0,1); +--disable_ps2_protocol explain select c,a,b from t where c=0 and a=0 and b=1; flush status; select c,a,b from t where c=0 and a=0 and b=1; @@ -18,5 +19,6 @@ explain select c,a,b from t force index (c) where c=0 and a=0 and b=1; flush status; select c,a,b from t force index (c) where c=0 and a=0 and b=1; show status like 'handler_read%'; +--enable_ps2_protocol drop table t; diff --git a/storage/tokudb/mysql-test/tokudb/t/ext_key_2_tokudb.test b/storage/tokudb/mysql-test/tokudb/t/ext_key_2_tokudb.test index bb4b97bf011..d68a1bcf7f7 100644 --- a/storage/tokudb/mysql-test/tokudb/t/ext_key_2_tokudb.test +++ b/storage/tokudb/mysql-test/tokudb/t/ext_key_2_tokudb.test @@ -8,6 +8,7 @@ create table t (a int not null, b int not null, c int not null, d int not null, insert into t values (0,0,0,0),(0,1,0,1); +--disable_ps2_protocol explain select c,a,b from t where c=0 and a=0 and b=1; flush status; select c,a,b from t where c=0 and a=0 and b=1; @@ -17,5 +18,6 @@ explain select c,a,b from t force index (c) where c=0 and a=0 and b=1; flush status; select c,a,b from t force index (c) where c=0 and a=0 and b=1; show status like 'handler_read%'; +--enable_ps2_protocol drop table t; diff --git a/storage/tokudb/mysql-test/tokudb/t/savepoint-3.test b/storage/tokudb/mysql-test/tokudb/t/savepoint-3.test index 8fff8ab498d..92f13af6be5 100644 --- a/storage/tokudb/mysql-test/tokudb/t/savepoint-3.test +++ b/storage/tokudb/mysql-test/tokudb/t/savepoint-3.test @@ -148,10 +148,14 @@ commit| set autocommit= 1| # Let us test that savepoints work inside of functions # even in auto-commit mode +--disable_ps2_protocol select bug13825_3(0)| +--enable_ps2_protocol select * from t1| delete from t1| +--disable_ps2_protocol select bug13825_3(1)| +--enable_ps2_protocol select * from t1| delete from t1| # Curious case: rolling back to savepoint which is set by first diff --git a/storage/tokudb/mysql-test/tokudb/t/type_datetime.test b/storage/tokudb/mysql-test/tokudb/t/type_datetime.test index 1a6b2ed7142..13fa596e6bd 100644 --- a/storage/tokudb/mysql-test/tokudb/t/type_datetime.test +++ b/storage/tokudb/mysql-test/tokudb/t/type_datetime.test @@ -278,6 +278,7 @@ drop table t1; # Bug#28261: Wrong DATETIME comparison result when the GET_USER_VAR function # is involved. # +--disable_ps2_protocol create table t1(f1 date); insert into t1 values('01-01-01'),('02-02-02'),('01-01-01'),('02-02-02'); set @bug28261=''; @@ -285,6 +286,7 @@ select if(@bug28261 = f1, '', @bug28261:= f1) from t1; select if(@bug28261 = f1, '', @bug28261:= f1) from t1; select if(@bug28261 = f1, '', @bug28261:= f1) from t1; drop table t1; +--enable_ps2_protocol # # Bug#28778: Wrong result of BETWEEN when comparing a DATETIME field with an diff --git a/storage/tokudb/mysql-test/tokudb/t/type_newdecimal.test b/storage/tokudb/mysql-test/tokudb/t/type_newdecimal.test index 17916288e85..3d44a5b78f4 100644 --- a/storage/tokudb/mysql-test/tokudb/t/type_newdecimal.test +++ b/storage/tokudb/mysql-test/tokudb/t/type_newdecimal.test @@ -1212,7 +1212,9 @@ CREATE TABLE t1 (a int DEFAULT NULL, b int DEFAULT NULL); INSERT INTO t1 VALUES (3,30), (1,10), (2,10); SET @a= CAST(1 AS decimal); +--disable_ps2_protocol SELECT 1 FROM t1 GROUP BY @b := @a, @b; +--enable_ps2_protocol DROP TABLE t1; diff --git a/storage/tokudb/mysql-test/tokudb_bugs/t/PS-3773.test b/storage/tokudb/mysql-test/tokudb_bugs/t/PS-3773.test index e9490e91c33..cd765576e90 100644 --- a/storage/tokudb/mysql-test/tokudb_bugs/t/PS-3773.test +++ b/storage/tokudb/mysql-test/tokudb_bugs/t/PS-3773.test @@ -10,8 +10,10 @@ SET tokudb_auto_analyze=0; INSERT INTO t1 VALUES(0,0,0), (1,1,1), (2,2,2), (3,3,3), (4,4,4), (5,5,5); SET GLOBAL debug_dbug = "+d,tokudb_fake_db_notfound_error_in_read_full_row"; +--disable_ps2_protocol --error ER_NOT_KEYFILE SELECT * FROM t1 WHERE b = 2; +--enable_ps2_protocol DROP TABLE t1; diff --git a/storage/tokudb/mysql-test/tokudb_bugs/t/simple_icp.test b/storage/tokudb/mysql-test/tokudb_bugs/t/simple_icp.test index de9dd5824da..36bf0e2f28a 100644 --- a/storage/tokudb/mysql-test/tokudb_bugs/t/simple_icp.test +++ b/storage/tokudb/mysql-test/tokudb_bugs/t/simple_icp.test @@ -16,6 +16,7 @@ create table foo (a int, b int, c int, d int, e int, key(a,b,c)) engine=TokuDB; insert into foo (a,b,c) select * from a,b,c; +--disable_ps2_protocol flush status; show status like '%Handler_read_next%'; replace_column 9 NA; @@ -43,5 +44,6 @@ replace_column 9 NA; explain select * from foo where a > 19 and c=10; select * from foo where a > 19 and c=10; show status like '%Handler_read_next%'; +--enable_ps2_protocol drop table foo,a,b,c;