diff --git a/mysql-test/include/commit.inc b/mysql-test/include/commit.inc index 132fdcff7bd..dbbd7459b52 100644 --- a/mysql-test/include/commit.inc +++ b/mysql-test/include/commit.inc @@ -258,8 +258,10 @@ select * from t2; insert into t2 (a) values (1025); --replace_result $MYSQLTEST_VARDIR .. +--disable_cursor_protocol --error ER_DUP_ENTRY eval select f2(25) into outfile "$MYSQLTEST_VARDIR/tmp/dml.out" from t1; +--enable_cursor_protocol select * from t2; rollback; select * from t2; @@ -279,8 +281,10 @@ select * from t2; --echo ======================================================================= insert into t2 (a) values (1027); +--disable_cursor_protocol --error ER_DUP_ENTRY select f2(27) into @foo; +--enable_cursor_protocol select * from t2; rollback; select * from t2; diff --git a/mysql-test/include/ctype_like_range_f1f2.inc b/mysql-test/include/ctype_like_range_f1f2.inc index def341e8d5e..59f668bfbba 100644 --- a/mysql-test/include/ctype_like_range_f1f2.inc +++ b/mysql-test/include/ctype_like_range_f1f2.inc @@ -17,6 +17,8 @@ INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10)); INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11)); INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12)); +#enable after fix MDEV-31512 +--disable_cursor_protocol #check after fix MDEV-29290 --disable_view_protocol # Check pattern (important for ucs2, utf16, utf32) @@ -24,5 +26,6 @@ SELECT hex(concat(repeat(0xF1F2, 10), '%')); --echo 3 rows expected SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%'); -DROP TABLE t1; +--enable_cursor_protocol --enable_view_protocol +DROP TABLE t1; diff --git a/mysql-test/include/ctype_numconv.inc b/mysql-test/include/ctype_numconv.inc index ee60c9196e2..254868e1fd7 100644 --- a/mysql-test/include/ctype_numconv.inc +++ b/mysql-test/include/ctype_numconv.inc @@ -1646,7 +1646,10 @@ SELECT GROUP_CONCAT(IF(a,a,'')) FROM t1; SELECT GROUP_CONCAT(CASE WHEN a THEN a ELSE '' END) FROM t1; --disable_view_protocol --enable_metadata +#Check after fix MDEV-31512 +--disable_cursor_protocol SELECT COALESCE(a,'') FROM t1 GROUP BY 1; +--enable_cursor_protocol --disable_metadata --enable_view_protocol --echo # All columns must be VARCHAR(9) with the same length: diff --git a/mysql-test/include/diff_tables.inc b/mysql-test/include/diff_tables.inc index a566a4d79c2..331f5c18a02 100644 --- a/mysql-test/include/diff_tables.inc +++ b/mysql-test/include/diff_tables.inc @@ -168,7 +168,9 @@ while ($_dt_tables) --disable_ps2_protocol --let $_dt_outfile= `SELECT @@datadir` --let $_dt_outfile= $_dt_outfile/diff_table-$_dt_connection-$_dt_database-$_dt_table + --disable_cursor_protocol eval SELECT * INTO OUTFILE '$_dt_outfile' FROM $_dt_database.$_dt_table ORDER BY `$_dt_column_list`; + --enable_cursor_protocol --enable_ps2_protocol # Compare files. diff --git a/mysql-test/include/explain_utils.inc b/mysql-test/include/explain_utils.inc index d729be94f49..eb0558da3c8 100644 --- a/mysql-test/include/explain_utils.inc +++ b/mysql-test/include/explain_utils.inc @@ -28,6 +28,7 @@ --echo # --disable_ps2_protocol --disable_view_protocol +--disable_cursor_protocol if ($select) { --disable_query_log --eval $select INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/before_explain.txt' @@ -160,5 +161,6 @@ SHOW STATUS WHERE (Variable_name LIKE 'Sort%' OR --enable_query_log --echo +--enable_cursor_protocol --enable_view_protocol --enable_ps2_protocol diff --git a/mysql-test/include/function_defaults.inc b/mysql-test/include/function_defaults.inc index e8e1059f4be..86ccb697d28 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_cursor_protocol --disable_ps2_protocol SELECT 1 INTO OUTFILE 't3.dat' FROM dual; @@ -833,6 +834,7 @@ FROM dual; SELECT 1, 2 INTO OUTFILE 't5.dat' FROM dual; --enable_ps2_protocol +--enable_cursor_protocol --echo # Mon Aug 1 15:11:19 2011 UTC SET TIMESTAMP = 1312211479.918273; @@ -931,11 +933,13 @@ remove_file $MYSQLD_DATADIR/test/t5.dat; --echo # Mon Aug 1 15:11:19 2011 UTC SET TIMESTAMP = 1312211479.089786; +--disable_cursor_protocol --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 +--enable_cursor_protocol --echo # Too short row diff --git a/mysql-test/include/grant_cache.inc b/mysql-test/include/grant_cache.inc index 69c520c3e61..5a9fa8f0ec0 100644 --- a/mysql-test/include/grant_cache.inc +++ b/mysql-test/include/grant_cache.inc @@ -55,6 +55,7 @@ set LOCAL query_cache_type=ON; set GLOBAL query_cache_size=1355776; --disable_ps2_protocol +--disable_cursor_protocol reset query cache; flush status; @@ -173,6 +174,7 @@ show status like "Qcache_queries_in_cache"; show status like "Qcache_hits"; show status like "Qcache_not_cached"; +--enable_cursor_protocol --enable_ps2_protocol # Cleanup diff --git a/mysql-test/include/ps_conv.inc b/mysql-test/include/ps_conv.inc index 2b7af82907c..9facff43ec9 100644 --- a/mysql-test/include/ps_conv.inc +++ b/mysql-test/include/ps_conv.inc @@ -206,6 +206,7 @@ execute full_info ; --error 1064 prepare stmt1 from "select ? := c1 from t9 where c1= 1" ; +--disable_cursor_protocol --disable_query_log select '------ select column, .. into @parm,.. ------' as test_sequence ; --enable_query_log @@ -243,6 +244,7 @@ into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08, @arg17, @arg18, @arg19, @arg20, @arg21, @arg22, @arg23, @arg24, @arg25, @arg26, @arg27, @arg28, @arg29, @arg30, @arg31, @arg32 from t9 where c1= ?" ; +--enable_cursor_protocol set @my_key= 1 ; execute stmt1 using @my_key ; # get as much information about the parameters as possible diff --git a/mysql-test/include/query_cache.inc b/mysql-test/include/query_cache.inc index 0f52b70b7f2..ba9c256005a 100644 --- a/mysql-test/include/query_cache.inc +++ b/mysql-test/include/query_cache.inc @@ -28,6 +28,7 @@ drop table if exists t1,t2,t3; set @save_query_cache_size = @@global.query_cache_size; set GLOBAL query_cache_size = 1355776; +--disable_cursor_protocol # # Without auto_commit. # @@ -86,6 +87,7 @@ show status like "Qcache_hits"; commit; show status like "Qcache_queries_in_cache"; drop table t3,t2,t1; +--enable_cursor_protocol eval CREATE TABLE t1 (id int(11) NOT NULL auto_increment, PRIMARY KEY (id))$partitions_id; select count(*) from t1; @@ -128,6 +130,7 @@ connection default; # This should be 'YES'. SHOW VARIABLES LIKE 'have_query_cache'; +--disable_cursor_protocol SET GLOBAL query_cache_size = 204800; flush status; SET @@autocommit=1; @@ -190,6 +193,7 @@ disconnect connection1; connection default; set @@global.query_cache_size = @save_query_cache_size; drop table t2; +--enable_cursor_protocol SET global query_cache_type=default; --enable_view_protocol diff --git a/mysql-test/include/query_cache_partitions.inc b/mysql-test/include/query_cache_partitions.inc index 6c51300a5d5..3e861b5fe29 100644 --- a/mysql-test/include/query_cache_partitions.inc +++ b/mysql-test/include/query_cache_partitions.inc @@ -45,9 +45,11 @@ show status like "Qcache_queries_in_cache"; show status like "Qcache_hits"; --disable_ps2_protocol +--disable_cursor_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; +--enable_cursor_protocol show status like "Qcache_queries_in_cache"; show status like "Qcache_hits"; @@ -81,9 +83,11 @@ show status like "Qcache_queries_in_cache"; show status like "Qcache_hits"; --disable_ps2_protocol +--disable_cursor_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; +--enable_cursor_protocol show status like "Qcache_queries_in_cache"; show status like "Qcache_hits"; @@ -118,6 +122,7 @@ show status like "Qcache_queries_in_cache"; show status like "Qcache_hits"; --disable_ps2_protocol +--disable_cursor_protocol BEGIN; UPDATE `t1` SET `cool` = 1 WHERE `id` = 1; SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; @@ -127,6 +132,7 @@ BEGIN; SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; ROLLBACK; SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; +--enable_cursor_protocol show status like "Qcache_queries_in_cache"; show status like "Qcache_hits"; diff --git a/mysql-test/include/test_outfile.inc b/mysql-test/include/test_outfile.inc index e50847b67a3..af64cc6ba5f 100644 --- a/mysql-test/include/test_outfile.inc +++ b/mysql-test/include/test_outfile.inc @@ -1,3 +1,5 @@ +--disable_cursor_protocol --disable_ps2_protocol eval select "Outfile OK" into outfile "$MYSQLTEST_VARDIR/tmp/outfile.test"; --enable_ps2_protocol +--enable_cursor_protocol diff --git a/mysql-test/include/type_temporal_zero_default.inc b/mysql-test/include/type_temporal_zero_default.inc index 6553bfb6d86..4cc36ad572c 100644 --- a/mysql-test/include/type_temporal_zero_default.inc +++ b/mysql-test/include/type_temporal_zero_default.inc @@ -35,7 +35,9 @@ SET sql_mode=DEFAULT; --eval INSERT INTO t1 VALUES (DEFAULT,DEFAULT); --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --disable_ps2_protocol +--disable_cursor_protocol --eval SELECT a INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/mdev-7824.txt' FROM t1 +--enable_cursor_protocol DELETE FROM t1; --enable_ps2_protocol SET sql_mode=TRADITIONAL; diff --git a/mysql-test/include/write_var_to_file.inc b/mysql-test/include/write_var_to_file.inc index 58bdac6f09e..1579b5b21e7 100644 --- a/mysql-test/include/write_var_to_file.inc +++ b/mysql-test/include/write_var_to_file.inc @@ -46,9 +46,11 @@ if (`SELECT LENGTH(@@secure_file_priv) > 0`) --let $_wvtf_suffix= `SELECT UUID()` --let $_wvtf_tmp_file= $MYSQLTEST_VARDIR/_wvtf_$_wvtf_suffix + --disable_cursor_protocol --disable_ps2_protocol --eval SELECT '$write_var' INTO DUMPFILE '$_wvtf_tmp_file' --enable_ps2_protocol + --enable_cursor_protocol --copy_file $_wvtf_tmp_file $write_to_file --remove_file $_wvtf_tmp_file } diff --git a/mysql-test/main/alter_table.test b/mysql-test/main/alter_table.test index d3d588149e0..f6755ada733 100644 --- a/mysql-test/main/alter_table.test +++ b/mysql-test/main/alter_table.test @@ -985,6 +985,7 @@ while ($count) commit; --enable_query_log +--disable_cursor_protocol select index_length into @unpaked_keys_size from information_schema.tables where table_name='t1'; alter table t1 pack_keys=1; @@ -998,6 +999,7 @@ alter table t1 max_rows=100; select max_data_length into @changed_max_data_length from information_schema.tables where table_name='t1'; select (@orig_max_data_length > @changed_max_data_length); +--enable_cursor_protocol drop table t1; diff --git a/mysql-test/main/alter_user.test b/mysql-test/main/alter_user.test index 95e6d732907..6f4f9fb1e1e 100644 --- a/mysql-test/main/alter_user.test +++ b/mysql-test/main/alter_user.test @@ -1,6 +1,8 @@ --source include/not_embedded.inc +--disable_cursor_protocol select priv into @root_priv from mysql.global_priv where user='root' and host='localhost'; +--enable_cursor_protocol select * from mysql.user where user = 'root' and host = 'localhost'; --echo # Test syntax diff --git a/mysql-test/main/auto_increment_ranges_innodb.test b/mysql-test/main/auto_increment_ranges_innodb.test index 3abd8d4d482..927954216c7 100644 --- a/mysql-test/main/auto_increment_ranges_innodb.test +++ b/mysql-test/main/auto_increment_ranges_innodb.test @@ -11,9 +11,11 @@ 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_cursor_protocol --disable_ps2_protocol select null, f into outfile 'load.data' from t1 limit 1; --enable_ps2_protocol +--enable_cursor_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 b334db504f9..b3c0494fc2b 100644 --- a/mysql-test/main/bootstrap.test +++ b/mysql-test/main/bootstrap.test @@ -45,9 +45,11 @@ 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_cursor_protocol --disable_ps2_protocol eval select * into outfile '$MYSQLTEST_VARDIR/tmp/long_query.sql' from t1; --enable_ps2_protocol +--enable_cursor_protocol --enable_query_log --source include/kill_mysqld.inc --error 1 diff --git a/mysql-test/main/bug12427262.test b/mysql-test/main/bug12427262.test index aca37a651c4..e1917aaa201 100644 --- a/mysql-test/main/bug12427262.test +++ b/mysql-test/main/bug12427262.test @@ -20,6 +20,7 @@ create table t9 (c1 int); create table t10 (c1 int); --enable_warnings +--disable_cursor_protocol # Query PS to know initial read count for frm file. select Sum(ALL(COUNT_READ)) from performance_schema.file_summary_by_instance where FILE_NAME like "%show_table_lw_db%" AND FILE_NAME like "%.frm%" AND EVENT_NAME='wait/io/file/sql/FRM' @@ -32,16 +33,19 @@ show tables; select Sum(ALL(COUNT_READ)) from performance_schema.file_summary_by_instance where FILE_NAME like "%show_table_lw_db%" AND FILE_NAME like "%.frm%" AND EVENT_NAME='wait/io/file/sql/FRM' into @count_read_after; +--enable_cursor_protocol select @count_read_after-@count_read_before; show full tables; +--disable_cursor_protocol # Query PS to know read count for frm file after above query. COUNT_READ # will be incremented by 1 as FRM file will be opened for above query. select Sum(ALL(COUNT_READ)) from performance_schema.file_summary_by_instance where FILE_NAME like "%show_table_lw_db%" AND FILE_NAME like "%.frm%" AND EVENT_NAME='wait/io/file/sql/FRM' into @count_read_after; +--enable_cursor_protocol select @count_read_after-@count_read_before; diff --git a/mysql-test/main/count_distinct2.test b/mysql-test/main/count_distinct2.test index f5d16527af3..0ab8169098f 100644 --- a/mysql-test/main/count_distinct2.test +++ b/mysql-test/main/count_distinct2.test @@ -62,6 +62,7 @@ while ($1) commit; --enable_query_log +--disable_cursor_protocol flush status; select count(distinct n) from t1; show status like 'Created_tmp_disk_tables'; @@ -83,6 +84,7 @@ flush status; select count(distinct s) from t1; show status like 'Created_tmp_disk_tables'; drop table t1; +--enable_cursor_protocol --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 adea12eb6d0..4b6203a2577 100644 --- a/mysql-test/main/ctype_big5.test +++ b/mysql-test/main/ctype_big5.test @@ -77,9 +77,11 @@ select hex(convert(_big5 0xC84041 using ucs2)); set names big5; create table t1 (a blob); insert into t1 values (0xEE00); +--disable_cursor_protocol --disable_ps2_protocol select * into outfile 'test/t1.txt' from t1; --enable_ps2_protocol +--enable_cursor_protocol delete from t1; let $MYSQLD_DATADIR= `select @@datadir`; --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR diff --git a/mysql-test/main/ctype_binary.test b/mysql-test/main/ctype_binary.test index 26618ec235b..756c96fcf60 100644 --- a/mysql-test/main/ctype_binary.test +++ b/mysql-test/main/ctype_binary.test @@ -1,3 +1,4 @@ + set names binary; --source include/ctype_numconv.inc @@ -232,8 +233,11 @@ SELECT DATE_FORMAT('2004-02-02','%W'); SELECT HEX(DATE_FORMAT('2004-02-02','%W')); #Enable after fix MDEV-33936 --disable_view_protocol +#enable after fix MDEV-34215 +--disable_cursor_protocol SELECT DATE_FORMAT(TIME'-01:01:01','%h'); SELECT HEX(DATE_FORMAT(TIME'-01:01:01','%h')); +--enable_cursor_protocol --enable_view_protocol --echo # latin1 format, binary result @@ -241,8 +245,11 @@ SELECT DATE_FORMAT('2004-02-02',_latin1'%W'); SELECT HEX(DATE_FORMAT('2004-02-02',_latin1'%W')); #Enable after fix MDEV-33936 --disable_view_protocol +#enable after fix MDEV-34215 +--disable_cursor_protocol SELECT DATE_FORMAT(TIME'-01:01:01',_latin1'%h'); SELECT HEX(DATE_FORMAT(TIME'-01:01:01',_latin1'%h')); +--enable_cursor_protocol --enable_view_protocol --echo # Binary format, latin1 result @@ -251,8 +258,11 @@ SELECT DATE_FORMAT('2004-02-02',_binary'%W'); SELECT HEX(DATE_FORMAT('2004-02-02',_binary'%W')); #Enable after fix MDEV-33936 --disable_view_protocol +#enable after fix MDEV-34215 +--disable_cursor_protocol SELECT DATE_FORMAT(TIME'-01:01:01',_binary'%h'); SELECT HEX(DATE_FORMAT(TIME'-01:01:01',_binary'%h')); +--enable_cursor_protocol --enable_view_protocol --echo # --echo # End of 10.4 tests diff --git a/mysql-test/main/ctype_filename.test b/mysql-test/main/ctype_filename.test index 185d4ca641a..83d1a7a5d5b 100644 --- a/mysql-test/main/ctype_filename.test +++ b/mysql-test/main/ctype_filename.test @@ -20,10 +20,13 @@ drop table com1; create table `clock$` (a int); drop table `clock$`; +# Enable after fix MDEV-31553 +--disable_cursor_protocol # Enable after fix MDEV-29295 --disable_view_protocol select convert(convert(',' using filename) using binary); --enable_view_protocol +--enable_cursor_protocol --echo # --echo # MDEV-7677 my_charset_handler_filename has a wrong "ismbchar" member diff --git a/mysql-test/main/ctype_gbk.test b/mysql-test/main/ctype_gbk.test index ba41b177b44..9f6f6672952 100644 --- a/mysql-test/main/ctype_gbk.test +++ b/mysql-test/main/ctype_gbk.test @@ -64,8 +64,10 @@ CREATE TABLE t1(a MEDIUMTEXT CHARACTER SET gbk, INSERT INTO t1 VALUES (REPEAT(0x1125,200000), REPEAT(0x1125,200000)), ('', ''), ('', ''); +--disable_cursor_protocol SELECT a FROM t1 GROUP BY 1 LIMIT 1 INTO @nullll; SELECT b FROM t1 GROUP BY 1 LIMIT 1 INTO @nullll; +--enable_cursor_protocol DROP TABLES t1; diff --git a/mysql-test/main/ctype_ucs.test b/mysql-test/main/ctype_ucs.test index 708af6baf8a..7144f0af5cc 100644 --- a/mysql-test/main/ctype_ucs.test +++ b/mysql-test/main/ctype_ucs.test @@ -75,9 +75,11 @@ DROP TABLE t1; --echo # Problem # 1 (original report): wrong parsing of ucs2 data SET character_set_connection=ucs2; +--disable_cursor_protocol --disable_ps2_protocol SELECT '00' UNION SELECT '10' INTO OUTFILE 'tmpp.txt'; --enable_ps2_protocol +--enable_cursor_protocol CREATE TABLE t1(a INT); LOAD DATA INFILE 'tmpp.txt' INTO TABLE t1 CHARACTER SET ucs2 (@b) SET a=REVERSE(@b); @@ -90,7 +92,9 @@ 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 +--disable_cursor_protocol SELECT '00' UNION SELECT '10' INTO OUTFILE 'tmpp2.txt' CHARACTER SET ucs2; +--enable_cursor_protocol --enable_ps2_protocol CREATE TABLE t1(a INT); LOAD DATA INFILE 'tmpp2.txt' INTO TABLE t1 CHARACTER SET ucs2 diff --git a/mysql-test/main/ctype_utf16.test b/mysql-test/main/ctype_utf16.test index 529b737fcfb..9f23f02b0fa 100644 --- a/mysql-test/main/ctype_utf16.test +++ b/mysql-test/main/ctype_utf16.test @@ -741,6 +741,8 @@ CREATE TABLE t1 ( s3 MEDIUMTEXT CHARACTER SET utf16, s4 LONGTEXT CHARACTER SET utf16 ); +#check after fix MDEV-31540 +--disable_cursor_protocol --disable_view_protocol --enable_metadata SET NAMES utf8, @@character_set_results=NULL; @@ -751,6 +753,7 @@ SET NAMES utf8; SELECT *, HEX(s1) FROM t1; --disable_metadata --enable_view_protocol +--enable_cursor_protocol CREATE TABLE t2 AS SELECT CONCAT(s1) FROM t1; SHOW CREATE TABLE t2; DROP TABLE t1, t2; diff --git a/mysql-test/main/ctype_utf16le.test b/mysql-test/main/ctype_utf16le.test index 537a456f7db..d0ccb2e8509 100644 --- a/mysql-test/main/ctype_utf16le.test +++ b/mysql-test/main/ctype_utf16le.test @@ -703,6 +703,8 @@ CREATE TABLE t1 ( s3 MEDIUMTEXT CHARACTER SET utf16le, s4 LONGTEXT CHARACTER SET utf16le ); +#check after fix MDEV-31540 +--disable_cursor_protocol --disable_view_protocol --enable_metadata SET NAMES utf8, @@character_set_results=NULL; @@ -713,6 +715,7 @@ SET NAMES utf8; SELECT *, HEX(s1) FROM t1; --disable_metadata --enable_view_protocol +--enable_cursor_protocol CREATE TABLE t2 AS SELECT CONCAT(s1) FROM t1; SHOW CREATE TABLE t2; DROP TABLE t1, t2; diff --git a/mysql-test/main/ctype_utf32.test b/mysql-test/main/ctype_utf32.test index 0e49302c776..f35a94e909c 100644 --- a/mysql-test/main/ctype_utf32.test +++ b/mysql-test/main/ctype_utf32.test @@ -795,6 +795,8 @@ CREATE TABLE t1 ( s3 MEDIUMTEXT CHARACTER SET utf32, s4 LONGTEXT CHARACTER SET utf32 ); +#check after fix MDEV-31540 +--disable_cursor_protocol --disable_view_protocol --enable_metadata SET NAMES utf8mb4, @@character_set_results=NULL; @@ -805,6 +807,7 @@ SET NAMES utf8mb4; SELECT *, HEX(s1) FROM t1; --disable_metadata --enable_view_protocol +--enable_cursor_protocol CREATE TABLE t2 AS SELECT CONCAT(s1) FROM t1; SHOW CREATE TABLE t2; DROP TABLE t1, t2; @@ -1131,8 +1134,11 @@ SELECT HEX(DATE_FORMAT(TIME'-01:01:01','%h')); --echo # utf8 format, utf32 result SELECT DATE_FORMAT('2004-02-02',_utf8'%W'); SELECT HEX(DATE_FORMAT('2004-02-02',_utf8'%W')); +#enable after fix MDEV-34215 +--disable_cursor_protocol SELECT DATE_FORMAT(TIME'-01:01:01',_utf8'%h'); SELECT HEX(DATE_FORMAT(TIME'-01:01:01',_utf8'%h')); +--enable_cursor_protocol --echo # utf32 format, utf8 result SET NAMES utf8; diff --git a/mysql-test/main/ctype_utf8.test b/mysql-test/main/ctype_utf8.test index 074a536f0f0..4bc01142b4c 100644 --- a/mysql-test/main/ctype_utf8.test +++ b/mysql-test/main/ctype_utf8.test @@ -1501,8 +1501,11 @@ SELECT HEX(LPAD(_utf8 0xD18F, 3, 0x20)); SELECT HEX(INSERT(_utf8 0xD18F, 2, 1, 0x20)); #Enable view-protocol after fix MDEV-33942 --disable_view_protocol +#Enable after fix MDEV-31512 +--disable_cursor_protocol SELECT HEX(INSERT(_utf8 0xD18FD18E, 2, 1, 0x20)); --enable_view_protocol +--enable_cursor_protocol --echo # --echo # Bug#11752408 - 43593: DUMP/BACKUP/RESTORE/UPGRADE TOOLS FAILS BECAUSE OF UTF8_GENERAL_CI @@ -1581,12 +1584,15 @@ CREATE TABLE t1 ( ); --disable_view_protocol --enable_metadata +#Check after fix MDEV-31512 +--disable_cursor_protocol SET NAMES utf8, @@character_set_results=NULL; SELECT *, HEX(s1) FROM t1; SET NAMES latin1; SELECT *, HEX(s1) FROM t1; SET NAMES utf8; SELECT *, HEX(s1) FROM t1; +--enable_cursor_protocol --disable_metadata --enable_view_protocol CREATE TABLE t2 AS SELECT CONCAT(s1) FROM t1; diff --git a/mysql-test/main/ctype_utf8mb4.test b/mysql-test/main/ctype_utf8mb4.test index 6361252ab80..3c6eab86126 100644 --- a/mysql-test/main/ctype_utf8mb4.test +++ b/mysql-test/main/ctype_utf8mb4.test @@ -1798,12 +1798,15 @@ CREATE TABLE t1 ( s4 LONGTEXT CHARACTER SET utf8mb4 ); --enable_metadata +#Check after fix MDEV-31512 +--disable_cursor_protocol SET NAMES utf8mb4, @@character_set_results=NULL; SELECT *, HEX(s1) FROM t1; SET NAMES latin1; SELECT *, HEX(s1) FROM t1; SET NAMES utf8mb4; SELECT *, HEX(s1) FROM t1; +--enable_cursor_protocol --disable_metadata CREATE TABLE t2 AS SELECT CONCAT(s1) FROM t1; SHOW CREATE TABLE t2; @@ -1953,7 +1956,9 @@ DROP TABLE t1; SET NAMES utf8mb4; SELECT COLUMN_JSON(COLUMN_CREATE(_utf8mb4 0xF09F988E, 1)); +--disable_cursor_protocol SELECT COLUMN_LIST(COLUMN_CREATE(_utf8mb4 0xF09F988E, 1)); +--enable_cursor_protocol SELECT COLUMN_GET(COLUMN_CREATE(_utf8mb4 0xF09F988E, 1), _utf8mb4 0xF09F988E as int); diff --git a/mysql-test/main/derived.test b/mysql-test/main/derived.test index 41ede6b440a..179cdd427d3 100644 --- a/mysql-test/main/derived.test +++ b/mysql-test/main/derived.test @@ -859,6 +859,8 @@ INSERT INTO example1463 VALUES ('David', 'Unknown', 100); INSERT INTO example1463 VALUES ('Edward', 'Success', 150); INSERT INTO example1463 VALUES ('Edward', 'Pending', 150); +#Enable after fix MDEV-31720 +--disable_cursor_protocol SELECT Customer, Success, SUM(OrderSize) FROM (SELECT Customer, CASE WHEN DeliveryStatus='Success' THEN 'Yes' ELSE 'No' END AS Success, @@ -866,6 +868,7 @@ SELECT Customer, Success, SUM(OrderSize) FROM example1463) as subQ GROUP BY Success, Customer WITH ROLLUP; +--enable_cursor_protocol SELECT Customer, Success, SUM(OrderSize) FROM (SELECT Customer, CASE WHEN DeliveryStatus='Success' THEN 'Yes' ELSE 'No' END AS Success, diff --git a/mysql-test/main/derived_view.test b/mysql-test/main/derived_view.test index 9747f1df61f..d26d2d6c535 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_cursor_protocol --disable_ps2_protocol flush status; explain extended @@ -51,6 +52,7 @@ flush status; select * from (select * from t1 where f1 in (2,3)) tt where f11=2; show status like 'Handler_read%'; --enable_ps2_protocol +--enable_cursor_protocol --echo for merged views create view v1 as select * from t1; @@ -72,12 +74,14 @@ explain extended select * from v3 join v4 on f1=f2; --disable_ps2_protocol +--disable_cursor_protocol flush status; explain extended select * from v4 where f2 in (1,3); show status like 'Handler_read%'; flush status; select * from v4 where f2 in (1,3); show status like 'Handler_read%'; +--enable_cursor_protocol --echo for materialized derived tables --echo explain for simple derived @@ -92,8 +96,10 @@ flush status; explain select * from t1 join (select * from t2 group by f2) tt on f1=f2; show status like 'Handler_read%'; flush status; +--disable_cursor_protocol select * from t1 join (select * from t2 group by f2) tt on f1=f2; show status like 'Handler_read%'; +--enable_cursor_protocol --enable_ps2_protocol --echo for materialized views @@ -110,6 +116,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_cursor_protocol --disable_ps2_protocol flush status; select * from t1,v3 as v31,v3 where t1.f1=v31.f1 and t1.f1=v3.f1; @@ -122,6 +129,7 @@ flush status; select * from t1 join v2 on f1=f2; show status like 'Handler_read%'; --enable_ps2_protocol +--enable_cursor_protocol explain extended select * from v1 join v4 on f1=f2; explain format=json select * from v1 join v4 on f1=f2; @@ -165,6 +173,7 @@ join (select * from (select * from t1 where f1 < 7 group by f1) tt where f1 > 2) z on x.f1 = z.f1; +--disable_cursor_protocol --disable_ps2_protocol flush status; select * from @@ -175,6 +184,7 @@ join show status like 'Handler_read%'; flush status; --enable_ps2_protocol +--enable_cursor_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 0658949597c..8935147e579 100644 --- a/mysql-test/main/distinct.test +++ b/mysql-test/main/distinct.test @@ -460,6 +460,7 @@ INSERT INTO t1 VALUES (2,2,'APPLE'); INSERT INTO t1 VALUES (3,2,'APPLE'); INSERT INTO t1 VALUES (4,3,'PEAR'); +--disable_cursor_protocol SELECT DISTINCT fruit_id, fruit_name INTO @v1, @v2 FROM t1 WHERE fruit_name = 'APPLE'; SELECT @v1, @v2; @@ -508,6 +509,7 @@ SELECT DISTINCT @v19:= fruit_id, @v20:= fruit_name INTO OUTFILE --enable_ps2_protocol LOAD DATA INFILE '../../tmp/data2.tmp' INTO TABLE t2; --remove_file $MYSQLTEST_VARDIR/tmp/data2.tmp +--enable_cursor_protocol SELECT @v19, @v20; SELECT * FROM t2; diff --git a/mysql-test/main/empty_table.test b/mysql-test/main/empty_table.test index 85638bc290b..3c6f418ccd4 100644 --- a/mysql-test/main/empty_table.test +++ b/mysql-test/main/empty_table.test @@ -6,6 +6,8 @@ drop table if exists t1; --enable_warnings +# Enable after fix MDEV-31721 +--disable_cursor_protocol 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; @@ -24,6 +26,7 @@ drop table t1; select * from t2; --enable_ps2_protocol show status like "Empty_queries"; +--enable_cursor_protocol --echo # End of 4.1 tests diff --git a/mysql-test/main/events_bugs.test b/mysql-test/main/events_bugs.test index fe744de86c9..3c4836af9e5 100644 --- a/mysql-test/main/events_bugs.test +++ b/mysql-test/main/events_bugs.test @@ -966,7 +966,9 @@ DROP USER evtest1@localhost; # scheduler to detect that --echo Sleep 4 seconds sleep 4; +--disable_cursor_protocol SELECT COUNT(*) INTO @row_cnt FROM events_test.event_log; +--enable_cursor_protocol # Give the event mechanism ~ 4 seconds to do something wrong # (execute the event of the dropped user -> inser rows). --echo Sleep 4 seconds @@ -1186,9 +1188,11 @@ drop procedure if exists p; set @old_mode= @@sql_mode; set @@sql_mode= cast(pow(2,32)-1 as unsigned integer); create event e1 on schedule every 1 day do select 1; +--disable_cursor_protocol select @@sql_mode into @full_mode; set @@sql_mode= @old_mode; select replace(@full_mode, 'ALLOW_INVALID_DATES', 'INVALID_DATES') into @full_mode; +--enable_cursor_protocol select name from mysql.event where name = 'e1' and sql_mode = @full_mode; drop event e1; diff --git a/mysql-test/main/explain.test b/mysql-test/main/explain.test index a546242d6aa..74459ce7bc3 100644 --- a/mysql-test/main/explain.test +++ b/mysql-test/main/explain.test @@ -48,7 +48,9 @@ set names latin1; # # Bug#15463: EXPLAIN SELECT..INTO hangs the client (QB, command line) # +--disable_cursor_protocol select 3 into @v1; +--enable_cursor_protocol explain select 3 into @v1; # @@ -154,7 +156,9 @@ DROP TABLE t1; CREATE TABLE t1 (f1 INT not null); +--disable_cursor_protocol SELECT @@session.sql_mode INTO @old_sql_mode; +--enable_cursor_protocol SET SESSION sql_mode='ONLY_FULL_GROUP_BY'; # EXPLAIN EXTENDED (with subselect). used to crash. should give NOTICE. diff --git a/mysql-test/main/fast_prefix_index_fetch_innodb.test b/mysql-test/main/fast_prefix_index_fetch_innodb.test index 03b7275a1e3..98b1e4887c0 100644 --- a/mysql-test/main/fast_prefix_index_fetch_innodb.test +++ b/mysql-test/main/fast_prefix_index_fetch_innodb.test @@ -39,10 +39,12 @@ let $count = query_get_value($show_count_statement, Value, 1); let $opt = query_get_value($show_opt_statement, Value, 1); --disable_ps2_protocol +--disable_cursor_protocol --disable_query_log eval select $count - $base_count into @cluster_lookups; eval select $opt - $base_opt into @cluster_lookups_avoided; --enable_query_log +--enable_cursor_protocol select @cluster_lookups; select @cluster_lookups_avoided; @@ -56,10 +58,12 @@ select id, bigfield from prefixinno where bigfield = repeat('d', 31); let $count = query_get_value($show_count_statement, Value, 1); let $opt = query_get_value($show_opt_statement, Value, 1); +--disable_cursor_protocol --disable_query_log eval select $count - $base_count into @cluster_lookups; eval select $opt - $base_opt into @cluster_lookups_avoided; --enable_query_log +--enable_cursor_protocol select @cluster_lookups; select @cluster_lookups_avoided; @@ -73,10 +77,12 @@ select id, bigfield from prefixinno where fake_id = 1031; let $count = query_get_value($show_count_statement, Value, 1); let $opt = query_get_value($show_opt_statement, Value, 1); +--disable_cursor_protocol --disable_query_log eval select $count - $base_count into @cluster_lookups; eval select $opt - $base_opt into @cluster_lookups_avoided; --enable_query_log +--enable_cursor_protocol select @cluster_lookups; select @cluster_lookups_avoided; @@ -90,10 +96,12 @@ select id, bigfield from prefixinno where fake_id = 1033; let $count = query_get_value($show_count_statement, Value, 1); let $opt = query_get_value($show_opt_statement, Value, 1); +--disable_cursor_protocol --disable_query_log eval select $count - $base_count into @cluster_lookups; eval select $opt - $base_opt into @cluster_lookups_avoided; --enable_query_log +--enable_cursor_protocol select @cluster_lookups; select @cluster_lookups_avoided; @@ -107,10 +115,12 @@ select id, bigfield from prefixinno where bigfield = repeat('x', 32); let $count = query_get_value($show_count_statement, Value, 1); let $opt = query_get_value($show_opt_statement, Value, 1); +--disable_cursor_protocol --disable_query_log eval select $count - $base_count into @cluster_lookups; eval select $opt - $base_opt into @cluster_lookups_avoided; --enable_query_log +--enable_cursor_protocol select @cluster_lookups; select @cluster_lookups_avoided; @@ -124,10 +134,12 @@ select id, bigfield from prefixinno where bigfield = repeat('y', 33); let $count = query_get_value($show_count_statement, Value, 1); let $opt = query_get_value($show_opt_statement, Value, 1); +--disable_cursor_protocol --disable_query_log eval select $count - $base_count into @cluster_lookups; eval select $opt - $base_opt into @cluster_lookups_avoided; --enable_query_log +--enable_cursor_protocol select @cluster_lookups; select @cluster_lookups_avoided; @@ -141,10 +153,12 @@ select id, bigfield from prefixinno where bigfield = repeat('b', 8); let $count = query_get_value($show_count_statement, Value, 1); let $opt = query_get_value($show_opt_statement, Value, 1); +--disable_cursor_protocol --disable_query_log eval select $count - $base_count into @cluster_lookups; eval select $opt - $base_opt into @cluster_lookups_avoided; --enable_query_log +--enable_cursor_protocol select @cluster_lookups; select @cluster_lookups_avoided; @@ -158,10 +172,12 @@ select id, bigfield from prefixinno where bigfield = repeat('c', 24); let $count = query_get_value($show_count_statement, Value, 1); let $opt = query_get_value($show_opt_statement, Value, 1); +--disable_cursor_protocol --disable_query_log eval select $count - $base_count into @cluster_lookups; eval select $opt - $base_opt into @cluster_lookups_avoided; --enable_query_log +--enable_cursor_protocol select @cluster_lookups; select @cluster_lookups_avoided; @@ -175,10 +191,12 @@ select id, bigfield from prefixinno where bigfield = repeat('z', 128); let $count = query_get_value($show_count_statement, Value, 1); let $opt = query_get_value($show_opt_statement, Value, 1); +--disable_cursor_protocol --disable_query_log eval select $count - $base_count into @cluster_lookups; eval select $opt - $base_opt into @cluster_lookups_avoided; --enable_query_log +--disable_cursor_protocol select @cluster_lookups; select @cluster_lookups_avoided; @@ -193,10 +211,12 @@ select id, bigfield from prefixinno where fake_id = 1033; let $count = query_get_value($show_count_statement, Value, 1); let $opt = query_get_value($show_opt_statement, Value, 1); +--disable_cursor_protocol --disable_query_log eval select $count - $base_count into @cluster_lookups; eval select $opt - $base_opt into @cluster_lookups_avoided; --enable_query_log +--enable_cursor_protocol select @cluster_lookups; select @cluster_lookups_avoided; diff --git a/mysql-test/main/flush_ssl.test b/mysql-test/main/flush_ssl.test index e7bd57b156a..c8be2896815 100644 --- a/mysql-test/main/flush_ssl.test +++ b/mysql-test/main/flush_ssl.test @@ -23,7 +23,9 @@ let $restart_parameters=--ssl-key=$ssl_key --ssl-cert=$ssl_cert; --source include/start_mysqld.inc connect ssl_con,localhost,root,,,,,SSL; +--disable_cursor_protocol SELECT VARIABLE_VALUE INTO @ssl_not_after FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_server_not_after'; +--enable_cursor_protocol let $ssl_not_after=`SELECT @ssl_not_after`; remove_file $ssl_cert; diff --git a/mysql-test/main/func_analyse.test b/mysql-test/main/func_analyse.test index 17b6b49decc..8afc2ab34a6 100644 --- a/mysql-test/main/func_analyse.test +++ b/mysql-test/main/func_analyse.test @@ -24,7 +24,10 @@ EXPLAIN SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(); create table t1 (v varchar(128)); insert into t1 values ('abc'),('abc\'def\\hij\"klm\0opq'),('\''),('\"'),('\\'),('a\0'),('b\''),('c\"'),('d\\'),('\'b'),('\"c'),('\\d'),('a\0\0\0b'),('a\'\'\'\'b'),('a\"\"\"\"b'),('a\\\\\\\\b'),('\'\0\\\"'),('\'\''),('\"\"'),('\\\\'),('The\ZEnd'); +#Enable after fix MDEV-31538 +--disable_cursor_protocol select * from t1 procedure analyse(); +--enable_cursor_protocol drop table t1; #decimal-related test diff --git a/mysql-test/main/func_des_encrypt.test b/mysql-test/main/func_des_encrypt.test index 44fc30ff00f..b1e2a7f42ff 100644 --- a/mysql-test/main/func_des_encrypt.test +++ b/mysql-test/main/func_des_encrypt.test @@ -54,7 +54,13 @@ DROP TABLE t1; CREATE TABLE t1 (a INT); INSERT t1 VALUES (1),(2); +# There is a problem with cursor-protocol and DES_DECRYPT(), +# but DES_DECRYPT has been deprecated from MariaDB 10.10.0, +# and will be removed in a future release. That's why this +# case is excluded without bug +--disable_cursor_protocol SELECT CHAR_LENGTH(a), DES_DECRYPT(a) FROM (SELECT _utf8 0xC2A2 AS a FROM t1) AS t2; +--enable_cursor_protocol DROP TABLE t1; --Echo End of 10.5 tests diff --git a/mysql-test/main/func_digest.test b/mysql-test/main/func_digest.test index afc3941e1b3..9043f6534b9 100644 --- a/mysql-test/main/func_digest.test +++ b/mysql-test/main/func_digest.test @@ -489,6 +489,8 @@ SELECT LENGTH(SHA2( 'computed', 512 )) / 2 * 8 = 512; --echo # Bug#54661 sha2() returns BINARY result --echo # +#Check after fix MDEV-31540 +--disable_cursor_protocol --disable_view_protocol --enable_metadata SET NAMES binary; @@ -499,6 +501,7 @@ SET NAMES latin1; SELECT sha2('1',224); --disable_metadata --disable_view_protocol +--enable_cursor_protocol --echo # --echo # Start of 10.1 tests diff --git a/mysql-test/main/func_gconcat.test b/mysql-test/main/func_gconcat.test index 09703db334a..5694c245033 100644 --- a/mysql-test/main/func_gconcat.test +++ b/mysql-test/main/func_gconcat.test @@ -409,11 +409,14 @@ drop table t1; # create table t1 (f1 int unsigned, f2 varchar(255)); insert into t1 values (1,repeat('a',255)),(2,repeat('b',255)); +#Enable after fix MDEV-31540 +--disable_cursor_protocol --enable_metadata --disable_view_protocol select f2,group_concat(f1) from t1 group by f2; --enable_view_protocol --disable_metadata +--enable_cursor_protocol drop table t1; # End of 4.1 tests @@ -499,11 +502,14 @@ set names latin1; # create table t1 (f1 int unsigned, f2 varchar(255)); insert into t1 values (1,repeat('a',255)),(2,repeat('b',255)); +#Enable after fix MDEV-31540 +--disable_cursor_protocol --enable_metadata --disable_view_protocol select f2,group_concat(f1) from t1 group by f2; --enable_view_protocol --disable_metadata +--enable_cursor_protocol drop table t1; # diff --git a/mysql-test/main/func_group_innodb.test b/mysql-test/main/func_group_innodb.test index 6db7fdc2ad7..2f6935ec4a6 100644 --- a/mysql-test/main/func_group_innodb.test +++ b/mysql-test/main/func_group_innodb.test @@ -170,8 +170,10 @@ DROP TABLE t1; --echo # MDEV-4269: crash when grouping by values() --echo # +--disable_cursor_protocol SELECT @@default_storage_engine INTO @old_engine; set default_storage_engine=innodb; +--enable_cursor_protocol create table y select 1 b; select 1 from y group by b; diff --git a/mysql-test/main/func_json.test b/mysql-test/main/func_json.test index a1ac2368014..e0fcd192ca6 100644 --- a/mysql-test/main/func_json.test +++ b/mysql-test/main/func_json.test @@ -24,7 +24,10 @@ select json_array(1); --disable_view_protocol select json_array(1, "text", false, null); +#enable after fix MDEV-31554 +--disable_cursor_protocol select json_array_append('["a", "b"]', '$', FALSE); +--enable_cursor_protocol --enable_view_protocol select json_array_append('{"k1":1, "k2":["a", "b"]}', '$.k2', 2); select json_array_append('["a", ["b", "c"], "d"]', '$[0]', 2); @@ -87,12 +90,18 @@ select json_extract('[10, 20, [30, 40], 1, 10]', '$[1]') as exp; select json_extract('[10, 20, [30, 40], 1, 10]', '$[1]', '$[25]') as exp; select json_extract( '[{"a": [3, 4]}, {"b": 2}]', '$[0].a', '$[1].a') as exp; +#enable after fix MDEV-31554 +--disable_cursor_protocol select json_insert('{"a":1, "b":{"c":1}, "d":[1, 2]}', '$.b.k1', 'word') as exp; +--enable_cursor_protocol select json_insert('{"a":1, "b":{"c":1}, "d":[1, 2]}', '$.d[3]', 3) as exp; select json_insert('{"a":1, "b":{"c":1}, "d":[1, 2]}', '$.a[2]', 2) as exp; select json_insert('{"a":1, "b":{"c":1}, "d":[1, 2]}', '$.b.c', 'word') as exp; +#enable after fix MDEV-31554 +--disable_cursor_protocol select json_set('{ "a": 1, "b": [2, 3]}', '$.a', 10, '$.c', '[true, false]') as exp; +--enable_cursor_protocol select json_replace('{ "a": 1, "b": [2, 3]}', '$.a', 10, '$.c', '[true, false]') as exp; select json_replace('{ "a": 1, "b": [2, 3]}', '$.a', 10, '$.b', '[true, false]') as exp; @@ -134,11 +143,14 @@ select json_merge('a','b'); select json_merge('{"a":"b"}','{"c":"d"}'); SELECT JSON_MERGE('[1, 2]', '{"id": 47}'); +#enable after fix MDEV-31554 +--disable_cursor_protocol select json_type('{"k1":123, "k2":345}'); select json_type('[123, "k2", 345]'); select json_type("true"); select json_type('123'); select json_type('123.12'); +--enable_cursor_protocol select json_keys('{"a":{"c":1, "d":2}, "b":2}'); select json_keys('{"a":{"c":1, "d":2}, "b":2}', "$.a"); @@ -166,21 +178,30 @@ insert into t1 values select json_search( json_col, 'all', 'foot' ) as ex from t1; drop table t1; - +#enable after fix MDEV-31554 +--disable_cursor_protocol select json_unquote('"abc"'); select json_unquote('abc'); +--enable_cursor_protocol + # # MDEV-13703 Illegal mix of collations for operation 'json_object' on using JSON_UNQUOTE as an argument. # create table t1 (c VARCHAR(8)) DEFAULT CHARSET=latin1; insert into t1 values ('abc'),('def'); - + +#enable after fix MDEV-31554 +--disable_cursor_protocol select json_object('foo', json_unquote(json_object('bar', c)),'qux', c) as fld from t1; +--enable_cursor_protocol drop table t1; select json_object("a", json_object("b", "abcd")); +#enable after fix MDEV-31554 +--disable_cursor_protocol select json_object("a", '{"b": "abcd"}'); +--enable_cursor_protocol select json_object("a", json_compact('{"b": "abcd"}')); select json_compact(NULL); @@ -257,8 +278,11 @@ select json_merge('{"a":{"u":12, "x":"b"}}', '{"a":{"x":"c"}}') as ex ; select json_merge('{"a":{"u":12, "x":"b", "r":1}}', '{"a":{"x":"c", "r":2}}') as ex ; select json_compact('{"a":1, "b":[1,2,3], "c":{"aa":"v1", "bb": "v2"}}') as ex; +#enable after fix MDEV-31554 +--disable_cursor_protocol select json_loose('{"a":1, "b":[1,2,3], "c":{"aa":"v1", "bb": "v2"}}') as ex; select json_detailed('{"a":1, "b":[1,2,3], "c":{"aa":"v1", "bb": "v2"}}') as ex; +--enable_cursor_protocol # # MDEV-11856 json_search doesn't search for values with double quotes character (") @@ -450,9 +474,12 @@ drop table t1; --echo # MDEV-16750 JSON_SET mishandles unicode every second pair of arguments. --echo # +#enable after fix MDEV-31554 +--disable_cursor_protocol SELECT JSON_SET('{}', '$.a', _utf8 0xC3B6) as exp; SELECT JSON_SET('{}', '$.a', _utf8 0xC3B6, '$.b', _utf8 0xC3B6) as exp; SELECT JSON_SET('{}', '$.a', _utf8 X'C3B6', '$.x', 1, '$.b', _utf8 X'C3B6') as exp; +--enable_cursor_protocol --echo # --echo # MDEV-17121 JSON_ARRAY_APPEND @@ -1029,12 +1056,15 @@ create table t1 (a varchar(254)); insert into t1 values (concat('x64-', repeat('a', 60))); insert into t1 values (concat('x64-', repeat('b', 60))); insert into t1 values (concat('x64-', repeat('c', 60))); +#enable after fix MDEV-31554 +--disable_cursor_protocol #enable after MDEV-32454 fix --disable_view_protocol --disable_ps2_protocol select json_arrayagg(a) from t1; --enable_ps2_protocol --enable_view_protocol +--enable_cursor_protocol drop table t1; SET group_concat_max_len= default; diff --git a/mysql-test/main/func_math.test b/mysql-test/main/func_math.test index dbeefa94d59..d16fc3bc37b 100644 --- a/mysql-test/main/func_math.test +++ b/mysql-test/main/func_math.test @@ -567,11 +567,14 @@ select (1.175494351E-37 div 1.7976931348623157E+308); select round(999999999, -9); select round(999999999.0, -9); +#enable after fix MDEV-31555 +--disable_cursor_protocol #enable after fix MDEV-29526 --disable_view_protocol select round(999999999999999999, -18); select round(999999999999999999.0, -18); --enable_view_protocol +--enable_cursor_protocol --echo # --echo # Bug#12537160 ASSERTION FAILED: diff --git a/mysql-test/main/func_misc.test b/mysql-test/main/func_misc.test index d0f622421bd..498c8a94df9 100644 --- a/mysql-test/main/func_misc.test +++ b/mysql-test/main/func_misc.test @@ -248,6 +248,7 @@ SELECT NAME_CONST('var', 'value') COLLATE latin1_general_cs; # # Bug #35848: UUID() returns UUIDs with the wrong time # +--disable_cursor_protocol select @@session.time_zone into @save_tz; # make sure all times are UTC so the DayNr won't differ @@ -259,6 +260,7 @@ select 24 * 60 * 60 * 1000 * 1000 * 10 into @my_uuid_one_day; select concat('0',mid(@my_uuid,16,3),mid(@my_uuid,10,4),left(@my_uuid,8)) into @my_uuidate; select floor(conv(@my_uuidate,16,10)/@my_uuid_one_day) into @my_uuid_date; select 141427 + datediff(curdate(),'1970-01-01') into @my_uuid_synthetic; +--enable_cursor_protocol # these should be identical; date part of UUID should be current date select @my_uuid_date - @my_uuid_synthetic; diff --git a/mysql-test/main/func_str.test b/mysql-test/main/func_str.test index 39957aabe70..3c9360a9c40 100644 --- a/mysql-test/main/func_str.test +++ b/mysql-test/main/func_str.test @@ -92,9 +92,12 @@ SELECT CONCAT('"',CONCAT_WS('";"',repeat('a',60),repeat('b',60),repeat('c',60),r select insert('txs',2,1,'hi'),insert('is ',4,0,'a'),insert('txxxxt',2,4,'es'); select replace('aaaa','a','b'),replace('aaaa','aa','b'),replace('aaaa','a','bb'),replace('aaaa','','b'),replace('bbbb','a','c'); --disable_view_protocol +#chaeck after fix MDEV-31540 +--disable_cursor_protocol --enable_metadata select replace('aaaa','a','bbbb'); --disable_metadata +--enable_cursor_protocol --enable_view_protocol select replace(concat(lcase(concat('THIS',' ','IS',' ','A',' ')),ucase('false'),' ','test'),'FALSE','REAL') as exp; select soundex(''),soundex('he'),soundex('hello all folks'),soundex('#3556 in bugdb'); @@ -145,7 +148,10 @@ select length(unhex(md5("abrakadabra"))); # # Bug #6564: QUOTE(NULL # +#enable after fix MDEV-31587 +--disable_cursor_protocol select concat('a', quote(NULL)); +--enable_cursor_protocol # # Wrong usage of functions @@ -741,8 +747,11 @@ create table t1 (i int); insert into t1 values (1000000000),(1); --enable_metadata --disable_view_protocol +#check after fix MDEV-31540 +--disable_cursor_protocol select lpad(i, 7, ' ') as t from t1; select rpad(i, 7, ' ') as t from t1; +--enable_cursor_protocol --enable_view_protocol --disable_metadata drop table t1; @@ -893,6 +902,8 @@ select format(NULL, NULL); select format(pi(), NULL); select format(NULL, 2); +#check after fix MDEV-31587 +--disable_cursor_protocol #enable after fix MDEV-28585 --disable_view_protocol select benchmark(NULL, NULL); @@ -900,16 +911,20 @@ select benchmark(0, NULL); select benchmark(100, NULL); select benchmark(NULL, 1+1); --enable_view_protocol +--enable_cursor_protocol # # Bug #20752: BENCHMARK with many iterations returns too quickly # # not a string, but belongs with the above Bug#22684 +#check after fix MDEV-31587 +--disable_cursor_protocol #enable after fix MDEV-28585 --disable_view_protocol select benchmark(-1, 1); --enable_view_protocol +--enable_cursor_protocol # # Please note: # 1) The collation of the password is irrelevant, the encryption uses @@ -977,26 +992,26 @@ select left('hello', -1); select left('hello', -4294967295); #enable after fix MDEV-29552 --disable_view_protocol +#enable after fix MDEV-34213 +--disable_cursor_protocol select left('hello', 4294967295); ---enable_view_protocol select left('hello', -4294967296); -#enable after fix MDEV-29552 ---disable_view_protocol select left('hello', 4294967296); ---enable_view_protocol select left('hello', -4294967297); -#enable after fix MDEV-29552 ---disable_view_protocol select left('hello', 4294967297); +--enable_cursor_protocol --enable_view_protocol #view protocol generates additional warning --disable_view_protocol select left('hello', -18446744073709551615); select left('hello', 18446744073709551615); select left('hello', -18446744073709551616); +#enable after fix MDEV-34213 +--disable_cursor_protocol select left('hello', 18446744073709551616); select left('hello', -18446744073709551617); select left('hello', 18446744073709551617); +--enable_cursor_protocol --enable_view_protocol select right('hello', 10); @@ -1005,26 +1020,26 @@ select right('hello', -1); select right('hello', -4294967295); #enable after fix MDEV-29552 --disable_view_protocol +#enable after fix MDEV-34213 +--disable_cursor_protocol select right('hello', 4294967295); ---enable_view_protocol select right('hello', -4294967296); -#enable after fix MDEV-29552 ---disable_view_protocol select right('hello', 4294967296); ---enable_view_protocol select right('hello', -4294967297); -#enable after fix MDEV-29552 ---disable_view_protocol select right('hello', 4294967297); +--enable_cursor_protocol --enable_view_protocol #view protocol generates additional warning --disable_view_protocol select right('hello', -18446744073709551615); select right('hello', 18446744073709551615); select right('hello', -18446744073709551616); +#enable after fix MDEV-34213 +--disable_cursor_protocol select right('hello', 18446744073709551616); select right('hello', -18446744073709551617); select right('hello', 18446744073709551617); +--enable_cursor_protocol --enable_view_protocol select substring('hello', 2, -1); @@ -1049,6 +1064,8 @@ select substring('hello', 18446744073709551617, 1); #enable after fix MDEV-28652 --disable_view_protocol select substring('hello', 1, -1); +#check after fix MDEV-31587 +--disable_cursor_protocol select substring('hello', 1, -4294967295); select substring('hello', 1, 4294967295); select substring('hello', 1, -4294967296); @@ -1064,6 +1081,7 @@ select substring('hello', 1, -18446744073709551616); select substring('hello', 1, 18446744073709551616); select substring('hello', 1, -18446744073709551617); select substring('hello', 1, 18446744073709551617); +--enable_cursor_protocol --enable_view_protocol select substring('hello', -1, -1); select substring('hello', -4294967295, -4294967295); @@ -1395,7 +1413,10 @@ create table t1(a float); insert into t1 values (1.33); --enable_metadata --disable_view_protocol +#check after fix MDEV-31540 +--disable_cursor_protocol select format(a, 2) from t1; +--enable_cursor_protocol --enable_view_protocol --disable_metadata drop table t1; @@ -1510,9 +1531,11 @@ SELECT CONVERT(('' IN (REVERSE(CAST(('') AS DECIMAL)), '')), CHAR(3)); --echo # CREATE TABLE t1 ( a TEXT ); --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_cursor_protocol --disable_ps2_protocol --eval SELECT 'aaaaaaaaaaaaaa' INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/bug58165.txt'; --enable_ps2_protocol +--enable_cursor_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; @@ -1595,11 +1618,17 @@ SELECT format(12345678901234567890.123, 3, 'ar_AE'); SELECT format(12345678901234567890.123, 3, 'ar_SA'); SELECT format(12345678901234567890.123, 3, 'be_BY'); SELECT format(12345678901234567890.123, 3, 'de_DE'); +#check after fix MDEV-31512 +--disable_cursor_protocol SELECT format(12345678901234567890.123, 3, 'en_IN'); SELECT format(12345678901234567890.123, 3, 'en_US'); +--enable_cursor_protocol SELECT format(12345678901234567890.123, 3, 'it_CH'); SELECT format(12345678901234567890.123, 3, 'ru_RU'); +#checkafter fix MDEV-31512 +--disable_cursor_protocol SELECT format(12345678901234567890.123, 3, 'ta_IN'); +--enable_cursor_protocol CREATE TABLE t1 (fmt CHAR(5) NOT NULL); INSERT INTO t1 VALUES ('ar_AE'); @@ -1611,6 +1640,8 @@ INSERT INTO t1 VALUES ('en_US'); INSERT INTO t1 VALUES ('it_CH'); INSERT INTO t1 VALUES ('ru_RU'); INSERT INTO t1 VALUES ('ta_IN'); +#check after fix MDEV-31512 +--disable_cursor_protocol SELECT fmt, format(12345678901234567890.123, 3, fmt) FROM t1 ORDER BY fmt; SELECT fmt, format(12345678901234567890.123, 0, fmt) FROM t1 ORDER BY fmt; SELECT fmt, format(12345678901234567890, 3, fmt) FROM t1 ORDER BY fmt; @@ -1618,6 +1649,7 @@ SELECT fmt, format(-12345678901234567890, 3, fmt) FROM t1 ORDER BY fmt; SELECT fmt, format(-02345678901234567890, 3, fmt) FROM t1 ORDER BY fmt; SELECT fmt, format(-00345678901234567890, 3, fmt) FROM t1 ORDER BY fmt; SELECT fmt, format(-00045678901234567890, 3, fmt) FROM t1 ORDER BY fmt; +--enable_cursor_protocol DROP TABLE t1; SELECT format(123, 1, 'Non-existent-locale'); @@ -2062,7 +2094,10 @@ DROP TABLE t1; --disable_view_protocol CREATE TABLE t1 (a INT, b TIME, c TIME); INSERT INTO t1 VALUES (NULL,'22:56:45','22:56:45'),(4,'12:51:42','12:51:42'); +#check after fix MDEV-31512 +--disable_cursor_protocol SELECT REPLACE( BINARY c, a, b ) f FROM t1 GROUP BY f WITH ROLLUP; +--enable_cursor_protocol DROP TABLE t1; --enable_view_protocol diff --git a/mysql-test/main/func_time.test b/mysql-test/main/func_time.test index 4b046ac166a..51b2722d7a0 100644 --- a/mysql-test/main/func_time.test +++ b/mysql-test/main/func_time.test @@ -1294,7 +1294,10 @@ SET TIME_ZONE='+02:00'; --echo # CREATE TABLE t1 (a DATE); INSERT INTO t1 VALUES ('2005-05-04'),('2000-02-23'); +#check after fix MDEV-31495 +--disable_cursor_protocol SELECT a, FROM_UNIXTIME(CONCAT(a,'10')) AS f1, FROM_UNIXTIME(CONCAT(a,'10'))+0 AS f2 FROM t1; +--enable_cursor_protocol SELECT * FROM t1 GROUP BY FROM_UNIXTIME(CONCAT(a,'10'))+0; DROP TABLE t1; @@ -1608,7 +1611,10 @@ SELECT DATE_ADD('2001-01-01 10:20:30',INTERVAL 250000000000.0 SECOND) AS c1, DAT --echo # --enable_metadata --disable_view_protocol +#check after fix MDEV-31540 +--disable_cursor_protocol SELECT DATE_ADD('2011-01-02 12:13:14', INTERVAL 1 MINUTE); +--enable_cursor_protocol --enable_view_protocol --disable_metadata @@ -2241,11 +2247,13 @@ SET @sav_slow_query_log= @@session.slow_query_log; --disable_ps2_protocol # @@slow_query_log ON check SET @@session.slow_query_log= ON; +--disable_cursor_protocol 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; +--enable_cursor_protocol if (!`SELECT @ts_cur = @ts_func and @ts_func = @ts_trig`) { SELECT @ts_cur, @ts_func, @ts_trig; @@ -2257,10 +2265,12 @@ DELETE FROM t_trig; --disable_ps2_protocol # @@slow_query_log OFF check SET @@session.slow_query_log= OFF; +--disable_cursor_protocol 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; +--enable_cursor_protocol if (!`SELECT @ts_cur = @ts_func and @ts_func = @ts_trig`) { SELECT @ts_cur, @ts_func, @ts_trig; @@ -3196,7 +3206,10 @@ SELECT TIME('- 01:00:00'), TIME('- 1 01:00:00'); #enable after fix MDEV-29534 --disable_view_protocol SET time_zone='+00:00'; +#check after fix MDEV-31495 +--disable_cursor_protocol SELECT NULLIF(FROM_UNIXTIME('foo'), '2012-12-12 21:10:14'); +--enable_cursor_protocol SET time_zone=DEFAULT; --enable_view_protocol diff --git a/mysql-test/main/func_time_round.test b/mysql-test/main/func_time_round.test index 79f9ec289a0..fa13e7cb461 100644 --- a/mysql-test/main/func_time_round.test +++ b/mysql-test/main/func_time_round.test @@ -181,7 +181,10 @@ SELECT YEAR(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id; SELECT DAYNAME(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id; SELECT MONTHNAME(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id; +#check after fix MDEV-31555 +--disable_cursor_protocol SELECT LAST_DAY(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id; +--enable_cursor_protocol SELECT TO_DAYS(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id; SELECT DAYOFYEAR(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id; @@ -219,7 +222,10 @@ SELECT DAYNAME(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id; SELECT MONTHNAME(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id; SELECT YEARWEEK(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id; +#check after fix MDEV-31555 +--disable_cursor_protocol SELECT LAST_DAY(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id; +--enable_cursor_protocol SELECT TO_DAYS(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id; SELECT DAYOFYEAR(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id; SELECT DAYOFMONTH(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id; diff --git a/mysql-test/main/get_diagnostics.test b/mysql-test/main/get_diagnostics.test index 6b4227887b5..68b58a32e2b 100644 --- a/mysql-test/main/get_diagnostics.test +++ b/mysql-test/main/get_diagnostics.test @@ -282,6 +282,7 @@ GET DIAGNOSTICS CONDITION ABS(2) @var = CLASS_ORIGIN; GET DIAGNOSTICS CONDITION 1.1 @var = CLASS_ORIGIN; GET DIAGNOSTICS CONDITION "1" @var = CLASS_ORIGIN; +--disable_cursor_protocol # Reset warnings SELECT COUNT(max_questions) INTO @var FROM mysql.user; @@ -301,6 +302,7 @@ GET DIAGNOSTICS CONDITION @cond @var1 = CLASS_ORIGIN; # Reset warnings SELECT COUNT(max_questions) INTO @var FROM mysql.user; +--enable_cursor_protocol DELIMITER |; CREATE PROCEDURE p1() @@ -367,7 +369,9 @@ GET DIAGNOSTICS @var = NUMBER; SELECT @var; --enable_view_protocol +--disable_cursor_protocol SELECT COUNT(max_questions) INTO @var FROM mysql.user; +--enable_cursor_protocol GET DIAGNOSTICS @var = NUMBER; SELECT @var; diff --git a/mysql-test/main/gis.test b/mysql-test/main/gis.test index f160d8f1a10..6bac1e0c906 100644 --- a/mysql-test/main/gis.test +++ b/mysql-test/main/gis.test @@ -403,9 +403,12 @@ select (asWKT(geomfromwkb((0x010100000000000000000024400000000000002440)))) as e --enable_metadata --disable_view_protocol +#check after fix MDEV-31540 +--disable_cursor_protocol create table t1 (g GEOMETRY); select * from t1; select asbinary(g) from t1; +--enable_cursor_protocol --enable_view_protocol --disable_metadata drop table t1; @@ -3245,6 +3248,8 @@ CREATE TABLE t1 ( g GEOMETRY ) CHARACTER SET utf8; +#check after fix MDEV-31540 +--disable_cursor_protocol --disable_view_protocol --enable_metadata SELECT * FROM t1; @@ -3350,6 +3355,7 @@ FROM t1; --disable_metadata --enable_view_protocol +--enable_cursor_protocol DROP TABLE t1; --echo # diff --git a/mysql-test/main/grant.test b/mysql-test/main/grant.test index c9c74d7b877..c75da4f76a8 100644 --- a/mysql-test/main/grant.test +++ b/mysql-test/main/grant.test @@ -10,7 +10,9 @@ set GLOBAL sql_mode=""; set LOCAL sql_mode=""; SET @old_log_bin_trust_function_creators= @@global.log_bin_trust_function_creators; SET GLOBAL log_bin_trust_function_creators = 1; +--disable_cursor_protocol select priv into @root_priv from mysql.global_priv where user='root' and host='localhost'; +--enable_cursor_protocol connect (master,localhost,root,,); connection master; diff --git a/mysql-test/main/grant2.test b/mysql-test/main/grant2.test index 7efd9bdde78..19ad2d37472 100644 --- a/mysql-test/main/grant2.test +++ b/mysql-test/main/grant2.test @@ -4,7 +4,10 @@ # Save the initial number of concurrent sessions --source include/count_sessions.inc +--disable_cursor_protocol select priv into @root_priv from mysql.global_priv where user='root' and host='localhost'; +--enable_cursor_protocol + set GLOBAL sql_mode=""; set LOCAL sql_mode=""; SET NAMES binary; @@ -655,8 +658,10 @@ DROP DATABASE db1; # work out who we are. USE mysql; +--disable_cursor_protocol SELECT LEFT(CURRENT_USER(),INSTR(CURRENT_USER(),'@')-1) INTO @u; SELECT MID(CURRENT_USER(),INSTR(CURRENT_USER(),'@')+1) INTO @h; +--enable_cursor_protocol # show current privs. SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h; @@ -838,9 +843,11 @@ SHOW CREATE TABLE t1; --echo # INSERT INTO t1 VALUES (1), (2), (3); --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_cursor_protocol --disable_ps2_protocol --eval SELECT a INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/bug27480.txt' FROM t1 --enable_ps2_protocol +--enable_cursor_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/grant_4332.test b/mysql-test/main/grant_4332.test index 4a228b5c1a1..69566cb5e2e 100644 --- a/mysql-test/main/grant_4332.test +++ b/mysql-test/main/grant_4332.test @@ -21,7 +21,10 @@ flush privileges; --enable_metadata --disable_view_protocol +# Check after fix MDEV-31540 +--disable_cursor_protocol select user(); +--enable_cursor_protocol --enable_view_protocol --disable_metadata @@ -43,7 +46,10 @@ flush privileges; --enable_metadata --disable_view_protocol +# Check after fix MDEV-31540 +--disable_cursor_protocol select user(); +--enable_cursor_protocol --enable_view_protocol --disable_metadata diff --git a/mysql-test/main/group_by.test b/mysql-test/main/group_by.test index 340a6473eb7..6c2b99c90be 100644 --- a/mysql-test/main/group_by.test +++ b/mysql-test/main/group_by.test @@ -284,6 +284,7 @@ drop table t1; CREATE TABLE t1 (a char(1)); INSERT INTO t1 VALUES ('A'),('B'),('A'),('B'),('A'),('B'),(NULL),('a'),('b'),(NULL),('A'),('B'),(NULL); flush status; +--disable_cursor_protocol --disable_ps2_protocol SELECT a FROM t1 GROUP BY a; SELECT a,count(*) FROM t1 GROUP BY a; @@ -292,11 +293,13 @@ SELECT a,count(*) FROM t1 GROUP BY binary a; SELECT binary a FROM t1 GROUP BY 1; SELECT binary a,count(*) FROM t1 GROUP BY 1; --enable_ps2_protocol +--enable_cursor_protocol --disable_ps_protocol show status like 'Created%tables'; --enable_ps_protocol # Do the same tests with on-disk temporary tables set tmp_memory_table_size=0; +--disable_cursor_protocol --disable_ps2_protocol SELECT a FROM t1 GROUP BY a; SELECT a,count(*) FROM t1 GROUP BY a; @@ -305,6 +308,7 @@ SELECT a,count(*) FROM t1 GROUP BY binary a; SELECT binary a FROM t1 GROUP BY 1; SELECT binary a,count(*) FROM t1 GROUP BY 1; --enable_ps2_protocol +--enable_cursor_protocol --disable_ps_protocol show status like 'Created%tables'; --enable_ps_protocol @@ -1666,7 +1670,7 @@ DROP TABLE t1, t2; # an additional util connection and other statistics data --disable_ps2_protocol --disable_view_protocol - +--disable_cursor_protocol FLUSH STATUS; # this test case *must* use Aria temp tables CREATE TABLE t1 (f1 INT, f2 decimal(20,1), f3 blob); @@ -1676,6 +1680,7 @@ DROP TABLE t1; --echo the value below *must* be 1 show status like 'Created_tmp_disk_tables'; +--enable_cursor_protocol --enable_view_protocol --enable_ps2_protocol diff --git a/mysql-test/main/group_min_max.test b/mysql-test/main/group_min_max.test index ec4c5705b23..97de775f4c8 100644 --- a/mysql-test/main/group_min_max.test +++ b/mysql-test/main/group_min_max.test @@ -1726,6 +1726,8 @@ explain select and t1.PARENT_ID = t2.PARENT_ID and t2.CHILD_FIELD = "ZZZZ"; +#Enable after fix MDEV-31552 +--disable_cursor_protocol select t1.PARENT_ID, min(CHILD_FIELD) @@ -1733,6 +1735,7 @@ select where t1.PARENT_ID = 1 and t1.PARENT_ID = t2.PARENT_ID and t2.CHILD_FIELD = "ZZZZ"; +--enable_cursor_protocol select 1, @@ -1764,6 +1767,8 @@ explain select and t1.PARENT_ID = t2.PARENT_ID and t2.CHILD_FIELD = "ZZZZ"; +#Enable after fix MDEV-31552 +--disable_cursor_protocol select t1.PARENT_ID, min(CHILD_FIELD) @@ -1771,6 +1776,7 @@ select where t1.PARENT_ID = 1 and t1.PARENT_ID = t2.PARENT_ID and t2.CHILD_FIELD = "ZZZZ"; +--enable_cursor_protocol drop table t1,t2; @@ -1897,6 +1903,8 @@ explain select and t1.PARENT_ID = t2.PARENT_ID and t2.CHILD_FIELD = "ZZZZ"; +#Enable after fix MDEV-31552 +--disable_cursor_protocol select t1.PARENT_ID, min(CHILD_FIELD) @@ -1904,6 +1912,7 @@ select where t1.PARENT_ID = 1 and t1.PARENT_ID = t2.PARENT_ID and t2.CHILD_FIELD = "ZZZZ"; +--enable_cursor_protocol select 1, @@ -1935,6 +1944,8 @@ explain select and t1.PARENT_ID = t2.PARENT_ID and t2.CHILD_FIELD = "ZZZZ"; +#Enable after fix MDEV-31552 +--disable_cursor_protocol select t1.PARENT_ID, min(CHILD_FIELD) @@ -1942,6 +1953,7 @@ select where t1.PARENT_ID = 1 and t1.PARENT_ID = t2.PARENT_ID and t2.CHILD_FIELD = "ZZZZ"; +--enable_cursor_protocol drop table t1,t2; diff --git a/mysql-test/main/handler_read_last.test b/mysql-test/main/handler_read_last.test index 390d5f092fc..56e0b091e67 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_cursor_protocol --disable_ps2_protocol FLUSH STATUS; SELECT a FROM t1 ORDER BY a LIMIT 1; @@ -26,6 +27,7 @@ FLUSH STATUS; SELECT a FROM t1 ORDER BY a DESC LIMIT 3; SHOW STATUS LIKE 'HANDLER_READ%'; --enable_ps2_protocol +--enable_cursor_protocol DROP TABLE t1; diff --git a/mysql-test/main/information_schema.test b/mysql-test/main/information_schema.test index cd118a17961..d3af60a32fb 100644 --- a/mysql-test/main/information_schema.test +++ b/mysql-test/main/information_schema.test @@ -1811,14 +1811,18 @@ drop database mysqltest; --disable_result_log SELECT * FROM INFORMATION_SCHEMA.TABLES; --enable_result_log +--disable_cursor_protocol SELECT VARIABLE_VALUE INTO @val1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME LIKE 'Opened_tables'; +--enable_cursor_protocol --disable_result_log SELECT ENGINE FROM INFORMATION_SCHEMA.TABLES; --enable_result_log --echo # The below SELECT query should give same output as above SELECT query. +--disable_cursor_protocol SELECT VARIABLE_VALUE INTO @val2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME LIKE 'Opened_tables'; +--enable_cursor_protocol --echo # The below select should return '1' SELECT @val1 = @val2; diff --git a/mysql-test/main/init_file.test b/mysql-test/main/init_file.test index 65e54db43ea..57acf7ce6e2 100644 --- a/mysql-test/main/init_file.test +++ b/mysql-test/main/init_file.test @@ -10,8 +10,10 @@ # Bug#23240 --init-file statements with NOW() reports '1970-01-01 11:00:00'as the date time # INSERT INTO init_file.startup VALUES ( NOW() ); +--disable_cursor_protocol SELECT * INTO @X FROM init_file.startup limit 0,1; SELECT * INTO @Y FROM init_file.startup limit 1,1; +--enable_cursor_protocol SELECT YEAR(@X)-YEAR(@Y); --echo ok diff --git a/mysql-test/main/innodb_ext_key.test b/mysql-test/main/innodb_ext_key.test index a37677411ad..fb47da1ccfb 100644 --- a/mysql-test/main/innodb_ext_key.test +++ b/mysql-test/main/innodb_ext_key.test @@ -29,6 +29,7 @@ ANALYZE TABLE lineitem PERSISTENT FOR COLUMNS() INDEXES(); --enable_result_log --enable_query_log +--disable_cursor_protocol --disable_ps2_protocol explain select count(*) from lineitem where l_orderkey=130 and l_shipdate='1992-07-01'; @@ -153,6 +154,7 @@ select o_orderkey, p_partkey and o_orderkey=l_orderkey and p_partkey=l_partkey; show /*d*/ status like 'handler_read%'; --enable_ps2_protocol +--enable_cursor_protocol --echo # --echo # Bug mdev-3851: ref access used instead of expected eq_ref access @@ -326,7 +328,9 @@ from t1 A, t1 B; explain select * from t1, t2 where t2.a=t1.a and t2.b < 2; flush status; +--disable_cursor_protocol select * from t1, t2 where t2.a=t1.a and t2.b < 2; +--enable_cursor_protocol show /*e*/ status like 'handler_read%'; --enable_ps2_protocol diff --git a/mysql-test/main/insert.test b/mysql-test/main/insert.test index 0a1e63765a4..4b5a5181f09 100644 --- a/mysql-test/main/insert.test +++ b/mysql-test/main/insert.test @@ -596,9 +596,11 @@ 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_cursor_protocol --disable_ps2_protocol SELECT 0,0 INTO OUTFILE 't1.txt'; --enable_ps2_protocol +--enable_cursor_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 0731c393399..67a5e62337a 100644 --- a/mysql-test/main/invisible_field.test +++ b/mysql-test/main/invisible_field.test @@ -251,9 +251,11 @@ DROP TABLE t1; create or replace table t1 (a int, b int invisible); insert into t1 values (1),(2); +--disable_cursor_protocol --disable_ps2_protocol select * from t1 into outfile 'f'; --enable_ps2_protocol +--enable_cursor_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; @@ -263,9 +265,11 @@ select a,b from t1; truncate table t1; insert into t1(a,b) values (1,1),(2,2); +--disable_cursor_protocol --disable_ps2_protocol select a,b from t1 into outfile 'a'; --enable_ps2_protocol +--enable_cursor_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 f8abc3fac22..ac30e14f7ad 100644 --- a/mysql-test/main/join.test +++ b/mysql-test/main/join.test @@ -658,6 +658,7 @@ insert into t2 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(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); +--disable_cursor_protocol flush status; --disable_ps2_protocol select * from t1, t2, t3 where t3.a=t1.a and t2.a=t1.b; @@ -665,6 +666,7 @@ select * from t1, t2, t3 where t3.a=t1.a and t2.a=t1.b; 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%'; +--enable_cursor_protocol drop table t1, t2, t3; # @@ -959,11 +961,13 @@ INSERT INTO t1 VALUES (3,'b'),(4,NULL),(5,'c'),(6,'cc'),(7,'d'), (8,'dd'),(9,'e'),(10,'ee'); INSERT INTO t2 VALUES (2,NULL); ANALYZE TABLE t1,t2; +--disable_cursor_protocol 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_%'; +--enable_cursor_protocol DROP TABLE t1, t2; --echo End of 5.1 tests diff --git a/mysql-test/main/join_outer.test b/mysql-test/main/join_outer.test index 83bb7fdeef3..d370a11967e 100644 --- a/mysql-test/main/join_outer.test +++ b/mysql-test/main/join_outer.test @@ -885,9 +885,11 @@ INSERT INTO t2 VALUES EXPLAIN SELECT t1.id, a FROM t1 LEFT JOIN t2 ON t1.id=t2.id WHERE t2.b IS NULL; +--disable_cursor_protocol flush status; SELECT t1.id, a FROM t1 LEFT JOIN t2 ON t1.id=t2.id WHERE t2.b IS NULL; show status like 'Handler_read%'; +--enable_cursor_protocol DROP TABLE t1,t2; --enable_ps2_protocol @@ -1371,7 +1373,6 @@ drop table t1,t2,t3,t4; --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); insert into t1 select * from t1; @@ -1403,16 +1404,18 @@ insert into t3 values (11, 100), (33, 301), (44, 402), (11, 102), (11, 101); insert into t3 values (22, 100), (53, 301), (64, 402), (22, 102), (22, 101); analyze table t1,t2,t3; - +--disable_view_protocol +--disable_cursor_protocol flush status; select sum(t3.b) from t1 left join t3 on t3.a=t1.a and t1.a is not null; show status like "handler_read%"; flush status; select sum(t3.b) from t2 left join t3 on t3.a=t2.a and t2.a <> 10; show status like "handler_read%"; +--enable_cursor_protocol +--enable_view_protocol drop table t1,t2,t3; ---enable_view_protocol --enable_ps2_protocol --echo # diff --git a/mysql-test/main/key_cache.test b/mysql-test/main/key_cache.test index 0829719a442..b25ff58bd1e 100644 --- a/mysql-test/main/key_cache.test +++ b/mysql-test/main/key_cache.test @@ -303,7 +303,9 @@ update t1 set p=3 where p=1; update t2 set i=2 where i=1; select * from information_schema.session_status where variable_name like 'key_%' and variable_name != 'Key_blocks_unused'; +--disable_cursor_protocol select variable_value into @key_blocks_unused from information_schema.session_status where variable_name = 'Key_blocks_unused'; +--enable_cursor_protocol --replace_column 7 # select * from information_schema.key_caches where segment_number is null; diff --git a/mysql-test/main/last_value.test b/mysql-test/main/last_value.test index 41cfdb5482d..9e90a8a25bb 100644 --- a/mysql-test/main/last_value.test +++ b/mysql-test/main/last_value.test @@ -33,6 +33,8 @@ DROP TABLE t1; SELECT LAST_VALUE(@last_a:=1,@last_b:=1); select @last_b; --enable_ps_protocol +#Check after fix MDEV-31540 +--disable_cursor_protocol SELECT LAST_VALUE(@last_a:=1,@last_b:=1.0); select @last_b; SELECT LAST_VALUE(@last_a:=1,@last_b:="hello"); @@ -41,6 +43,7 @@ SELECT date(LAST_VALUE(@last_a:=1,@last_b:="2001-02-03")); select @last_b; SELECT LAST_VALUE(@last_a:=1,@last_b:="2001-02-03",NULL); select @last_b; +--enable_cursor_protocol --disable_metadata --error ER_PARSE_ERROR SELECT LAST_VALUE(); diff --git a/mysql-test/main/limit_rows_examined.test b/mysql-test/main/limit_rows_examined.test index 16831a0cf5c..94bbf8e819a 100644 --- a/mysql-test/main/limit_rows_examined.test +++ b/mysql-test/main/limit_rows_examined.test @@ -23,6 +23,8 @@ insert into t2i values ('bb'), ('cc'), ('dd'), ('ff'); --echo Simple joins --echo ========================================================================= +#Check after fix MDEV-31522 +--disable_cursor_protocol --echo Simple nested loops join without blocking set @@join_cache_level=0; explain @@ -457,6 +459,7 @@ SELECT DISTINCT a FROM t1, t2 HAVING a > ' ' LIMIT ROWS EXAMINED 14; SELECT DISTINCT a FROM t1, t2 HAVING a > ' ' LIMIT ROWS EXAMINED 15; SELECT DISTINCT a FROM t1, t2 HAVING a > ' ' LIMIT ROWS EXAMINED 16; +--enable_cursor_protocol drop table t1,t2,t3; @@ -489,6 +492,7 @@ WHERE alias3.c IN ( SELECT 1 UNION SELECT 6 ) GROUP BY field1, field2, field3, field4, field5 LIMIT ROWS EXAMINED 120; +--disable_cursor_protocol --disable_ps2_protocol FLUSH STATUS; SELECT a AS field1, alias2.d AS field2, alias2.f AS field3, alias2.e AS field4, b AS field5 @@ -508,6 +512,7 @@ LIMIT ROWS EXAMINED 124; SHOW STATUS LIKE 'Handler_read%'; SHOW STATUS LIKE 'Handler_tmp%'; --enable_ps2_protocol +--enable_cursor_protocol drop table t1, t2; diff --git a/mysql-test/main/loaddata.test b/mysql-test/main/loaddata.test index 9c1a583831b..ef1496787d4 100644 --- a/mysql-test/main/loaddata.test +++ b/mysql-test/main/loaddata.test @@ -41,7 +41,9 @@ 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); disable_query_log; +--disable_cursor_protocol eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t1' from t1; +--enable_cursor_protocol delete from t1; eval load data infile '$MYSQLTEST_VARDIR/tmp/t1' into table t1; enable_query_log; @@ -49,9 +51,11 @@ select * from t1; remove_file $MYSQLTEST_VARDIR/tmp/t1; disable_query_log; +--disable_cursor_protocol eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t1' FIELDS TERMINATED BY '' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\r\n' FROM t1; +--enable_cursor_protocol delete from t1; eval load data infile '$MYSQLTEST_VARDIR/tmp/t1' into table t1 FIELDS TERMINATED BY '' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\r\n'; @@ -94,9 +98,11 @@ INSERT INTO t1 (c1) VALUES SELECT * FROM t1; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_cursor_protocol --disable_ps2_protocol eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t1' FIELDS ENCLOSED BY 'r' FROM t1; --enable_ps2_protocol +--enable_cursor_protocol cat_file $MYSQLTEST_VARDIR/tmp/t1; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR @@ -184,9 +190,11 @@ create table t1(f1 int); insert into t1 values(1),(null); create table t2(f2 int auto_increment primary key); disable_query_log; +--disable_cursor_protocol --disable_ps2_protocol eval select * into outfile '$MYSQLTEST_VARDIR/tmp/t1' from t1; --enable_ps2_protocol +--enable_cursor_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; @@ -203,20 +211,24 @@ 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_cursor_protocol --disable_ps2_protocol eval select * into outfile '$MYSQLTEST_VARDIR/tmp/t2' from t2; --enable_ps2_protocol +--enable_cursor_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_cursor_protocol --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 +--enable_cursor_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; @@ -235,9 +247,11 @@ 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_cursor_protocol --disable_ps2_protocol eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t1' FIELDS ENCLOSED BY '-' FROM t1; --enable_ps2_protocol +--enable_cursor_protocol cat_file $MYSQLTEST_VARDIR/tmp/t1; echo EOF; @@ -376,8 +390,10 @@ SET sql_mode = ''; --disable_ps2_protocol --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_cursor_protocol --eval SELECT '1 \\\\aa\n' INTO DUMPFILE '$file' --enable_ps2_protocol +--enable_cursor_protocol CREATE TABLE t1 (id INT, val1 CHAR(3)) ENGINE=MyISAM; @@ -389,17 +405,21 @@ SELECT * FROM t1; # show we can write this with OUTFILE, forcing the parameters for now --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_cursor_protocol --disable_ps2_protocol --eval SELECT * INTO OUTFILE '$file2' FIELDS ESCAPED BY '' TERMINATED BY ' ' FROM t1 --enable_ps2_protocol +--enable_cursor_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_cursor_protocol --disable_ps2_protocol --eval SELECT * INTO OUTFILE '$file2' FIELDS TERMINATED BY ' ' FROM t1 --enable_ps2_protocol +--enable_cursor_protocol --diff_files $file $file2 --remove_file $file2 @@ -432,9 +452,11 @@ 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_cursor_protocol --disable_ps2_protocol --eval SELECT * INTO OUTFILE '$file' FIELDS TERMINATED BY ' ' FROM t1 ORDER BY id --enable_ps2_protocol +--enable_cursor_protocol --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --eval LOAD DATA INFILE '$file' INTO TABLE t2 FIELDS TERMINATED BY ' ' @@ -451,9 +473,11 @@ eval SELECT LOAD_FILE("$file") as exp; --echo 1.2 NO_BACKSLASH_ESCAPES, override defaults for ESCAPED BY --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_cursor_protocol --disable_ps2_protocol --eval SELECT * INTO OUTFILE '$file' FIELDS ESCAPED BY '\' TERMINATED BY ' ' FROM t1 ORDER BY id --enable_ps2_protocol +--enable_cursor_protocol --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --eval LOAD DATA INFILE '$file' INTO TABLE t2 FIELDS ESCAPED BY '\' TERMINATED BY ' ' @@ -475,9 +499,11 @@ SET sql_mode = ''; --echo 2.1 !NO_BACKSLASH_ESCAPES, use defaults for ESCAPED BY --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_cursor_protocol --disable_ps2_protocol --eval SELECT * INTO OUTFILE '$file' FIELDS TERMINATED BY ' ' FROM t1 ORDER BY id --enable_ps2_protocol +--enable_cursor_protocol --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --eval LOAD DATA INFILE '$file' INTO TABLE t2 FIELDS TERMINATED BY ' ' @@ -500,9 +526,11 @@ SET sql_mode = ''; --echo 2.2 !NO_BACKSLASH_ESCAPES, override defaults for ESCAPED BY --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_cursor_protocol --disable_ps2_protocol --eval SELECT * INTO OUTFILE '$file' FIELDS ESCAPED BY '' TERMINATED BY ' ' FROM t1 ORDER BY id --enable_ps2_protocol +--enable_cursor_protocol --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --eval LOAD DATA INFILE '$file' INTO TABLE t2 FIELDS ESCAPED BY '' TERMINATED BY ' ' @@ -544,9 +572,11 @@ INSERT INTO t1 VALUES (1); SET NAMES latin1; SET character_set_filesystem=filename; select @@character_set_filesystem; +--disable_cursor_protocol --disable_ps2_protocol SELECT * INTO OUTFILE 't-1' FROM t1; --enable_ps2_protocol +--enable_cursor_protocol DELETE FROM t1; LOAD DATA INFILE 't-1' INTO TABLE t1; SELECT * FROM t1; @@ -568,9 +598,11 @@ select @@character_set_filesystem; --echo # CREATE TABLE t1(col0 LONGBLOB); +--disable_cursor_protocol --disable_ps2_protocol SELECT 'test' INTO OUTFILE 't1.txt'; --enable_ps2_protocol +--enable_cursor_protocol LOAD DATA INFILE 't1.txt' IGNORE INTO TABLE t1 SET col0=col0; SELECT * FROM t1; @@ -639,9 +671,11 @@ disconnect con1; --echo # CREATE TABLE t1(f1 INT); +--disable_cursor_protocol --disable_ps2_protocol EVAL SELECT 0xE1BB30 INTO OUTFILE 't1.dat'; --enable_ps2_protocol +--enable_cursor_protocol --disable_warnings LOAD DATA INFILE 't1.dat' IGNORE INTO TABLE t1 CHARACTER SET utf8; --enable_warnings @@ -658,7 +692,9 @@ remove_file $MYSQLD_DATADIR/test/t1.dat; --disable_ps2_protocol --let $file=$MYSQLTEST_VARDIR/tmp/bug11735141.txt --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_cursor_protocol --eval SELECT '1\n' INTO DUMPFILE '$file' +--enable_cursor_protocol --enable_ps2_protocol create table t1(a point); @@ -745,9 +781,11 @@ 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_cursor_protocol --disable_ps2_protocol SELECT a, b INTO OUTFILE '15645.data' FROM t1; --enable_ps2_protocol +--enable_cursor_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/log_slow.test b/mysql-test/main/log_slow.test index 8997b95d72c..1f33cff9f25 100644 --- a/mysql-test/main/log_slow.test +++ b/mysql-test/main/log_slow.test @@ -74,10 +74,12 @@ SET long_query_time=0.1; --echo # Although this query is disallowed by slow_query_log, it should still increment Slow_queries +--disable_cursor_protocol SELECT VARIABLE_VALUE INTO @global_slow_queries FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='SLOW_QUERIES'; SELECT sleep(0.2) INTO @tmp FROM DUAL; +--enable_cursor_protocol SELECT CAST(VARIABLE_VALUE AS UNSIGNED)-@global_slow_queries AS Slow_queries_increment FROM @@ -88,11 +90,13 @@ SELECT --echo # Although this query is disallowed by log_slow_filter, it should still increment Slow_queries SET log_slow_filter=filesort; +--disable_cursor_protocol SELECT sleep(0.2) INTO @tmp FROM DUAL; SELECT VARIABLE_VALUE INTO @global_slow_queries FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='SLOW_QUERIES'; SELECT sleep(0.2) INTO @tmp FROM DUAL; +--enable_cursor_protocol SELECT CAST(VARIABLE_VALUE AS UNSIGNED)-@global_slow_queries AS Slow_queries_increment FROM diff --git a/mysql-test/main/log_tables.test b/mysql-test/main/log_tables.test index 1169f2b094c..88211efa111 100644 --- a/mysql-test/main/log_tables.test +++ b/mysql-test/main/log_tables.test @@ -836,7 +836,9 @@ SET GLOBAL slow_query_log = @old_slow_query_log; --echo # Bug#21557 entries in the general query log truncated at 1000 characters. --echo # +--disable_cursor_protocol select CONNECTION_ID() into @thread_id; +--enable_cursor_protocol --disable_ps_protocol truncate table mysql.general_log; --enable_ps_protocol @@ -1006,9 +1008,12 @@ INSERT INTO t1 VALUES (3,3,3); INSERT INTO t1 VALUES (4,4,4); --disable_ps2_protocol +#Enable after fix MDEV-31522 +--disable_cursor_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; +--enable_cursor_protocol --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; diff --git a/mysql-test/main/long_unique_bugs.test b/mysql-test/main/long_unique_bugs.test index aa89a78e0bd..2f85328bda3 100644 --- a/mysql-test/main/long_unique_bugs.test +++ b/mysql-test/main/long_unique_bugs.test @@ -12,9 +12,11 @@ insert into t1 () values (),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(), (),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(), (),(),(),(); +--disable_cursor_protocol --disable_ps2_protocol select * into outfile 'load.data' from t1; --enable_ps2_protocol +--enable_cursor_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; @@ -226,9 +228,11 @@ drop table t1; --echo # CREATE TABLE t1 (data VARCHAR(4), unique(data) using hash) with system versioning; INSERT INTO t1 VALUES ('A'); +--disable_cursor_protocol --disable_ps2_protocol SELECT * INTO OUTFILE 'load.data' from t1; --enable_ps2_protocol +--enable_cursor_protocol --error ER_DUP_ENTRY LOAD DATA INFILE 'load.data' INTO TABLE t1; select * from t1; @@ -242,9 +246,11 @@ DROP TABLE t1; CREATE TABLE t1 (data VARCHAR(7961)) ENGINE=InnoDB; INSERT INTO t1 VALUES ('f'), ('o'), ('o'); +--disable_cursor_protocol --disable_ps2_protocol SELECT * INTO OUTFILE 'load.data' from t1; --enable_ps2_protocol +--enable_cursor_protocol ALTER IGNORE TABLE t1 ADD UNIQUE INDEX (data); SELECT * FROM t1; @@ -509,9 +515,11 @@ drop table t2; --echo # create table t1 (pk int primary key, f blob, unique(f)) engine=innodb; insert t1 values (1, null); +--disable_cursor_protocol --disable_ps2_protocol select * into outfile 't1.data' from t1; --enable_ps2_protocol +--enable_cursor_protocol load data infile 't1.data' replace into table t1; select * from t1; drop table t1; diff --git a/mysql-test/main/lowercase_table_qcache.test b/mysql-test/main/lowercase_table_qcache.test index b6047a98c74..ceff2719353 100644 --- a/mysql-test/main/lowercase_table_qcache.test +++ b/mysql-test/main/lowercase_table_qcache.test @@ -13,6 +13,7 @@ set LOCAL query_cache_type=ON; drop database if exists MySQLtesT; --enable_warnings +--disable_cursor_protocol create database MySQLtesT; create table MySQLtesT.t1 (a int); select * from MySQLtesT.t1; @@ -30,6 +31,7 @@ disable_result_log; select * from MySQL.db; enable_result_log; show status like "Qcache_queries_in_cache"; +--enable_cursor_protocol set GLOBAL query_cache_size=@save_query_cache_size; set GLOBAL query_cache_type=default; diff --git a/mysql-test/main/mdev-21101.test b/mysql-test/main/mdev-21101.test index 543b587c5e6..99a8c3006e5 100644 --- a/mysql-test/main/mdev-21101.test +++ b/mysql-test/main/mdev-21101.test @@ -10,12 +10,14 @@ # different connections simultaneously, to force queueing occurs. # Verify connections are intact, even if queueing time exceeds wait_timeout +--disable_cursor_protocol SELECT @@global.wait_timeout, @@global.thread_pool_max_threads, @@global.thread_pool_size, @@global.thread_pool_oversubscribe, @@global.thread_pool_stall_limit INTO @_wait_timeout,@_thread_pool_max_threads,@_thread_pool_size, @_thread_pool_oversubscribe,@_thread_pool_stall_limit; +--enable_cursor_protocol SET @@global.wait_timeout=1, @@global.thread_pool_max_threads=2, diff --git a/mysql-test/main/myisam_debug.test b/mysql-test/main/myisam_debug.test index fcb134c0400..3e73e0c7345 100644 --- a/mysql-test/main/myisam_debug.test +++ b/mysql-test/main/myisam_debug.test @@ -48,10 +48,12 @@ let $wait_condition= INFO = "INSERT INTO t1(id) SELECT id FROM t2"; --source include/wait_condition.inc +--disable_cursor_protocol SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'wait_in_enable_indexes' AND INFO = "INSERT INTO t1(id) SELECT id FROM t2" INTO @thread_id; +--enable_cursor_protocol KILL QUERY @thread_id; CHECK TABLE t1; diff --git a/mysql-test/main/mysqldump-max.test b/mysql-test/main/mysqldump-max.test index 49e54d542b8..6ff2f6733c7 100644 --- a/mysql-test/main/mysqldump-max.test +++ b/mysql-test/main/mysqldump-max.test @@ -81,8 +81,10 @@ drop table t6; # type to avoid Inno's column-number limits (~1000 columns) etc. # Here because it needs Inno-engine. +--disable_cursor_protocol SELECT @@global.default_storage_engine INTO @old_engine; SET GLOBAL default_storage_engine=InnoDB; +--enable_cursor_protocol --disable_query_log CREATE TABLE `t1` ( diff --git a/mysql-test/main/null.test b/mysql-test/main/null.test index 35ffb01d3c7..824be41739f 100644 --- a/mysql-test/main/null.test +++ b/mysql-test/main/null.test @@ -326,7 +326,10 @@ SELECT NOT NOT NULLIF(2,3); CREATE TABLE t1 (a YEAR(2)); INSERT INTO t1 VALUES (0); SELECT a,NULLIF(a,2000),NULLIF(2000,a) FROM t1; +# Enable after fix MDEV-31722 +--disable_cursor_protocol SELECT a,NULLIF(a,2001),NULLIF(2001,a) FROM t1; +--enable_cursor_protocol DROP TABLE t1; --echo # diff --git a/mysql-test/main/null_key.test b/mysql-test/main/null_key.test index 0759e99b524..e1a3784afb2 100644 --- a/mysql-test/main/null_key.test +++ b/mysql-test/main/null_key.test @@ -234,11 +234,13 @@ 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 +--disable_cursor_protocol SELECT SQL_CALC_FOUND_ROWS * FROM t1 LEFT JOIN t2 ON t1.a=t2.a LEFT JOIN t3 ON t2.b=t3.b; --disable_view_protocol SELECT FOUND_ROWS(); +--enable_cursor_protocol SHOW STATUS LIKE "handler_read%"; --enable_view_protocol --enable_ps2_protocol diff --git a/mysql-test/main/order_by.test b/mysql-test/main/order_by.test index 47ead9e9e5e..9165a2e5beb 100644 --- a/mysql-test/main/order_by.test +++ b/mysql-test/main/order_by.test @@ -832,7 +832,10 @@ eval set @tmp_tables_before = CAST(REPLACE('$q', 'Created_tmp_tables', '') AS UNSIGNED); --enable_query_log +#Enable after fix MDEV-31548 +--disable_cursor_protocol SELECT a FROM t1 IGNORE INDEX FOR GROUP BY (a, ab) GROUP BY a; +--enable_cursor_protocol # this query creates one temporary table in itself, which we are not # interested in. @@ -854,7 +857,10 @@ eval set @tmp_tables_before = CAST(REPLACE('$q', 'Created_tmp_tables', '') AS UNSIGNED); --enable_query_log +#Enable after fix MDEV-31548 +--disable_cursor_protocol SELECT a FROM t1 IGNORE INDEX FOR ORDER BY (a, ab) ORDER BY a; +--enable_cursor_protocol --disable_query_log --let $q = `show status like 'Created_tmp_tables';` @@ -1884,6 +1890,7 @@ insert into t1 analyze table t1; --enable_result_log +--disable_cursor_protocol --disable_view_protocol --disable_ps2_protocol explain @@ -1907,6 +1914,7 @@ select b, count(*) num_cnt from t1 show status like '%Handler_read%'; --enable_ps2_protocol --enable_view_protocol +--enable_cursor_protocol drop table t0, t1; diff --git a/mysql-test/main/order_by_pack_big.test b/mysql-test/main/order_by_pack_big.test index b83a5416e91..717027e3e5a 100644 --- a/mysql-test/main/order_by_pack_big.test +++ b/mysql-test/main/order_by_pack_big.test @@ -145,16 +145,20 @@ set sort_buffer_size= 2097152; --source include/analyze-format.inc eval ANALYZE FORMAT=JSON SELECT id, names, address FROM t3 ORDER BY names, address; flush status; +--disable_cursor_protocol --disable_ps2_protocol evalp SELECT id, names, address INTO OUTFILE '$file1' FROM t3 ORDER BY names, address; --enable_ps2_protocol +--enable_cursor_protocol --echo # Sort_merge_passes should be 0 show status like '%sort%'; +--disable_cursor_protocol --disable_ps2_protocol evalp SELECT id, names, address INTO OUTFILE '$file2' FROM t3 FORCE INDEX(idx) ORDER BY names, address; --enable_ps2_protocol +--enable_cursor_protocol diff_files $file1 $file2; @@ -171,9 +175,11 @@ set sort_buffer_size= 1097152; --source include/analyze-format.inc eval ANALYZE FORMAT=JSON SELECT id, names, address FROM t3 ORDER BY names, address; flush status; +--disable_cursor_protocol --disable_ps2_protocol evalp SELECT id, names, address INTO OUTFILE '$file1' FROM t3 ORDER BY names, address; --enable_ps2_protocol +--enable_cursor_protocol --echo # Sort_merge_passes should be 0 show status like '%sort%'; diff --git a/mysql-test/main/outfile.test b/mysql-test/main/outfile.test index 7f8f31bc748..f9bd76dcd95 100644 --- a/mysql-test/main/outfile.test +++ b/mysql-test/main/outfile.test @@ -21,29 +21,41 @@ drop table if exists t1; create table t1 (`a` blob); insert into t1 values("hello world"),("Hello mars"),(NULL); disable_query_log; +--disable_cursor_protocol eval select * into outfile "../../tmp/outfile-test.1" from t1; +--enable_cursor_protocol enable_query_log; select load_file(concat(@tmpdir,"/outfile-test.1")); disable_query_log; +--disable_cursor_protocol eval select * into dumpfile "../../tmp/outfile-test.2" from t1 limit 1; +--enable_cursor_protocol enable_query_log; select load_file(concat(@tmpdir,"/outfile-test.2")); disable_query_log; +--disable_cursor_protocol eval select * into dumpfile "../../tmp/outfile-test.3" from t1 where a is null; +--enable_cursor_protocol enable_query_log; select load_file(concat(@tmpdir,"/outfile-test.3")); # the following should give errors disable_query_log; +--disable_cursor_protocol --error ER_FILE_EXISTS_ERROR eval select * into outfile "../../tmp/outfile-test.1" from t1; +--enable_cursor_protocol +--disable_cursor_protocol --error ER_FILE_EXISTS_ERROR eval select * into dumpfile "../../tmp/outfile-test.2" from t1; +--enable_cursor_protocol +--disable_cursor_protocol --error ER_FILE_EXISTS_ERROR eval select * into dumpfile "../../tmp/outfile-test.3" from t1; +--enable_cursor_protocol enable_query_log; select load_file(concat(@tmpdir,"/outfile-test.not-exist")); --remove_file $MYSQLTEST_VARDIR/tmp/outfile-test.1 @@ -53,7 +65,9 @@ drop table t1; # Bug#8191 SELECT INTO OUTFILE insists on FROM clause disable_query_log; +--disable_cursor_protocol eval select 1 into outfile "../../tmp/outfile-test.4"; +--enable_cursor_protocol enable_query_log; select load_file(concat(@tmpdir,"/outfile-test.4")); --remove_file $MYSQLTEST_VARDIR/tmp/outfile-test.4 @@ -76,17 +90,21 @@ DROP TABLE t1; # Bug#13202 SELECT * INTO OUTFILE ... FROM information_schema.schemata now fails # disable_query_log; +--disable_cursor_protocol eval SELECT * INTO OUTFILE "../../tmp/outfile-test.4" FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' FROM information_schema.schemata LIMIT 0, 5; +--enable_cursor_protocol # enable_query_log; --remove_file $MYSQLTEST_VARDIR/tmp/outfile-test.4 use information_schema; # disable_query_log; +--disable_cursor_protocol eval SELECT * INTO OUTFILE "../../tmp/outfile-test.4" FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' FROM schemata LIMIT 0, 5; +--enable_cursor_protocol enable_query_log; --remove_file $MYSQLTEST_VARDIR/tmp/outfile-test.4 use test; @@ -97,8 +115,10 @@ use test; # It should not be possible to write to a file outside of vardir create table t1(a int); --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +--disable_cursor_protocol --error ER_OPTION_PREVENTS_STATEMENT eval select * into outfile "$MYSQL_TEST_DIR/outfile-test1" from t1; +--enable_cursor_protocol drop table t1; # @@ -110,6 +130,7 @@ create user user_1@localhost; grant all on mysqltest.* to user_1@localhost; connect (con28181_1,localhost,user_1,,mysqltest); +--disable_cursor_protocol --error ER_ACCESS_DENIED_ERROR eval select schema_name into outfile "../../tmp/outfile-test.4" @@ -117,18 +138,21 @@ fields terminated by ',' optionally enclosed by '"' lines terminated by '\n' from information_schema.schemata where schema_name like 'mysqltest'; +--enable_cursor_protocol connection default; disconnect con28181_1; grant file on *.* to user_1@localhost; connect (con28181_2,localhost,user_1,,mysqltest); +--disable_cursor_protocol eval select schema_name into outfile "../../tmp/outfile-test.4" fields terminated by ',' optionally enclosed by '"' lines terminated by '\n' from information_schema.schemata where schema_name like 'mysqltest'; +--enable_cursor_protocol connection default; disconnect con28181_2; diff --git a/mysql-test/main/outfile_loaddata.test b/mysql-test/main/outfile_loaddata.test index 64a40714b5a..f308aadecc4 100644 --- a/mysql-test/main/outfile_loaddata.test +++ b/mysql-test/main/outfile_loaddata.test @@ -15,7 +15,9 @@ INSERT INTO t1 VALUES (101, 202, '-r-', '=raker='); --echo # $clauses, warning: --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_cursor_protocol --eval SELECT $fields INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/bug31663.txt' $clauses FROM t1 +--enable_cursor_protocol --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --eval SELECT LOAD_FILE('$MYSQLTEST_VARDIR/tmp/bug31663.txt') as exp --eval CREATE TABLE t2 SELECT $fields FROM t1 @@ -30,7 +32,9 @@ DROP TABLE t2; --echo # Only numeric fields, $clauses, no warnings: --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_cursor_protocol --eval SELECT $fields INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/bug31663.txt' $clauses FROM t1 +--enable_cursor_protocol --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --eval SELECT LOAD_FILE('$MYSQLTEST_VARDIR/tmp/bug31663.txt') as exp --eval CREATE TABLE t2 SELECT $fields FROM t1 @@ -45,7 +49,9 @@ DROP TABLE t2; --echo # $clauses, warning: --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_cursor_protocol --eval SELECT $fields INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/bug31663.txt' $clauses FROM t1 +--enable_cursor_protocol --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --eval SELECT LOAD_FILE('$MYSQLTEST_VARDIR/tmp/bug31663.txt') as exp --eval CREATE TABLE t2 SELECT $fields FROM t1 @@ -60,7 +66,9 @@ DROP TABLE t2; --echo # $clauses, warning: --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_cursor_protocol --eval SELECT $fields INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/bug31663.txt' $clauses FROM t1 +--enable_cursor_protocol --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --eval SELECT LOAD_FILE('$MYSQLTEST_VARDIR/tmp/bug31663.txt') as exp --eval CREATE TABLE t2 SELECT $fields FROM t1 @@ -75,7 +83,9 @@ DROP TABLE t2; --echo # Only string fields, $clauses, no warnings: --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_cursor_protocol --eval SELECT $fields INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/bug31663.txt' $clauses FROM t1 +--enable_cursor_protocol --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --eval SELECT LOAD_FILE('$MYSQLTEST_VARDIR/tmp/bug31663.txt') as exp --eval CREATE TABLE t2 SELECT $fields FROM t1 @@ -98,7 +108,9 @@ SELECT HEX(c1) FROM t1; --let $file=$MYSQLTEST_VARDIR/tmp/bug32533.txt --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_cursor_protocol --eval SELECT * INTO OUTFILE '$file' FIELDS ENCLOSED BY 0xC3 FROM t1 +--enable_cursor_protocol TRUNCATE t1; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR @@ -133,13 +145,17 @@ INSERT INTO t1 VALUES (1, 'ABC-ÐБВ', 'DEF-ÂÃÄ'), (2, NULL, NULL); --echo # Error on multi-character ENCLOSED/ESCAPED BY --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_cursor_protocol --error 1083 --eval SELECT * FROM t1 INTO OUTFILE '$file' FIELDS ENCLOSED BY '12345' +--enable_cursor_protocol --remove_file $file --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_cursor_protocol --error 1083 --eval SELECT * FROM t1 INTO OUTFILE '$file' FIELDS ESCAPED BY '12345' +--enable_cursor_protocol --remove_file $file @@ -147,21 +163,27 @@ INSERT INTO t1 VALUES (1, 'ABC-ÐБВ', 'DEF-ÂÃÄ'), (2, NULL, NULL); --echo # LOAD DATA rises error or has unpredictable result -- to be fixed later --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_cursor_protocol --eval SELECT * FROM t1 INTO OUTFILE '$file' FIELDS ENCLOSED BY 'ÑŠ' +--enable_cursor_protocol --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --error 1083 # backward compatibility --eval LOAD DATA INFILE '$file' INTO TABLE t2 CHARACTER SET binary FIELDS ENCLOSED BY 'ÑŠ' --remove_file $file --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_cursor_protocol --eval SELECT * FROM t1 INTO OUTFILE '$file' FIELDS ESCAPED BY 'ÑŠ' +--enable_cursor_protocol --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --error 1083 # backward compatibility --eval LOAD DATA INFILE '$file' INTO TABLE t2 CHARACTER SET binary FIELDS ESCAPED BY 'ÑŠ' --remove_file $file --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_cursor_protocol --eval SELECT * FROM t1 INTO OUTFILE '$file' FIELDS TERMINATED BY 'ÑŠ' +--enable_cursor_protocol --echo ################################################## --cat_file $file --echo ################################################## @@ -174,7 +196,9 @@ SELECT * FROM t1; SELECT * FROM t2; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_cursor_protocol --eval SELECT * FROM t1 INTO OUTFILE '$file' LINES STARTING BY 'ÑŠ' +--enable_cursor_protocol --echo ################################################## --cat_file $file --echo ################################################## @@ -185,7 +209,9 @@ TRUNCATE t2; SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_cursor_protocol --eval SELECT * FROM t1 INTO OUTFILE '$file' LINES TERMINATED BY 'ÑŠ' +--enable_cursor_protocol --echo ################################################## --cat_file $file --echo ################################################## @@ -200,7 +226,9 @@ SELECT * FROM t2; --echo # Default (binary) charset: --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_cursor_protocol --eval SELECT * INTO OUTFILE '$file' FROM t1 +--enable_cursor_protocol --echo ################################################## --cat_file $file --echo ################################################## @@ -214,7 +242,9 @@ SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c; --echo # latin1 charset (INTO OUTFILE warning is expected): --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_cursor_protocol --eval SELECT * INTO OUTFILE '$file' CHARACTER SET latin1 FROM t1 +--enable_cursor_protocol --echo ################################################## --cat_file $file --echo ################################################## @@ -228,7 +258,9 @@ SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c; --echo # KOI8-R charset (INTO OUTFILE warning is expected): --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_cursor_protocol --eval SELECT * INTO OUTFILE '$file' CHARACTER SET koi8r FROM t1 +--enable_cursor_protocol --echo ################################################## --cat_file $file --echo ################################################## @@ -242,7 +274,9 @@ SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c; --echo # UTF-8 charset: --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_cursor_protocol --eval SELECT * INTO OUTFILE '$file' CHARACTER SET utf8 FROM t1 +--enable_cursor_protocol --echo ################################################## --cat_file $file --echo ################################################## @@ -274,7 +308,9 @@ let $length= 800; --eval INSERT INTO t1 VALUES (REPEAT('.', $length)) --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_cursor_protocol --eval SELECT * INTO OUTFILE $file CHARACTER SET latin1 FROM t1 +--enable_cursor_protocol --echo # should be greater than $length --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR diff --git a/mysql-test/main/parser.test b/mysql-test/main/parser.test index 8565667acdb..008e0c74bc1 100644 --- a/mysql-test/main/parser.test +++ b/mysql-test/main/parser.test @@ -896,6 +896,7 @@ SELECT 1 FROM t1 UNION SELECT 1 FROM t1 ORDER BY 1 LIMIT 1 FOR UPDATE; --echo # "INTO" clause tests +--disable_cursor_protocol SELECT 1 FROM t1 INTO @var17727401; SELECT 1 FROM DUAL INTO @var17727401; SELECT 1 INTO @var17727401; @@ -940,6 +941,7 @@ SELECT 1 INTO @var17727401 FROM t1 PROCEDURE ANALYSE(); --error ER_PARSE_ERROR SELECT 1 FROM t1 PROCEDURE ANALYSE() INTO @var17727401; +--enable_cursor_protocol --echo # ORDER and LIMIT clause combinations diff --git a/mysql-test/main/partition.test b/mysql-test/main/partition.test index cc23286b794..b3ea7f5c274 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_cursor_protocol --disable_ps2_protocol FLUSH STATUS; SELECT c1 FROM t1 WHERE (c1 > 10 AND c1 < 13) OR (c1 > 17 AND c1 < 20); @@ -486,6 +487,7 @@ 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 +--enable_cursor_protocol # Bug#37329 Range scan on partitioned tables shows higher Handler_read_next # (marked as duplicate of Bug#35931) @@ -507,6 +509,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_cursor_protocol --disable_ps2_protocol FLUSH STATUS; SELECT c1 FROM t1 WHERE (c1 > 2 AND c1 < 5); @@ -531,6 +534,7 @@ SELECT c1 FROM t2 WHERE (c1 > 12 AND c1 < 15); SHOW STATUS LIKE 'Handler_read_%'; DROP TABLE t1,t2; --enable_ps2_protocol +--enable_cursor_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_csv.test b/mysql-test/main/partition_csv.test index 44013dd4b0a..2057d8cac3b 100644 --- a/mysql-test/main/partition_csv.test +++ b/mysql-test/main/partition_csv.test @@ -57,7 +57,9 @@ ALTER TABLE gl_partitioned PARTITION BY HASH (thread_id) PARTITIONS 10; ALTER TABLE general_log RENAME TO gl_nonpartitioned; ALTER TABLE gl_partitioned RENAME TO general_log; +--disable_cursor_protocol SELECT @@global.log_output INTO @old_glo; +--enable_cursor_protocol SET GLOBAL log_output='table'; SET GLOBAL general_log =1; diff --git a/mysql-test/main/partition_explicit_prune.test b/mysql-test/main/partition_explicit_prune.test index 610bdf4435b..3136cab4443 100644 --- a/mysql-test/main/partition_explicit_prune.test +++ b/mysql-test/main/partition_explicit_prune.test @@ -9,6 +9,7 @@ WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; --echo # --echo # Bug#13559657: PARTITION SELECTION DOES NOT WORK WITH VIEWS --echo # +--disable_cursor_protocol --disable_view_protocol --disable_ps2_protocol CREATE TABLE t1 (a int) @@ -623,6 +624,7 @@ SELECT * FROM t3 PARTITION (pNeg); DROP TABLE t1, t2, t3; --enable_ps2_protocol --enable_view_protocol +--enable_cursor_protocol --echo # Test from superseeded WL# 2682 # Partition select tests. # diff --git a/mysql-test/main/plugin.test b/mysql-test/main/plugin.test index 9151a6e905c..6d03f0fd8f8 100644 --- a/mysql-test/main/plugin.test +++ b/mysql-test/main/plugin.test @@ -87,7 +87,9 @@ UNINSTALL PLUGIN example; # INSTALL PLUGIN example SONAME 'ha_example'; +--disable_cursor_protocol select @@session.sql_mode into @old_sql_mode; +--enable_cursor_protocol # first, try normal sql_mode (no error, send OK) set session sql_mode=''; diff --git a/mysql-test/main/processlist.test b/mysql-test/main/processlist.test index 7e60f196f65..1d3827fd7a2 100644 --- a/mysql-test/main/processlist.test +++ b/mysql-test/main/processlist.test @@ -66,7 +66,10 @@ set debug_sync='reset'; SET NAMES utf8; --vertical_results +#Check after fix MDEV-31514 +--disable_cursor_protocol SELECT INFO, INFO_BINARY, 'xxx😎yyy' AS utf8mb4_string FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO LIKE '%xxx%yyy%'; +--enable_cursor_protocol --horizontal_results --echo # diff --git a/mysql-test/main/ps.test b/mysql-test/main/ps.test index 99a479f854c..160c471154b 100644 --- a/mysql-test/main/ps.test +++ b/mysql-test/main/ps.test @@ -2002,7 +2002,10 @@ prepare stmt from "create view v1 as select * from `t1` `b`"; prepare stmt from "select ?"; set @arg= 123456789.987654321; +#Enable after fix MDEV-31495 +--disable_cursor_protocol select @arg; +--enable_cursor_protocol execute stmt using @arg; set @arg= "string"; select @arg; @@ -2011,7 +2014,10 @@ set @arg= 123456; select @arg; execute stmt using @arg; set @arg= cast(-12345.54321 as decimal(20, 10)); +#Enable after fix MDEV-31495 +--disable_cursor_protocol select @arg; +--enable_cursor_protocol execute stmt using @arg; deallocate prepare stmt; @@ -3335,6 +3341,8 @@ SELECT @x_str_1, @x_int_1, @x_int_2, @x_int_3; --echo --echo -- Testing decs... +#Enable after fix MDEV-31495 +--disable_cursor_protocol --echo EXECUTE stmt_dec USING @x_int_1, @x_dec_1, @x_dec_2, @x_dec_3; SELECT @x_int_1, @x_dec_1, @x_dec_2, @x_dec_3; @@ -3342,6 +3350,7 @@ SELECT @x_int_1, @x_dec_1, @x_dec_2, @x_dec_3; --echo EXECUTE stmt_dec USING @x_int_1, @x_dec_1, @x_dec_2, @x_dec_3; SELECT @x_int_1, @x_dec_1, @x_dec_2, @x_dec_3; +--enable_cursor_protocol --echo DEALLOCATE PREPARE stmt_str; @@ -3574,7 +3583,9 @@ execute st; show status like '%Handler_read%'; flush status; --disable_ps2_protocol +--disable_cursor_protocol select * from t1 use index() where a=3; +--enable_cursor_protocol show status like '%Handler_read%'; --enable_ps2_protocol flush status; diff --git a/mysql-test/main/query_cache.test b/mysql-test/main/query_cache.test index 88d226cdcc4..2a9f34c7cf1 100644 --- a/mysql-test/main/query_cache.test +++ b/mysql-test/main/query_cache.test @@ -21,6 +21,7 @@ SET LOCAL query_cache_type= ON; # Reset query cache variables. +--disable_cursor_protocol flush query cache; # This crashed in some versions flush query cache; # This crashed in some versions reset query cache; @@ -1802,6 +1803,7 @@ SELECT foo( LAST_INSERT_ID() ) from t1; show status like "Qcache_queries_in_cache"; DROP FUNCTION foo; drop table t1; +--enable_cursor_protocol --echo # --echo # MDEV-33861: main.query_cache fails with embedded after diff --git a/mysql-test/main/query_cache_debug.test b/mysql-test/main/query_cache_debug.test index 5942e6f42aa..d9c6cb1c94f 100644 --- a/mysql-test/main/query_cache_debug.test +++ b/mysql-test/main/query_cache_debug.test @@ -94,7 +94,9 @@ connection con1; --reap SHOW STATUS LIKE "Qcache_queries_in_cache"; --echo # Test that it's cacheable +--disable_cursor_protocol SELECT * FROM t1; +--enable_cursor_protocol SHOW STATUS LIKE "Qcache_queries_in_cache"; disconnect con1; diff --git a/mysql-test/main/query_cache_innodb.test b/mysql-test/main/query_cache_innodb.test index 7ac96220c11..143cc5ee6d6 100644 --- a/mysql-test/main/query_cache_innodb.test +++ b/mysql-test/main/query_cache_innodb.test @@ -20,7 +20,9 @@ create table t2 ( t2id int unsigned, id int unsigned, primary key(t2id, id), for --disable_view_protocol insert into t1 values (1); insert into t2 values (1,1); +--disable_cursor_protocol select * from t2; +--enable_cursor_protocol show status like "Qcache_queries_in_cache"; delete from t1; @@ -41,7 +43,9 @@ create table `t2$Ñ—` ( t2id int unsigned, id int unsigned, primary key(t2id, id) insert into `t1$Ñ—` values (1); insert into `t2$Ñ—`values (1,1); +--disable_cursor_protocol select * from `t2$Ñ—`; +--enable_cursor_protocol show status like "Qcache_queries_in_cache"; delete from `t1$Ñ—`; @@ -63,7 +67,9 @@ create table `#mysql50#t-2` ( t2id int unsigned, id int unsigned, primary key(t2 insert into `#mysql50#t-1` values (1); insert into `#mysql50#t-2`values (1,1); +--disable_cursor_protocol select * from `#mysql50#t-2`; +--enable_cursor_protocol show status like "Qcache_queries_in_cache"; delete from `#mysql50#t-1`; diff --git a/mysql-test/main/query_cache_merge.test b/mysql-test/main/query_cache_merge.test index c3267d628b9..bca3fb352d1 100644 --- a/mysql-test/main/query_cache_merge.test +++ b/mysql-test/main/query_cache_merge.test @@ -40,6 +40,7 @@ while ($1) # --disable_ps2_protocol --disable_view_protocol +--disable_cursor_protocol set @save_table_definition_cache= @@global.table_definition_cache; set @@global.table_definition_cache=512; create table t00 (a int) engine=MERGE UNION=(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90,t91,t92,t93,t94,t95,t96,t97,t98,t99,t100,t101,t102,t103,t104,t105,t106,t107,t108,t109,t110,t111,t112,t113,t114,t115,t116,t117,t118,t119,t120,t121,t122,t123,t124,t125,t126,t127,t128,t129,t130,t131,t132,t133,t134,t135,t136,t137,t138,t139,t140,t141,t142,t143,t144,t145,t146,t147,t148,t149,t150,t151,t152,t153,t154,t155,t156,t157,t158,t159,t160,t161,t162,t163,t164,t165,t166,t167,t168,t169,t170,t171,t172,t173,t174,t175,t176,t177,t178,t179,t180,t181,t182,t183,t184,t185,t186,t187,t188,t189,t190,t191,t192,t193,t194,t195,t196,t197,t198,t199,t200,t201,t202,t203,t204,t205,t206,t207,t208,t209,t210,t211,t212,t213,t214,t215,t216,t217,t218,t219,t220,t221,t222,t223,t224,t225,t226,t227,t228,t229,t230,t231,t232,t233,t234,t235,t236,t237,t238,t239,t240,t241,t242,t243,t244,t245,t246,t247,t248,t249,t250,t251,t252,t253,t254,t255,t256,t257) INSERT_METHOD=FIRST; @@ -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_cursor_protocol --enable_view_protocol --enable_ps2_protocol @@ -88,8 +90,10 @@ eval CREATE TABLE t0 (a INT) ENGINE=MERGE UNION($str); SET GLOBAL query_cache_size = 1048576; FLUSH STATUS; --disable_view_protocol +--disable_cursor_protocol SELECT a FROM t0 WHERE a = 1; SHOW STATUS LIKE "Qcache_queries_in_cache"; +--enable_cursor_protocol --enable_view_protocol let $c= 255; diff --git a/mysql-test/main/query_cache_notembedded.test b/mysql-test/main/query_cache_notembedded.test index 5f97dc5c00d..73fc4340bf1 100644 --- a/mysql-test/main/query_cache_notembedded.test +++ b/mysql-test/main/query_cache_notembedded.test @@ -26,6 +26,7 @@ drop table if exists t1, t2, t3, t11, t21; # # FLUSH QUERY CACHE # +--disable_cursor_protocol create table t1 (a int not null); insert into t1 values (1),(2),(3); create table t2 (a int not null); @@ -85,6 +86,7 @@ flush query cache; show status like "Qcache_total_blocks"; show status like "Qcache_free_blocks"; drop table t1, t2, t3, t11, t21; +--enable_cursor_protocol # # do not use QC if tables locked (Bug#12385) @@ -114,6 +116,7 @@ disconnect root2; # improved to also test Bug#3583 and Bug#12990 # --disable_ps2_protocol +--disable_cursor_protocol flush query cache; reset query cache; flush status; @@ -186,6 +189,7 @@ call f1(); call f3(); call f3(); call f1(); +--enable_cursor_protocol drop procedure f1; drop procedure f2; @@ -248,6 +252,7 @@ SET @@global.log_bin_trust_function_creators = @old_log_bin_trust_function_creat # # Bug #30269 Query cache eats memory # +--disable_cursor_protocol --disable_warnings DROP DATABASE IF EXISTS bug30269; --enable_warnings @@ -269,6 +274,7 @@ SELECT id FROM test1 WHERE id>2; show status like 'Qcache_queries_in_cache'; SELECT id FROM view1 WHERE id>2; show status like 'Qcache_queries_in_cache'; +--enable_cursor_protocol connection default; USE test; diff --git a/mysql-test/main/query_cache_with_views.test b/mysql-test/main/query_cache_with_views.test index 6740c70883e..c1e3ed96cd3 100644 --- a/mysql-test/main/query_cache_with_views.test +++ b/mysql-test/main/query_cache_with_views.test @@ -18,6 +18,7 @@ set GLOBAL query_cache_size=1355776; flush status; create table t1 (a int, b int); +--disable_cursor_protocol # queries with following views should not be in query cache create view v1 (c,d) as select sql_no_cache a,b from t1; create view v2 (c,d) as select a+rand(),b from t1; @@ -66,6 +67,7 @@ show status like "Qcache_hits"; drop view v1; set query_cache_type=default; --enable_ps2_protocol +--enable_cursor_protocol drop table t1; @@ -110,6 +112,7 @@ drop table t1; # # BUG#15119: returning temptable view from the query cache. # +--disable_cursor_protocol --disable_ps2_protocol flush status; create table t1 (a int, b int); @@ -137,6 +140,7 @@ show status like "Qcache_inserts"; show status like "Qcache_hits"; drop table t1; --enable_ps2_protocol +--enable_cursor_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_vs_index_merge.test b/mysql-test/main/range_vs_index_merge.test index c71811fa74d..6b480e327dc 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_cursor_protocol --disable_ps2_protocol --disable_view_protocol --replace_column 9 # @@ -761,6 +762,7 @@ ORDER BY Population LIMIT 5; SHOW STATUS LIKE 'Handler_read_%'; --enable_view_protocol --enable_ps2_protocol +--enable_cursor_protocol set optimizer_switch=@save_optimizer_switch; diff --git a/mysql-test/main/select.test b/mysql-test/main/select.test index 14035f81590..ecded18dc76 100644 --- a/mysql-test/main/select.test +++ b/mysql-test/main/select.test @@ -1845,10 +1845,15 @@ select wss_type from t1 where wss_type ='102935229216544104'; select wss_type from t1 where wss_type ='102935229216544093'; select wss_type from t1 where wss_type =102935229216544093; drop table t1; +--disable_cursor_protocol select 1+2,"aaaa",3.13*2.0 into @a,@b,@c; +--enable_cursor_protocol select @a; select @b; +#Enable after fix MDEV-31495 +--disable_cursor_protocol select @c; +--enable_cursor_protocol # # Test of removing redundant braces in the FROM part @@ -2198,7 +2203,10 @@ INSERT INTO t1 (SELECT * FROM t1 WHERE a = 50 AND b = 3); select found_rows(); SELECT * FROM t1; +# Check after fix MDEV-31522 +--disable_cursor_protocol select count(*) from t1; +--enable_cursor_protocol select found_rows(); select count(*) from t1 limit 2,3; select found_rows(); @@ -3727,6 +3735,7 @@ DROP TABLE t1; # # Bug #32942 now() - interval '7200' second is NOT pre-calculated, causing "full table scan" # +--disable_cursor_protocol --disable_ps2_protocol --disable_view_protocol CREATE TABLE t1 (a INT, b INT); @@ -3744,6 +3753,7 @@ SHOW STATUS LIKE 'Handler_read%'; DROP TABLE t1, t2; --enable_view_protocol --enable_ps2_protocol +--enable_cursor_protocol # # Bug#40953 SELECT query throws "ERROR 1062 (23000): Duplicate entry..." error @@ -3820,10 +3830,12 @@ CREATE TABLE t1(a INT); INSERT INTO t1 VALUES (2),(3); --echo # Should not crash +--disable_cursor_protocol --error ER_SUBQUERY_NO_1_ROW SELECT 1 FROM t1 WHERE a <> 1 AND NOT ROW(1,a) <=> ROW(1,(SELECT 1 FROM t1)) INTO @var0; +--enable_cursor_protocol DROP TABLE t1; diff --git a/mysql-test/main/select_found.test b/mysql-test/main/select_found.test index dac16fdb727..abbfd6cc3ef 100644 --- a/mysql-test/main/select_found.test +++ b/mysql-test/main/select_found.test @@ -178,14 +178,19 @@ DROP TABLE t1; # # Bug #6089: queries which don't use any tables # - +# Check after fix MDEV-31522 +--disable_cursor_protocol SELECT 'foo'; +--enable_cursor_protocol SELECT FOUND_ROWS(); SELECT SQL_CALC_FOUND_ROWS 'foo'; SELECT FOUND_ROWS(); SELECT SQL_CALC_FOUND_ROWS 'foo' limit 0; +# Check after fix MDEV-31522 +--disable_cursor_protocol SELECT FOUND_ROWS(); SELECT FOUND_ROWS(); +--enable_cursor_protocol SELECT SQL_CALC_FOUND_ROWS 'foo' UNION SELECT 'bar' LIMIT 0; SELECT FOUND_ROWS(); diff --git a/mysql-test/main/shutdown_not_windows.test b/mysql-test/main/shutdown_not_windows.test index 43063ced494..9e5246cc3f8 100644 --- a/mysql-test/main/shutdown_not_windows.test +++ b/mysql-test/main/shutdown_not_windows.test @@ -9,7 +9,9 @@ source include/have_debug.inc; call mtr.add_suppression('Thread .* did not exit'); set @old_dbug=@@global.debug_dbug; set global debug_dbug='+d,CONNECT_wait'; +--disable_cursor_protocol select variable_value into @cons from information_schema.global_status where variable_name='connections'; +--enable_cursor_protocol exec $MYSQL -e 'select sleep(3600)' >/dev/null 2>&1 &; let $wait_condition= select variable_value>@cons from information_schema.global_status where variable_name='connections'; source include/wait_condition.inc; diff --git a/mysql-test/main/single_delete_update.test b/mysql-test/main/single_delete_update.test index 0f2dc189e94..49a1b6b758d 100644 --- a/mysql-test/main/single_delete_update.test +++ b/mysql-test/main/single_delete_update.test @@ -12,6 +12,7 @@ --echo # limit efficiently --echo # +--disable_cursor_protocol CREATE TABLE t1 (i INT); INSERT INTO t1 VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19), (20),(21),(22),(23),(24),(25); @@ -457,3 +458,4 @@ SELECT * FROM t2 WHERE c = 10 ORDER BY a DESC, b DESC; DROP TABLE t1, t2; --enable_ps2_protocol +--enable_cursor_protocol diff --git a/mysql-test/main/sp-error.test b/mysql-test/main/sp-error.test index 800a9b503b6..c471ffae99f 100644 --- a/mysql-test/main/sp-error.test +++ b/mysql-test/main/sp-error.test @@ -11,7 +11,9 @@ drop table if exists t1, t2; --disable_ps2_protocol # Backup the mysql.proc table --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_cursor_protocol eval SELECT * FROM mysql.proc INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/proc.txt'; +--enable_cursor_protocol --enable_ps2_protocol # Make sure we don't have any procedures left. diff --git a/mysql-test/main/sp-no-valgrind.test b/mysql-test/main/sp-no-valgrind.test index 6bacc7b150c..10a238f9871 100644 --- a/mysql-test/main/sp-no-valgrind.test +++ b/mysql-test/main/sp-no-valgrind.test @@ -5,18 +5,24 @@ --echo # Warmup round, this might allocate some memory for session variable --echo # and the output +--disable_cursor_protocol SELECT VARIABLE_VALUE into @global_mem_used FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='MEMORY_USED'; SELECT VARIABLE_VALUE into @local_mem_used FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='MEMORY_USED'; +--enable_cursor_protocol CREATE PROCEDURE sp0() SELECT 1; SHOW CREATE PROCEDURE sp0; DROP PROCEDURE sp0; #Check that CREATE/SHOW does not use memory in caches. +--disable_cursor_protocol SELECT VARIABLE_VALUE into @global_mem_used FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='MEMORY_USED'; SELECT VARIABLE_VALUE into @local_mem_used FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='MEMORY_USED'; +--enable_cursor_protocol CREATE PROCEDURE sp1() SELECT 1; SHOW CREATE PROCEDURE sp1; +--disable_cursor_protocol SELECT VARIABLE_VALUE-@local_mem_used FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='MEMORY_USED'; +--enable_cursor_protocol # FIXME: MDEV-26754 main.sp test fails for embedded server #SELECT VARIABLE_VALUE-@global_mem_used FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='MEMORY_USED'; DROP PROCEDURE sp1; diff --git a/mysql-test/main/sp.test b/mysql-test/main/sp.test index d417bc636d4..c1e107b69e1 100644 --- a/mysql-test/main/sp.test +++ b/mysql-test/main/sp.test @@ -3019,8 +3019,10 @@ create procedure bug5251() begin end| +--disable_cursor_protocol select created into @c1 from mysql.proc where db='test' and name='bug5251'| +--enable_cursor_protocol --sleep 2 alter procedure bug5251 comment 'foobar'| select count(*) from mysql.proc @@ -8256,12 +8258,16 @@ drop procedure if exists p; --enable_warnings set @old_mode= @@sql_mode; set @@sql_mode= cast(pow(2,32)-1 as unsigned integer); +--disable_cursor_protocol select @@sql_mode into @full_mode; +--enable_cursor_protocol create procedure p() as begin end; call p(); set @@sql_mode= @old_mode; # Rename SQL modes that differ in name between the server and the table definition. +--disable_cursor_protocol select replace(@full_mode, 'ALLOW_INVALID_DATES', 'INVALID_DATES') into @full_mode; +--enable_cursor_protocol select name from mysql.proc where name = 'p' and sql_mode = @full_mode; drop procedure p; diff --git a/mysql-test/main/sp_trans.test b/mysql-test/main/sp_trans.test index b991cd49f70..bb71c195a08 100644 --- a/mysql-test/main/sp_trans.test +++ b/mysql-test/main/sp_trans.test @@ -610,9 +610,11 @@ drop table t3| # BUG#11758414: Default default_storage_engine not honored when set # from within a stored procedure # +--disable_cursor_protocol SELECT @@GLOBAL.default_storage_engine INTO @old_engine| SET @@GLOBAL.default_storage_engine=InnoDB| SET @@SESSION.default_storage_engine=InnoDB| +--enable_cursor_protocol # show defaults at define-time SHOW GLOBAL VARIABLES LIKE 'default_storage_engine'| SHOW SESSION VARIABLES LIKE 'default_storage_engine'| diff --git a/mysql-test/main/statistics.test b/mysql-test/main/statistics.test index e6b300b5db2..c690d2bb3ca 100644 --- a/mysql-test/main/statistics.test +++ b/mysql-test/main/statistics.test @@ -318,6 +318,7 @@ SELECT * FROM mysql.column_stats; --sorted_result SELECT * FROM mysql.index_stats; +--disable_cursor_protocol --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --disable_ps2_protocol eval @@ -330,6 +331,7 @@ 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 +--enable_cursor_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 339e853f2fc..bf35890722e 100644 --- a/mysql-test/main/status2.test +++ b/mysql-test/main/status2.test @@ -27,6 +27,7 @@ CREATE EVENT ev1 ON SCHEDULE EVERY 1 SECOND CREATE TABLE t1 (c1 INT); CREATE TABLE t2 (c1 INT); +--disable_cursor_protocol --echo Assert Questions == 7 SHOW STATUS LIKE 'Questions'; SELECT testQuestion(); @@ -38,6 +39,7 @@ SHOW STATUS LIKE 'Questions'; SELECT 1; --echo Assert Questions == 13 SHOW STATUS LIKE 'Questions'; +--enable_cursor_protocol connect (con1,localhost,root,,); connection con1; SELECT 1; diff --git a/mysql-test/main/strict.test b/mysql-test/main/strict.test index 830f051a5f6..90afdd1c854 100644 --- a/mysql-test/main/strict.test +++ b/mysql-test/main/strict.test @@ -60,7 +60,10 @@ INSERT INTO t1 VALUES ('2004-2-30'); set @@sql_mode='ansi,traditional'; INSERT IGNORE INTO t1 VALUES('2004-02-29'),('2004-13-15'),('0000-00-00'); +#Enable after fix MDEV-31516 +--disable_cursor_protocol select * from t1; +--enable_cursor_protocol drop table t1; # Test difference in behaviour with InnoDB and MyISAM tables diff --git a/mysql-test/main/subselect.test b/mysql-test/main/subselect.test index 3f01e984125..89e7d18b2b2 100644 --- a/mysql-test/main/subselect.test +++ b/mysql-test/main/subselect.test @@ -71,10 +71,13 @@ SELECT ROW(1,2,3) = (SELECT 1,2,3); SELECT ROW(1,2,3) = (SELECT 1,2,1); SELECT ROW(1,2,3) < (SELECT 1,2,1); SELECT ROW(1,2,3) > (SELECT 1,2,1); +#enable after fix MDEV-31728 +--disable_cursor_protocol #enable after fix MDEV-28585 --disable_view_protocol SELECT ROW(1,2,3) = (SELECT 1,2,NULL); --enable_view_protocol +--enable_cursor_protocol SELECT (SELECT 1.5,2,'a') = ROW(1.5,2,'a') AS m; SELECT (SELECT 1.5,2,'a') = ROW(1.5,2,'b') AS m; SELECT (SELECT 1.5,2,'a') = ROW('1.5b',2,'b') AS m; @@ -507,8 +510,11 @@ select 1 IN (SELECT * from t1); select 3 IN (SELECT * from t1); select 10 IN (SELECT * from t1); select 1 > ALL (SELECT * from t1); +#enable after fix MDEV-31728 +--disable_cursor_protocol select 10 > ALL (SELECT * from t1); select 1 > ANY (SELECT * from t1); +--enable_cursor_protocol select 10 > ANY (SELECT * from t1); drop table t1; create table t1 (a varchar(20)); @@ -521,8 +527,11 @@ select 'A' IN (SELECT * from t1); select 'DEF' IN (SELECT * from t1); select 'XYZS' IN (SELECT * from t1); select 'A' > ALL (SELECT * from t1); +#enable after fix MDEV-31728 +--disable_cursor_protocol select 'XYZS' > ALL (SELECT * from t1); select 'A' > ANY (SELECT * from t1); +--enable_cursor_protocol select 'XYZS' > ANY (SELECT * from t1); drop table t1; create table t1 (a float); @@ -535,15 +544,21 @@ select 1.5 IN (SELECT * from t1); select 3.5 IN (SELECT * from t1); select 10.5 IN (SELECT * from t1); select 1.5 > ALL (SELECT * from t1); +#enable after fix MDEV-31728 +--disable_cursor_protocol select 10.5 > ALL (SELECT * from t1); select 1.5 > ANY (SELECT * from t1); +--enable_cursor_protocol update t1 set a=NULL where a=2.5; select 1.5 IN (SELECT * from t1); select 3.5 IN (SELECT * from t1); select 10.5 IN (SELECT * from t1); select 1.5 > ALL (SELECT * from t1); +#enable after fix MDEV-31728 +--disable_cursor_protocol select 10.5 > ALL (SELECT * from t1); select 1.5 > ANY (SELECT * from t1); +--enable_cursor_protocol select 10.5 > ANY (SELECT * from t1); --enable_view_protocol explain extended select (select a+1) from t1; @@ -1177,7 +1192,9 @@ let $outfile_rel= ../../tmp/subselect.out.file.1; --error 0,1 --remove_file $outfile_abs --enable_warnings +--disable_cursor_protocol eval select a, (select max(b) from t1) into outfile "$outfile_rel" from t1; +--enable_cursor_protocol delete from t1; eval load data infile "$outfile_rel" into table t1; --remove_file $outfile_abs @@ -3583,7 +3600,9 @@ DROP TABLE t1,t2; CREATE TABLE t1(a1 int); INSERT INTO t1 VALUES (1),(2); +--disable_cursor_protocol SELECT @@session.sql_mode INTO @old_sql_mode; +--enable_cursor_protocol SET SESSION sql_mode='ONLY_FULL_GROUP_BY'; ## First a simpler query, illustrating the transformation @@ -3621,7 +3640,9 @@ INSERT INTO t1 VALUES (1),(2); CREATE TABLE t2(a1 int); INSERT INTO t2 VALUES (3); +--disable_cursor_protocol SELECT @@session.sql_mode INTO @old_sql_mode; +--enable_cursor_protocol SET SESSION sql_mode='ONLY_FULL_GROUP_BY'; ## All these are subject to the transformation @@ -3642,7 +3663,9 @@ DROP TABLE t1, t2; create table t2(i int); insert into t2 values(0); +--disable_cursor_protocol SELECT @@session.sql_mode INTO @old_sql_mode; +--enable_cursor_protocol SET SESSION sql_mode='ONLY_FULL_GROUP_BY'; CREATE VIEW v1 AS @@ -5018,7 +5041,9 @@ INSERT INTO t1 VALUES (1),(2); CREATE TABLE t2(a1 int); INSERT INTO t2 VALUES (3); +--disable_cursor_protocol SELECT @@session.sql_mode INTO @old_sql_mode; +--enable_cursor_protocol SET SESSION sql_mode='ONLY_FULL_GROUP_BY'; ## All these are subject to the transformation @@ -5035,7 +5060,9 @@ DROP TABLE t1, t2; create table t2(i int); insert into t2 values(0); +--disable_cursor_protocol SELECT @@session.sql_mode INTO @old_sql_mode; +--enable_cursor_protocol SET SESSION sql_mode='ONLY_FULL_GROUP_BY'; CREATE VIEW v1 AS @@ -5427,8 +5454,10 @@ DROP TABLE t1,t2,t3; CREATE TABLE t1(a1 int); INSERT INTO t1 VALUES (1),(2); - + +--disable_cursor_protocol SELECT @@session.sql_mode INTO @old_sql_mode; +--enable_cursor_protocol SET SESSION sql_mode='ONLY_FULL_GROUP_BY'; ## First a simpler query, illustrating the transformation @@ -5855,10 +5884,12 @@ FROM t2 alias1, t1 alias2, t1 alias3; --disable_ps2_protocol flush status; +--disable_cursor_protocol SELECT (SELECT MIN(b) FROM t1, t2 WHERE b = a AND (b = alias1.b OR EXISTS (SELECT * FROM t3))) AS m FROM t2 alias1, t1 alias2, t1 alias3; +--enable_cursor_protocol show status like "subquery_cache%"; show status like '%Handler_read%'; @@ -5873,10 +5904,12 @@ FROM t2 alias1, t1 alias2, t1 alias3; flush status; +--disable_cursor_protocol SELECT (SELECT MIN(b) FROM t1, t2 WHERE b = a AND (b = alias1.b OR EXISTS (SELECT * FROM t3))) AS m FROM t2 alias1, t1 alias2, t1 alias3; +--enable_cursor_protocol show status like "subquery_cache%"; show status like '%Handler_read%'; diff --git a/mysql-test/main/subselect3.inc b/mysql-test/main/subselect3.inc index 2258456f355..6516c6a6ef0 100644 --- a/mysql-test/main/subselect3.inc +++ b/mysql-test/main/subselect3.inc @@ -57,9 +57,11 @@ select a, oref, a in ( create table t3 (a int); insert into t3 values (NULL), (NULL); flush status; +--disable_cursor_protocol --disable_ps2_protocol select a in (select max(ie) from t1 where oref=4 group by grp) from t3; --enable_ps2_protocol +--enable_cursor_protocol show status like 'Handler_read_rnd_next'; select ' ^ This must show 11' Z; @@ -96,7 +98,9 @@ select oref, a, a in (select a from t1 where oref=t2.oref) Z from t2; --disable_ps2_protocol flush status; +--disable_cursor_protocol select oref, a from t2 where a in (select a from t1 where oref=t2.oref); +--enable_cursor_protocol # This will only show access to t2: show status like '%Handler_read_rnd_next'; @@ -106,7 +110,9 @@ insert into t2 values (NULL, 0),(NULL, 0), (NULL, 0), (NULL, 0); set optimizer_switch='subquery_cache=off'; flush status; +--disable_cursor_protocol select oref, a, a in (select a from t1 where oref=t2.oref) Z from t2; +--enable_cursor_protocol 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; @@ -641,9 +647,11 @@ DROP TABLE t1, t2; create table t1 (a int, b decimal(13, 3)); insert into t1 values (1, 0.123); +--disable_cursor_protocol --disable_ps2_protocol select a, (select max(b) from t1) into outfile "../../tmp/subselect.out.file.1" from t1; --enable_ps2_protocol +--enable_cursor_protocol delete from t1; load data infile "../../tmp/subselect.out.file.1" into table t1; select * from t1; @@ -695,6 +703,8 @@ SELECT a AS x, ROW(11, 12) = (SELECT MAX(x), 12), ROW(11, 12) IN (SELECT MAX(x), DROP TABLE t1; +#enable after fix MDEV-31728 +--disable_cursor_protocol #enable after fix MDEV-28585 --disable_view_protocol --echo # both columns should be same @@ -705,6 +715,7 @@ SELECT ROW(1,2) = (SELECT NULL, 1), ROW(1,2) IN (SELECT NULL, 1); SELECT ROW(1,2) = (SELECT 1, 1), ROW(1,2) IN (SELECT 1, 1); SELECT ROW(1,2) = (SELECT 1, 2), ROW(1,2) IN (SELECT 1, 2); --enable_view_protocol +--enable_cursor_protocol # # Bug #37362 Crash in do_field_eq @@ -812,11 +823,13 @@ set @save_optimizer_switch2=@@optimizer_switch; set optimizer_switch='subquery_cache=off'; --disable_ps2_protocol +--disable_cursor_protocol --echo SELECT i1, i2 FROM t1 WHERE (i1, i2) NOT IN (SELECT i1, i2 FROM t2); +--enable_cursor_protocol --echo --echo # Check that the subquery only has to be evaluated once @@ -828,11 +841,13 @@ SHOW STATUS LIKE '%Handler_read_rnd_next'; INSERT INTO t1 VALUES (NULL, NULL); FLUSH STATUS; +--disable_cursor_protocol --echo SELECT i1, i2 FROM t1 WHERE (i1, i2) NOT IN (SELECT i1, i2 FROM t2); +--enable_cursor_protocol --echo --echo # Handler_read_rnd_next should be one more than baseline @@ -978,9 +993,11 @@ 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 +--disable_cursor_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'; +--enable_cursor_protocol set @save_max_heap_table_size=@@max_heap_table_size; set @@optimizer_switch=@save_optimizer_switch; drop table t0, t1; diff --git a/mysql-test/main/subselect_cache.test b/mysql-test/main/subselect_cache.test index 1af2825791e..6e63273cdcb 100644 --- a/mysql-test/main/subselect_cache.test +++ b/mysql-test/main/subselect_cache.test @@ -24,7 +24,9 @@ insert into t2 values (2,3),(3,4),(5,6),(4,1); --echo #single value subquery test (SELECT list) --disable_ps2_protocol flush status; +--disable_cursor_protocol select a, (select d from t2 where b=c) from t1; +--enable_cursor_protocol show status like "subquery_cache%"; show status like '%Handler_read%'; @@ -42,6 +44,7 @@ select a, (select d from t2 where b=c), (select d from t2 where b=c union select set optimizer_switch='subquery_cache=off'; flush status; +--disable_cursor_protocol select a, (select d from t2 where b=c) from t1; show status like "subquery_cache%"; @@ -172,6 +175,7 @@ select ta.a, tb.a from t1 ta left join t1 tb on (select d from t2 where tb.b=c); show status like "subquery_cache%"; show status like '%Handler_read%'; set optimizer_switch='subquery_cache=on'; +--enable_cursor_protocol --echo #single value subquery test (PS) prepare stmt1 from 'select a, (select d from t2 where b=c) + 1 from t1'; @@ -192,6 +196,7 @@ drop procedure p1; --echo #IN subquery test flush status; +--disable_cursor_protocol show status like "subquery_cache%"; select a, b , b in (select d from t2) as SUBS from t1; show status like "subquery_cache%"; @@ -342,6 +347,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_cursor_protocol --enable_ps2_protocol --echo #clean up @@ -426,12 +432,14 @@ DROP TABLE t1; flush status; CREATE TABLE t1 (a int); INSERT INTO t1 VALUES (2), (4), (1), (3); +--disable_cursor_protocol select a, a in (select a from t1) from t1 as ext; show status like "subquery_cache%"; select a, a in (select a from t1 where -1 < rand()) from t1 as ext; 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%"; +--enable_cursor_protocol drop table t1; --enable_ps2_protocol @@ -459,6 +467,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_cursor_protocol --disable_ps2_protocol --echo aggregate function as parameter of subquery set optimizer_switch='subquery_cache=off'; @@ -485,6 +494,7 @@ 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 +--enable_cursor_protocol drop table t1,t2; @@ -499,6 +509,7 @@ insert into t1 values create table t2 (pk int, a int, primary key(pk)); insert into t2 select a,a from t0; +--disable_cursor_protocol --disable_ps2_protocol set optimizer_switch='default,semijoin=on,materialization=on,subquery_cache=on'; flush status; @@ -532,6 +543,7 @@ select * from t1 where a in (select pk from t2); show status like "subquery_cache%"; show status like '%Handler_read%'; --enable_ps2_protocol +--enable_cursor_protocol drop table t0,t1,t2; diff --git a/mysql-test/main/subselect_exists2in_costmat.test b/mysql-test/main/subselect_exists2in_costmat.test index 5d5eeaee268..02e61e983b1 100644 --- a/mysql-test/main/subselect_exists2in_costmat.test +++ b/mysql-test/main/subselect_exists2in_costmat.test @@ -47,7 +47,9 @@ create index Language on CountryLanguage(Language); create index CityName on City(Name); alter table City change population population int(11) null default 0; +--disable_cursor_protocol select max(id) from City into @max_city_id; +--enable_cursor_protocol insert into City values (@max_city_id + 1,'Kilifarevo','BGR',NULL); diff --git a/mysql-test/main/subselect_mat_cost.test b/mysql-test/main/subselect_mat_cost.test index 73ba717a8dc..41010da7cb0 100644 --- a/mysql-test/main/subselect_mat_cost.test +++ b/mysql-test/main/subselect_mat_cost.test @@ -53,7 +53,9 @@ create index Language on CountryLanguage(Language); create index CityName on City(Name); alter table City change population population int(11) null default 0; +--disable_cursor_protocol select max(id) from City into @max_city_id; +--enable_cursor_protocol insert into City values (@max_city_id + 1,'Kilifarevo','BGR',NULL); diff --git a/mysql-test/main/subselect_sj.test b/mysql-test/main/subselect_sj.test index e4d02ed666c..e2edc31fa9c 100644 --- a/mysql-test/main/subselect_sj.test +++ b/mysql-test/main/subselect_sj.test @@ -2679,8 +2679,10 @@ CREATE TABLE t3 (i3 INT, KEY(i3)) engine=myisam; INSERT INTO t3 VALUES (0),(8),(1),(8),(9),(24),(6),(1),(6),(2),(4),(2),(1); +--disable_cursor_protocol select @@max_heap_table_size into @tmp_max_heap_table_size; select @@join_buffer_size into @tmp_join_buffer_size; +--enable_cursor_protocol set max_heap_table_size=16*1024; --disable_query_log diff --git a/mysql-test/main/tmp_table_count-7586.test b/mysql-test/main/tmp_table_count-7586.test index 0629e27f164..71eb5c37d0d 100644 --- a/mysql-test/main/tmp_table_count-7586.test +++ b/mysql-test/main/tmp_table_count-7586.test @@ -11,6 +11,7 @@ create table t2 (a int); insert into t2 values (1),(2),(3); create view v2 as select a from t2; +--disable_cursor_protocol flush status; select * from v2; --disable_ps_protocol @@ -23,6 +24,7 @@ select * from (select * from t2) T1; --disable_ps_protocol show status like '%Created_tmp%'; --enable_ps_protocol +--enable_cursor_protocol explain select * from (select * from t2) T1; diff --git a/mysql-test/main/trigger-compat.test b/mysql-test/main/trigger-compat.test index 9c102993a6f..a8ad20073d6 100644 --- a/mysql-test/main/trigger-compat.test +++ b/mysql-test/main/trigger-compat.test @@ -68,11 +68,13 @@ 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_cursor_protocol --disable_ps2_protocol eval SELECT SUBSTRING_INDEX(a,'definers=',1) INTO OUTFILE '$MYSQLD_DATADIR/mysqltest_db1/t1.TRG' FROM patch; --enable_ps2_protocol +--enable_cursor_protocol DROP TABLE patch; --connection wl2818_definer_con --enable_query_log diff --git a/mysql-test/main/trigger.test b/mysql-test/main/trigger.test index ae4ee2e04bc..5086215f751 100644 --- a/mysql-test/main/trigger.test +++ b/mysql-test/main/trigger.test @@ -634,7 +634,10 @@ set sql_mode=""; create trigger t1_bi before insert on t1 for each row set new.a = '2004-01-00'; set sql_mode="traditional"; insert into t1 values ('2004-01-01'); +#Check after fix MDEV-31516 +--disable_cursor_protocol select * from t1; +--enable_cursor_protocol set sql_mode=default; show create table t1; --replace_column 6 # diff --git a/mysql-test/main/type_binary.test b/mysql-test/main/type_binary.test index 04cdc94e6d8..d9b07563a28 100644 --- a/mysql-test/main/type_binary.test +++ b/mysql-test/main/type_binary.test @@ -135,6 +135,8 @@ DROP TABLE t1; --echo # CREATE TABLE t1 (a VARCHAR(39)); +#check after fix MDEV-31540 +--disable_cursor_protocol --disable_view_protocol --enable_metadata SELECT @@ -155,4 +157,5 @@ SELECT FROM t1; --disable_metadata --enable_view_protocol +--enable_cursor_protocol DROP TABLE t1; diff --git a/mysql-test/main/type_bit.test b/mysql-test/main/type_bit.test index ad7b6fbbd72..6c8be397938 100644 --- a/mysql-test/main/type_bit.test +++ b/mysql-test/main/type_bit.test @@ -461,7 +461,10 @@ SHOW CREATE TABLE t2; DROP TABLE t2; --enable_metadata --disable_view_protocol +#Check after fix MDEV-31540 +--disable_cursor_protocol SELECT COALESCE(val, 1) FROM t1; +--enable_cursor_protocol --enable_view_protocol --disable_metadata DROP TABLE t1; diff --git a/mysql-test/main/type_date.test b/mysql-test/main/type_date.test index 3566e427d50..3e136e56a5a 100644 --- a/mysql-test/main/type_date.test +++ b/mysql-test/main/type_date.test @@ -211,12 +211,15 @@ CREATE TABLE t2 (a DATE); CREATE INDEX i ON t1 (a); INSERT INTO t1 VALUES ('1000-00-00'),('1000-00-00'); INSERT INTO t2 VALUES ('1000-00-00'),('1000-00-00'); +#Check after fix MDEV-31516 +--disable_cursor_protocol SELECT * FROM t1 WHERE a = '1000-00-00'; SELECT * FROM t2 WHERE a = '1000-00-00'; SET SQL_MODE=TRADITIONAL; EXPLAIN SELECT * FROM t1 WHERE a = '1000-00-00'; SELECT * FROM t1 WHERE a = '1000-00-00'; SELECT * FROM t2 WHERE a = '1000-00-00'; +--enable_cursor_protocol --error ER_TRUNCATED_WRONG_VALUE INSERT INTO t1 VALUES ('1000-00-00'); SET SQL_MODE=DEFAULT; diff --git a/mysql-test/main/type_enum.test b/mysql-test/main/type_enum.test index bcbc4cc520e..cd157bae178 100644 --- a/mysql-test/main/type_enum.test +++ b/mysql-test/main/type_enum.test @@ -237,7 +237,10 @@ CREATE TABLE t1 ( INSERT INTO t1 VALUES (1),(2); --enable_metadata --disable_view_protocol +#check after fix MDEV-31540 +--disable_cursor_protocol SELECT AVG(f1) FROM t1; +--enable_cursor_protocol --enable_view_protocol --disable_metadata drop table t1; diff --git a/mysql-test/main/type_float.test b/mysql-test/main/type_float.test index 1cc5cc94267..ebf1883d301 100644 --- a/mysql-test/main/type_float.test +++ b/mysql-test/main/type_float.test @@ -320,8 +320,10 @@ let $nine_65= select format(-1.7976931348623157E+307,256) as foo; select least(-1.1111111111111111111111111, - group_concat(1.7976931348623157E+308)) as foo; +--disable_cursor_protocol eval select concat((truncate((-1.7976931348623157E+307),(0x1e))), ($nine_65)) into @a; +--enable_cursor_protocol --enable_result_log --echo End of 5.0 tests @@ -337,6 +339,8 @@ select format(truncate('1.7976931348623157E+308',-12),1,'fr_BE') as foo; --echo # MDEV-17249 MAKETIME(-1e50,0,0) returns a wrong result --echo # +#enable after fix MDEV-34213 +--disable_cursor_protocol #enable after fix MDEV-29552 --disable_view_protocol SELECT LEFT('a',EXP(50)); @@ -347,6 +351,7 @@ CREATE TABLE t1 (a FLOAT); INSERT INTO t1 VALUES (1e30); SELECT LEFT('a',a), LEFT('a',1e30) FROM t1; DROP TABLE t1; +--enable_cursor_protocol PREPARE stmt FROM 'SELECT LEFT(111,?)'; SET @a=1e30; diff --git a/mysql-test/main/type_newdecimal.test b/mysql-test/main/type_newdecimal.test index 33e56da7da8..babfb4e1db8 100644 --- a/mysql-test/main/type_newdecimal.test +++ b/mysql-test/main/type_newdecimal.test @@ -609,12 +609,15 @@ select round(99999999999999999.999,3); select round(-99999999999999999.999,3); #-- should return -100000000000000000.000 # +#enable after fix MDEV-31729 +--disable_cursor_protocol #enable after fix MDEV-28660 --disable_view_protocol select truncate(99999999999999999999999999999999999999,49); #-- should return 99999999999999999999999999999999999999.000 # --enable_view_protocol +--enable_cursor_protocol select truncate(99.999999999999999999999999999999999999,49); #-- should return 99.9999999999999999999999999999999 # @@ -1266,11 +1269,12 @@ DROP TABLE t1; let $nine_81= 999999999999999999999999999999999999999999999999999999999999999999999999999999999; - #view protocol generates additional warning --disable_view_protocol eval SELECT substring(('M') FROM ($nine_81)) AS foo; --enable_view_protocol +#check after fix MDEV-31729 +--disable_cursor_protocol #enable after fix MDEV-28661 --disable_view_protocol eval SELECT min($nine_81) AS foo; @@ -1284,6 +1288,7 @@ eval SELECT date_sub(($nine_81), day_minute) AS foo; eval SELECT truncate($nine_81, 28) AS foo; +--enable_cursor_protocol --enable_view_protocol --echo End of 5.0 tests diff --git a/mysql-test/main/type_timestamp.test b/mysql-test/main/type_timestamp.test index 3f17f347a22..82193ee709a 100644 --- a/mysql-test/main/type_timestamp.test +++ b/mysql-test/main/type_timestamp.test @@ -742,9 +742,11 @@ FLUSH TABLES; # 0xFF - record flags # 0x77777777 - TIMESTAMP integer part # 0xFFFFFF - TIMESTAMP bad fractional part +--disable_cursor_protocol --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 +--enable_cursor_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; @@ -859,7 +861,10 @@ DROP TABLE t1; CREATE TABLE t1 (a TIMESTAMP(4), b TIMESTAMP DEFAULT 0) ENGINE=MyISAM; INSERT IGNORE INTO t1 (a) VALUES ('2001-01-01'),('2003-01-01'); SELECT * FROM t1 WHERE (SELECT MIN(b) FROM t1) - a; +#Enable after fix MDEV-31730 +--disable_cursor_protocol SELECT (SELECT MIN(b) FROM t1) - a FROM t1; +--enable_cursor_protocol DROP TABLE t1; --echo # diff --git a/mysql-test/main/type_year.test b/mysql-test/main/type_year.test index 1e72fc08886..0f0af9c8b0c 100644 --- a/mysql-test/main/type_year.test +++ b/mysql-test/main/type_year.test @@ -158,7 +158,10 @@ DROP TABLE t1; CREATE TABLE t1(c1 YEAR(4)); INSERT INTO t1 VALUES (1901),(2155),(0000); SELECT * FROM t1; +#Check after fix MDEV-31730 +--disable_cursor_protocol SELECT COUNT(*) AS total_rows, MIN(c1) AS min_value, MAX(c1) FROM t1; +--enable_cursor_protocol SELECT COUNT(*) AS total_rows, MIN(c1+0) AS min_value, MAX(c1+0) FROM t1; DROP TABLE t1; --enable_view_protocol diff --git a/mysql-test/main/udf.test b/mysql-test/main/udf.test index d87d446f733..11717eb43b1 100644 --- a/mysql-test/main/udf.test +++ b/mysql-test/main/udf.test @@ -250,6 +250,8 @@ DROP FUNCTION avgcost; #enable view prtotocol after fix MDEV-28677 --disable_view_protocol +#check after fix MDEV-31587 +--disable_cursor_protocol select * from mysql.func; --replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB eval CREATE FUNCTION is_const RETURNS STRING SONAME "$UDF_EXAMPLE_SO"; @@ -262,6 +264,7 @@ select * from mysql.func; --error 1305 select is_const(3); +--enable_cursor_protocol --enable_view_protocol # @@ -270,6 +273,8 @@ select is_const(3); --replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB eval CREATE FUNCTION is_const RETURNS STRING SONAME "$UDF_EXAMPLE_SO"; +#check after fix MDEV-31587 +--disable_cursor_protocol select is_const(3) as const, is_const(3.14) as const, @@ -297,6 +302,7 @@ select from bug18761; drop table bug18761; +--enable_cursor_protocol --error 1241 select is_const((1,2,3)); diff --git a/mysql-test/main/union.test b/mysql-test/main/union.test index 278958d800c..f1ffbf41ca2 100644 --- a/mysql-test/main/union.test +++ b/mysql-test/main/union.test @@ -1114,6 +1114,7 @@ DROP TABLE t1; CREATE TABLE t1 (a INT); INSERT INTO t1 VALUES (1); +--disable_cursor_protocol -- echo # Tests fix in parser rule select_derived_union. SELECT a INTO @v FROM ( SELECT a FROM t1 @@ -1153,6 +1154,7 @@ SELECT a INTO DUMPFILE 'union.out.file8' FROM t1 UNION SELECT a FROM t1; SELECT ( SELECT a UNION SELECT a ) INTO @v FROM t1; SELECT ( SELECT a UNION SELECT a ) INTO OUTFILE 'union.out.file3' FROM t1; SELECT ( SELECT a UNION SELECT a ) INTO DUMPFILE 'union.out.file4' FROM t1; +--enable_cursor_protocol DROP TABLE t1; remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.1/data/test union.out.fil*; diff --git a/mysql-test/main/update.test b/mysql-test/main/update.test index 0dbc3c333ee..144f89b0053 100644 --- a/mysql-test/main/update.test +++ b/mysql-test/main/update.test @@ -236,9 +236,11 @@ 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 +--disable_cursor_protocol flush status; select a from t1 order by a limit 1; show status like 'handler_read%'; +--enable_cursor_protocol --enable_view_protocol --enable_ps2_protocol @@ -346,6 +348,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_cursor_protocol --disable_ps2_protocol flush status; SELECT user_id FROM t1 WHERE request_id=9999999999999; @@ -357,6 +360,7 @@ show status like '%Handler_read%'; UPDATE t1 SET user_id=null WHERE request_id=999999999999999999999999999999; show status like '%Handler_read%'; --enable_ps2_protocol +--enable_cursor_protocol DROP TABLE t1; diff --git a/mysql-test/main/user_var.test b/mysql-test/main/user_var.test index e69718243ed..135dd92fd29 100644 --- a/mysql-test/main/user_var.test +++ b/mysql-test/main/user_var.test @@ -290,7 +290,9 @@ drop table t1; # CREATE TABLE t1(a INT, b INT); INSERT INTO t1 VALUES (0, 0), (2, 1), (2, 3), (1, 1), (30, 20); +--disable_cursor_protocol SELECT a, b INTO @a, @b FROM t1 WHERE a=2 AND b=3 GROUP BY a, b; +--enable_cursor_protocol SELECT @a, @b; SELECT a, b FROM t1 WHERE a=2 AND b=3 GROUP BY a, b; DROP TABLE t1; @@ -384,7 +386,9 @@ DROP TABLE t1; # SAME USER VARIABLE = CRASH # SET @bug12408412=1; +--disable_cursor_protocol SELECT GROUP_CONCAT(@bug12408412 ORDER BY 1) INTO @bug12408412; +--enable_cursor_protocol --echo End of 5.1 tests @@ -459,7 +463,9 @@ DROP TABLE t1; --echo # SET @bug12408412=1; +--disable_cursor_protocol SELECT GROUP_CONCAT(@bug12408412 ORDER BY 1) INTO @bug12408412; +--enable_cursor_protocol # # MDEV-616 LP BUG#1002126 diff --git a/mysql-test/main/userstat-badlogin-4824.test b/mysql-test/main/userstat-badlogin-4824.test index 0a7490bc29c..f9d3e22bff0 100644 --- a/mysql-test/main/userstat-badlogin-4824.test +++ b/mysql-test/main/userstat-badlogin-4824.test @@ -14,7 +14,9 @@ set global userstat=1; --disable_ps2_protocol connect(foo, localhost, foo, foo); +--disable_cursor_protocol select 1; +--enable_cursor_protocol disconnect foo; connection default; diff --git a/mysql-test/main/userstat.test b/mysql-test/main/userstat.test index 4aa10819d33..686165223a5 100644 --- a/mysql-test/main/userstat.test +++ b/mysql-test/main/userstat.test @@ -8,7 +8,9 @@ -- source include/have_perfschema.inc --disable_ps2_protocol +--disable_cursor_protocol select variable_value from information_schema.global_status where variable_name="handler_read_key" into @global_read_key; +--enable_cursor_protocol show columns from information_schema.client_statistics; show columns from information_schema.user_statistics; show columns from information_schema.index_statistics; @@ -26,6 +28,7 @@ update t1 set b=1; update t1 set b=5 where a=2; delete from t1 where a=3; +--disable_cursor_protocol /* Empty query */ select * from t1 where a=999; @@ -35,11 +38,11 @@ drop table t1; --connect (ssl_con,localhost,root,,,,,SSL) SELECT (VARIABLE_VALUE <> '') AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher'; --connection default +--enable_cursor_protocol # # Test the commit and rollback are counted # - create table t1 (a int, primary key (a), b int default 0) engine=innodb; begin; insert into t1 values(1,1); @@ -52,11 +55,13 @@ insert into t1 values(3,3); rollback; drop table t1; +--disable_cursor_protocol select sleep(1); show status like "rows%"; show status like "ha%"; select variable_value - @global_read_key as "handler_read_key" from information_schema.global_status where variable_name="handler_read_key"; +--enable_cursor_protocol --disconnect ssl_con diff --git a/mysql-test/main/variables.test b/mysql-test/main/variables.test index 2f145a77d74..1e5302e6d42 100644 --- a/mysql-test/main/variables.test +++ b/mysql-test/main/variables.test @@ -65,7 +65,10 @@ set @test_int=null,@test_double=null,@test_string=null,@test_string2=null; select @test_int,@test_double,@test_string,@test_string2; select @t1:=(@t2:=1)+@t3:=4,@t1,@t2,@t3; explain extended select @t1:=(@t2:=1)+@t3:=4,@t1,@t2,@t3; +#Enable after fix MDEV-31495 +--disable_cursor_protocol select @t5; +--enable_cursor_protocol # # Test problem with WHERE and variables @@ -372,7 +375,9 @@ select @@key_buffer_size; select * from t1 where a=2; select * from t2 where a=3; check table t1,t2; +--disable_cursor_protocol select max(a) +1, max(a) +2 into @xx,@yy from t1; +--enable_cursor_protocol drop table t1,t2; # @@ -594,7 +599,9 @@ set global sql_mode=repeat('a',80); # create table t1 (a int); +--disable_cursor_protocol select a into @x from t1; +--enable_cursor_protocol show warnings; drop table t1; @@ -1129,7 +1136,9 @@ SET @@global.thread_stack= 7; # Bug #40657 - assertion with out of range variables and traditional sql_mode # +--disable_cursor_protocol SELECT @@global.expire_logs_days INTO @old_eld; +--enable_cursor_protocol SET GLOBAL expire_logs_days = -1; --echo needs to've been adjusted (0) @@ -1165,10 +1174,12 @@ SET GLOBAL auto_increment_offset=0; # # Bug#41030 Wrong meta data (incorrect fieldlen) # - +#Check after fix MDEV-31540 +--disable_cursor_protocol --enable_metadata select @@default_storage_engine; --disable_metadata +--enable_cursor_protocol # # Bug#36540: CREATE EVENT and ALTER EVENT statements fail with large server_id diff --git a/mysql-test/main/view.test b/mysql-test/main/view.test index 16f752ecc41..6730e7f7111 100644 --- a/mysql-test/main/view.test +++ b/mysql-test/main/view.test @@ -2043,7 +2043,9 @@ drop view abc; flush status; create table t1(f1 char(1)); create view v1 as select * from t1; +--disable_cursor_protocol select * from (select f1 as f2, f1 as f3 from v1) v where v.f2='a'; +--enable_cursor_protocol --disable_ps_protocol show status like "Created_tmp%"; --enable_ps_protocol @@ -2054,9 +2056,11 @@ set @tmp=@@optimizer_switch; set @@optimizer_switch='derived_merge=OFF'; create table t1(f1 char(1)); create view v1 as select * from t1; +--disable_cursor_protocol --disable_ps2_protocol select * from (select f1 as f2, f1 as f3 from v1) v where v.f2='a'; --enable_ps2_protocol +--enable_cursor_protocol --disable_ps_protocol show status like "Created_tmp%"; --enable_ps_protocol @@ -3107,12 +3111,13 @@ DROP VIEW IF EXISTS v1; let $query = SELECT * FROM (SELECT 1) AS t into @w; +--disable_cursor_protocol eval $query; --error ER_PARSE_ERROR eval CREATE VIEW v1 AS $query; --echo # Previously the following would fail. eval $query; - +--enable_cursor_protocol # # Bug#24532 The return data type of IS TRUE is different from similar operations @@ -4150,6 +4155,7 @@ INSERT INTO t2 VALUES (9,90), (16, 160), (11,110), (1,10), (18,180), (2,20), (14,140), (15, 150), (12,120), (3,30), (17,170), (19,190); +--disable_cursor_protocol EXPLAIN EXTENDED SELECT t1.a,t2.c FROM t1,t2 WHERE t2.pk = t1.a AND t2.pk > 8; FLUSH STATUS; @@ -4163,6 +4169,7 @@ FLUSH STATUS; SELECT t1.a,v.c FROM t1,v WHERE v.pk = t1.a AND v.pk > 8; SHOW STATUS LIKE 'Handler_read_%'; DROP VIEW v; +--enable_cursor_protocol DROP TABLE t1, t2; --enable_ps2_protocol diff --git a/mysql-test/main/view_grant.test b/mysql-test/main/view_grant.test index 686a9428bf6..fc0521933cc 100644 --- a/mysql-test/main/view_grant.test +++ b/mysql-test/main/view_grant.test @@ -686,15 +686,19 @@ use test; create view v1 as select 42; show create view v1; +--disable_cursor_protocol select definer into @v1def1 from information_schema.views where table_schema = 'test' and table_name='v1'; +--enable_cursor_protocol drop view v1; create definer=`test14256`@`%` view v1 as select 42; show create view v1; +--disable_cursor_protocol select definer into @v1def2 from information_schema.views where table_schema = 'test' and table_name='v1'; +--enable_cursor_protocol drop view v1; select @v1def1, @v1def2, @v1def1=@v1def2; diff --git a/mysql-test/main/wl4435_generated.inc b/mysql-test/main/wl4435_generated.inc index 5ea05a89402..df039c6347e 100644 --- a/mysql-test/main/wl4435_generated.inc +++ b/mysql-test/main/wl4435_generated.inc @@ -288,7 +288,10 @@ CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; SHOW CREATE TABLE tmp1; +#Enable after fix MDEV-31495 +--disable_cursor_protocol SELECT @a, @a = 123.456789; +--enable_cursor_protocol DROP TEMPORARY TABLE tmp1; DROP PROCEDURE p1; diff --git a/mysql-test/suite/archive/rnd_pos.test b/mysql-test/suite/archive/rnd_pos.test index f0a8c9ad2f3..4ceb8a93656 100644 --- a/mysql-test/suite/archive/rnd_pos.test +++ b/mysql-test/suite/archive/rnd_pos.test @@ -11,9 +11,11 @@ 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_cursor_protocol --disable_ps2_protocol select c1,c3 from t1 order by c2; --enable_ps2_protocol +--enable_cursor_protocol set max_length_for_sort_data = default; --disable_ps_protocol show status where variable_name like '%tmp%' and value != 0; @@ -24,9 +26,11 @@ 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_cursor_protocol --disable_ps2_protocol select c1,c3 from t1 order by c2; --enable_ps2_protocol +--enable_cursor_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 e61198b2da2..a55cd7c5002 100644 --- a/mysql-test/suite/binlog/include/database.test +++ b/mysql-test/suite/binlog/include/database.test @@ -44,9 +44,11 @@ CREATE TABLE t2(c1 INT); let $prefix= `SELECT UUID()`; --echo # Create a file in the database directory --replace_result $prefix FAKE_FILE +--disable_cursor_protocol --disable_ps2_protocol eval SELECT 'hello' INTO OUTFILE 'fake_file.$prefix'; --enable_ps2_protocol +--enable_cursor_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_commit_wait.test b/mysql-test/suite/binlog/t/binlog_commit_wait.test index 7d7af2a90e2..dbd0e41407f 100644 --- a/mysql-test/suite/binlog/t/binlog_commit_wait.test +++ b/mysql-test/suite/binlog/t/binlog_commit_wait.test @@ -15,6 +15,7 @@ connect(con3,localhost,root,,test); # Get Initial status measurements --connection default +--disable_cursor_protocol SELECT variable_value INTO @group_commits FROM information_schema.global_status WHERE variable_name = 'binlog_group_commits'; SELECT variable_value INTO @group_commit_trigger_count FROM information_schema.global_status @@ -23,6 +24,7 @@ SELECT variable_value INTO @group_commit_trigger_timeout FROM information_schema WHERE variable_name = 'binlog_group_commit_trigger_timeout'; SELECT variable_value INTO @group_commit_trigger_lock_wait FROM information_schema.global_status WHERE variable_name = 'binlog_group_commit_trigger_lock_wait'; +--enable_cursor_protocol # Note: binlog_group_commits is counted at the start of the group and group_commit_trigger_* is # counted near when the groups its finalised. diff --git a/mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_frag.test b/mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_frag.test index 3e18ef1e351..420a00462ee 100644 --- a/mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_frag.test +++ b/mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_frag.test @@ -7,7 +7,9 @@ CREATE TABLE t (a TEXT); # events of interest are guaranteed to stay in 000001 log RESET MASTER; --eval INSERT INTO t SET a=repeat('a', 1024) +--disable_cursor_protocol SELECT a into @a from t; +--enable_cursor_protocol FLUSH LOGS; DELETE FROM t; diff --git a/mysql-test/suite/compat/oracle/t/update_innodb.test b/mysql-test/suite/compat/oracle/t/update_innodb.test index 8af219584d6..d1ae0864dc2 100644 --- a/mysql-test/suite/compat/oracle/t/update_innodb.test +++ b/mysql-test/suite/compat/oracle/t/update_innodb.test @@ -8,7 +8,9 @@ SET sql_mode='ORACLE'; CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY) engine=innodb; INSERT INTO t1 VALUES (1); START TRANSACTION; +--disable_cursor_protocol SELECT a AS a_con1 FROM t1 INTO @a FOR UPDATE; +--enable_cursor_protocol --connect(con2,localhost,root,,) SET sql_mode='ORACLE'; diff --git a/mysql-test/suite/encryption/t/innodb_encrypt_temporary_tables.test b/mysql-test/suite/encryption/t/innodb_encrypt_temporary_tables.test index 83abb783c9e..c48e5cf5c73 100644 --- a/mysql-test/suite/encryption/t/innodb_encrypt_temporary_tables.test +++ b/mysql-test/suite/encryption/t/innodb_encrypt_temporary_tables.test @@ -2,6 +2,7 @@ --source include/have_innodb.inc --source include/have_file_key_management_plugin.inc +--disable_cursor_protocol SELECT CAST(variable_value AS INT) INTO @old_encrypted FROM information_schema.global_status WHERE variable_name = 'innodb_encryption_n_temp_blocks_encrypted'; @@ -9,6 +10,7 @@ WHERE variable_name = 'innodb_encryption_n_temp_blocks_encrypted'; SELECT CAST(variable_value AS INT) INTO @old_decrypted FROM information_schema.global_status WHERE variable_name = 'innodb_encryption_n_temp_blocks_decrypted'; +--enable_cursor_protocol CREATE TEMPORARY TABLE t1(f1 CHAR(200), f2 CHAR(200)) ENGINE=InnoDB; INSERT INTO t1 (f1,f2) SELECT '', '' FROM seq_1_to_8192; diff --git a/mysql-test/suite/engines/funcs/t/ld_null.test b/mysql-test/suite/engines/funcs/t/ld_null.test index 50cbce78044..e01c473baf3 100644 --- a/mysql-test/suite/engines/funcs/t/ld_null.test +++ b/mysql-test/suite/engines/funcs/t/ld_null.test @@ -3,7 +3,9 @@ DROP TABLE IF EXISTS t1; --enable_warnings CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 DATETIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_null.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +--disable_cursor_protocol eval SELECT * INTO OUTFILE '../../tmp/t1.dat' FROM t1; +--enable_cursor_protocol SELECT * FROM t1 ORDER BY c1; TRUNCATE TABLE t1; --disable_query_log @@ -15,7 +17,9 @@ DROP TABLE t1; CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 DATETIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_null2.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' ESCAPED BY '\'' LINES TERMINATED BY '\n'; --disable_query_log +--disable_cursor_protocol eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t1-2.dat' FIELDS ESCAPED BY '\'' FROM t1; +--enable_cursor_protocol --enable_query_log SELECT * FROM t1 ORDER BY c1; TRUNCATE TABLE t1; diff --git a/mysql-test/suite/engines/funcs/t/ld_quote.test b/mysql-test/suite/engines/funcs/t/ld_quote.test index 89636fff2bb..b66a5e24ed8 100644 --- a/mysql-test/suite/engines/funcs/t/ld_quote.test +++ b/mysql-test/suite/engines/funcs/t/ld_quote.test @@ -4,7 +4,9 @@ DROP TABLE IF EXISTS t1; CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 VARCHAR(10)); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_quote.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' ENCLOSED BY '\'' LINES TERMINATED BY '\n'; --disable_query_log +--disable_cursor_protocol eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t1.dat' FIELDS ENCLOSED BY '\'' FROM t1; +--enable_cursor_protocol --enable_query_log SELECT * FROM t1 ORDER BY c1; TRUNCATE TABLE t1; diff --git a/mysql-test/suite/engines/iuds/t/insert_calendar.test b/mysql-test/suite/engines/iuds/t/insert_calendar.test index 5d8380a1496..f957891bb1e 100644 --- a/mysql-test/suite/engines/iuds/t/insert_calendar.test +++ b/mysql-test/suite/engines/iuds/t/insert_calendar.test @@ -78,8 +78,11 @@ SELECT * FROM t4; ## Full table scan ## --sorted_result SELECT * FROM t1; +#Check after fix MDEV-31730 +--disable_cursor_protocol --sorted_result SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t1; +--enable_cursor_protocol --sorted_result SELECT * FROM t1 WHERE c3 = '2007-05-24'; @@ -152,8 +155,11 @@ SELECT * FROM t1 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2; ## Full table scan ## --sorted_result SELECT * FROM t1; +#Check after fix MDEV-31730 +--disable_cursor_protocol --sorted_result SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t1; +--enable_cursor_protocol --sorted_result SELECT * FROM t1 WHERE c3 = '2007-05-26'; @@ -868,8 +874,11 @@ SELECT * FROM t4; ## Full table scan ## --sorted_result SELECT * FROM t1; +#Check after fix MDEV-31730 +--disable_cursor_protocol --sorted_result SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t1; +--enable_cursor_protocol --sorted_result SELECT * FROM t1 WHERE c3 = '2007-05-24 09:15:28'; @@ -942,8 +951,11 @@ SELECT * FROM t1 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2; ## Full table scan ## --sorted_result SELECT * FROM t1; +#Check after fix MDEV-31730 +--disable_cursor_protocol --sorted_result SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t1; +--enable_cursor_protocol --sorted_result SELECT * FROM t1 WHERE c3 = '2007-05-26 00:00:00'; @@ -1016,8 +1028,11 @@ SELECT * FROM t1 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2; ## Full table scan ## --sorted_result SELECT * FROM t1; +#Check after fix MDEV-31730 +--disable_cursor_protocol --sorted_result SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t1; +--enable_cursor_protocol --sorted_result SELECT * FROM t1 WHERE c3 = '1998-12-28 00:00:00'; @@ -2070,8 +2085,11 @@ SELECT * FROM t4; ## Full table scan ## --sorted_result SELECT * FROM t1; +#Check after fix MDEV-31730 +--disable_cursor_protocol --sorted_result SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t1; +--enable_cursor_protocol --sorted_result SELECT * FROM t1 WHERE c3 = '2007-05-24'; @@ -2144,8 +2162,11 @@ SELECT * FROM t1 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2; ## Full table scan ## --sorted_result SELECT * FROM t1; +#Check after fix MDEV-31730 +--disable_cursor_protocol --sorted_result SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t1; +--enable_cursor_protocol --sorted_result SELECT * FROM t1 WHERE c3 = '2007-05-26'; @@ -2864,8 +2885,11 @@ SELECT * FROM t4; ## Full table scan ## --sorted_result SELECT * FROM t1; +#Check after fix MDEV-31730 +--disable_cursor_protocol --sorted_result SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t1; +--enable_cursor_protocol --sorted_result SELECT * FROM t1 WHERE c3 = '2007-05-24'; @@ -2938,8 +2962,11 @@ SELECT * FROM t1 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2; ## Full table scan ## --sorted_result SELECT * FROM t1; +#Check after fix MDEV-31730 +--disable_cursor_protocol --sorted_result SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t1; +--enable_cursor_protocol --sorted_result SELECT * FROM t1 WHERE c3 = '2007-05-26'; @@ -3012,8 +3039,11 @@ SELECT * FROM t1 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2; ## Full table scan ## --sorted_result SELECT * FROM t1; +#Check after fix MDEV-31730 +--disable_cursor_protocol --sorted_result SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t1; +--enable_cursor_protocol --sorted_result SELECT * FROM t1 WHERE c3 = '1998-12-28'; @@ -4067,8 +4097,11 @@ SELECT * FROM t4; ## Full table scan ## --sorted_result SELECT * FROM t1; +#Check after fix MDEV-31730 +--disable_cursor_protocol --sorted_result SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t1; +--enable_cursor_protocol --sorted_result SELECT * FROM t1 WHERE c3 = '2007-05-24'; @@ -4141,8 +4174,11 @@ SELECT * FROM t1 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2; ## Full table scan ## --sorted_result SELECT * FROM t1; +#Check after fix MDEV-31730 +--disable_cursor_protocol --sorted_result SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t1; +--enable_cursor_protocol --sorted_result SELECT * FROM t1 WHERE c3 = '2007-05-26'; @@ -4854,8 +4890,11 @@ SELECT * FROM t4; ## Full table scan ## --sorted_result SELECT * FROM t1; +#Check after fix MDEV-31730 +--disable_cursor_protocol --sorted_result SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t1; +--enable_cursor_protocol --sorted_result SELECT * FROM t1 WHERE c3 = '2007-05-24'; @@ -4928,8 +4967,11 @@ SELECT * FROM t1 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2; ## Full table scan ## --sorted_result SELECT * FROM t1; +#Check after fix MDEV-31730 +--disable_cursor_protocol --sorted_result SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t1; +--enable_cursor_protocol --sorted_result SELECT * FROM t1 WHERE c3 = '2007-05-26'; @@ -5002,8 +5044,11 @@ SELECT * FROM t1 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2; ## Full table scan ## --sorted_result SELECT * FROM t1; +#Check after fix MDEV-31730 +--disable_cursor_protocol --sorted_result SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t1; +--enable_cursor_protocol --sorted_result SELECT * FROM t1 WHERE c3 = '1998-12-28'; diff --git a/mysql-test/suite/engines/iuds/t/insert_decimal.test b/mysql-test/suite/engines/iuds/t/insert_decimal.test index c75fa19506e..d6e1b43d0bf 100644 --- a/mysql-test/suite/engines/iuds/t/insert_decimal.test +++ b/mysql-test/suite/engines/iuds/t/insert_decimal.test @@ -60,8 +60,11 @@ SELECT count(*) as total_rows, min(c3) as min_value, max(c3) as max_value, sum(c ## Full table scan ## --sorted_result SELECT * FROM t1; +#Check after fix MDEV-31730 +--disable_cursor_protocol --sorted_result SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t1; +--enable_cursor_protocol --sorted_result SELECT * FROM t1 WHERE c3 = '0.0'; @@ -134,8 +137,11 @@ SELECT * FROM t1 WHERE c1 IS NOT NULL ORDER BY c1,c2 DESC LIMIT 2; ## Full table scan ## --sorted_result SELECT * FROM t1; +#Check after fix MDEV-31730 +--disable_cursor_protocol --sorted_result SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t1; +--enable_cursor_protocol --sorted_result SELECT * FROM t1 WHERE c3 = '-0.0'; @@ -388,8 +394,11 @@ SELECT count(*) as total_rows, min(c3) as min_value, max(c3) as max_value, sum(c ## Full table scan ## --sorted_result SELECT * FROM t1; +#Check after fix MDEV-31730 +--disable_cursor_protocol --sorted_result SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t1; +--enable_cursor_protocol --sorted_result SELECT * FROM t1 WHERE c3 = '0.0'; @@ -462,8 +471,11 @@ SELECT * FROM t1 WHERE c1 IS NOT NULL ORDER BY c1,c2 DESC LIMIT 2; ## Full table scan ## --sorted_result SELECT * FROM t1; +#Check after fix MDEV-31730 +--disable_cursor_protocol --sorted_result SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t1; +--enable_cursor_protocol --sorted_result SELECT * FROM t1 WHERE c3 = '-0.0'; @@ -711,8 +723,11 @@ SELECT count(*) as total_rows, min(c3) as min_value, max(c3) as max_value, sum(c ## Full table scan ## --sorted_result SELECT * FROM t1; +#Check after fix MDEV-31730 +--disable_cursor_protocol --sorted_result SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t1; +--enable_cursor_protocol --sorted_result SELECT * FROM t1 WHERE c3 = '0.0'; @@ -785,8 +800,11 @@ SELECT * FROM t1 WHERE c1 IS NOT NULL ORDER BY c1,c2 DESC LIMIT 2; ## Full table scan ## --sorted_result SELECT * FROM t1; +#Check after fix MDEV-31730 +--disable_cursor_protocol --sorted_result SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t1; +--enable_cursor_protocol --sorted_result SELECT * FROM t1 WHERE c3 = '-0.0'; diff --git a/mysql-test/suite/engines/iuds/t/insert_time.test b/mysql-test/suite/engines/iuds/t/insert_time.test index 0e5e21507a9..8a7a822b934 100644 --- a/mysql-test/suite/engines/iuds/t/insert_time.test +++ b/mysql-test/suite/engines/iuds/t/insert_time.test @@ -77,8 +77,11 @@ SELECT * FROM t4; ## Full table scan ## --sorted_result SELECT * FROM t1; +#Check after fix MDEV-31730 +--disable_cursor_protocol --sorted_result SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t1; +--enable_cursor_protocol --sorted_result SELECT * FROM t1 WHERE c3 = '2009-01-17'; diff --git a/mysql-test/suite/federated/federatedx_create_handlers.test b/mysql-test/suite/federated/federatedx_create_handlers.test index 8e504590282..9cf08a34931 100644 --- a/mysql-test/suite/federated/federatedx_create_handlers.test +++ b/mysql-test/suite/federated/federatedx_create_handlers.test @@ -7,6 +7,9 @@ connection default; set global federated_pushdown=1; +#Enable after fix MDEV-31846 or in v. 10.5 and later +--disable_cursor_protocol + connection slave; DROP TABLE IF EXISTS federated.t1; @@ -433,5 +436,7 @@ DEALLOCATE PREPARE stmt; set global federated_pushdown=0; +--enable_cursor_protocol + source include/federated_cleanup.inc; diff --git a/mysql-test/suite/funcs_1/datadict/datadict.pre b/mysql-test/suite/funcs_1/datadict/datadict.pre index cedc24aad13..4082ab7be31 100644 --- a/mysql-test/suite/funcs_1/datadict/datadict.pre +++ b/mysql-test/suite/funcs_1/datadict/datadict.pre @@ -21,11 +21,13 @@ # be able to use the correct --replace_result statement. Using this only the # one pair of 'wrong' values is replaced and not all occurrencies of all # possible pairs of values. See bug #12777 for details. +--disable_cursor_protocol SELECT character_maximum_length INTO @CML FROM information_schema.columns WHERE table_schema = 'information_schema' AND table_name = 'columns' AND column_name = 'table_catalog'; +--enable_cursor_protocol let $bug_12777_0512= `SELECT @CML = 512`; let $bug_12777_1023= `SELECT @CML = 1023`; diff --git a/mysql-test/suite/funcs_1/datadict/datadict_load.inc b/mysql-test/suite/funcs_1/datadict/datadict_load.inc index 9e3b87660f8..e3358588654 100644 --- a/mysql-test/suite/funcs_1/datadict/datadict_load.inc +++ b/mysql-test/suite/funcs_1/datadict/datadict_load.inc @@ -16,11 +16,13 @@ # be able to use the correct --replace_result statement. Using this only the # one pair of 'wrong' values is replaced and not all occurrencies of all # possible pairs of values. See bug #12777 for details. +--disable_cursor_protocol SELECT character_maximum_length INTO @CML FROM information_schema.columns WHERE table_schema = 'information_schema' AND table_name = 'columns' AND column_name = 'table_catalog'; +--enable_cursor_protocol let $bug_12777_0512= `SELECT @CML = 512`; let $bug_12777_1023= `SELECT @CML = 1023`; diff --git a/mysql-test/suite/funcs_1/datadict/is_tables.inc b/mysql-test/suite/funcs_1/datadict/is_tables.inc index b3d0ef4cca5..12257cad1ce 100644 --- a/mysql-test/suite/funcs_1/datadict/is_tables.inc +++ b/mysql-test/suite/funcs_1/datadict/is_tables.inc @@ -337,9 +337,11 @@ WHERE table_name = 't1_my_tablex'; ALTER TABLE db_datadict.t1_my_tablex CHECKSUM = 1; SELECT table_name, checksum IS NOT NULL FROM information_schema.tables WHERE table_name = 't1_my_tablex'; +--disable_cursor_protocol SELECT UPDATE_TIME, checksum INTO @UPDATE_TIME, @checksum FROM information_schema.tables WHERE table_name = 't1_my_tablex'; +--enable_cursor_protocol # Enforce a time difference bigger than the smallest unit (1 second). --real_sleep 1.1 INSERT INTO db_datadict.t1_my_tablex SET f1 = 3; @@ -354,8 +356,10 @@ FROM information_schema.tables WHERE table_name = 't1_my_tablex'; # # Information is used later +--disable_cursor_protocol SELECT CREATE_TIME INTO @CREATE_TIME FROM information_schema.tables WHERE table_name = 't1_my_tablex'; +--enable_cursor_protocol # # Check impact of DROP TABLE SELECT table_name FROM information_schema.tables diff --git a/mysql-test/suite/funcs_1/storedproc/param_check.inc b/mysql-test/suite/funcs_1/storedproc/param_check.inc index 203187f92b1..72c5ce15bc1 100644 --- a/mysql-test/suite/funcs_1/storedproc/param_check.inc +++ b/mysql-test/suite/funcs_1/storedproc/param_check.inc @@ -32,12 +32,16 @@ eval UPDATE t1_aux SET f1 = NULL; # Enforce that all user variables have the same data type and initial value. +--disable_cursor_protocol SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux; +--enable_cursor_protocol --disable_warnings eval UPDATE t1_aux SET f1 = $test_value; --enable_warnings +--disable_cursor_protocol SELECT f1 INTO @v1_tab FROM t1_aux; +--enable_cursor_protocol --disable_warnings eval CALL sproc_1($test_value, @v1_proc); eval SET @v1_func = func_1($test_value); 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 591a5ca566b..dd0aa78d0f1 100644 --- a/mysql-test/suite/funcs_1/t/is_basics_mixed.test +++ b/mysql-test/suite/funcs_1/t/is_basics_mixed.test @@ -175,9 +175,11 @@ SELECT 1 AS my_col FROM information_schema.tables WHERE table_name = 't1_third'; # # SELECT INTO USER VARIABLE +--disable_cursor_protocol SELECT table_name,table_schema INTO @table_name,@table_schema FROM information_schema.tables WHERE table_schema = 'db_datadict' ORDER BY table_name LIMIT 1; +--enable_cursor_protocol SELECT @table_name,@table_schema; # # SELECT INTO OUTFILE @@ -185,6 +187,7 @@ let $OUTFILE = $MYSQLTEST_VARDIR/tmp/datadict.out; --error 0,1 remove_file $OUTFILE; --replace_result $OUTFILE +--disable_cursor_protocol --disable_ps2_protocol eval SELECT table_name,table_schema INTO OUTFILE '$OUTFILE' @@ -193,6 +196,7 @@ LINES TERMINATED BY '\n' FROM information_schema.tables WHERE table_schema = 'db_datadict' ORDER BY table_name; --enable_ps2_protocol +--enable_cursor_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 fb207681bc6..4c3466f7a13 100644 --- a/mysql-test/suite/funcs_1/t/row_count_func.test +++ b/mysql-test/suite/funcs_1/t/row_count_func.test @@ -18,9 +18,11 @@ 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_cursor_protocol --disable_ps2_protocol --eval SELECT * FROM t1 INTO OUTFILE "$MYSQL_TMP_DIR/bug21818.txt" --enable_ps2_protocol +--enable_cursor_protocol --enable_query_log --disable_info @@ -32,9 +34,11 @@ SELECT ROW_COUNT(); --echo --echo # -- Check 2. +--disable_cursor_protocol --enable_info SELECT a FROM t1 LIMIT 1 INTO @a; --disable_info +--enable_cursor_protocol --echo --disable_ps2_protocol diff --git a/mysql-test/suite/funcs_1/triggers/triggers_08.inc b/mysql-test/suite/funcs_1/triggers/triggers_08.inc index 0aeb46896a6..e1c56cacf20 100644 --- a/mysql-test/suite/funcs_1/triggers/triggers_08.inc +++ b/mysql-test/suite/funcs_1/triggers/triggers_08.inc @@ -123,8 +123,10 @@ let $message= 3.5.8.4 - multiple SQL; select * from db_test.t1_u; --sorted_result select * from db_test.t1_d; +#Check after fix MDEV-31495 +--disable_cursor_protocol select @test_var; - +--enable_cursor_protocol let $message= 3.5.8.4 - single SQL - insert; --source include/show_msg.inc @@ -201,7 +203,10 @@ let $message= 3.5.8.3/4 - single SQL - select; f122='Test 3.5.8.4-Single Select' where f122='Test 3.5.8.4-Single Delete'; Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%'; +#Check after fix MDEV-31495 +--disable_cursor_protocol select @test_var; +--enable_cursor_protocol #Cleanup connection default; diff --git a/mysql-test/suite/funcs_1/triggers/triggers_09.inc b/mysql-test/suite/funcs_1/triggers/triggers_09.inc index 93762b363df..92ea70240fc 100644 --- a/mysql-test/suite/funcs_1/triggers/triggers_09.inc +++ b/mysql-test/suite/funcs_1/triggers/triggers_09.inc @@ -93,10 +93,13 @@ let $message= Testcase 3.5.9.3:; Update tb3 Set f136=8 where f122='Test 3.5.9.3'; select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3' order by f136; +#Check after fix MDEV-31495 +--disable_cursor_protocol select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, @tr_var_b4_136, @tr_var_b4_163; select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, @tr_var_af_136, @tr_var_af_163; +--enable_cursor_protocol --disable_query_log set @tr_var_b4_118=0, @tr_var_b4_121=0, @tr_var_b4_122=0, @@ -112,10 +115,14 @@ let $message= Testcase 3.5.9.3:; delete from tb3 where f122='Test 3.5.9.3'; select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3' order by f136; +#Check after fix MDEV-31495 +--disable_cursor_protocol select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, @tr_var_b4_136, @tr_var_b4_163; select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, @tr_var_af_136, @tr_var_af_163; +--enable_cursor_protocol + #Cleanup --disable_warnings drop trigger trg2_a; @@ -167,10 +174,13 @@ let $message= Testcase 3.5.9.4:; select f118, f121, f122, f136, f151, f163 from tb3 where f122 like 'Test 3.5.9.4%' order by f163; +#Check after fix MDEV-31495 +--disable_cursor_protocol select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, @tr_var_b4_136, @tr_var_b4_151, @tr_var_b4_163; select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, @tr_var_af_136, @tr_var_af_151, @tr_var_af_163; +--enable_cursor_protocol --disable_query_log set @tr_var_b4_118=0, @tr_var_b4_121=0, @tr_var_b4_122=0, @@ -188,10 +198,14 @@ let $message= Testcase 3.5.9.4:; select f118, f121, f122, f136, f151, f163 from tb3 where f122 like 'Test 3.5.9.4-trig' order by f163; +#Check after fix MDEV-31495 +--disable_cursor_protocol select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, @tr_var_b4_136, @tr_var_b4_151, @tr_var_b4_163; select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, @tr_var_af_136, @tr_var_af_151, @tr_var_af_163; +--enable_cursor_protocol + #Cleanup --disable_warnings drop trigger trg3_a; diff --git a/mysql-test/suite/gcol/inc/gcol_ins_upd.inc b/mysql-test/suite/gcol/inc/gcol_ins_upd.inc index f025752b5b1..7b6538a3085 100644 --- a/mysql-test/suite/gcol/inc/gcol_ins_upd.inc +++ b/mysql-test/suite/gcol/inc/gcol_ins_upd.inc @@ -626,9 +626,11 @@ CREATE TABLE t1 ( ); INSERT IGNORE INTO t1 (b) VALUES (b'101110001110100'),(b'011101'); +--disable_cursor_protocol --disable_ps2_protocol SELECT pk, b INTO OUTFILE 'load.data' FROM t1; --enable_ps2_protocol +--enable_cursor_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 473086f6e04..61116781a70 100644 --- a/mysql-test/suite/gcol/inc/gcol_keys.inc +++ b/mysql-test/suite/gcol/inc/gcol_keys.inc @@ -776,9 +776,11 @@ CREATE TABLE t1 ( ); INSERT IGNORE INTO t1 (b) VALUES (b'101110001110100'),(b'011101'); +--disable_cursor_protocol --disable_ps2_protocol SELECT pk, b INTO OUTFILE 'load.data' FROM t1; --enable_ps2_protocol +--enable_cursor_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 1edc9779d41..7ec4b3d4e35 100644 --- a/mysql-test/suite/gcol/t/gcol_bugfixes.test +++ b/mysql-test/suite/gcol/t/gcol_bugfixes.test @@ -674,9 +674,11 @@ 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_cursor_protocol --disable_ps2_protocol SELECT id, va INTO OUTFILE 'load_t1' FROM t1; --enable_ps2_protocol +--enable_cursor_protocol --error ER_DATA_TOO_LONG LOAD DATA INFILE 'load_t1' REPLACE INTO TABLE t1 (id,va); SELECT * FROM t1; @@ -689,9 +691,11 @@ 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_cursor_protocol --disable_ps2_protocol SELECT id, va INTO OUTFILE 'load_t1' FROM t1; --enable_ps2_protocol +--enable_cursor_protocol --error ER_DATA_TOO_LONG LOAD DATA INFILE 'load_t1' REPLACE INTO TABLE t1 (id,va); SELECT * FROM t1; @@ -711,9 +715,11 @@ 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_cursor_protocol --disable_ps2_protocol SELECT id, ts, vc INTO OUTFILE 'load_t1' FROM t1; --enable_ps2_protocol +--enable_cursor_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 9184902a7d0..4f38e1a62a4 100644 --- a/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test +++ b/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test @@ -258,10 +258,14 @@ disconnect truncate; connection default; DROP TABLE t1, t2; +--disable_cursor_protocol --disable_ps2_protocol --enable_ps2_protocol +--enable_cursor_protocol +--disable_cursor_protocol --disable_ps2_protocol --enable_ps2_protocol +--enable_cursor_protocol --source include/wait_until_count_sessions.inc set debug_sync=reset; diff --git a/mysql-test/suite/handler/ps.test b/mysql-test/suite/handler/ps.test index 783d862435e..87f4cddf525 100644 --- a/mysql-test/suite/handler/ps.test +++ b/mysql-test/suite/handler/ps.test @@ -7,6 +7,10 @@ flush status; handler handler_a read first; # handler...read must be prepared in --ps-protocol mode --replace_result $PS_PROTOCOL OK +if($CURSOR_PROTOCOL) +{ + --replace_result $CURSOR_PROTOCOL OK +} --disable_ps_protocol show status like 'Com_stmt_prepare%'; --enable_ps_protocol diff --git a/mysql-test/suite/innodb/t/alter_inplace_perfschema.test b/mysql-test/suite/innodb/t/alter_inplace_perfschema.test index e0451e121a6..9abc198843b 100644 --- a/mysql-test/suite/innodb/t/alter_inplace_perfschema.test +++ b/mysql-test/suite/innodb/t/alter_inplace_perfschema.test @@ -4,7 +4,9 @@ --source include/have_debug_sync.inc --source include/not_embedded.inc +--disable_cursor_protocol select count_star into @init_count from performance_schema.events_waits_summary_global_by_event_name WHERE event_name LIKE '%wait%io%file%innodb%innodb_temp_file%'; +--enable_cursor_protocol connect (ddl, localhost, root,,); update performance_schema.setup_instruments set enabled='yes'; update performance_schema.setup_consumers set enabled='yes'; @@ -26,7 +28,9 @@ send ALTER TABLE t1 ADD INDEX(b), ALGORITHM=INPLACE; connection default; SET DEBUG_SYNC = 'now WAIT_FOR go'; +--disable_cursor_protocol select count_star into @final_count from performance_schema.events_waits_summary_global_by_event_name WHERE event_name LIKE '%wait%io%file%innodb%innodb_temp_file%'; +--enable_cursor_protocol SELECT @final_count - @init_count; diff --git a/mysql-test/suite/innodb/t/group_commit.test b/mysql-test/suite/innodb/t/group_commit.test index 692e06f38b8..24d7d1ee1fa 100644 --- a/mysql-test/suite/innodb/t/group_commit.test +++ b/mysql-test/suite/innodb/t/group_commit.test @@ -11,10 +11,12 @@ CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) ENGINE=innodb; +--disable_cursor_protocol SELECT variable_value INTO @commits FROM information_schema.global_status WHERE variable_name = 'binlog_commits'; SELECT variable_value INTO @group_commits FROM information_schema.global_status WHERE variable_name = 'binlog_group_commits'; +--enable_cursor_protocol connect(con1,localhost,root,,); connect(con2,localhost,root,,); diff --git a/mysql-test/suite/innodb/t/group_commit_no_optimize_thread.test b/mysql-test/suite/innodb/t/group_commit_no_optimize_thread.test index 85c0e295424..f7e1a5c0150 100644 --- a/mysql-test/suite/innodb/t/group_commit_no_optimize_thread.test +++ b/mysql-test/suite/innodb/t/group_commit_no_optimize_thread.test @@ -11,10 +11,12 @@ CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) ENGINE=innodb; +--disable_cursor_protocol SELECT variable_value INTO @commits FROM information_schema.global_status WHERE variable_name = 'binlog_commits'; SELECT variable_value INTO @group_commits FROM information_schema.global_status WHERE variable_name = 'binlog_group_commits'; +--enable_cursor_protocol connect(con1,localhost,root,,); connect(con2,localhost,root,,); diff --git a/mysql-test/suite/innodb/t/innodb-page_compression_none.test b/mysql-test/suite/innodb/t/innodb-page_compression_none.test index e4eaae8bcb2..3ca0e1afe32 100644 --- a/mysql-test/suite/innodb/t/innodb-page_compression_none.test +++ b/mysql-test/suite/innodb/t/innodb-page_compression_none.test @@ -6,8 +6,9 @@ SET @save_compression_algorithm=@@GLOBAL.innodb_compression_algorithm; SET GLOBAL innodb_compression_algorithm=0; +--disable_cursor_protocol SELECT VARIABLE_VALUE INTO @compress_errors FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'Innodb_num_pages_page_compression_error'; - +--enable_cursor_protocol CREATE TABLE t (c INT) page_compressed=1 page_compression_level=4 ENGINE=InnoDB; INSERT INTO t VALUES (1); diff --git a/mysql-test/suite/innodb/t/innodb-system-table-view.test b/mysql-test/suite/innodb/t/innodb-system-table-view.test index ea620b398e5..e783deff4b7 100644 --- a/mysql-test/suite/innodb/t/innodb-system-table-view.test +++ b/mysql-test/suite/innodb/t/innodb-system-table-view.test @@ -12,10 +12,12 @@ LET $INNODB_PAGE_SIZE = `select @@innodb_page_size`; # The IDs of mysql.innodb_table_stats and mysql.innodb_index_stats may # vary depending on whether the tables have been rebuilt # by previously run tests. +--disable_cursor_protocol SELECT table_id INTO @table_stats_id FROM information_schema.innodb_sys_tables WHERE name = 'mysql/innodb_table_stats'; SELECT table_id INTO @index_stats_id FROM information_schema.innodb_sys_tables WHERE name = 'mysql/innodb_index_stats'; +--enable_cursor_protocol SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE table_id NOT IN (@table_stats_id, @index_stats_id) ORDER BY table_id; diff --git a/mysql-test/suite/innodb/t/innodb_buffer_pool_load_now.test b/mysql-test/suite/innodb/t/innodb_buffer_pool_load_now.test index baced6e9e11..1697c69d6e4 100644 --- a/mysql-test/suite/innodb/t/innodb_buffer_pool_load_now.test +++ b/mysql-test/suite/innodb/t/innodb_buffer_pool_load_now.test @@ -30,8 +30,10 @@ ENGINE=INNODB; SELECT PAGE_NUMBER FROM information_schema.innodb_buffer_page_lru WHERE table_name = '`test`.`ib_bp_test`'; +--disable_cursor_protocol SELECT SPACE INTO @space FROM information_schema.innodb_buffer_page_lru WHERE table_name = '`test`.`ib_bp_test`' AND PAGE_NUMBER=3; +--enable_cursor_protocol let SPACE=`SELECT @space`; diff --git a/mysql-test/suite/innodb/t/innodb_bug51920.test b/mysql-test/suite/innodb/t/innodb_bug51920.test index c83e00db22a..8037b20e592 100644 --- a/mysql-test/suite/innodb/t/innodb_bug51920.test +++ b/mysql-test/suite/innodb/t/innodb_bug51920.test @@ -22,9 +22,11 @@ let $wait_condition = WHERE INFO="UPDATE bug51920 SET i=2"; -- source include/wait_condition.inc +--disable_cursor_protocol SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO="UPDATE bug51920 SET i=2" INTO @thread_id; +--enable_cursor_protocol KILL @thread_id; let $wait_condition = diff --git a/mysql-test/suite/innodb/t/innodb_mysql.test b/mysql-test/suite/innodb/t/innodb_mysql.test index d495186db25..50ab6e8c1a8 100644 --- a/mysql-test/suite/innodb/t/innodb_mysql.test +++ b/mysql-test/suite/innodb/t/innodb_mysql.test @@ -625,7 +625,9 @@ CREATE TABLE t2 (a INT, b INT, --echo # set up our data elements INSERT INTO t1 (d) VALUES (1); INSERT INTO t2 (a,b) VALUES (1,1); +--disable_cursor_protocol SELECT SECOND(c) INTO @bug47453 FROM t2; +--enable_cursor_protocol SELECT SECOND(c)-@bug47453 FROM t1 JOIN t2 ON d=a; UPDATE t1 JOIN t2 ON d=a SET b=1 WHERE a=1; diff --git a/mysql-test/suite/innodb/t/innodb_stats_persistent.test b/mysql-test/suite/innodb/t/innodb_stats_persistent.test index cfcd7c2128d..4f952f2b3b8 100644 --- a/mysql-test/suite/innodb/t/innodb_stats_persistent.test +++ b/mysql-test/suite/innodb/t/innodb_stats_persistent.test @@ -102,8 +102,10 @@ ANALYZE TABLE bug12429573; # innodb_index_stats have been updated to the same value. If the bug is # present this check will fail. +--disable_cursor_protocol SELECT last_update INTO @last FROM mysql.innodb_table_stats WHERE table_name = 'bug12429573'; +--enable_cursor_protocol SELECT * FROM mysql.innodb_index_stats WHERE table_name = 'bug12429573' AND last_update!=@last; diff --git a/mysql-test/suite/innodb/t/instant_alter.test b/mysql-test/suite/innodb/t/instant_alter.test index 8e333e3bb72..bd0018f6173 100644 --- a/mysql-test/suite/innodb/t/instant_alter.test +++ b/mysql-test/suite/innodb/t/instant_alter.test @@ -807,18 +807,24 @@ SELECT * FROM t1; DROP TABLE t1; eval CREATE TABLE t1 (t TINYINT PRIMARY KEY, m MEDIUMINT UNIQUE) $engine; +--disable_cursor_protocol SELECT table_id INTO @table_id1 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE name = 'test/t1'; +--enable_cursor_protocol INSERT INTO t1 VALUES (-42, -123456); --enable_info ALTER TABLE t1 CHANGE t s SMALLINT; +--disable_cursor_protocol SELECT table_id INTO @table_id2 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE name = 'test/t1'; +--enable_cursor_protocol --error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON ALTER TABLE t1 CHANGE m i INT, ALGORITHM=INSTANT; ALTER TABLE t1 CHANGE m i INT; +--disable_cursor_protocol SELECT table_id INTO @table_id3 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE name = 'test/t1'; +--enable_cursor_protocol --disable_info SELECT @table_id1 = @table_id2, @table_id2 = @table_id3; INSERT IGNORE INTO t1 VALUES (0, -123456); diff --git a/mysql-test/suite/innodb/t/instant_alter_bugs.test b/mysql-test/suite/innodb/t/instant_alter_bugs.test index c1b999dbc74..c5f16736656 100644 --- a/mysql-test/suite/innodb/t/instant_alter_bugs.test +++ b/mysql-test/suite/innodb/t/instant_alter_bugs.test @@ -129,9 +129,11 @@ 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_cursor_protocol --disable_ps2_protocol SELECT * INTO OUTFILE 'load.data' FROM t1; --enable_ps2_protocol +--enable_cursor_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/restart.test b/mysql-test/suite/innodb/t/restart.test index 859d9325985..dba2c1e500b 100644 --- a/mysql-test/suite/innodb/t/restart.test +++ b/mysql-test/suite/innodb/t/restart.test @@ -93,8 +93,10 @@ let $wait_condition = FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_buffer_pool_resize_status'; +--disable_cursor_protocol SELECT @@innodb_buffer_pool_size INTO @innodb_buffer_pool_size_orig; SELECT CEILING((256 + 64) * @@innodb_page_size / 1048576) * 1048576 INTO @min_pool_size; +--enable_cursor_protocol --error ER_WRONG_VALUE_FOR_VAR EXECUTE IMMEDIATE 'SET GLOBAL innodb_buffer_pool_size = ?' USING (@min_pool_size -1); diff --git a/mysql-test/suite/innodb/t/temp_table_savepoint.test b/mysql-test/suite/innodb/t/temp_table_savepoint.test index fd1d06b48f7..185fb252e93 100644 --- a/mysql-test/suite/innodb/t/temp_table_savepoint.test +++ b/mysql-test/suite/innodb/t/temp_table_savepoint.test @@ -141,9 +141,11 @@ update ignore t5 set c1 = 20 where c1 = 140 ; select count(*) from t5 where c1 = 140; --replace_result $MYSQLTEST_VARDIR VARDIR +--disable_cursor_protocol --disable_ps2_protocol eval select * into outfile "$MYSQLTEST_VARDIR/tmp/t5.outfile" from t5; --enable_ps2_protocol +--enable_cursor_protocol create temporary table temp_1 engine = innodb as select * from t5 where 1=2; diff --git a/mysql-test/suite/innodb_fts/t/opt.test b/mysql-test/suite/innodb_fts/t/opt.test index 19dfdcad8fd..efcc47af4a7 100644 --- a/mysql-test/suite/innodb_fts/t/opt.test +++ b/mysql-test/suite/innodb_fts/t/opt.test @@ -30,6 +30,7 @@ ANALYZE TABLE t1; SET STATEMENT use_stat_tables=never FOR ANALYZE TABLE wp; +--disable_cursor_protocol --disable_ps2_protocol # @@ -549,6 +550,7 @@ SHOW STATUS LIKE 'Handler_read%'; DROP TABLE wp, t1; --enable_ps2_protocol +--enable_cursor_protocol # Tests for FT hints. diff --git a/mysql-test/suite/innodb_gis/t/1.test b/mysql-test/suite/innodb_gis/t/1.test index 3a5103860e1..411cb10602b 100644 --- a/mysql-test/suite/innodb_gis/t/1.test +++ b/mysql-test/suite/innodb_gis/t/1.test @@ -408,7 +408,10 @@ select (ST_asWKT(ST_geomfromwkb((0x010100000000000000000024400000000000002440))) --enable_metadata create table t1 (g GEOMETRY); select * from t1; +#Check after fix MDEV-31540 +--disable_cursor_protocol select ST_asbinary(g) from t1; +--enable_cursor_protocol --disable_metadata --enable_view_protocol drop table t1; diff --git a/mysql-test/suite/innodb_gis/t/gis.test b/mysql-test/suite/innodb_gis/t/gis.test index ea9de7edfff..fbf7c93840a 100644 --- a/mysql-test/suite/innodb_gis/t/gis.test +++ b/mysql-test/suite/innodb_gis/t/gis.test @@ -400,11 +400,14 @@ select (ST_asWKT(ST_geomfromwkb((0x000000000140240000000000004024000000000000))) select (ST_asWKT(ST_geomfromwkb((0x010100000000000000000024400000000000002440)))) AS val; --disable_view_protocol +#check after fix MDEV-31540 +--disable_cursor_protocol --enable_metadata create table t1 (g GEOMETRY); select * from t1; select ST_asbinary(g) from t1; --disable_metadata +--enable_cursor_protocol --enable_view_protocol drop table t1; @@ -1442,7 +1445,9 @@ SELECT ST_Union('', ''), md5(1); --echo # fields after MDEV-25459 --echo # CREATE TABLE t1(l LINESTRING NOT NULL, SPATIAL INDEX(l))ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; +--disable_cursor_protocol SELECT GROUP_CONCAT(CONCAT(seq, ' ', seq) SEPARATOR ',') INTO @g FROM seq_0_to_190; +--enable_cursor_protocol INSERT INTO t1 SET l=ST_GeomFromText(CONCAT('LINESTRING(',@g,',0 0)')); SELECT COUNT(*) FROM t1 WHERE MBRIntersects(GeomFromText('Polygon((0 0,0 10,10 10,10 0,0 0))'), l); DROP TABLE t1; diff --git a/mysql-test/suite/json/t/json_no_table.test b/mysql-test/suite/json/t/json_no_table.test index d7b302c98a6..4e4c6c842c4 100644 --- a/mysql-test/suite/json/t/json_no_table.test +++ b/mysql-test/suite/json/t/json_no_table.test @@ -330,8 +330,11 @@ SELECT JSON_DEPTH( json_compact( '"abc"') ); --echo error ER_INVALID_TYPE_FOR_JSON SELECT JSON_DEPTH( 1 ); +#Check after fix MDEV-31728 +--disable_cursor_protocol --echo error ER_INVALID_JSON_TEXT_IN_PARAM SELECT JSON_DEPTH( 'abc' ); +--enable_cursor_protocol # returns 1 SELECT JSON_DEPTH( json_compact( 1) ); @@ -372,11 +375,14 @@ SELECT JSON_DEPTH '[ "a", true, "b" , { "e" : false }, "c" , null ]' ); +#Check after fix MDEV-31728 +--disable_cursor_protocol --echo error ER_INVALID_JSON_TEXT_IN_PARAM SELECT JSON_DEPTH ( '[ "a", true, "b" , { "e" : false }, "c" , null' ); +--enable_cursor_protocol --echo # ---------------------------------------------------------------------- --echo # Test of JSON_REMOVE function. @@ -585,6 +591,8 @@ SELECT JSON_MERGE --echo error ER_INVALID_JSON_TEXT_IN_PARAM select json_type('abc'); +# Enable after fix MDEV-31554 +--disable_cursor_protocol #select i, json_type(j) from t1; select json_type('{"a": 2}'); select json_type('[1,2]'); @@ -651,6 +659,7 @@ select json_type(json_compact(ST_GeomFromText('POLYGON((0 0,10 0,10 10,0 10,0 0) select json_type(json_compact(null)); select json_type(json_compact(null)) is null; # check that it is an SQL NULL select json_type(null) is null; # is an SQL NULL +--enable_cursor_protocol # # same, but now show the printable value: @@ -882,7 +891,10 @@ select json_extract( '[1]', '$**[0]' ); # should have same result select json_extract( '{ "a": 1 }', '$.a[0]' ); +# Enable after fix MDEV-31554 +--disable_cursor_protocol select json_extract( '{ "a": 1 }', '$**[0]' ); +--enable_cursor_protocol # should have same result select json_extract( '{ "a": 1 }', '$[0].a' ); @@ -890,7 +902,10 @@ select json_extract( '{ "a": 1 }', '$**.a' ); # should have same result select json_extract( '{ "a": 1 }', '$[0].a[0]' ); +# Enable after fix MDEV-31554 +--disable_cursor_protocol select json_extract( '{ "a": 1 }', '$**[0]' ); +--enable_cursor_protocol # should have the same result select json_extract( '{ "a": 1 }', '$[0].a' ); @@ -998,7 +1013,10 @@ select json_extract( '[ { "a": [3,4] }, { "b": 2 } ]', '$[0].a', '$[1].a' ) jdoc # NULLs select json_array_append(NULL, '$.b', json_compact(1)); select json_array_append('[1,2,3]', NULL, json_compact(1)); +# Enable after fix MDEV-31554 +--disable_cursor_protocol select json_array_append('[1,2,3]', '$', NULL); +--enable_cursor_protocol # wrong # args --error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT @@ -1019,9 +1037,12 @@ select json_array_append(json_compact('{"a": {"b": [3]}}'), '$**[0]', 6); --echo # Auto-wrapping, since because the paths identify scalars. --echo # should return {"a": "foo", "b": ["bar", 4], "c": ["wibble", "grape"]} +# Enable after fix MDEV-31554 +--disable_cursor_protocol SELECT JSON_ARRAY_APPEND('{"a": "foo", "b": "bar", "c": "wibble"}', '$.b', json_compact(4), '$.c', json_compact('"grape"')); +--enable_cursor_protocol --echo # should return {"a": "foo", "b": [1, 2, 3, 4], --echo # "c": ["apple", "pear", "grape"]} @@ -1089,7 +1110,10 @@ select json_insert('[1,2,3]', '$[3]', 4); select json_insert('[1,2,3]', '$[10]', 4); select json_insert('{"c":4}', '$.c', 4); +# Enable after fix MDEV-31554 +--disable_cursor_protocol select json_insert('{"c":4}', '$.a', 4); +--enable_cursor_protocol select json_insert('1', '$', 4); select json_insert('1', '$[0]', 4); @@ -1297,9 +1321,12 @@ select json_set(NULL, NULL); --error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT select json_set(NULL, NULL, NULL, NULL); +# Enable after fix MDEV-31554 +--disable_cursor_protocol # Detect errors in nested function calls. --echo error ER_INVALID_JSON_TEXT_IN_PARAM SELECT JSON_SET('{}', '$.name', JSON_EXTRACT('', '$')); +--enable_cursor_protocol # positive test cases @@ -1308,7 +1335,10 @@ select json_set('[1,2,3]', '$[3]', 4); select json_set('[1,2,3]', '$[10]', 4); select json_set('{"c":4}', '$.c', 5); +# Enable after fix MDEV-31554 +--disable_cursor_protocol select json_set('{"c":4}', '$.a', 5); +--enable_cursor_protocol select json_set('1', '$', 4); select json_set('1', '$[0]', 4); @@ -1355,10 +1385,13 @@ select json_set('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', '$.a', json_compact('{}')); +# Enable after fix MDEV-31554 +--disable_cursor_protocol # returns { "a" : "foo", "b" : [ 1, 2, 3 ], "c" : [ true, false ] } select json_set('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', '$.c', json_compact('[true, false]')); +--enable_cursor_protocol # returns [ 1, null, null, 2 ] select json_set('1', '$[3]', 2); @@ -1376,6 +1409,8 @@ SELECT JSON_SET JSON_OBJECT() ); +# Enable after fix MDEV-31554 +--disable_cursor_protocol # returns {"a": "foo", "b": [1, 2, 3], "c": [true, false]} SELECT JSON_SET ( @@ -1391,6 +1426,7 @@ SELECT JSON_SET '$.c', JSON_ARRAY( json_compact( 'true'), json_compact( 'false') ) ); +--enable_cursor_protocol # returns [1, 2] SELECT JSON_SET @@ -1473,6 +1509,8 @@ select json_array('[1,2,3]', NULL, json_compact(1)); select json_array('[1,2,3]', '$[3]', NULL); +# Enable after fix MDEV-31554 +--disable_cursor_protocol # positive test cases select json_array(); select json_array(3.14); @@ -1483,6 +1521,7 @@ select json_array(b'0', b'1', b'10'); # returns the empty array: [] SELECT JSON_ARRAY(); +--enable_cursor_protocol --echo # ---------------------------------------------------------------------- --echo # Test of JSON_OBJECT function. @@ -1498,9 +1537,12 @@ select json_object( 'a', 1, 'b' ); --echo error ER_JSON_DOCUMENT_NULL_KEY select json_object( null, 1 ); +# Enable after fix MDEV-31554 +--disable_cursor_protocol # positive tests select json_object(); select json_object( 'a', null ); +--enable_cursor_protocol select json_object( 'a', 1 ); select json_object( 'a', 1, 'b', 'foo' ); select json_object( 'a', 1, 'b', 'foo', 'c', json_compact( '{ "d": "wibble" }') ); @@ -1517,8 +1559,11 @@ select json_object( cast(json_array() as char), json_array()); select json_object( 1, json_array()); select json_object( cast(1 as char), json_array()); +# Enable after fix MDEV-31554 +--disable_cursor_protocol # returns the empty object: {} SELECT JSON_OBJECT(); +--enable_cursor_protocol --echo # ---------------------------------------------------------------------- --echo # Test of JSON_SEARCH function. @@ -1710,17 +1755,23 @@ select json_type(case (null is null) when 1 then json_compact('null') else json_compact('[1,2,3]') end); +# Enable after fix MDEV-31554 +--disable_cursor_protocol select json_type(case (null is not null) when 1 then json_compact('null') else json_compact('[1,2,3]') end); +--enable_cursor_protocol select json_type( if(null is null, json_compact('null'), json_compact('[1,2,3]')) ); +# Enable after fix MDEV-31554 +--disable_cursor_protocol select json_type( if(null is not null, json_compact('null'), json_compact('[1,2,3]'))); +--enable_cursor_protocol select cast(json_extract(json_compact(concat('[', json_compact('["A",2]'), ']')), '$[0][1]') as char) = 2; @@ -1765,8 +1816,11 @@ select json_quote(convert('abc' using utf8mb4)); select json_unquote('abc'); # should do nothing select json_unquote('"abc"'); +# Enable after fix MDEV-31554 +--disable_cursor_protocol select json_unquote(convert('"abc"' using ascii)); select json_unquote(convert('"abc"' using latin1)); +--enable_cursor_protocol select json_unquote(convert('"abc"' using utf8)); select json_unquote(convert('"abc"' using utf8mb4)); @@ -1775,8 +1829,11 @@ select json_unquote('"'); # should do nothing --echo error ER_INCORRECT_TYPE select json_quote(123); # integer not allowed +# Enable after fix MDEV-31554 +--disable_cursor_protocol --echo error ER_INCORRECT_TYPE select json_unquote(123); # integer not allowed +--enable_cursor_protocol select json_unquote('""'); # empty string select char_length(json_unquote('""')); # verify empty string @@ -1810,21 +1867,30 @@ select json_unquote(json_unquote(json_unquote( # long round trip of it # DATE/TIME will lose their quotes, too: select json_compact(cast('2015-01-15 23:24:25' as datetime)); +# Enable after fix MDEV-31554 +--disable_cursor_protocol select json_unquote(json_compact(cast('2015-01-15 23:24:25' as datetime))); +--enable_cursor_protocol # as well as opaque values: select json_compact(st_geomfromtext('point(1 1)')); +# Enable after fix MDEV-31554 +--disable_cursor_protocol select json_unquote(json_compact(st_geomfromtext('point(1 1)'))); +--enable_cursor_protocol # examples from the wl7909 spec # returns the SQL string literal abc SELECT JSON_UNQUOTE( '"abc"' ); +# Enable after fix MDEV-31554 +--disable_cursor_protocol # returns the SQL string literal "abc SELECT JSON_UNQUOTE( '"abc' ); --echo error ER_INCORRECT_TYPE SELECT JSON_UNQUOTE( 123 ); +--enable_cursor_protocol # returns the SQL string literal abc SELECT JSON_UNQUOTE @@ -1966,7 +2032,10 @@ SELECT JSON_CONTAINS('[1]', '[1]', '$', '$[0]'); select json_object("a", ifnull(json_quote('test'), json_compact('null'))); select json_compact(concat('[', json_quote('ab'), ']')); select json_compact(concat('[', json_unquote('"12"'), ']')); +# Enable after fix MDEV-31554 +--disable_cursor_protocol select json_compact(concat('["', json_type( json_compact(1)), '"]')); +--enable_cursor_protocol --echo # --echo # Bug#20912438: ITEM_TYPE_HOLDER::DISPLAY_LENGTH(ITEM*): ASSERTION `0' FAILED @@ -2125,7 +2194,10 @@ select json_quote( json_type( json_compact('{}') ) ); --echo # WHEN EXECUTED IN A VIEW OR JOIN --echo # +# Enable after fix MDEV-31554 +--disable_cursor_protocol SELECT JSON_TYPE(JSON_OBJECT()); +--enable_cursor_protocol CREATE VIEW v1 AS SELECT JSON_TYPE(JSON_OBJECT()); SELECT * FROM v1; drop view v1; @@ -2158,8 +2230,11 @@ SELECT * FROM (SELECT JSON_UNQUOTE(JSON_QUOTE('This is a string that should not --echo # FOR BOOL WHEN USED VIA VIEW --echo # +# Enable after fix MDEV-31554 +--disable_cursor_protocol SELECT JSON_OBJECT('key1', false, 'key2', true); SELECT JSON_ARRAY('key1', false, 'key2', true); +--enable_cursor_protocol CREATE VIEW v1 AS SELECT JSON_OBJECT('key1', false, 'key2', true); SELECT * FROM v1; CREATE VIEW v2 AS SELECT JSON_ARRAY('key1', false, 'key2', true); @@ -2282,7 +2357,9 @@ SELECT JSON_REPLACE('[[[1]]]', '$[0][0][0]', 100); # LEAST and GREATEST treat JSON arguments as strings for now. They used to hit # an assertion if used in a JSON context and all arguments were JSON values, or # a mix of NULLs and JSON values. +# Enable after fix MDEV-31554 +--disable_cursor_protocol SELECT JSON_ARRAY(LEAST(NULL, NULL), GREATEST(NULL, NULL), LEAST(j1, NULL), GREATEST(NULL, j2), LEAST(j1, j2), GREATEST(j1, j2)) AS j FROM (SELECT json_compact('1') AS j1, json_compact('2') AS j2) t; - +--enable_cursor_protocol diff --git a/mysql-test/suite/parts/inc/partition.pre b/mysql-test/suite/parts/inc/partition.pre index fba909687a0..96e1afbb5a5 100644 --- a/mysql-test/suite/parts/inc/partition.pre +++ b/mysql-test/suite/parts/inc/partition.pre @@ -57,7 +57,9 @@ let $ER_NO_PARTITION_FOR_GIVEN_VALUE= 1526; # Set the variable $engine_other to a storage engine <> $engine --disable_query_log +--disable_cursor_protocol eval SELECT UPPER($engine) = 'MEMORY' INTO @aux; +--enable_cursor_protocol let $aux= `SELECT @aux`; if ($aux) { @@ -69,6 +71,7 @@ if (!$aux) } --enable_query_log +--disable_cursor_protocol # Numbers used for # - partitioning Example: ... PARTITION part1 VALUES LESS THAN ($max_row_div2) # - INSERT/SELECT/UPDATE/DELETE Example: ... WHERE f_int1 > @max_row_div3 @@ -102,6 +105,7 @@ WHERE f_int1 BETWEEN 2 * @max_row_div3 AND @max_row; # let $insert_all= INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; +--enable_cursor_protocol # Column list with definition for all tables to be checked let $column_list= f_int1 INTEGER DEFAULT 0, diff --git a/mysql-test/suite/parts/inc/partition_alter3.inc b/mysql-test/suite/parts/inc/partition_alter3.inc index 395f93f44f6..feebcf4ffaa 100644 --- a/mysql-test/suite/parts/inc/partition_alter3.inc +++ b/mysql-test/suite/parts/inc/partition_alter3.inc @@ -28,8 +28,10 @@ SELECT CONCAT(CAST((f_int1 + 999) AS CHAR),'-02-10'), CAST(f_char1 AS CHAR) FROM t0_template WHERE f_int1 + 999 BETWEEN 1000 AND 9999; # 3. Calculate the number of inserted records. +--disable_cursor_protocol SELECT IF(9999 - 1000 + 1 > @max_row, @max_row , 9999 - 1000 + 1) INTO @exp_row_count; +--enable_cursor_protocol # DEBUG SELECT @exp_row_count; # 4. Print the layout, check Readability --source suite/parts/inc/partition_layout.inc diff --git a/mysql-test/suite/parts/inc/partition_check.inc b/mysql-test/suite/parts/inc/partition_check.inc index ed323dfa245..4dad6bff16f 100644 --- a/mysql-test/suite/parts/inc/partition_check.inc +++ b/mysql-test/suite/parts/inc/partition_check.inc @@ -64,6 +64,7 @@ if ($no_debug) { --disable_query_log } +--disable_cursor_protocol let $my_stmt= SELECT COUNT(*) <> 0 INTO @aux FROM t1 WHERE f_int1 <> f_int2 OR f_char1 <> CAST(f_int1 AS CHAR) OR f_char1 <> f_char2 OR f_charbig <> CONCAT('===',f_char1,'===') @@ -148,6 +149,7 @@ if ($run) --echo # Sorry, have to abort. exit; } +--enable_cursor_protocol # Give a success message like in the other following tests --echo # check MIN/MAX(f_int2) success: 1 @@ -368,17 +370,21 @@ AND (MIN(f_int1) = 1) AND (MAX(f_int1) = @max_row) AS "" FROM t1; if ($any_unique) { # Calculate the number of records, where we will try INSERT ..... or REPLACE + --disable_cursor_protocol SELECT COUNT(*) INTO @try_count FROM t0_template WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; + --enable_cursor_protocol # # Calculate the number of records, where we will get DUPLICATE KEY # f_int1 is sufficient for calculating this, because 1.1 # checks, that f_int1 = f_int2 is valid for all rows. + --disable_cursor_protocol SELECT COUNT(*) INTO @clash_count FROM t1 INNER JOIN t0_template USING(f_int1) WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row; + --enable_cursor_protocol if ($debug) { SELECT @try_count, @clash_count; @@ -390,7 +396,9 @@ if ($any_unique) # 4 Some operations with single records # 4.1 Insert one record with a value for f_int1 which is lower than in all # existing records. +--disable_cursor_protocol SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1; +--enable_cursor_protocol INSERT INTO t1 SET f_int1 = @cur_value , f_int2 = @cur_value, f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), @@ -408,7 +416,9 @@ WHERE f_int1 = @cur_value AND f_int2 = @cur_value # # 4.2 Insert one record with a value for f_int1 which is higher than in all # existing records. +--disable_cursor_protocol SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1; +--enable_cursor_protocol INSERT INTO t1 SET f_int1 = @cur_value , f_int2 = @cur_value, f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR), @@ -428,8 +438,10 @@ WHERE f_int1 = @cur_value AND f_int2 = @cur_value # the highest value of all existing records. # If f_int1 is used for the partitioning expression a movement of the # record to another partition/subpartition might appear. +--disable_cursor_protocol SELECT MIN(f_int1) INTO @cur_value1 FROM t1; SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1; +--enable_cursor_protocol UPDATE t1 SET f_int1 = @cur_value2 WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; # Check of preceding statement via Select @@ -447,7 +459,9 @@ WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; # record to another partition/subpartition might appear. # f_int1 gets the delicate value '-1'. SET @cur_value1= -1; +--disable_cursor_protocol SELECT MAX(f_int1) INTO @cur_value2 FROM t1; +--enable_cursor_protocol # Bug#15968: Partitions: crash when INSERT with f_int1 = -1 into PARTITION BY HASH(f_int1) UPDATE t1 SET f_int1 = @cur_value1 WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#'; @@ -461,7 +475,9 @@ WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#'; --enable_query_log # # 4.5 Delete the record with the highest value of f_int1. +--disable_cursor_protocol SELECT MAX(f_int1) INTO @cur_value FROM t1; +--enable_cursor_protocol DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#'; # Check of preceding statements via Select if ($no_debug) @@ -751,8 +767,10 @@ if ($no_debug) { --disable_query_log } +--disable_cursor_protocol SELECT COUNT(f_int1) INTO @start_count FROM t1 WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; +--enable_cursor_protocol --enable_query_log let $run= `SELECT @start_count <> 0`; if ($run) @@ -770,7 +788,9 @@ if ($no_debug) { --disable_query_log } +--disable_cursor_protocol SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; +--enable_cursor_protocol --enable_query_log # 7.1 Successful INSERT + COMMIT INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) @@ -839,8 +859,10 @@ if ($no_debug) { --disable_query_log } +--disable_cursor_protocol SELECT COUNT(*) INTO @my_count FROM t1 WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; +--enable_cursor_protocol SELECT '# check transactions-6 success: ' AS "", @my_count IN (0,@exp_inserted_rows) AS ""; let $run= `SELECT @my_count = 0`; @@ -872,7 +894,9 @@ COMMIT WORK; # 7.3 Failing INSERT (in mid of statement processing) + COMMIT SET @@session.sql_mode = 'traditional'; # Number of records where a INSERT has to be tried +--disable_cursor_protocol SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows; +--enable_cursor_protocol # --disable_abort_on_error INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) @@ -890,8 +914,10 @@ if ($no_debug) { --disable_query_log } +--disable_cursor_protocol SELECT COUNT(*) INTO @my_count FROM t1 WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4; +--enable_cursor_protocol SELECT '# check transactions-8 success: ' AS "", @my_count IN (@max_row_div2 - 1 - @max_row_div4 + 1,0) AS ""; let $run= `SELECT @my_count = @max_row_div2 - 1 - @max_row_div4 + 1`; diff --git a/mysql-test/suite/parts/inc/partition_check_read.inc b/mysql-test/suite/parts/inc/partition_check_read.inc index e42bb9c90ab..280580d67a6 100644 --- a/mysql-test/suite/parts/inc/partition_check_read.inc +++ b/mysql-test/suite/parts/inc/partition_check_read.inc @@ -27,7 +27,9 @@ while ($num) { --disable_query_log } + --disable_cursor_protocol eval SELECT COUNT(*) <> 1 INTO @aux FROM t1 WHERE $col_to_check = $num; + --enable_cursor_protocol --enable_query_log let $run= `SELECT @aux`; if ($run) @@ -46,7 +48,9 @@ while ($num) { --disable_query_log } + --disable_cursor_protocol eval SELECT COUNT(*) = 1 INTO @aux FROM t1 WHERE $col_to_check = @max_row + $num; + --enable_cursor_protocol --enable_query_log let $run= `SELECT @aux`; if ($run) @@ -64,7 +68,9 @@ while ($num) { --disable_query_log } + --disable_cursor_protocol eval SELECT COUNT(*) = 1 INTO @aux FROM t1 WHERE $col_to_check = 1 - $num; + --enable_cursor_protocol --enable_query_log let $run= `SELECT @aux`; if ($run) diff --git a/mysql-test/suite/parts/inc/partition_check_read1.inc b/mysql-test/suite/parts/inc/partition_check_read1.inc index 0b8b800a371..cb6b839130a 100644 --- a/mysql-test/suite/parts/inc/partition_check_read1.inc +++ b/mysql-test/suite/parts/inc/partition_check_read1.inc @@ -26,7 +26,9 @@ if ($no_debug) { --disable_query_log } +--disable_cursor_protocol SELECT COUNT(*) <> 1 INTO @aux FROM t1 WHERE f_date = '1000-02-10'; +--enable_cursor_protocol --enable_query_log let $run= `SELECT @aux`; if ($run) @@ -43,7 +45,9 @@ if ($no_debug) { --disable_query_log } +--disable_cursor_protocol eval SELECT COUNT(*) <> @exp_row_count INTO @aux FROM t1; +--enable_cursor_protocol --enable_query_log let $run= `SELECT @aux`; if ($run) @@ -63,8 +67,10 @@ while ($num) { --disable_query_log } + --disable_cursor_protocol eval SELECT COUNT(*) <> 1 INTO @aux FROM t1 WHERE f_date = CONCAT(CAST(999 + $num AS CHAR),'-02-10'); + --enable_cursor_protocol --enable_query_log let $run= `SELECT @aux`; if ($run) diff --git a/mysql-test/suite/parts/inc/partition_check_read2.inc b/mysql-test/suite/parts/inc/partition_check_read2.inc index 60964355d14..36421dec115 100644 --- a/mysql-test/suite/parts/inc/partition_check_read2.inc +++ b/mysql-test/suite/parts/inc/partition_check_read2.inc @@ -22,7 +22,9 @@ if ($no_debug) { --disable_query_log } +--disable_cursor_protocol SELECT COUNT(*) <> 1 INTO @aux FROM t1 WHERE f_int1 = 3; +--enable_cursor_protocol --enable_query_log let $run= `SELECT @aux`; if ($run) @@ -39,7 +41,9 @@ if ($no_debug) { --disable_query_log } +--disable_cursor_protocol eval SELECT COUNT(*) <> @max_row INTO @aux FROM t1; +--enable_cursor_protocol --enable_query_log let $run= `SELECT @aux`; if ($run) @@ -59,8 +63,10 @@ while ($num) { --disable_query_log } + --disable_cursor_protocol eval SELECT COUNT(*) <> 1 INTO @aux FROM t1 WHERE f_int1 = 3; + --enable_cursor_protocol --enable_query_log let $run= `SELECT @aux`; if ($run) diff --git a/mysql-test/suite/parts/inc/partition_layout_check2.inc b/mysql-test/suite/parts/inc/partition_layout_check2.inc index 23e4a9e1e95..6e98eb16223 100644 --- a/mysql-test/suite/parts/inc/partition_layout_check2.inc +++ b/mysql-test/suite/parts/inc/partition_layout_check2.inc @@ -58,11 +58,13 @@ eval INSERT INTO t0_definition SET state = 'new', file_list = @aux; # Print the old and new table layout, if they differ +--disable_cursor_protocol SELECT COUNT(*) <> 1 INTO @aux FROM t0_definition tab1, t0_definition tab2 WHERE tab1.state = 'old' AND tab2.state = 'new' AND tab1.create_command = tab2.create_command AND tab1.file_list = tab2.file_list; +--enable_cursor_protocol let $run= `SELECT @aux`; if ($run) { diff --git a/mysql-test/suite/parts/inc/partition_trigg1.inc b/mysql-test/suite/parts/inc/partition_trigg1.inc index 7bb5aa162a9..c0d6ba4e867 100644 --- a/mysql-test/suite/parts/inc/partition_trigg1.inc +++ b/mysql-test/suite/parts/inc/partition_trigg1.inc @@ -24,7 +24,9 @@ if ($no_debug) { --disable_query_log } +--disable_cursor_protocol eval SELECT INSTR('$statement','DELETE') = 0 INTO @aux; +--enable_cursor_protocol let $run1= `SELECT @aux`; --enable_query_log if ($run1) @@ -72,7 +74,9 @@ if ($no_debug) { --disable_query_log } +--disable_cursor_protocol eval SELECT INSTR('$statement','INSERT') = 0 INTO @aux; +--enable_cursor_protocol let $run1= `SELECT @aux`; --enable_query_log if ($run1) diff --git a/mysql-test/suite/parts/inc/partition_trigg3.inc b/mysql-test/suite/parts/inc/partition_trigg3.inc index 34dbf4e2cd1..4d461a8a755 100644 --- a/mysql-test/suite/parts/inc/partition_trigg3.inc +++ b/mysql-test/suite/parts/inc/partition_trigg3.inc @@ -46,7 +46,9 @@ delimiter ;| # Additional statements because of Bug(limitation)#17704 SET @counter = 1; # Bug#18730 Partitions: crash on SELECT MIN() +--disable_cursor_protocol SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1; +--enable_cursor_protocol # Additional statements end eval $statement; DROP TRIGGER trg_3; diff --git a/mysql-test/suite/perfschema/t/alter_table_progress.test b/mysql-test/suite/perfschema/t/alter_table_progress.test index d0a4055ad0e..d132ed53fa5 100644 --- a/mysql-test/suite/perfschema/t/alter_table_progress.test +++ b/mysql-test/suite/perfschema/t/alter_table_progress.test @@ -34,9 +34,11 @@ update performance_schema.threads truncate table performance_schema.events_statements_history_long; truncate table performance_schema.events_stages_history_long; +--disable_cursor_protocol --disable_query_log eval select $con1_THREAD_ID into @con1_thread_id; --enable_query_log +--enable_cursor_protocol --connection con1 @@ -52,8 +54,10 @@ SET DEBUG_SYNC='copy_data_between_tables_before SIGNAL found_row WAIT_FOR wait_r SET DEBUG_SYNC='now WAIT_FOR found_row'; # Find the statement id of the ALTER TABLE +--disable_cursor_protocol select event_id from performance_schema.events_statements_current where thread_id = @con1_thread_id into @con1_stmt_id; +--enable_cursor_protocol # completed 0 select EVENT_NAME, WORK_COMPLETED, WORK_ESTIMATED diff --git a/mysql-test/suite/perfschema/t/dml_handler.test b/mysql-test/suite/perfschema/t/dml_handler.test index 16810fcba82..791d2274598 100644 --- a/mysql-test/suite/perfschema/t/dml_handler.test +++ b/mysql-test/suite/perfschema/t/dml_handler.test @@ -21,7 +21,9 @@ CREATE TEMPORARY TABLE table_list (id INT AUTO_INCREMENT, PRIMARY KEY (id)) AS WHERE TABLE_SCHEMA='performance_schema' ORDER BY TABLE_NAME; +--disable_cursor_protocol SELECT COUNT(*) FROM table_list INTO @table_count; +--enable_cursor_protocol let $count=`SELECT @table_count`; @@ -32,7 +34,9 @@ let $count=`SELECT @table_count`; while ($count > 0) { + --disable_cursor_protocol eval SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=$count; + --enable_cursor_protocol let $table_name = `SELECT @table_name`; --error ER_ILLEGAL_HA eval HANDLER performance_schema.$table_name OPEN; diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_blocked.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_blocked.test index d304cc5a1b8..58077973248 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv4_blocked.test +++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_blocked.test @@ -17,7 +17,9 @@ --source ../include/wait_for_pfs_thread_count.inc --source ../include/hostcache_set_state.inc +--disable_cursor_protocol select @@global.max_connect_errors into @saved_max_connect_errors; +--enable_cursor_protocol set global max_connect_errors = 3; diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_max_con.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_max_con.test index 6420b8b5300..ab3fd73ab45 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv4_max_con.test +++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_max_con.test @@ -17,8 +17,10 @@ --source ../include/wait_for_pfs_thread_count.inc --source ../include/hostcache_set_state.inc +--disable_cursor_protocol select @@global.max_connections into @saved_max_connections; select @@global.max_user_connections into @saved_max_user_connections; +--enable_cursor_protocol create user 'quota'@'santa.claus.ipv4.example.com'; grant select on test.* to 'quota'@'santa.claus.ipv4.example.com'; diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_blocked.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_blocked.test index 6da99e02444..9d845b5e296 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv6_blocked.test +++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_blocked.test @@ -17,7 +17,9 @@ --source ../include/wait_for_pfs_thread_count.inc --source ../include/hostcache_set_state.inc +--disable_cursor_protocol select @@global.max_connect_errors into @saved_max_connect_errors; +--enable_cursor_protocol set global max_connect_errors = 3; diff --git a/mysql-test/suite/perfschema/t/query_cache.test b/mysql-test/suite/perfschema/t/query_cache.test index 045c4628e9e..43c408a075f 100644 --- a/mysql-test/suite/perfschema/t/query_cache.test +++ b/mysql-test/suite/perfschema/t/query_cache.test @@ -23,13 +23,17 @@ reset query cache; flush status; --disable_ps2_protocol +--disable_cursor_protocol select * from t1; +--enable_cursor_protocol show global status like "Qcache_queries_in_cache"; show global status like "Qcache_inserts"; show global status like "Qcache_hits"; +--disable_cursor_protocol select * from t1; +--enable_cursor_protocol show global status like "Qcache_queries_in_cache"; show global status like "Qcache_inserts"; diff --git a/mysql-test/suite/perfschema/t/rpl_threads.test b/mysql-test/suite/perfschema/t/rpl_threads.test index 984939c21f8..f8438649cf0 100644 --- a/mysql-test/suite/perfschema/t/rpl_threads.test +++ b/mysql-test/suite/perfschema/t/rpl_threads.test @@ -29,9 +29,11 @@ connection master; # Read the ID of the binlog dump connection, # as exposed in PROCESSLIST. +--disable_cursor_protocol select ID from INFORMATION_SCHEMA.PROCESSLIST where COMMAND = "Binlog Dump" into @master_dump_pid; +--enable_cursor_protocol select COMMAND, STATE from INFORMATION_SCHEMA.PROCESSLIST @@ -47,9 +49,11 @@ sync_slave_with_master; # Read the ID of the SLAVE IO thread, # as exposed in PROCESSLIST. +--disable_cursor_protocol select ID from INFORMATION_SCHEMA.PROCESSLIST where STATE like "Waiting for master to send event%" into @slave_io_pid; +--enable_cursor_protocol select COMMAND, STATE from INFORMATION_SCHEMA.PROCESSLIST @@ -62,9 +66,11 @@ select NAME, TYPE, PROCESSLIST_COMMAND, PROCESSLIST_STATE # Read the ID of the SLAVE SQL thread, # as exposed in PROCESSLIST. +--disable_cursor_protocol select ID from INFORMATION_SCHEMA.PROCESSLIST where STATE like "Slave has read all relay log%" into @slave_sql_pid; +--enable_cursor_protocol select COMMAND, STATE from INFORMATION_SCHEMA.PROCESSLIST diff --git a/mysql-test/suite/perfschema/t/socket_connect.test b/mysql-test/suite/perfschema/t/socket_connect.test index 4ae9608cd0e..6b84ada964a 100644 --- a/mysql-test/suite/perfschema/t/socket_connect.test +++ b/mysql-test/suite/perfschema/t/socket_connect.test @@ -16,6 +16,7 @@ let $my_socket_debug_dbug=0; --echo #============================================================================== --source ../include/socket_ipv6.inc +--disable_cursor_protocol --echo #============================================================================== --echo # Get hostname, port number --echo #============================================================================== @@ -291,3 +292,4 @@ WHERE EVENT_NAME LIKE '%client_connection%' AND OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin; --source include/wait_condition.inc exit; +--enable_cursor_protocol diff --git a/mysql-test/suite/perfschema/t/socket_instances_func.test b/mysql-test/suite/perfschema/t/socket_instances_func.test index 4cf58d42185..1541a402289 100644 --- a/mysql-test/suite/perfschema/t/socket_instances_func.test +++ b/mysql-test/suite/perfschema/t/socket_instances_func.test @@ -47,9 +47,11 @@ CREATE TEMPORARY TABLE my_socket_instances AS SELECT * FROM performance_schema.socket_instances; --echo # Get thread id of the default connection +--disable_cursor_protocol SELECT THREAD_ID INTO @thread_id FROM performance_schema.threads WHERE PROCESSLIST_ID = CONNECTION_ID(); +--enable_cursor_protocol let $con0_thread_id= `SELECT @thread_id`; @@ -67,14 +69,18 @@ if($my_socket_debug) } --echo # Store the thread id of connection 1 (tcp/ip) +--disable_cursor_protocol SELECT THREAD_ID INTO @thread_id FROM performance_schema.threads WHERE PROCESSLIST_ID = CONNECTION_ID(); +--enable_cursor_protocol --echo # Store the port of connection 1 (tcp/ip) +--disable_cursor_protocol eval SELECT PORT INTO @port FROM performance_schema.socket_instances WHERE THREAD_ID = @thread_id; +--enable_cursor_protocol let $con1_thread_id= `SELECT @thread_id`; let $con1_port= `SELECT @port`; @@ -95,14 +101,18 @@ if($my_socket_debug) } --echo # Store the thread_id of connection 2 (tcp/ip) +--disable_cursor_protocol SELECT THREAD_ID INTO @thread_id FROM performance_schema.threads WHERE PROCESSLIST_ID = CONNECTION_ID(); +--enable_cursor_protocol --echo # Store the port of connection 2 (tcp/ip) +--disable_cursor_protocol eval SELECT PORT INTO @port FROM performance_schema.socket_instances WHERE THREAD_ID = @thread_id; +--enable_cursor_protocol let $con2_thread_id= `SELECT @thread_id`; let $con2_port= `SELECT @port`; @@ -123,14 +133,18 @@ if($my_socket_debug) } --echo # Store the thread id of connection 3 (unix domain) +--disable_cursor_protocol SELECT THREAD_ID INTO @thread_id FROM performance_schema.threads WHERE PROCESSLIST_ID = CONNECTION_ID(); +--enable_cursor_protocol --echo # Store the port of connection 3 (unix domain) +--disable_cursor_protocol eval SELECT PORT INTO @port FROM performance_schema.socket_instances WHERE THREAD_ID = @thread_id; +--enable_cursor_protocol let $con3_port= `SELECT @port`; let $con3_thread_id= `SELECT @thread_id`; @@ -232,9 +246,11 @@ WHERE EVENT_NAME = 'wait/io/socket/sql/server_tcpip_socket'; # Store the thread id of server_tcpip_socket --echo # Get the 'server_tcpip_socket' thread id +--disable_cursor_protocol SELECT THREAD_ID INTO @thread_id FROM performance_schema.socket_instances WHERE EVENT_NAME = 'wait/io/socket/sql/server_tcpip_socket'; +--enable_cursor_protocol let $server_tcpip_thread_id= `SELECT @thread_id`; @@ -265,9 +281,11 @@ WHERE EVENT_NAME = 'wait/io/socket/sql/server_unix_socket'; # Store the thread id of 'server_unix_socket' --echo # Get the 'server_unix_socket' thread id +--disable_cursor_protocol SELECT THREAD_ID INTO @thread_id FROM performance_schema.socket_instances WHERE EVENT_NAME = 'wait/io/socket/sql/server_unix_socket'; +--enable_cursor_protocol let $server_unix_thread_id= `SELECT @thread_id`; @@ -301,7 +319,9 @@ WHERE THREAD_ID = @thread_id; --echo #Compare server listener socket thread ids --disable_query_log ONCE +--disable_cursor_protocol eval SELECT ($server_tcpip_thread_id = $server_unix_thread_id) into @match_thread_id; +--disable_cursor_protocol select @match_thread_id; diff --git a/mysql-test/suite/perfschema/t/socket_instances_func_win.test b/mysql-test/suite/perfschema/t/socket_instances_func_win.test index 5faf0d24ec4..24774a51fa2 100644 --- a/mysql-test/suite/perfschema/t/socket_instances_func_win.test +++ b/mysql-test/suite/perfschema/t/socket_instances_func_win.test @@ -47,9 +47,11 @@ CREATE TEMPORARY TABLE my_socket_instances AS SELECT * FROM performance_schema.socket_instances; --echo # Get thread id of the default connection +--disable_cursor_protocol SELECT THREAD_ID INTO @thread_id FROM performance_schema.threads WHERE PROCESSLIST_ID = CONNECTION_ID(); +--enable_cursor_protocol let $con0_thread_id= `SELECT @thread_id`; @@ -70,14 +72,18 @@ if($my_socket_debug) } --echo # Store the thread id of connection 1 (tcp/ip) +--disable_cursor_protocol SELECT THREAD_ID INTO @thread_id FROM performance_schema.threads WHERE PROCESSLIST_ID = CONNECTION_ID(); +--enable_cursor_protocol --echo # Store the port of connection 1 (tcp/ip) +--disable_cursor_protocol eval SELECT PORT INTO @port FROM performance_schema.socket_instances WHERE THREAD_ID = @thread_id; +--enable_cursor_protocol let $con1_thread_id= `SELECT @thread_id`; let $con1_port= `SELECT @port`; @@ -102,14 +108,18 @@ if($my_socket_debug) } --echo # Store the thread_id of connection 2 (tcp/ip) +--disable_cursor_protocol SELECT THREAD_ID INTO @thread_id FROM performance_schema.threads WHERE PROCESSLIST_ID = CONNECTION_ID(); +--enable_cursor_protocol --echo # Store the port of connection 2 (tcp/ip) +--disable_cursor_protocol eval SELECT PORT INTO @port FROM performance_schema.socket_instances WHERE THREAD_ID = @thread_id; +--enable_cursor_protocol let $con2_thread_id= `SELECT @thread_id`; let $con2_port = `SELECT @port`; @@ -216,9 +226,11 @@ WHERE EVENT_NAME = 'wait/io/socket/sql/server_tcpip_socket'; # Store the thread id of server_tcpip_socket --echo # Get the 'server_tcpip_socket' thread id +--disable_cursor_protocol SELECT THREAD_ID INTO @thread_id FROM performance_schema.socket_instances WHERE EVENT_NAME = 'wait/io/socket/sql/server_tcpip_socket'; +--enable_cursor_protocol let $server_tcpip_thread_id= `SELECT @thread_id`; diff --git a/mysql-test/suite/perfschema/t/socket_summary_by_event_name_func.test b/mysql-test/suite/perfschema/t/socket_summary_by_event_name_func.test index 4a6ee2b6277..aebe64e3f59 100644 --- a/mysql-test/suite/perfschema/t/socket_summary_by_event_name_func.test +++ b/mysql-test/suite/perfschema/t/socket_summary_by_event_name_func.test @@ -41,8 +41,10 @@ let $my_socket_debug_dbug= 0; --echo #============================================================================== --echo # Get hostname, port number --echo #============================================================================== +--disable_cursor_protocol SELECT @@hostname INTO @MY_HOSTNAME; SELECT @@port INTO @MY_MASTER_PORT; +--enable_cursor_protocol if ($my_socket_debug) { @@ -145,7 +147,7 @@ WHERE t_inst.event_name LIKE '%client%' --connection default UPDATE performance_schema.threads SET INSTRUMENTED='NO' WHERE PROCESSLIST_ID = CONNECTION_ID(); - +--disable_cursor_protocol --echo # --echo # 1.2 Get the default THREAD_ID; --echo # @@ -161,6 +163,7 @@ let $default_object_instance_begin= `SELECT @my_object_instance_begin`; --disable_query_log SELECT @my_object_instance_begin INTO @default_object_instance_begin; --enable_query_log +--enable_cursor_protocol if ($my_socket_debug) { diff --git a/mysql-test/suite/perfschema/t/table_schema.test b/mysql-test/suite/perfschema/t/table_schema.test index 935bd667f2d..6abbd403837 100644 --- a/mysql-test/suite/perfschema/t/table_schema.test +++ b/mysql-test/suite/perfschema/t/table_schema.test @@ -16,9 +16,11 @@ select * from information_schema.columns where table_schema="performance_schema" # Count the number of NUMBER_OF_BYTES columns. +--disable_cursor_protocol select count(*) into @count_byte_columns from information_schema.columns where table_schema="performance_schema" and data_type = "bigint" and column_name like "%number_of_bytes"; +--enable_cursor_protocol # Confirm that at least one column was found. @@ -26,10 +28,12 @@ select @count_byte_columns > 0; # Confirm that all NUMBER_OF_BYTES columns are BIGINT signed. +--disable_cursor_protocol select count(*) into @count_byte_signed from information_schema.columns where table_schema="performance_schema" and data_type="bigint" and column_name like "%number_of_bytes" and column_type not like "%unsigned"; +--enable_cursor_protocol select (@count_byte_columns - @count_byte_signed) = 0; @@ -38,9 +42,11 @@ select (@count_byte_columns - @count_byte_signed) = 0; # # Count the number of OBJECT_INSTANCE_BEGIN columns. +--disable_cursor_protocol select count(*) into @count_object_columns from information_schema.columns where table_schema="performance_schema" and data_type = "bigint" and column_name like "%object_instance_begin"; +--enable_cursor_protocol # Confirm that at least one column was found. @@ -48,10 +54,12 @@ select @count_object_columns > 0; # Confirm that all OBJECT_INSTANCE_BEGIN columns are BIGINT unsigned. +--disable_cursor_protocol select count(*) into @count_object_unsigned from information_schema.columns where table_schema="performance_schema" and data_type="bigint" and column_name like "%object_instance_begin" and column_type like "%unsigned"; +--enable_cursor_protocol select (@count_object_columns - @count_object_unsigned) = 0; diff --git a/mysql-test/suite/perfschema/t/thread_cache.test b/mysql-test/suite/perfschema/t/thread_cache.test index 92309bb9ca1..1bd52afbd01 100644 --- a/mysql-test/suite/perfschema/t/thread_cache.test +++ b/mysql-test/suite/perfschema/t/thread_cache.test @@ -36,8 +36,10 @@ let $con2_THREAD_ID=`select thread_id from performance_schema.threads --connection default --disable_query_log +--disable_cursor_protocol eval select ($con2_ID - $con1_ID) into @id_increment; eval select ($con2_THREAD_ID - $con1_THREAD_ID) into @thread_id_increment; +--enable_cursor_protocol --enable_query_log # Expect 1, connection_id() is incremented for each new connection @@ -82,8 +84,10 @@ let $wait_condition= --source include/wait_condition.inc --disable_query_log +--disable_cursor_protocol eval select ($con3_ID - $con2_ID) into @id_increment; eval select ($con3_THREAD_ID - $con2_THREAD_ID) into @thread_id_increment; +--enable_cursor_protocol --enable_query_log select @id_increment; @@ -110,8 +114,10 @@ let $con2_THREAD_ID=`select thread_id from performance_schema.threads --connection default --disable_query_log +--disable_cursor_protocol eval select ($con2_ID - $con1_ID) into @id_increment; eval select ($con2_THREAD_ID - $con1_THREAD_ID) into @thread_id_increment; +--enable_cursor_protocol --enable_query_log select @id_increment; @@ -154,8 +160,10 @@ let $wait_condition= --source include/wait_condition.inc --disable_query_log +--disable_cursor_protocol eval select ($con3_ID - $con2_ID) into @id_increment; eval select ($con3_THREAD_ID - $con2_THREAD_ID) into @thread_id_increment; +--enable_cursor_protocol --enable_query_log # When caching threads, the pthread that executed con2 was parked in the diff --git a/mysql-test/suite/perfschema/t/threads_mysql.test b/mysql-test/suite/perfschema/t/threads_mysql.test index e19b3664f21..cf0a1386b5f 100644 --- a/mysql-test/suite/perfschema/t/threads_mysql.test +++ b/mysql-test/suite/perfschema/t/threads_mysql.test @@ -64,7 +64,9 @@ TRUNCATE t1; INSERT INTO t1 SELECT thread_id FROM performance_schema.threads WHERE name LIKE 'thread/sql%'; +--disable_cursor_protocol SELECT COUNT(*) INTO @aux FROM t1; +--enable_cursor_protocol # Attention: # Just waiting for some new thread showing up is not sufficient because diff --git a/mysql-test/suite/period/t/overlaps.test b/mysql-test/suite/period/t/overlaps.test index b762743be24..aca1a9150de 100644 --- a/mysql-test/suite/period/t/overlaps.test +++ b/mysql-test/suite/period/t/overlaps.test @@ -253,18 +253,22 @@ insert into t values (1, '2020-03-03', '2020-03-10') on duplicate key update x = 2; select * from t; +--disable_cursor_protocol --disable_ps2_protocol select * into outfile 'tmp_t.txt' from t; --enable_ps2_protocol +--enable_cursor_protocol load data infile 'tmp_t.txt' into table t; --error ER_NOT_SUPPORTED_YET load data infile 'tmp_t.txt' replace into table t; remove_file $MYSQLD_DATADIR/test/tmp_t.txt; insert into t values (1, '2020-03-01', '2020-03-05'); +--disable_cursor_protocol --disable_ps2_protocol select * into outfile 'tmp_t.txt' from t; --enable_ps2_protocol +--enable_cursor_protocol --error ER_DUP_ENTRY load data infile 'tmp_t.txt' into table t; diff --git a/mysql-test/suite/period/t/versioning.test b/mysql-test/suite/period/t/versioning.test index 5d38d81349e..45ca12469df 100644 --- a/mysql-test/suite/period/t/versioning.test +++ b/mysql-test/suite/period/t/versioning.test @@ -12,7 +12,9 @@ eval create table t ( insert into t values('1999-01-01', '2018-12-12'), ('1999-01-01', '1999-12-12'); +--disable_cursor_protocol select row_start into @ins_time from t limit 1; +--enable_cursor_protocol select * from t order by s, e; delete from t for portion of apptime from '2000-01-01' to '2018-01-01'; @@ -28,7 +30,9 @@ insert into t values('1999-01-01', '2018-12-12'), --let $trig_table=t --source suite/period/create_triggers.inc +--disable_cursor_protocol select row_start into @ins_time from t limit 1; +--enable_cursor_protocol select * from t order by s, e; delete from t for portion of apptime from '2000-01-01' to '2018-01-01'; @@ -47,7 +51,9 @@ eval create or replace table t (x int, s date, e date, insert into t values(1, '1999-01-01', '2018-12-12'), (2, '1999-01-01', '1999-12-12'); +--disable_cursor_protocol select row_start into @ins_time from t limit 1; +--enable_cursor_protocol --sorted_result select * from t; diff --git a/mysql-test/suite/plugins/t/feedback_plugin_load.test b/mysql-test/suite/plugins/t/feedback_plugin_load.test index f67397afdfe..cb154cae7ad 100644 --- a/mysql-test/suite/plugins/t/feedback_plugin_load.test +++ b/mysql-test/suite/plugins/t/feedback_plugin_load.test @@ -18,7 +18,9 @@ select plugin_status from information_schema.plugins where plugin_name='feedback # so lets get back to it if it ever happens. # Lets say the plugin was used X times before this SELECT +--disable_cursor_protocol SELECT variable_value INTO @feedback_used FROM information_schema.feedback where variable_name = 'FEEDBACK used'; +--enable_cursor_protocol # Now $feedback_used == X+1, and 'FEEDBACK used' is also X+1. And variable_value is increased again when we run the next SELECT SELECT variable_value = @feedback_used + 1 as 'MUST BE 1' FROM information_schema.feedback where variable_name = 'FEEDBACK used'; diff --git a/mysql-test/suite/plugins/t/qc_info.test b/mysql-test/suite/plugins/t/qc_info.test index de3e9d59b01..5345bac12ff 100644 --- a/mysql-test/suite/plugins/t/qc_info.test +++ b/mysql-test/suite/plugins/t/qc_info.test @@ -4,10 +4,12 @@ set @save_query_cache_size=@@global.query_cache_size; # test that hits are correctly incremented reset query cache; +--disable_cursor_protocol --disable_ps2_protocol select * from t1; select * from t1; --enable_ps2_protocol +--enable_cursor_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 c69ffa07ca8..8c2d4b6e227 100644 --- a/mysql-test/suite/plugins/t/qc_info_init.inc +++ b/mysql-test/suite/plugins/t/qc_info_init.inc @@ -9,11 +9,14 @@ set global query_cache_size=1355776; create table t1 (a int not null); insert into t1 values (1),(2),(3); +--disable_cursor_protocol --disable_ps2_protocol select * from t1; --enable_ps2_protocol +--enable_cursor_protocol select statement_schema, statement_text, result_blocks_count, result_blocks_size from information_schema.query_cache_info; +--disable_cursor_protocol select @@time_zone into @time_zone; select @@default_week_format into @default_week_format; select @@character_set_client into @character_set_client; @@ -32,6 +35,7 @@ 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; +--enable_cursor_protocol --sorted_result --replace_column 5 # 20 # 24 # diff --git a/mysql-test/suite/roles/grant_revoke_current.test b/mysql-test/suite/roles/grant_revoke_current.test index fda55358b20..1c7bb0402df 100644 --- a/mysql-test/suite/roles/grant_revoke_current.test +++ b/mysql-test/suite/roles/grant_revoke_current.test @@ -1,5 +1,8 @@ --source include/not_embedded.inc + +--disable_cursor_protocol select priv into @root_priv from mysql.global_priv where user='root' and host='localhost'; +--enable_cursor_protocol --error ER_MALFORMED_DEFINER grant select on *.* to current_role; diff --git a/mysql-test/suite/roles/set_default_role_ps-6960.test b/mysql-test/suite/roles/set_default_role_ps-6960.test index fd965c2aa75..ce7bb96b5bb 100644 --- a/mysql-test/suite/roles/set_default_role_ps-6960.test +++ b/mysql-test/suite/roles/set_default_role_ps-6960.test @@ -4,7 +4,9 @@ --source include/not_embedded.inc +--disable_cursor_protocol select priv into @root_priv from mysql.global_priv where user='root' and host='localhost'; +--enable_cursor_protocol create role r1; prepare stmt from "set password = '11111111111111111111111111111111111111111'"; diff --git a/mysql-test/suite/rpl/include/check_type.inc b/mysql-test/suite/rpl/include/check_type.inc index c72754cad4f..26276391a63 100644 --- a/mysql-test/suite/rpl/include/check_type.inc +++ b/mysql-test/suite/rpl/include/check_type.inc @@ -43,7 +43,9 @@ connection master; eval INSERT INTO t1 VALUES(1, $source_value); if ($can_convert) { sync_slave_with_master; + --disable_cursor_protocol eval SELECT a = $target_value into @compare FROM t1; + --enable_cursor_protocol eval INSERT INTO type_conversions SET Source = "$source_type", Target = "$target_type", diff --git a/mysql-test/suite/rpl/include/rpl_innodb_rows_counters.inc b/mysql-test/suite/rpl/include/rpl_innodb_rows_counters.inc index cb51058f0ae..9e4d468bb16 100644 --- a/mysql-test/suite/rpl/include/rpl_innodb_rows_counters.inc +++ b/mysql-test/suite/rpl/include/rpl_innodb_rows_counters.inc @@ -5,6 +5,7 @@ # Requirements: Having @[master|slave]_[system_]rows_[read|inserted|deleted|updated] counters already created ######################################### +--disable_cursor_protocol --connection master select variable_value into @rows_read from information_schema.global_status where variable_name = 'innodb_rows_read'; @@ -46,3 +47,4 @@ select variable_value into @system_rows_inserted from information_schema.global_ select @system_rows_inserted - @slave_system_rows_inserted; --connection master +--enable_cursor_protocol diff --git a/mysql-test/suite/rpl/include/rpl_stop_middle_group.test b/mysql-test/suite/rpl/include/rpl_stop_middle_group.test index 6bc872cabe5..0a436b28b20 100644 --- a/mysql-test/suite/rpl/include/rpl_stop_middle_group.test +++ b/mysql-test/suite/rpl/include/rpl_stop_middle_group.test @@ -37,9 +37,11 @@ source include/wait_for_slave_sql_to_stop.inc; let $error= query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1); let $read = query_get_value("SHOW SLAVE STATUS", Read_Master_Log_Pos, 1); let $exec = query_get_value("SHOW SLAVE STATUS", Exec_Master_Log_Pos, 1); +--disable_cursor_protocol --disable_query_log eval SELECT $read = $exec into @check; --enable_query_log +--enable_cursor_protocol eval SELECT "NO$error" AS Last_SQL_Error, @check as `true`; select count(*) as one from tm; select count(*) as one from ti; @@ -91,9 +93,11 @@ source include/wait_for_slave_sql_error.inc; let $error= query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1); let $read = query_get_value("SHOW SLAVE STATUS", Read_Master_Log_Pos, 1); let $exec = query_get_value("SHOW SLAVE STATUS", Exec_Master_Log_Pos, 1); +--disable_cursor_protocol --disable_query_log eval SELECT $read - $exec > 0 into @check; --enable_query_log +--enable_cursor_protocol eval SELECT "$error" AS Last_SQL_Error, @check as `true`; select count(*) as one from tm; select count(*) as zero from ti; @@ -130,9 +134,11 @@ source include/wait_for_slave_sql_error.inc; let $error= query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1); let $read = query_get_value("SHOW SLAVE STATUS", Read_Master_Log_Pos, 1); let $exec = query_get_value("SHOW SLAVE STATUS", Exec_Master_Log_Pos, 1); +--disable_cursor_protocol --disable_query_log eval SELECT $read - $exec > 0 into @check; --enable_query_log +--enable_cursor_protocol eval SELECT "$error" AS Last_SQL_Error, @check as `true`; select max(a) as two from tm; select max(a) as one from ti; diff --git a/mysql-test/suite/rpl/t/rpl_binlog_errors.test b/mysql-test/suite/rpl/t/rpl_binlog_errors.test index a5988efcb21..1c80f4f4b53 100644 --- a/mysql-test/suite/rpl/t/rpl_binlog_errors.test +++ b/mysql-test/suite/rpl/t/rpl_binlog_errors.test @@ -58,9 +58,11 @@ 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_cursor_protocol --disable_ps2_protocol -- eval SELECT repeat('x',8192) INTO OUTFILE '$load_file' --enable_ps2_protocol +--enable_cursor_protocol ### ACTION: create a small file (< 4096 bytes) that will be later used ### in LOAD DATA INFILE to check for absence of binlog errors @@ -69,9 +71,11 @@ 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_cursor_protocol --disable_ps2_protocol -- eval SELECT repeat('x',10) INTO OUTFILE '$load_file2' --enable_ps2_protocol +--enable_cursor_protocol RESET MASTER; diff --git a/mysql-test/suite/rpl/t/rpl_checksum_cache.test b/mysql-test/suite/rpl/t/rpl_checksum_cache.test index e04f618b81e..63c40ac05da 100644 --- a/mysql-test/suite/rpl/t/rpl_checksum_cache.test +++ b/mysql-test/suite/rpl/t/rpl_checksum_cache.test @@ -119,7 +119,9 @@ let $1=100; begin; while ($1) { + --disable_cursor_protocol eval select round($t2_aver_size + RAND() * $t2_max_rand) into @act_size; + --enable_cursor_protocol set @data = repeat('a', @act_size); insert into t2 set data = @data; dec $1; @@ -162,7 +164,9 @@ let $1= 300; begin; while ($1) { + --disable_cursor_protocol eval select round($t3_aver_size + RAND() * $t3_max_rand) into @act_size; + --enable_cursor_protocol insert into t3 set data= repeat('a', @act_size); dec $1; } diff --git a/mysql-test/suite/rpl/t/rpl_do_grant.test b/mysql-test/suite/rpl/t/rpl_do_grant.test index 1350585ff93..2b757f57692 100644 --- a/mysql-test/suite/rpl/t/rpl_do_grant.test +++ b/mysql-test/suite/rpl/t/rpl_do_grant.test @@ -343,7 +343,9 @@ SELECT Grantor FROM mysql.tables_priv WHERE User='user_bug27606'; --connection master DROP USER user_bug27606@localhost; +--disable_cursor_protocol select priv into @root_priv from mysql.global_priv where user='root' and host='127.0.0.1'; +--enable_cursor_protocol update mysql.global_priv set priv=@root_priv where user='root' and host='localhost'; diff --git a/mysql-test/suite/rpl/t/rpl_drop_db.test b/mysql-test/suite/rpl/t/rpl_drop_db.test index 68d2ec46e4e..31da31f1c91 100644 --- a/mysql-test/suite/rpl/t/rpl_drop_db.test +++ b/mysql-test/suite/rpl/t/rpl_drop_db.test @@ -10,9 +10,11 @@ drop database if exists mysqltest1; create database mysqltest1; create table mysqltest1.t1 (n int); insert into mysqltest1.t1 values (1); +--disable_cursor_protocol --disable_ps2_protocol select * from mysqltest1.t1 into outfile 'mysqltest1/f1.txt'; --enable_ps2_protocol +--enable_cursor_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_filter_tables_not_exist.test b/mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test index ee6daac71ea..1b93ddc3f0a 100644 --- a/mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test +++ b/mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test @@ -229,15 +229,19 @@ SET INSERT_ID=2; SET @c=2; SET @@rand_seed1=10000000, @@rand_seed2=1000000; INSERT INTO t5 VALUES (NULL, RAND(), @c); # to be ignored +--disable_cursor_protocol SELECT b into @b FROM test.t5; +--enable_cursor_protocol --let $b_master=`select @b` UPDATE test.t1 SET a=2; # to run trigger on slave --sync_slave_with_master # The proof: +--disable_cursor_protocol SELECT a AS 'ONE' into @a FROM test.t_slave; SELECT c AS 'NULL' into @c FROM test.t_slave; +--enable_cursor_protocol let $count= 1; let $table= test.t_slave; @@ -249,7 +253,9 @@ if (`SELECT @a != 2 and @c != NULL`) --die Intvar or user var from replication events unexpetedly escaped out to screw a following query applying context. } +--disable_cursor_protocol SELECT b into @b FROM test.t_slave; +--enable_cursor_protocol --let $b_slave=`select @b` --let $assert_text= Random values from master and slave must be different diff --git a/mysql-test/suite/rpl/t/rpl_gtid_mdev4484.test b/mysql-test/suite/rpl/t/rpl_gtid_mdev4484.test index 5c17653da8a..cc32220f5d7 100644 --- a/mysql-test/suite/rpl/t/rpl_gtid_mdev4484.test +++ b/mysql-test/suite/rpl/t/rpl_gtid_mdev4484.test @@ -67,8 +67,10 @@ EOF # Since we injected error in the cleanup code, the rows should remain in # mysql.gtid_slave_pos. Check that we have at least 20 (more robust against # non-deterministic cleanup and future changes than checking for exact number). +--disable_cursor_protocol SELECT COUNT(*), MAX(seq_no) INTO @pre_count, @pre_max_seq_no FROM mysql.gtid_slave_pos; +--disable_cursor_protocol SELECT IF(@pre_count >= 20, "OK", CONCAT("Error: too few rows seen while errors injected: ", @pre_count)); SET GLOBAL debug_dbug= @old_dbug; diff --git a/mysql-test/suite/rpl/t/rpl_innodb_bug68220.test b/mysql-test/suite/rpl/t/rpl_innodb_bug68220.test index 1e4f40a0019..c63db427f7f 100644 --- a/mysql-test/suite/rpl/t/rpl_innodb_bug68220.test +++ b/mysql-test/suite/rpl/t/rpl_innodb_bug68220.test @@ -7,6 +7,7 @@ # # created all the base variables at the beginning at the test +--disable_cursor_protocol --connection master select variable_value into @master_rows_read from information_schema.global_status where variable_name = 'innodb_rows_read'; select variable_value into @master_rows_updated from information_schema.global_status where variable_name = 'innodb_rows_updated'; @@ -26,6 +27,7 @@ select variable_value into @slave_system_rows_read from information_schema.globa select variable_value into @slave_system_rows_updated from information_schema.global_status where variable_name = 'innodb_system_rows_updated'; select variable_value into @slave_system_rows_deleted from information_schema.global_status where variable_name = 'innodb_system_rows_deleted'; select variable_value into @slave_system_rows_inserted from information_schema.global_status where variable_name = 'innodb_system_rows_inserted'; +--enable_cursor_protocol --connection master CREATE DATABASE testdb; diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_local.test b/mysql-test/suite/rpl/t/rpl_loaddata_local.test index 01f5607ba0b..975bd110739 100644 --- a/mysql-test/suite/rpl/t/rpl_loaddata_local.test +++ b/mysql-test/suite/rpl/t/rpl_loaddata_local.test @@ -27,9 +27,11 @@ set SQL_LOG_BIN=1; enable_query_log; let $MYSQLD_DATADIR= `select @@datadir`; --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR +--disable_cursor_protocol --disable_ps2_protocol eval select * into outfile '$MYSQLD_DATADIR/rpl_loaddatalocal.select_outfile' from t1; --enable_ps2_protocol +--enable_cursor_protocol #This will generate a 20KB file, now test LOAD DATA LOCAL truncate table t1; --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR @@ -52,9 +54,11 @@ connection master; create table t1(a int); insert into t1 values (1), (2), (2), (3); --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR +--disable_cursor_protocol --disable_ps2_protocol eval select * into outfile '$MYSQLD_DATADIR/rpl_loaddatalocal.select_outfile' from t1; --enable_ps2_protocol +--enable_cursor_protocol drop table t1; create table t1(a int primary key); --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR @@ -83,9 +87,11 @@ 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_cursor_protocol --disable_ps2_protocol eval select * into outfile '$MYSQLD_DATADIR/rpl_loaddatalocal.select_outfile' from t1; --enable_ps2_protocol +--enable_cursor_protocol truncate table t1; --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR eval load data local infile '$MYSQLD_DATADIR/rpl_loaddatalocal.select_outfile' into table t1; @@ -109,7 +115,9 @@ sync_slave_with_master; connection master; let $MYSQLD_DATADIR= `select @@datadir`; +--disable_cursor_protocol SELECT @@SESSION.sql_mode INTO @old_mode; +--enable_cursor_protocol SET sql_mode='ignore_space'; @@ -117,9 +125,11 @@ CREATE TABLE t1(a int); INSERT INTO t1 VALUES (1), (2), (3), (4); --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR +--disable_cursor_protocol --disable_ps2_protocol eval SELECT * INTO OUTFILE '$MYSQLD_DATADIR/bug43746.sql' FROM t1; --enable_ps2_protocol +--enable_cursor_protocol TRUNCATE TABLE t1; --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR @@ -167,9 +177,11 @@ sync_slave_with_master; connection master; --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR +--disable_cursor_protocol --disable_ps2_protocol eval SELECT * INTO OUTFILE '$MYSQLD_DATADIR/bug59267.sql' FROM t1; --enable_ps2_protocol +--enable_cursor_protocol TRUNCATE TABLE t1; --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR @@ -214,9 +226,11 @@ 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_cursor_protocol --disable_ps2_protocol eval SELECT 1 INTO OUTFILE '$MYSQLD_DATADIR/bug60580.csv' FROM DUAL; --enable_ps2_protocol +--enable_cursor_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 0df424aa1ac..24477fa0230 100644 --- a/mysql-test/suite/rpl/t/rpl_loaddata_map.test +++ b/mysql-test/suite/rpl/t/rpl_loaddata_map.test @@ -37,9 +37,11 @@ while($rows) eval insert into t1 values (null); dec $rows; } +--disable_cursor_protocol --disable_ps2_protocol eval select * into outfile '$MYSQLTEST_VARDIR/tmp/bug30435_5k.txt' from t1; --enable_ps2_protocol +--enable_cursor_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 a49b3c30b87..edb72dc9925 100644 --- a/mysql-test/suite/rpl/t/rpl_loadfile.test +++ b/mysql-test/suite/rpl/t/rpl_loadfile.test @@ -69,9 +69,11 @@ connection master; let $file= $MYSQLTEST_VARDIR/tmp/bug_39701.data; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--disable_cursor_protocol --disable_ps2_protocol --eval SELECT repeat('x',20) INTO OUTFILE '$file' --enable_ps2_protocol +--enable_cursor_protocol disable_warnings; DROP TABLE IF EXISTS t1; diff --git a/mysql-test/suite/rpl/t/rpl_mdev12179.test b/mysql-test/suite/rpl/t/rpl_mdev12179.test index fc3457252e1..0154cee3e81 100644 --- a/mysql-test/suite/rpl/t/rpl_mdev12179.test +++ b/mysql-test/suite/rpl/t/rpl_mdev12179.test @@ -277,7 +277,9 @@ EOF --connection server_2 --enable_reconnect --source include/wait_until_connected_again.inc +--disable_cursor_protocol SELECT max(seq_no) FROM mysql.gtid_slave_pos_InnoDB into @seq_no; +--enable_cursor_protocol --connection server_1 INSERT INTO t2(a) SELECT 1+MAX(a) FROM t2; diff --git a/mysql-test/suite/rpl/t/rpl_misc_functions.test b/mysql-test/suite/rpl/t/rpl_misc_functions.test index 7211acd508c..714488a3c3c 100644 --- a/mysql-test/suite/rpl/t/rpl_misc_functions.test +++ b/mysql-test/suite/rpl/t/rpl_misc_functions.test @@ -26,9 +26,11 @@ 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_cursor_protocol --disable_ps2_protocol select * into outfile 'rpl_misc_functions.outfile' from t1; --enable_ps2_protocol +--enable_cursor_protocol let $MYSQLD_DATADIR= `select @@datadir`; sync_slave_with_master; create temporary table t2 like t1; @@ -92,9 +94,11 @@ INSERT INTO t1 (col_a) VALUES (test_replication_sf()); --sync_slave_with_master # Dump table on slave +--disable_cursor_protocol --disable_ps2_protocol select * from t1 into outfile "../../tmp/t1_slave.txt"; --enable_ps2_protocol +--enable_cursor_protocol # Load data from slave into temp table on master connection master; @@ -106,8 +110,10 @@ load data infile '../../tmp/t1_slave.txt' into table t1_slave; # Compare master and slave temp table, use subtraction # for floating point comparison of "double" +--disable_cursor_protocol select count(*) into @aux from t1 join t1_slave using (id) where ABS(t1.col_a - t1_slave.col_a) < 0.0000001 ; +--enable_cursor_protocol SELECT @aux; if (`SELECT @aux <> 12 OR @aux IS NULL`) { diff --git a/mysql-test/suite/rpl/t/rpl_parallel_seq.test b/mysql-test/suite/rpl/t/rpl_parallel_seq.test index cc361a7b35b..9522a976b89 100644 --- a/mysql-test/suite/rpl/t/rpl_parallel_seq.test +++ b/mysql-test/suite/rpl/t/rpl_parallel_seq.test @@ -147,7 +147,9 @@ if (`select $iter = 1`) --connection master CREATE OR REPLACE SEQUENCE s3 ENGINE=innodb; # select may return non-deterministically, don't print its result +--disable_cursor_protocol SELECT NEXT VALUE FOR s3 into @tmpvar; +--enable_cursor_protocol --source include/save_master_gtid.inc --connection slave 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 c1b7e02319b..5ca2f4edb8f 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_found_rows.test +++ b/mysql-test/suite/rpl/t/rpl_stm_found_rows.test @@ -35,18 +35,22 @@ 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_cursor_protocol --disable_ps2_protocol SELECT FOUND_ROWS() INTO @a; --enable_ps2_protocol +--enable_cursor_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_cursor_protocol --disable_ps2_protocol SELECT FOUND_ROWS() INTO @a; --enable_ps2_protocol +--enable_cursor_protocol INSERT INTO logtbl VALUES(1,2,@a); SELECT * FROM logtbl WHERE sect = 1 ORDER BY sect,test; @@ -82,9 +86,11 @@ END $$ --delimiter ; SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1; +--disable_cursor_protocol --disable_ps2_protocol SELECT FOUND_ROWS() INTO @found_rows; --enable_ps2_protocol +--enable_cursor_protocol CALL just_log(2,3,@found_rows); SELECT * FROM logtbl WHERE sect = 2 ORDER BY sect,test; @@ -105,7 +111,9 @@ END $$ SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1; --disable_ps2_protocol +--disable_cursor_protocol SELECT FOUND_ROWS() INTO @found_rows; +--enable_cursor_protocol SELECT log_rows(3,1,@found_rows), log_rows(3,2,@found_rows); --enable_ps2_protocol diff --git a/mysql-test/suite/rpl/t/rpl_temporary.test b/mysql-test/suite/rpl/t/rpl_temporary.test index 729f275bb0d..a2b21982a36 100644 --- a/mysql-test/suite/rpl/t/rpl_temporary.test +++ b/mysql-test/suite/rpl/t/rpl_temporary.test @@ -342,7 +342,9 @@ GRANT PROCESS ON *.* TO user43748@127.0.0.1; connect (cont43748,127.0.0.1,user43748,meow,test,$SLAVE_MYPORT,); connection cont43748; +--disable_cursor_protocol SELECT id INTO @id FROM information_schema.processlist WHERE user='system user' LIMIT 1; +--enable_cursor_protocol --error ER_KILL_DENIED_ERROR,ER_NO_SUCH_THREAD KILL @id; diff --git a/mysql-test/suite/rpl/t/rpl_xa.inc b/mysql-test/suite/rpl/t/rpl_xa.inc index d22d2d2ef3d..5925de24f44 100644 --- a/mysql-test/suite/rpl/t/rpl_xa.inc +++ b/mysql-test/suite/rpl/t/rpl_xa.inc @@ -94,7 +94,9 @@ while ($p_trx) --connection master --let $xid=ro_$p_trx --let $query=`SELECT @query$p_trx` + --disable_cursor_protocol --source rpl_create_xa_prepared.inc + --enable_cursor_protocol --let $complete=`select if(floor(rand()*10)%2,'COMMIT','ROLLBACK')` --error 0 --disable_query_log @@ -117,8 +119,9 @@ while ($p_trx) --connection master --let $xid=ro_$p_trx --let $query=`SELECT @query$p_trx` + --disable_cursor_protocol --source rpl_create_xa_prepared.inc - + --enable_cursor_protocol --disconnect master_$xid --source include/wait_until_disconnected.inc diff --git a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_now_basic.test b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_now_basic.test index 8c5f8fa7bf0..c33eb057cc6 100644 --- a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_now_basic.test +++ b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_now_basic.test @@ -11,8 +11,10 @@ SELECT @@global.innodb_buffer_pool_dump_now; -- error 0,1 -- remove_file $file +--disable_cursor_protocol SELECT variable_value INTO @old_dump_status FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_buffer_pool_dump_status'; +--enable_cursor_protocol # A previous test could have run buffer pool dump already; # in this case we want to make sure that the current time is different diff --git a/mysql-test/suite/sys_vars/t/innodb_fil_make_page_dirty_debug_basic.test b/mysql-test/suite/sys_vars/t/innodb_fil_make_page_dirty_debug_basic.test index 23d9fcdddb2..e5b37d1bc63 100644 --- a/mysql-test/suite/sys_vars/t/innodb_fil_make_page_dirty_debug_basic.test +++ b/mysql-test/suite/sys_vars/t/innodb_fil_make_page_dirty_debug_basic.test @@ -23,8 +23,10 @@ set innodb_fil_make_page_dirty_debug = ON; --echo # An example usage. create table t1 (f1 int primary key) engine = innodb; +--disable_cursor_protocol select space from information_schema.innodb_sys_tables where name = 'test/t1' into @space_id; +--enable_cursor_protocol set global innodb_saved_page_number_debug = 0; set global innodb_fil_make_page_dirty_debug = @space_id; drop table t1; diff --git a/mysql-test/suite/sys_vars/t/innodb_log_optimize_ddl_basic.test b/mysql-test/suite/sys_vars/t/innodb_log_optimize_ddl_basic.test index b8983093414..36490e55bcb 100644 --- a/mysql-test/suite/sys_vars/t/innodb_log_optimize_ddl_basic.test +++ b/mysql-test/suite/sys_vars/t/innodb_log_optimize_ddl_basic.test @@ -21,7 +21,9 @@ SELECT COUNT(@@GLOBAL.innodb_log_optimize_ddl); SELECT COUNT(@@SESSION.innodb_log_optimize_ddl); --echo Expected error 'Variable is a GLOBAL variable' +--disable_cursor_protocol SELECT @@GLOBAL.innodb_log_optimize_ddl INTO @innodb_log_optimize_ddl_save; +--enable_cursor_protocol #### Check if the value can be set SET @@GLOBAL.innodb_log_optimize_ddl = ON; SET @@GLOBAL.innodb_log_optimize_ddl = OFF; diff --git a/mysql-test/suite/sys_vars/t/innodb_saved_page_number_debug_basic.test b/mysql-test/suite/sys_vars/t/innodb_saved_page_number_debug_basic.test index aa36010d810..ca8be38ddad 100644 --- a/mysql-test/suite/sys_vars/t/innodb_saved_page_number_debug_basic.test +++ b/mysql-test/suite/sys_vars/t/innodb_saved_page_number_debug_basic.test @@ -23,8 +23,10 @@ set innodb_saved_page_number_debug = ON; --echo # An example usage. create table t1 (f1 int primary key) engine = innodb; +--disable_cursor_protocol select space from information_schema.innodb_sys_tables where name = 'test/t1' into @space_id; +--enable_cursor_protocol set global innodb_saved_page_number_debug = 0; set global innodb_fil_make_page_dirty_debug = @space_id; drop table t1; 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 db9bc8fb48f..1be82f5380e 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 @@ -43,7 +43,9 @@ SELECT @@log_slow_disabled_statements; TRUNCATE TABLE mysql.slow_log; ALTER TABLE t1 add column extra int; CALL slow2(); +--disable_cursor_protocol SELECT count(if(sleep(1) >= 0,0,NULL)) from t1 where j>'b and part2'; +--enable_cursor_protocol --echo --> SELECT sql_text FROM mysql.slow_log where sql_text <> "Close stmt" and sql_text <> "Prepare"; @@ -53,7 +55,9 @@ SET SESSION log_slow_disabled_statements="call,admin"; TRUNCATE TABLE mysql.slow_log; ALTER TABLE t1 add column extra2 int; CALL slow2(); +--disable_cursor_protocol SELECT count(if(sleep(1) >= 0,0,NULL)) from t1 where j>'b and part3'; +--enable_cursor_protocol --echo --> SELECT sql_text FROM mysql.slow_log where sql_text <> "Close stmt" and sql_text <> "Prepare"; @@ -63,7 +67,9 @@ SET SESSION log_slow_disabled_statements=""; TRUNCATE TABLE mysql.slow_log; ALTER TABLE t1 add column extra3 int; CALL slow2(); +--disable_cursor_protocol SELECT count(if(sleep(1) >= 0,0,NULL)) from t1 where j>'b and part4'; +--enable_cursor_protocol --echo --> SELECT sql_text FROM mysql.slow_log where sql_text <> "Close stmt" and sql_text <> "Prepare"; @@ -73,7 +79,9 @@ SET SESSION log_slow_disabled_statements="call,admin,slave,sp"; TRUNCATE TABLE mysql.slow_log; ALTER TABLE t1 add column extra4 int; CALL slow2(); +--disable_cursor_protocol SELECT count(if(sleep(1) >= 0,0,NULL)) from t1 where j>'b and part5'; +--enable_cursor_protocol --echo --> SELECT sql_text FROM mysql.slow_log where sql_text <> "Close stmt" and sql_text <> "Prepare"; 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 e0105c89866..27b19934162 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 @@ -76,6 +76,8 @@ SET GLOBAL query_cache_size = 0; SET GLOBAL query_cache_size = 131072; SET GLOBAL query_cache_type = ON; +--disable_cursor_protocol + --echo '#---------------------FN_DYNVARS_132_01----------------------#' # #Check if results are cacheing on default value # @@ -168,6 +170,8 @@ SHOW STATUS LIKE 'Qcache_not_cached'; SHOW STATUS LIKE 'Qcache_queries_in_cache'; --echo 1 Expected +--enable_cursor_protocol + # # Cleanup # diff --git a/mysql-test/suite/sys_vars/t/query_cache_type_func.test b/mysql-test/suite/sys_vars/t/query_cache_type_func.test index e1b5f4d1a12..e31c949fef0 100644 --- a/mysql-test/suite/sys_vars/t/query_cache_type_func.test +++ b/mysql-test/suite/sys_vars/t/query_cache_type_func.test @@ -62,6 +62,8 @@ SET @@GLOBAL.query_cache_size = 65536; --echo ** TESTING SESSION SCOPE ** +--disable_cursor_protocol + --echo '#--------------------FN_DYNVARS_135_01-------------------------#' # # Testing default value it should be ON by default @@ -284,6 +286,8 @@ connection con3; SELECT @@query_cache_type; --echo ON Expected +--enable_cursor_protocol + --echo --echo ** Cleanup ** --echo 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 74c07d160f1..e7f7043a0eb 100644 --- a/mysql-test/suite/sys_vars/t/secure_file_priv.test +++ b/mysql-test/suite/sys_vars/t/secure_file_priv.test @@ -17,6 +17,7 @@ SHOW VARIABLES LIKE 'secure_file_priv'; # If we run tests with --mem, it will be /dev/shm. # If we run tests with --parallel, it will be mysql-test/var # (because MYSQLTEST_VARDIR in this case is mysql-test/var/N). +--disable_cursor_protocol --perl use File::Basename; @@ -39,6 +40,8 @@ EOF --remove_file $MYSQL_TMP_DIR/bug50373.inc --enable_query_log +--enable_cursor_protocol + DROP TABLE t1; --perl 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 77f947c9913..d398f711ad5 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,18 +51,22 @@ SHOW STATUS LIKE 'Created_tmp_tables'; --enable_ps_protocol --echo Expected value : 0. +--disable_cursor_protocol --disable_ps2_protocol SELECT * FROM t1; --enable_ps2_protocol +--enable_cursor_protocol --disable_ps_protocol SHOW STATUS LIKE 'Created_tmp_tables'; --enable_ps_protocol --echo Expected value : 1. +--disable_cursor_protocol --disable_ps2_protocol SELECT * FROM t1; --enable_ps2_protocol +--enable_cursor_protocol --disable_ps_protocol SHOW STATUS LIKE 'Created_tmp_tables'; @@ -81,7 +85,9 @@ SHOW STATUS LIKE 'Created_tmp_tables'; --enable_ps_protocol --echo Expected value : 2. +--disable_cursor_protocol SELECT * FROM t1; +--enable_cursor_protocol --disable_ps_protocol SHOW STATUS LIKE 'Created_tmp_tables'; diff --git a/mysql-test/suite/vcol/t/load_data.test b/mysql-test/suite/vcol/t/load_data.test index 1b662818cd2..be247d106b9 100644 --- a/mysql-test/suite/vcol/t/load_data.test +++ b/mysql-test/suite/vcol/t/load_data.test @@ -5,9 +5,11 @@ 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_cursor_protocol --disable_ps2_protocol select * into outfile 't1.csv' from t1; --enable_ps2_protocol +--enable_cursor_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 bc8fcbd29c0..e9207d3bcdd 100644 --- a/mysql-test/suite/vcol/t/vcol_keys_myisam.test +++ b/mysql-test/suite/vcol/t/vcol_keys_myisam.test @@ -281,9 +281,11 @@ 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_cursor_protocol --disable_ps2_protocol SELECT i, d1, d2 INTO OUTFILE 'load_t1' FROM t1; --enable_ps2_protocol +--enable_cursor_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/versioning/common.inc b/mysql-test/suite/versioning/common.inc index f18f2d298f6..b09fc36319f 100644 --- a/mysql-test/suite/versioning/common.inc +++ b/mysql-test/suite/versioning/common.inc @@ -6,7 +6,9 @@ source include/have_innodb.inc; --disable_query_log set @@session.time_zone='+00:00'; +--disable_cursor_protocol select ifnull(max(transaction_id), 0) into @start_trx_id from mysql.transaction_registry; +--enable_cursor_protocol set @test_start=now(6); delimiter ~~; diff --git a/mysql-test/suite/versioning/t/alter.test b/mysql-test/suite/versioning/t/alter.test index 736cccb9cfb..4b484eb47a2 100644 --- a/mysql-test/suite/versioning/t/alter.test +++ b/mysql-test/suite/versioning/t/alter.test @@ -139,7 +139,9 @@ select * from t; update t set a=3 where a=1; select * from t; select * from t for system_time all; +--disable_cursor_protocol select row_start from t where a=3 into @tm; +--enable_cursor_protocol alter table t add column b int; select @tm=row_start from t where a=3; show create table t; diff --git a/mysql-test/suite/versioning/t/commit_id.test b/mysql-test/suite/versioning/t/commit_id.test index 0f9cf1eb391..646672bae76 100644 --- a/mysql-test/suite/versioning/t/commit_id.test +++ b/mysql-test/suite/versioning/t/commit_id.test @@ -17,19 +17,25 @@ insert into t1 values (); --real_sleep 0.01 set @ts0= now(6); insert into t1 values (); +--disable_cursor_protocol select sys_trx_start from t1 where id = last_insert_id() into @tx0; +--enable_cursor_protocol select transaction_id = @tx0 from mysql.transaction_registry order by transaction_id desc limit 1; set @ts1= now(6); insert into t1 values (); +--disable_cursor_protocol select sys_trx_start from t1 where id = last_insert_id() into @tx1; +--enable_cursor_protocol select transaction_id = @tx1 from mysql.transaction_registry order by transaction_id desc limit 1; set @ts2= now(6); insert into t1 values (); +--disable_cursor_protocol select sys_trx_start from t1 where id = last_insert_id() into @tx2; +--enable_cursor_protocol select transaction_id = @tx2 from mysql.transaction_registry order by transaction_id desc limit 1; @@ -69,22 +75,30 @@ select trt_trx_sees(0, @tx2); set transaction isolation level read uncommitted; insert into t1 values (); +--disable_cursor_protocol select sys_trx_start from t1 where id = last_insert_id() into @tx3; +--enable_cursor_protocol select isolation_level = 'READ-UNCOMMITTED' from mysql.transaction_registry where transaction_id = @tx3; set transaction isolation level read committed; insert into t1 values (); +--disable_cursor_protocol select sys_trx_start from t1 where id = last_insert_id() into @tx4; +--enable_cursor_protocol select isolation_level = 'READ-COMMITTED' from mysql.transaction_registry where transaction_id = @tx4; set transaction isolation level serializable; insert into t1 values (); +--disable_cursor_protocol select sys_trx_start from t1 where id = last_insert_id() into @tx5; +--enable_cursor_protocol select isolation_level = 'SERIALIZABLE' from mysql.transaction_registry where transaction_id = @tx5; set transaction isolation level repeatable read; insert into t1 values (); +--disable_cursor_protocol select sys_trx_start from t1 where id = last_insert_id() into @tx6; +--enable_cursor_protocol select isolation_level = 'REPEATABLE-READ' from mysql.transaction_registry where transaction_id = @tx6; diff --git a/mysql-test/suite/versioning/t/create.test b/mysql-test/suite/versioning/t/create.test index f50d75ded9e..1506ffaa378 100644 --- a/mysql-test/suite/versioning/t/create.test +++ b/mysql-test/suite/versioning/t/create.test @@ -212,9 +212,11 @@ show create table t3; --echo ## For versioned table insert into t1 values (1); +--disable_cursor_protocol select row_start from t1 into @row_start; insert into t0 (y) values (2); select st from t0 into @st; +--enable_cursor_protocol create or replace table t2 with system versioning as select * from t1; --replace_result $default_engine DEFAULT_ENGINE @@ -253,10 +255,12 @@ create or replace table t3 with system versioning select x23, row_start from t1; create or replace table t3 with system versioning select x23, row_end from t1; --echo # Prepare checking for historical row +--disable_cursor_protocol delete from t1; select row_end from t1 for system_time all into @row_end; delete from t0; select en from t0 for system_time all into @en; +--enable_cursor_protocol --echo ## Combinations of versioned + non-versioned create or replace table t2 (y int); @@ -272,9 +276,13 @@ insert into t2 (y) values (1), (2); delete from t2 where y = 2; create or replace table t3 select * from t2 for system_time all; +--disable_cursor_protocol select st, en from t3 where y = 1 into @st, @en; +--enable_cursor_protocol select y from t2 for system_time all where st = @st and en = @en; +--disable_cursor_protocol select st, en from t3 where y = 2 into @st, @en; +--enable_cursor_protocol select y from t2 for system_time all where st = @st and en = @en; --echo ## Default engine detection diff --git a/mysql-test/suite/versioning/t/cte.test b/mysql-test/suite/versioning/t/cte.test index 5a8fb1f8211..7d4e10ead9d 100644 --- a/mysql-test/suite/versioning/t/cte.test +++ b/mysql-test/suite/versioning/t/cte.test @@ -31,7 +31,9 @@ insert into emp (emp_id, name, salary, dept_id, mgr) values (20, "john", 500, 10, 1), (30, "jane", 750, 10,1 ); +--disable_cursor_protocol select row_start into @ts_1 from emp where name="jane"; +--enable_cursor_protocol update emp set mgr=30 where name ="john"; @@ -42,7 +44,9 @@ with ancestors as ( select e.emp_id, e.name, e.mgr, e.salary from emp as e ) select * from ancestors for system_time as of @ts_1; +--disable_cursor_protocol select row_start into @ts_2 from emp where name="john"; +--enable_cursor_protocol let $q= /* All report to 'Bill' */ diff --git a/mysql-test/suite/versioning/t/delete.test b/mysql-test/suite/versioning/t/delete.test index 9debdcfec8c..ded6f46762b 100644 --- a/mysql-test/suite/versioning/t/delete.test +++ b/mysql-test/suite/versioning/t/delete.test @@ -42,7 +42,9 @@ eval create or replace table t1( with system versioning; insert into t1(x) values (1); +--disable_cursor_protocol select sys_start into @sys_start from t1; +--disable_cursor_protocol delete from t1; select * from t1; select x = 1 as A, sys_start = @sys_start as B, sys_end > sys_start as C from t1 for system_time all; diff --git a/mysql-test/suite/versioning/t/foreign.test b/mysql-test/suite/versioning/t/foreign.test index 9489d90c55a..599a6a81298 100644 --- a/mysql-test/suite/versioning/t/foreign.test +++ b/mysql-test/suite/versioning/t/foreign.test @@ -314,7 +314,9 @@ create or replace table subchild ( ) engine=innodb; insert into parent (value) values (23); +--disable_cursor_protocol select id, value from parent into @id, @value; +--enable_cursor_protocol insert into child values (default, @id, @value); insert into subchild values (default, @id, @value); @@ -396,21 +398,27 @@ INSERT INTO t2 VALUES (1,'against'),(2,'q'); SET SQL_MODE= ''; SET timestamp = 2; +--disable_cursor_protocol --disable_ps2_protocol SELECT * INTO OUTFILE 't1.data' FROM t1; --enable_ps2_protocol +--enable_cursor_protocol SET timestamp = 3; UPDATE t1 SET f13 = 'q'; SET timestamp = 4; LOAD DATA INFILE 't1.data' REPLACE INTO TABLE t1; +--disable_cursor_protocol --disable_ps2_protocol SELECT * INTO OUTFILE 't1.data.2' FROM t1; --enable_ps2_protocol +--enable_cursor_protocol SET timestamp = 5; LOAD DATA INFILE 't1.data.2' REPLACE INTO TABLE t1; +--disable_cursor_protocol --disable_ps2_protocol SELECT * INTO OUTFILE 't2.data' FROM t2; --enable_ps2_protocol +--enable_cursor_protocol SET timestamp = 6; LOAD DATA INFILE 't2.data' REPLACE INTO TABLE t2; SET FOREIGN_KEY_CHECKS = OFF; @@ -553,9 +561,11 @@ delete from t0; --error ER_ROW_IS_REFERENCED_2 replace t0 values (1); +--disable_cursor_protocol --disable_ps2_protocol select * into outfile 'load_t0' from t0 ; --enable_ps2_protocol +--enable_cursor_protocol --error ER_ROW_IS_REFERENCED_2 load data infile 'load_t0' replace into table t0; diff --git a/mysql-test/suite/versioning/t/insert.test b/mysql-test/suite/versioning/t/insert.test index 0324df64d0c..5e3d85423a7 100644 --- a/mysql-test/suite/versioning/t/insert.test +++ b/mysql-test/suite/versioning/t/insert.test @@ -52,7 +52,9 @@ drop view vt1_1; replace_result $sys_datatype_expl SYS_DATATYPE; eval create or replace table t1( id bigint primary key, a int, b int) with system versioning; insert into t1 values(1, 1, 1); +--disable_cursor_protocol select row_start, row_end from t1 into @sys_start, @sys_end; +--enable_cursor_protocol select id, a, b from t1; insert into t1 values(2, 2, 2); select id, a, b, row_start > @sys_start as C, row_end = @sys_end as D from t1 where id = 2; diff --git a/mysql-test/suite/versioning/t/insert2.test b/mysql-test/suite/versioning/t/insert2.test index 1e7d2166064..527a66e5f21 100644 --- a/mysql-test/suite/versioning/t/insert2.test +++ b/mysql-test/suite/versioning/t/insert2.test @@ -48,7 +48,9 @@ insert into t1 (row_start) select row_end from t1; set sql_mode=''; insert into t1 (row_start, row_end) values (DEFAULT, 1); set sql_mode=default; +--disable_cursor_protocol select @@sql_mode into @saved_mode; +--enable_cursor_protocol set sql_mode= ''; insert into t1 (x, row_start, row_end) values (3, 4, 5); set sql_mode= @saved_mode; diff --git a/mysql-test/suite/versioning/t/load_data.test b/mysql-test/suite/versioning/t/load_data.test index 6668a4ff9f7..aa4e2192113 100644 --- a/mysql-test/suite/versioning/t/load_data.test +++ b/mysql-test/suite/versioning/t/load_data.test @@ -4,9 +4,11 @@ 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_cursor_protocol --disable_ps2_protocol SELECT a, b, c FROM t1 INTO OUTFILE '15330.data'; --enable_ps2_protocol +--enable_cursor_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 a4f487aae29..840af2d6cec 100644 --- a/mysql-test/suite/versioning/t/partition.test +++ b/mysql-test/suite/versioning/t/partition.test @@ -995,6 +995,7 @@ create or replace table t1 ( insert into t1 () values (),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(); +--disable_cursor_protocol --disable_ps2_protocol select * into outfile 'load.data' from t1; --enable_ps2_protocol @@ -1003,6 +1004,7 @@ load data infile 'load.data' replace into table t1; load data infile 'load.data' replace into table t1; --error ER_RECORD_FILE_FULL load data infile 'load.data' replace into table t1; +--enable_cursor_protocol # Cleanup --let $datadir= `select @@datadir` @@ -1339,9 +1341,11 @@ partition by system_time limit 100 ( partition pn current); insert into t1 select seq from seq_0_to_49; +--disable_cursor_protocol --disable_ps2_protocol select x into outfile 'MDEV-20077.data' from t1; --enable_ps2_protocol +--enable_cursor_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/mysql-test/suite/versioning/t/select.test b/mysql-test/suite/versioning/t/select.test index f28a3dddd89..27ff2ca35f6 100644 --- a/mysql-test/suite/versioning/t/select.test +++ b/mysql-test/suite/versioning/t/select.test @@ -29,7 +29,9 @@ set @t0= now(6); if ($MTR_COMBINATION_TRX_ID) { --disable_query_log +--disable_cursor_protocol select sys_trx_start from t1 limit 1 into @x0; +--enable_cursor_protocol --enable_query_log } @@ -37,12 +39,16 @@ delete from t1 where x = 3; delete from t1 where x > 7; insert into t1(x, y) values(3, 33); +--disable_cursor_protocol select sys_trx_start from t1 where x = 3 and y = 33 into @t1; +--enable_cursor_protocol if ($MTR_COMBINATION_TRX_ID) { --disable_query_log set @x1= @t1; +--disable_cursor_protocol select trt_commit_ts(@x1) into @t1; +--enable_cursor_protocol --enable_query_log } @@ -118,12 +124,14 @@ delete from t1; insert into t1 values (3); delete from t1; +--disable_cursor_protocol select row_start into @start1 from t1 for system_time all where x = 1; select row_end into @end1 from t1 for system_time all where x = 1; select row_start into @start2 from t1 for system_time all where x = 2; select row_end into @end2 from t1 for system_time all where x = 2; select row_start into @start3 from t1 for system_time all where x = 3; select row_end into @end3 from t1 for system_time all where x = 3; +--enable_cursor_protocol select x as ASOF_x from t1 for system_time as of @start2; select x as ASOF_x from t1 for system_time as of @end2; @@ -254,7 +262,9 @@ create or replace table t1 ( insert into t1 values (1); set @ts= now(6); delete from t1; +--disable_cursor_protocol select sys_trx_start from t1 for system_time all into @trx_start; +--enable_cursor_protocol --echo ## ensure @trx_start is much lower than unix timestamp select @trx_start < unix_timestamp(@ts) - 100 as trx_start_good; @@ -382,8 +392,10 @@ eval create or replace table t1 ( ) with system versioning; insert into t1 values (1); delete from t1; +--disable_cursor_protocol select row_start from t1 for system_time all into @t1; select row_end from t1 for system_time all into @t2; +--enable_cursor_protocol --disable_query_log if($MTR_COMBINATION_TRX_ID) { set @t1= trt_begin_ts(@t1); diff --git a/mysql-test/suite/versioning/t/select2.test b/mysql-test/suite/versioning/t/select2.test index 1ab7bcf27c1..a557f10501b 100644 --- a/mysql-test/suite/versioning/t/select2.test +++ b/mysql-test/suite/versioning/t/select2.test @@ -22,17 +22,21 @@ insert into t1 (x, y) values (8, 108), (9, 109); set @t0= now(6); +--disable_cursor_protocol select sys_start from t1 limit 1 into @x0; +--enable_cursor_protocol delete from t1 where x = 3; delete from t1 where x > 7; insert into t1(x, y) values(3, 33); +--disable_cursor_protocol select sys_start from t1 where x = 3 and y = 33 into @t1; if($MTR_COMBINATION_TRX_ID) { set @x1= @t1; select trt_commit_ts(@x1) into @t1; } +--enable_cursor_protocol select x, y from t1; select x as ASOF_x, y from t1 for system_time as of timestamp @t0; diff --git a/mysql-test/suite/versioning/t/simple.test b/mysql-test/suite/versioning/t/simple.test index b550b3967d9..6f0e52f4f5d 100644 --- a/mysql-test/suite/versioning/t/simple.test +++ b/mysql-test/suite/versioning/t/simple.test @@ -18,6 +18,7 @@ create or replace table emp ( ) with system versioning; +--disable_cursor_protocol select now() into @ts_0; insert into dept (dept_id, name) values (10, "accounting"); @@ -29,13 +30,16 @@ insert into emp (emp_id, name, salary, dept_id) values (1, "bill", 1000, 10); commit; select row_start into @ts_2 from emp where name="bill"; +--enable_cursor_protocol select * from emp; update emp set salary=2000 where name="bill"; commit; +--disable_cursor_protocol select row_start into @ts_3 from emp where name="bill"; +--enable_cursor_protocol select * from emp; select * from emp for system_time as of timestamp @ts_2; diff --git a/mysql-test/suite/versioning/t/trx_id.test b/mysql-test/suite/versioning/t/trx_id.test index a0da7714f50..098d85da999 100644 --- a/mysql-test/suite/versioning/t/trx_id.test +++ b/mysql-test/suite/versioning/t/trx_id.test @@ -38,11 +38,15 @@ alter table t1 add period for system_time(s, e), add system versioning, algorithm=inplace; +--disable_cursor_protocol select s from t1 into @trx_start; +--enable_cursor_protocol select count(*) = 1 from mysql.transaction_registry where transaction_id = @trx_start; create or replace table t1 (x int); +--disable_cursor_protocol select count(*) from mysql.transaction_registry into @tmp; +--enable_cursor_protocol alter table t1 add column s bigint unsigned as row start, add column e bigint unsigned as row end, @@ -59,11 +63,15 @@ alter table t1 add period for system_time(s, e), add system versioning, algorithm=copy; +--disable_cursor_protocol select s from t1 into @trx_start; +--enable_cursor_protocol select count(*) = 1 from mysql.transaction_registry where transaction_id = @trx_start; create or replace table t1 (x int); +--disable_cursor_protocol select count(*) from mysql.transaction_registry into @tmp; +--enable_cursor_protocol alter table t1 add column s bigint unsigned as row start, add column e bigint unsigned as row end, @@ -118,9 +126,11 @@ commit; --sleep 0.01 set @ts3= sysdate(6); +--disable_cursor_protocol select sys_start from t1 where x = 1 into @trx_id1; select sys_start from t1 where x = 2 into @trx_id2; select sys_start from t1 where x = 3 into @trx_id3; +--enable_cursor_protocol select @trx_id1 < @trx_id2, @trx_id2 < @trx_id3; select @ts1 < @ts2, @ts2 < @ts3; @@ -261,7 +271,9 @@ set @ts1= now(6); insert into t1 values (1); commit; +--disable_cursor_protocol select row_start from t1 into @trx_id; +--enable_cursor_protocol select trt_begin_ts(@trx_id) <= @ts1 as BEGIN_TS_GOOD; drop table t1; diff --git a/mysql-test/suite/versioning/t/update.test b/mysql-test/suite/versioning/t/update.test index 046a4ac149d..3c5e7c4315e 100644 --- a/mysql-test/suite/versioning/t/update.test +++ b/mysql-test/suite/versioning/t/update.test @@ -28,11 +28,15 @@ eval create table t1 ( with system versioning; set timestamp= unix_timestamp('2000-01-01 00:00:00'); insert into t1 values(1, 1, 1); +--disable_cursor_protocol select sys_trx_start into @tmp1 from t1; +--enable_cursor_protocol set timestamp= unix_timestamp('2000-01-01 01:00:00'); update t1 set x= 11, y= 11 where id = 1; select @tmp1 < sys_trx_start as A1, x, y from t1; +--disable_cursor_protocol select sys_trx_start into @tmp1 from t1; +--enable_cursor_protocol set timestamp= unix_timestamp('2000-01-01 02:00:00'); update t1 set y= 1 where id = 1; select @tmp1 = sys_trx_start as A2, x from t1; @@ -135,14 +139,18 @@ create table t2 like t1; insert into t1 values (1, "Jeremy", 3000); insert into t2 values (1, "Jeremy", 4000); +--disable_cursor_protocol select sys_trx_start into @tmp1 from t1; select sys_trx_start into @tmp2 from t2; +--enable_cursor_protocol update t1, t2 set t1.name= "Jerry", t2.name= "Jerry" where t1.id = t2.id and t1.name = "Jeremy"; select @tmp1 < sys_trx_start as A1, name from t1; select @tmp2 < sys_trx_start as A2, name from t2; +--disable_cursor_protocol select sys_trx_start into @tmp1 from t1; select sys_trx_start into @tmp2 from t2; +--enable_cursor_protocol update t1, t2 set t1.salary= 2500, t2.salary= 2500 where t1.id = t2.id and t1.name = "Jerry"; select @tmp1 = sys_trx_start as B1, salary from t1; select @tmp2 = sys_trx_start as B2, salary from t2; @@ -335,7 +343,9 @@ drop tables t1, t2, t3; create or replace table t1 (x int) with system versioning; insert t1 values (1); update t1 set x= 1; +--disable_cursor_protocol select row_start into @r from t1; +--enable_cursor_protocol select check_row_ts(row_start, row_end) from t1 for system_time all where row_start = @r; drop table t1; diff --git a/mysql-test/suite/versioning/t/view.test b/mysql-test/suite/versioning/t/view.test index 9bb915f7b77..e4c688fa859 100644 --- a/mysql-test/suite/versioning/t/view.test +++ b/mysql-test/suite/versioning/t/view.test @@ -5,10 +5,14 @@ create or replace table t1 (x int) with system versioning; insert into t1 values (1); +--disable_cursor_protocol select now(6) into @t1; +--enable_cursor_protocol update t1 set x= 2; +--disable_cursor_protocol select now(6) into @t2; +--enable_cursor_protocol delete from t1; set @vt1= concat("create or replace view vt1 as select * from t1 for system_time as of timestamp '", @t1, "'"); diff --git a/plugin/type_inet/mysql-test/type_inet/type_inet6.test b/plugin/type_inet/mysql-test/type_inet/type_inet6.test index 41cfa0b06ae..41fe8bd840e 100644 --- a/plugin/type_inet/mysql-test/type_inet/type_inet6.test +++ b/plugin/type_inet/mysql-test/type_inet/type_inet6.test @@ -19,7 +19,10 @@ CREATE TABLE t1 (a INET6); INSERT INTO t1 VALUES ('::1'); --enable_metadata SELECT * FROM t1; +#check after fix MDEV-31540 +--disable_cursor_protocol SELECT CAST('::' AS INET6) AS a; +--enable_cursor_protocol --disable_metadata DROP TABLE t1; @@ -1431,6 +1434,8 @@ DROP TABLE t1; --echo # CREATE TABLE t1 (a INET6); +#check after fix MDEV-31540 +--disable_cursor_protocol --enable_metadata SELECT CAST(a AS BINARY(0)), @@ -1449,6 +1454,7 @@ SELECT CAST(a AS BINARY(16777216)) FROM t1; --disable_metadata +--enable_cursor_protocol DROP TABLE t1; --echo # diff --git a/storage/connect/mysql-test/connect/t/bson_udf.test b/storage/connect/mysql-test/connect/t/bson_udf.test index 0da2de38864..584f8f25554 100644 --- a/storage/connect/mysql-test/connect/t/bson_udf.test +++ b/storage/connect/mysql-test/connect/t/bson_udf.test @@ -19,7 +19,10 @@ SELECT BsonValue(9223372036854775807); SELECT BsonValue(NULL); SELECT BsonValue(TRUE); SELECT BsonValue(FALSE); +#Check after fix MDEV-31587 +--disable_cursor_protocol SELECT BsonValue(); +--enable_cursor_protocol SELECT BsonValue('[11, 22, 33]' json_) FROM t1; # SELECT Bson_Make_Array(); diff --git a/storage/connect/mysql-test/connect/t/json_udf.test b/storage/connect/mysql-test/connect/t/json_udf.test index 96fe836e60b..82afd030f75 100644 --- a/storage/connect/mysql-test/connect/t/json_udf.test +++ b/storage/connect/mysql-test/connect/t/json_udf.test @@ -19,7 +19,10 @@ SELECT JsonValue(9223372036854775807); SELECT JsonValue(NULL); SELECT JsonValue(TRUE); SELECT JsonValue(FALSE); +#Check after fix MDEV-31587 +--disable_cursor_protocol SELECT JsonValue(); +--enable_cursor_protocol SELECT JsonValue('[11, 22, 33]' json_) FROM t1; # SELECT Json_Make_Array(); @@ -60,7 +63,10 @@ SELECT Json_Make_Object(56, 3.1416, 'foo', NULL); SELECT Json_Make_Object(56 qty, 3.1416 price, 'foo' truc, NULL garanty); SELECT Json_Make_Object(); SELECT Json_Make_Object(Json_Make_Array(56, 3.1416, 'foo'), NULL); +# Enable after fix MDEV-31554 +--disable_cursor_protocol SELECT Json_Make_Array(Json_Make_Object(56 "qty", 3.1416 "price", 'foo') ,NULL); +--enable_cursor_protocol SELECT Json_Object_Key('qty', 56, 'price', 3.1416, 'truc', 'machin', 'garanty', NULL); --error ER_CANT_INITIALIZE_UDF SELECT Json_Object_Key('qty', 56, 'price', 3.1416, 'truc', 'machin', 'garanty'); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_flags_comment.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_flags_comment.test index ec9e3c9d4b9..1cd840a9690 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_flags_comment.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_flags_comment.test @@ -30,7 +30,10 @@ CREATE TABLE tags ( ALTER TABLE tags ADD COLUMN name VARCHAR(64) COMMENT 'flags "COLUMN_VECTOR"'; +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command("dump --dump_plugins no"); +--enable_cursor_protocol DROP TABLE tags; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_flags_parameter.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_flags_parameter.test index e3b7df72cf9..b1276755a40 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_flags_parameter.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_flags_parameter.test @@ -33,7 +33,10 @@ CREATE TABLE tags ( ALTER TABLE tags ADD COLUMN name VARCHAR(64) FLAGS='COLUMN_VECTOR'; SHOW CREATE TABLE tags; +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command("dump --dump_plugins no"); +--enable_cursor_protocol DROP TABLE tags; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_groonga_type_comment.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_groonga_type_comment.test index 964426b44bf..dbad49d67d2 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_groonga_type_comment.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_groonga_type_comment.test @@ -35,7 +35,10 @@ CREATE TABLE bugs ( ALTER TABLE bugs ADD COLUMN name VARCHAR(64) COMMENT 'groonga_type "tags"'; +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command("dump --dump_plugins no"); +--enable_cursor_protocol DROP TABLE bugs; DROP TABLE tags; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_groonga_type_parameter.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_groonga_type_parameter.test index 0f92c024b7c..1f83d5d2df7 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_groonga_type_parameter.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_groonga_type_parameter.test @@ -38,7 +38,10 @@ CREATE TABLE bugs ( ALTER TABLE bugs ADD COLUMN name VARCHAR(64) GROONGA_TYPE='tags'; SHOW CREATE TABLE bugs; +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command("dump --dump_plugins no"); +--enable_cursor_protocol DROP TABLE bugs; DROP TABLE tags; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_multibyte_cp932.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_multibyte_cp932.test index 0516186ba17..8377e9c5690 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_multibyte_cp932.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_multibyte_cp932.test @@ -45,7 +45,10 @@ SELECT * FROM users; SELECT * FROM users WHERE MATCH (–¼‘O) AGAINST ('+‚½‚È‚©' IN BOOLEAN MODE); +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command("dump --dump_plugins no --dump_records no"); +--enable_cursor_protocol DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_multibyte_utf8.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_multibyte_utf8.test index 0ed92333e29..ec185295891 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_multibyte_utf8.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_multibyte_utf8.test @@ -45,7 +45,10 @@ SELECT * FROM users; SELECT * FROM users WHERE MATCH (åå‰) AGAINST ('+ãŸãªã‹' IN BOOLEAN MODE); +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command("dump --dump_plugins no --dump_records no"); +--enable_cursor_protocol DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_type_comment.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_type_comment.test index 54fb986a24f..19879bc57f1 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_type_comment.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_type_comment.test @@ -34,7 +34,10 @@ CREATE TABLE bugs ( ALTER TABLE bugs ADD COLUMN name VARCHAR(64) COMMENT 'type "tags"'; +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command("dump --dump_plugins no"); +--enable_cursor_protocol DROP TABLE bugs; DROP TABLE tags; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_index_token_filters_one_token_filter.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_index_token_filters_one_token_filter.test index 8a63885a8e7..d68fb7c7362 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_index_token_filters_one_token_filter.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_index_token_filters_one_token_filter.test @@ -34,7 +34,10 @@ CREATE TABLE memos ( ALTER TABLE memos ADD FULLTEXT INDEX (content) COMMENT 'token_filters "TokenFilterStopWord"'; +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command("dump --dump_plugins no"); +--enable_cursor_protocol DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_token_filter.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_token_filter.test index 8efaad2a4ce..00a09f952ec 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_token_filter.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_token_filter.test @@ -37,6 +37,8 @@ CREATE TABLE memos ( FULLTEXT INDEX (content) COMMENT 'table "terms"' ) DEFAULT CHARSET=utf8; +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command("dump --dump_plugins no"); ALTER TABLE terms COMMENT='default_tokenizer "TokenBigram", token_filters "TokenFilterStopWord"'; @@ -47,6 +49,7 @@ ALTER TABLE memos DISABLE KEYS; ALTER TABLE memos ENABLE KEYS; SELECT mroonga_command("dump --dump_plugins no"); +--enable_cursor_protocol DROP TABLE memos; DROP TABLE terms; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_fulltext_table.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_fulltext_table.test index 83ce2ca786e..8237f2d83fb 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_fulltext_table.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_fulltext_table.test @@ -35,9 +35,12 @@ CREATE TABLE memos ( FULLTEXT INDEX content_index (content) COMMENT 'table "terms"' ) DEFAULT CHARSET=utf8; +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command("dump --dump_plugins no"); ALTER TABLE memos DISABLE KEYS; SELECT mroonga_command("dump --dump_plugins no"); +--enable_cursor_protocol DROP TABLE memos; DROP TABLE terms; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext_table.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext_table.test index 424e51adaaa..27071e82c1d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext_table.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext_table.test @@ -35,10 +35,13 @@ CREATE TABLE memos ( FULLTEXT INDEX content_index (content) COMMENT 'table "terms"' ) DEFAULT CHARSET=utf8; +#Check after fix MDEV-31554 +--disable_cursor_protocol ALTER TABLE memos DISABLE KEYS; SELECT mroonga_command("dump --dump_plugins no"); ALTER TABLE memos ENABLE KEYS; SELECT mroonga_command("dump --dump_plugins no"); +--enable_cursor_protocol DROP TABLE memos; DROP TABLE terms; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_index_fulltext_vector_other_table.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_index_fulltext_vector_other_table.test index c23f35eef9a..11e524482be 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_index_fulltext_vector_other_table.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_index_fulltext_vector_other_table.test @@ -39,7 +39,10 @@ CREATE TABLE bugs ( INSERT INTO bugs (id, tags) VALUES (1, "Linux MySQL groonga"); +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command("dump --dump_plugins no --dump_records no"); +--enable_cursor_protocol SELECT *, MATCH (tags) AGAINST ("+MySQL" IN BOOLEAN MODE) AS score FROM bugs diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_index_int_other_table.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_index_int_other_table.test index 9e128a005bb..710b922d9da 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_index_int_other_table.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_index_int_other_table.test @@ -40,7 +40,10 @@ INSERT INTO bugs (id, priority) VALUES (1, 10); INSERT INTO bugs (id, priority) VALUES (2, 3); INSERT INTO bugs (id, priority) VALUES (3, -2); +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command("dump --dump_plugins no --dump_records no"); +--enable_cursor_protocol SELECT * FROM bugs diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_multibyte_cp932.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_multibyte_cp932.test index be26045ab89..5c94e43e2c8 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_multibyte_cp932.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_multibyte_cp932.test @@ -43,7 +43,10 @@ SELECT * FROM users; SELECT * FROM users WHERE MATCH (–¼‘O) AGAINST ('+‚½‚È‚©' IN BOOLEAN MODE); +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command("dump --dump_plugins no --dump_records no"); +--enable_cursor_protocol DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_multibyte_utf8.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_multibyte_utf8.test index efbaf31fae5..4734d6d71bb 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_multibyte_utf8.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_multibyte_utf8.test @@ -43,7 +43,10 @@ SELECT * FROM users; SELECT * FROM users WHERE MATCH (åå‰) AGAINST ('+ãŸãªã‹' IN BOOLEAN MODE); +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command("dump --dump_plugins no --dump_records no"); +--enable_cursor_protocol DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_flags_comment.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_flags_comment.test index 6bafebd8b9c..c3e4280390d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_flags_comment.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_flags_comment.test @@ -29,7 +29,10 @@ CREATE TABLE bugs ( tags TEXT COMMENT 'flags "COLUMN_VECTOR"' ) DEFAULT CHARSET=utf8; +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command("dump --dump_plugins no"); +--enable_cursor_protocol DROP TABLE bugs; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_flags_parameter.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_flags_parameter.test index 3baa576a9ea..3dd9bd81a08 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_flags_parameter.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_flags_parameter.test @@ -30,7 +30,10 @@ CREATE TABLE bugs ( tags TEXT FLAGS='COLUMN_VECTOR' ) DEFAULT CHARSET=utf8; +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command("dump --dump_plugins no"); +--enable_cursor_protocol DROP TABLE bugs; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_groonga_type_comment.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_groonga_type_comment.test index 28f0f214935..aa2270d4926 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_groonga_type_comment.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_groonga_type_comment.test @@ -33,7 +33,10 @@ CREATE TABLE bugs ( tag VARCHAR(64) COMMENT 'groonga_type "tags"' ) DEFAULT CHARSET=utf8; +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command("dump --dump_plugins no"); +--enable_cursor_protocol DROP TABLE bugs; DROP TABLE tags; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_groonga_type_parameter.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_groonga_type_parameter.test index a664287289b..6b1bd629337 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_groonga_type_parameter.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_groonga_type_parameter.test @@ -36,7 +36,10 @@ CREATE TABLE bugs ( ) DEFAULT CHARSET=utf8; SHOW CREATE TABLE bugs; +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command("dump --dump_plugins no"); +--enable_cursor_protocol DROP TABLE bugs; DROP TABLE tags; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_type_comment.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_type_comment.test index bd4b268b081..4b308c196eb 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_type_comment.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_type_comment.test @@ -33,7 +33,10 @@ CREATE TABLE bugs ( tag VARCHAR(64) COMMENT 'type "tags"' ) DEFAULT CHARSET=utf8; +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command("dump --dump_plugins no"); +--enable_cursor_protocol DROP TABLE bugs; DROP TABLE tags; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_default_tokenizer.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_default_tokenizer.test index ade4099a8d5..d1d4654460a 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_default_tokenizer.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_default_tokenizer.test @@ -30,7 +30,10 @@ CREATE TABLE tags ( COLLATE=utf8_bin COMMENT='default_tokenizer "TokenDelimit"'; +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command("dump --dump_plugins no"); +--enable_cursor_protocol DROP TABLE tags; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_index_bin.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_index_bin.test index 4997dbf75f7..b2bc719d683 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_index_bin.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_index_bin.test @@ -29,7 +29,10 @@ CREATE TABLE diaries ( INDEX (content) COMMENT 'normalizer "NormalizerAuto"' ) DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command("dump --dump_plugins no"); +--enable_cursor_protocol DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_token_filters_multiple_token_filters.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_token_filters_multiple_token_filters.test index f7add5dbd60..5b2dcf00001 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_token_filters_multiple_token_filters.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_token_filters_multiple_token_filters.test @@ -33,7 +33,10 @@ CREATE TABLE memos ( FULLTEXT INDEX (content) COMMENT 'token_filters "TokenFilterStopWord,TokenFilterStopWord"' ) DEFAULT CHARSET=utf8; +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command("dump --dump_plugins no"); +--enable_cursor_protocol DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_token_filters_one_token_filter.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_token_filters_one_token_filter.test index 2fc98e6103e..4f40cca47c0 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_token_filters_one_token_filter.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_token_filters_one_token_filter.test @@ -33,7 +33,10 @@ CREATE TABLE memos ( FULLTEXT INDEX (content) COMMENT 'token_filters "TokenFilterStopWord"' ) DEFAULT CHARSET=utf8; +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command("dump --dump_plugins no"); +--enable_cursor_protocol DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_token_filters_parameter.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_token_filters_parameter.test index aaf60b02dc4..a4c844ba435 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_token_filters_parameter.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_token_filters_parameter.test @@ -36,7 +36,10 @@ CREATE TABLE memos ( ) DEFAULT CHARSET=utf8; SHOW CREATE TABLE memos; +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command("dump --dump_plugins no"); +--enable_cursor_protocol DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_token_filters_multiple_token_filters.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_token_filters_multiple_token_filters.test index dc0996d279c..a9de0b1101d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_token_filters_multiple_token_filters.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_token_filters_multiple_token_filters.test @@ -37,7 +37,10 @@ CREATE TABLE memos ( FULLTEXT INDEX (content) COMMENT 'table "terms"' ) DEFAULT CHARSET=utf8; +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command("dump --dump_plugins no"); +--enable_cursor_protocol DROP TABLE memos; DROP TABLE terms; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_token_filters_one_token_filter.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_token_filters_one_token_filter.test index ee1da6d09c3..30a21540c62 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_token_filters_one_token_filter.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_token_filters_one_token_filter.test @@ -37,7 +37,10 @@ CREATE TABLE memos ( FULLTEXT INDEX (content) COMMENT 'table "terms"' ) DEFAULT CHARSET=utf8; +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command("dump --dump_plugins no"); +--enable_cursor_protocol DROP TABLE memos; DROP TABLE terms; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_delete_existent.test b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_delete_existent.test index 37405696697..e9ab751dc0b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_delete_existent.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_delete_existent.test @@ -44,7 +44,10 @@ DELETE FROM comments WHERE id = 100; SELECT * FROM entries; SELECT * FROM comments; +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command('dump --dump_plugins no'); +--enable_cursor_protocol DROP TABLE entries; DROP TABLE comments; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_delete_nonexistent.test b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_delete_nonexistent.test index 9322876badb..64a75843bfc 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_delete_nonexistent.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_delete_nonexistent.test @@ -44,7 +44,10 @@ DELETE FROM comments WHERE id = 200; SELECT * FROM entries; SELECT * FROM comments; +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command('dump --dump_plugins no'); +--enable_cursor_protocol DROP TABLE entries; DROP TABLE comments; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_insert_existent.test b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_insert_existent.test index 283efbd3a48..a0e27ea5618 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_insert_existent.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_insert_existent.test @@ -42,7 +42,10 @@ INSERT INTO entries (content, comment_id) VALUES ('Hello!', 100); SELECT * FROM entries; SELECT * FROM comments; +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command('dump --dump_plugins no'); +--enable_cursor_protocol DROP TABLE entries; DROP TABLE comments; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_insert_nonexistent.test b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_insert_nonexistent.test index 4b873f50cf0..ea9820ac6a6 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_insert_nonexistent.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_insert_nonexistent.test @@ -42,7 +42,10 @@ INSERT INTO entries (content, comment_id) VALUES ('Hello!', 1); SELECT * FROM entries; SELECT * FROM comments; +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command('dump --dump_plugins no'); +--enable_cursor_protocol DROP TABLE entries; DROP TABLE comments; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_update_existent.test b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_update_existent.test index fc3590f36ff..24cba6110fa 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_update_existent.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_update_existent.test @@ -44,7 +44,10 @@ UPDATE entries SET comment_id = 200 WHERE content = 'Hello!'; SELECT * FROM entries; SELECT * FROM comments; +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command('dump --dump_plugins no'); +--enable_cursor_protocol DROP TABLE entries; DROP TABLE comments; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_update_nonexistent.test b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_update_nonexistent.test index bcba6e75736..756c26bbfc2 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_update_nonexistent.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_update_nonexistent.test @@ -44,7 +44,10 @@ UPDATE entries SET comment_id = 200 WHERE content = 'Hello!'; SELECT * FROM entries; SELECT * FROM comments; +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command('dump --dump_plugins no'); +--enable_cursor_protocol DROP TABLE entries; DROP TABLE comments; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_command_auto-escape.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_command_auto-escape.test index e40a703b0a5..db2ee2b2203 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_command_auto-escape.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_command_auto-escape.test @@ -31,9 +31,12 @@ CREATE TABLE diaries ( INSERT INTO diaries VALUES('It is Groonga'); INSERT INTO diaries VALUES('It is Mroonga'); +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command('select', 'table', 'diaries', 'filter', 'title @ "Groonga"'); +--enable_cursor_protocol DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_command_special-database-name.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_command_special-database-name.test index 720c547c0f7..1dcb143de29 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_command_special-database-name.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_command_special-database-name.test @@ -30,7 +30,10 @@ CREATE TABLE diaries ( FULLTEXT KEY (title) ) DEFAULT CHARSET=utf8; +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command('dump --dump_plugins no'); +--enable_cursor_protocol DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_dynamic_keyword.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_dynamic_keyword.test index 3958782a4bc..8f9013bc87b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_dynamic_keyword.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_dynamic_keyword.test @@ -32,9 +32,12 @@ CREATE TABLE keywords ( INSERT INTO keywords VALUES ('Mroonga'); INSERT INTO keywords VALUES ('Groonga'); +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_highlight_html('Mroonga is the Groonga based storage engine.', keyword) AS highlighted FROM keywords; +--enable_cursor_protocol --disable_query_log DROP TABLE keywords; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_multiple_keywords.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_multiple_keywords.test index 98643876058..bac040e69b3 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_multiple_keywords.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_multiple_keywords.test @@ -18,8 +18,11 @@ --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_highlight_html('Mroonga is the Groonga based storage engine.', 'Mroonga', 'Groonga') AS highlighted; +--enable_cursor_protocol --source ../../include/mroonga/unload_mroonga_functions.inc --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_normalizer.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_normalizer.test index 83e5966d39e..a774f361fe3 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_normalizer.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_normalizer.test @@ -18,8 +18,11 @@ --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_highlight_html('Mroonga is the Groonga based storage engine.', 'mroonga') AS highlighted; +--enable_cursor_protocol --source ../../include/mroonga/unload_mroonga_functions.inc --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_normalize_default.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_normalize_default.test index aa2eee53b53..108f28ce952 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_normalize_default.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_normalize_default.test @@ -18,7 +18,10 @@ --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_normalize('aBcAbCã‘'); +--enable_cursor_protocol --source ../../include/mroonga/unload_mroonga_functions.inc --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_normalize_normalizer.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_normalize_normalizer.test index bb9199f012f..bcaec1fe4da 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_normalize_normalizer.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_normalize_normalizer.test @@ -18,7 +18,10 @@ --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_normalize('aBcAbCã‘', "NormalizerAuto"); +--enable_cursor_protocol --source ../../include/mroonga/unload_mroonga_functions.inc --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_dynamic_keyword.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_dynamic_keyword.test index a92e651cfd4..69297ed3152 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_dynamic_keyword.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_dynamic_keyword.test @@ -32,9 +32,12 @@ CREATE TABLE keywords ( INSERT INTO keywords VALUES ('Mroonga'); INSERT INTO keywords VALUES ('Groonga'); +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_snippet_html('Mroonga is the Groonga based storage engine.', keyword) as snippet FROM keywords; +--enable_cursor_protocol --disable_query_log DROP TABLE keywords; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_multiple_keywords.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_multiple_keywords.test index 54953ebea59..a968c7b924e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_multiple_keywords.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_multiple_keywords.test @@ -18,8 +18,11 @@ --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_snippet_html('Mroonga is the Groonga based storage engine.', 'Mroonga', 'Groonga') as snippet; +--enable_cursor_protocol --source ../../include/mroonga/unload_mroonga_functions.inc --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_add_column_multibyte_cp932.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_add_column_multibyte_cp932.test index 21e80a74fd6..ac828ddb1ac 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_add_column_multibyte_cp932.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_add_column_multibyte_cp932.test @@ -46,7 +46,10 @@ SELECT * FROM users; SELECT * FROM users WHERE MATCH (–¼‘O) AGAINST ('+‚½‚È‚©' IN BOOLEAN MODE); +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command("dump --dump_plugins no --dump_records no"); +--enable_cursor_protocol DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_add_column_multibyte_utf8.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_add_column_multibyte_utf8.test index f98d0e0da2c..d6d17396760 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_add_column_multibyte_utf8.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_add_column_multibyte_utf8.test @@ -46,7 +46,10 @@ SELECT * FROM users; SELECT * FROM users WHERE MATCH (åå‰) AGAINST ('+ãŸãªã‹' IN BOOLEAN MODE); +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command("dump --dump_plugins no --dump_records no"); +--enable_cursor_protocol DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_multibyte_cp932.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_multibyte_cp932.test index 5898e3772c6..f06f6cfe94e 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_multibyte_cp932.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_multibyte_cp932.test @@ -45,7 +45,10 @@ SELECT * FROM users; SELECT * FROM users WHERE MATCH (–¼‘O) AGAINST ('+‚½‚È‚©' IN BOOLEAN MODE); +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command("dump --dump_plugins no --dump_records no"); +--enable_cursor_protocol DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_multibyte_utf8.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_multibyte_utf8.test index c646a1d2eba..a61382949fe 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_multibyte_utf8.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_multibyte_utf8.test @@ -45,7 +45,10 @@ SELECT * FROM users; SELECT * FROM users WHERE MATCH (åå‰) AGAINST ('+ãŸãªã‹' IN BOOLEAN MODE); +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command("dump --dump_plugins no --dump_records no"); +--enable_cursor_protocol DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_comment_combined.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_comment_combined.test index e6dd9908002..c609df9d03d 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_comment_combined.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_comment_combined.test @@ -27,7 +27,10 @@ CREATE TABLE bugs ( ) DEFAULT CHARSET=utf8 COMMENT='Free style normal comment, engine "InnoDB"'; +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command("dump --dump_plugins no"); +--enable_cursor_protocol DROP TABLE bugs; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_multiple_token_filters.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_multiple_token_filters.test index 45c758173d4..920fa63a46c 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_multiple_token_filters.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_multiple_token_filters.test @@ -35,7 +35,10 @@ CREATE TABLE memos ( FULLTEXT INDEX (content) COMMENT 'token_filters "TokenFilterStopWord,TokenFilterStopWord"' ) COMMENT='engine "InnoDB"' DEFAULT CHARSET=utf8; +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command("dump --dump_plugins no"); +--enable_cursor_protocol DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_one_token_filter.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_one_token_filter.test index 64732efd8ec..55e31124c18 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_one_token_filter.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_one_token_filter.test @@ -35,7 +35,10 @@ CREATE TABLE memos ( FULLTEXT INDEX (content) COMMENT 'token_filters "TokenFilterStopWord"' ) COMMENT='engine "InnoDB"' DEFAULT CHARSET=utf8; +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command("dump --dump_plugins no"); +--enable_cursor_protocol DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_parameter.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_parameter.test index 3fb0caeadf8..e6b56bae1e0 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_parameter.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_parameter.test @@ -38,7 +38,10 @@ CREATE TABLE memos ( ) COMMENT='ENGINE "InnoDB"' DEFAULT CHARSET=utf8; SHOW CREATE TABLE memos; +#Check after fix MDEV-31554 +--disable_cursor_protocol SELECT mroonga_command("dump --dump_plugins no"); +--enable_cursor_protocol DROP TABLE memos; diff --git a/storage/rocksdb/mysql-test/rocksdb/include/group_min_max.inc b/storage/rocksdb/mysql-test/rocksdb/include/group_min_max.inc index 40fabce0517..492343f2e47 100644 --- a/storage/rocksdb/mysql-test/rocksdb/include/group_min_max.inc +++ b/storage/rocksdb/mysql-test/rocksdb/include/group_min_max.inc @@ -1428,10 +1428,12 @@ INSERT INTO t1(c1,c2) VALUES (4,14), (4,15), (4,16), (4,17), (4,18), (4,19), (4,20),(5,5); ANALYZE TABLE t1; +--disable_cursor_protocol EXPLAIN SELECT MAX(c2), c1 FROM t1 WHERE c1 = 4 GROUP BY c1; FLUSH STATUS; SELECT MAX(c2), c1 FROM t1 WHERE c1 = 4 GROUP BY c1; SHOW SESSION STATUS LIKE 'Handler_read%'; +--enable_cursor_protocol DROP TABLE t1; diff --git a/storage/rocksdb/mysql-test/rocksdb/t/2pc_group_commit.test b/storage/rocksdb/mysql-test/rocksdb/t/2pc_group_commit.test index aeadf5381b0..64d38a5e571 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/2pc_group_commit.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/2pc_group_commit.test @@ -35,9 +35,11 @@ SET GLOBAL rocksdb_flush_log_at_trx_commit=1; --echo ## --echo ## 2PC + durability + single thread --echo ## +--disable_cursor_protocol select variable_value into @b1 from information_schema.global_status where variable_name='Binlog_commits'; select variable_value into @b2 from information_schema.global_status where variable_name='Binlog_group_commits'; select variable_value into @b3 from information_schema.global_status where variable_name='Rocksdb_wal_synced'; +--enable_cursor_protocol --exec $MYSQL_SLAP --silent --concurrency=1 --number-of-queries=1000 --query="INSERT INTO t1 (id, value) VALUES(NULL, 1)" select IF(variable_value - @b1 = 1000, 'OK', variable_value - @b1) as Binlog_commits from information_schema.global_status where variable_name='Binlog_commits'; @@ -63,9 +65,11 @@ set debug_dbug='-d,rocksdb_enable_delay_commits'; --echo ## --echo ## 2PC + durability + group commit --echo ## +--disable_cursor_protocol select variable_value into @b1 from information_schema.global_status where variable_name='Binlog_commits'; select variable_value into @b2 from information_schema.global_status where variable_name='Binlog_group_commits'; select variable_value into @b3 from information_schema.global_status where variable_name='Rocksdb_wal_synced'; +--enable_cursor_protocol --exec $MYSQL_SLAP --silent --concurrency=50 --number-of-queries=10000 --query="INSERT INTO t1 (id, value) VALUES(NULL, 1)" @@ -90,9 +94,11 @@ set debug_dbug='-d,rocksdb_disable_delay_commits'; SET GLOBAL rocksdb_enable_2pc=1; SET GLOBAL rocksdb_flush_log_at_trx_commit=0; +--disable_cursor_protocol select variable_value into @b1 from information_schema.global_status where variable_name='Binlog_commits'; select variable_value into @b2 from information_schema.global_status where variable_name='Binlog_group_commits'; select variable_value into @b3 from information_schema.global_status where variable_name='Rocksdb_wal_synced'; +--enable_cursor_protocol --exec $MYSQL_SLAP --silent --concurrency=1 --number-of-queries=1000 --query="INSERT INTO t1 (id, value) VALUES(NULL, 1)" select IF(variable_value - @b1 = 1000, 'OK', variable_value - @b1) as Binlog_commits @@ -106,9 +112,11 @@ from information_schema.global_status where variable_name='Rocksdb_wal_synced'; --echo # 2PC enabled, MyRocks durability disabled, concurrent workload --echo ## +--disable_cursor_protocol select variable_value into @b1 from information_schema.global_status where variable_name='Binlog_commits'; select variable_value into @b2 from information_schema.global_status where variable_name='Binlog_group_commits'; select variable_value into @b3 from information_schema.global_status where variable_name='Rocksdb_wal_synced'; +--enable_cursor_protocol --exec $MYSQL_SLAP --silent --concurrency=50 --number-of-queries=10000 --query="INSERT INTO t1 (id, value) VALUES(NULL, 1)" @@ -132,9 +140,11 @@ from information_schema.global_status where variable_name='Rocksdb_wal_synced'; SET GLOBAL rocksdb_enable_2pc=0; SET GLOBAL rocksdb_flush_log_at_trx_commit=1; +--disable_cursor_protocol select variable_value into @b1 from information_schema.global_status where variable_name='Binlog_commits'; select variable_value into @b2 from information_schema.global_status where variable_name='Binlog_group_commits'; select variable_value into @b3 from information_schema.global_status where variable_name='Rocksdb_wal_synced'; +--enable_cursor_protocol --exec $MYSQL_SLAP --silent --concurrency=1 --number-of-queries=1000 --query="INSERT INTO t1 (id, value) VALUES(NULL, 1)" @@ -148,9 +158,11 @@ from information_schema.global_status where variable_name='Rocksdb_wal_synced'; --echo ## --echo # 2PC disabled, MyRocks durability enabled, concurrent workload --echo ## +--disable_cursor_protocol select variable_value into @b1 from information_schema.global_status where variable_name='Binlog_commits'; select variable_value into @b2 from information_schema.global_status where variable_name='Binlog_group_commits'; select variable_value into @b3 from information_schema.global_status where variable_name='Rocksdb_wal_synced'; +--enable_cursor_protocol --exec $MYSQL_SLAP --silent --concurrency=50 --number-of-queries=10000 --query="INSERT INTO t1 (id, value) VALUES(NULL, 1)" select variable_value - @b1 as Binlog_commits diff --git a/storage/rocksdb/mysql-test/rocksdb/t/autoinc_debug.test b/storage/rocksdb/mysql-test/rocksdb/t/autoinc_debug.test index 99e28f3b55e..280c59a6a1d 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/autoinc_debug.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/autoinc_debug.test @@ -67,7 +67,9 @@ commit; --exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect --source include/wait_until_connected_again.inc --disable_reconnect +--disable_cursor_protocol select max(i) into @row_max from t; +--enable_cursor_protocol select table_schema, table_name, auto_increment > @row_max from information_schema.tables where table_name = 't'; --echo # After engine prepare @@ -83,7 +85,9 @@ commit; --exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect --source include/wait_until_connected_again.inc --disable_reconnect +--disable_cursor_protocol select max(i) into @row_max from t; +--enable_cursor_protocol select table_schema, table_name, auto_increment > @row_max from information_schema.tables where table_name = 't'; --echo # After binlog @@ -99,7 +103,9 @@ commit; --exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect --source include/wait_until_connected_again.inc --disable_reconnect +--disable_cursor_protocol select max(i) into @row_max from t; +--enable_cursor_protocol select table_schema, table_name, auto_increment > @row_max from information_schema.tables where table_name = 't'; --echo # After everything @@ -115,7 +121,9 @@ commit; --exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect --source include/wait_until_connected_again.inc --disable_reconnect +--disable_cursor_protocol select max(i) into @row_max from t; +--enable_cursor_protocol select table_schema, table_name, auto_increment > @row_max from information_schema.tables where table_name = 't'; drop table t; diff --git a/storage/rocksdb/mysql-test/rocksdb/t/autoinc_vars_thread_2.test b/storage/rocksdb/mysql-test/rocksdb/t/autoinc_vars_thread_2.test index b64af16411b..83ef7c0ff29 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/autoinc_vars_thread_2.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/autoinc_vars_thread_2.test @@ -99,10 +99,12 @@ while ($i > 0) # smallest value in the sequence for thread 'thr' that is greater than # the pk in the previous row. let $file = `SELECT CONCAT(@@datadir, "test_export.txt")`; +--disable_cursor_protocol --disable_query_log --echo SELECT * FROM t1 ORDER BY pk INTO OUTFILE ; eval SELECT * FROM t1 ORDER BY pk INTO OUTFILE "$file"; --enable_query_log +--enable_cursor_protocol let ROCKSDB_OUTFILE = $file; diff --git a/storage/rocksdb/mysql-test/rocksdb/t/bloomfilter3.test b/storage/rocksdb/mysql-test/rocksdb/t/bloomfilter3.test index dc2a0da506d..41909a584ff 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/bloomfilter3.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/bloomfilter3.test @@ -29,7 +29,9 @@ while ($i <= 10000) { ## HA_READ_PREFIX_LAST_OR_PREV # BF len 21 +--disable_cursor_protocol select variable_value into @c from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked'; +--enable_cursor_protocol select id1, id2, link_type, visibility, data, time, version from linktable FORCE INDEX(`id1_type`) where id1 = 100 and link_type = 1 and time >= 0 and time <= 9223372036854775807 and visibility = 1 order by time desc; select case when variable_value-@c > 0 then 'true' else 'false' end from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked'; @@ -47,7 +49,9 @@ explain select id1, id2, link_type, visibility, data, time, version from linktable FORCE INDEX(`id1_type2`) where id1 = 100 and link_type = 1 and time >= 0 and time <= 9223372036854775807 order by time desc; +--disable_cursor_protocol select variable_value into @c from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked'; +--enable_cursor_protocol # MariaDB: no support for optimizer_force_index_for_range: #set @tmp_force_index_for_range=@@optimizer_force_index_for_range; #set optimizer_force_index_for_range=on; @@ -56,34 +60,46 @@ select case when variable_value-@c > 0 then 'true' else 'false' end from informa #set global optimizer_force_index_for_range=@tmp_force_index_for_range; # BF len 13 +--disable_cursor_protocol select variable_value into @c from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked'; +--enable_cursor_protocol select id1, id2, link_type, visibility, data, time, version from linktable FORCE INDEX(`id1_type3`) where id1 = 100 and time >= 0 and time <= 9223372036854775807 and visibility = 1 order by time desc; select case when variable_value-@c = 0 then 'true' else 'false' end from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked'; ## HA_READ_PREFIX_LAST_OR_PREV (no end range) # BF len 20 +--disable_cursor_protocol select variable_value into @c from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked'; +--enable_cursor_protocol select id1, id2, link_type, visibility, data, time, version from linktable FORCE INDEX(`id1_type`) where id1 = 100 and link_type = 1 and visibility = 1 and time >= 0 order by time desc; select case when variable_value-@c > 0 then 'true' else 'false' end from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked'; # BF len 19 +--disable_cursor_protocol select variable_value into @c from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked'; +--enable_cursor_protocol select id1, id2, link_type, visibility, data, time, version from linktable FORCE INDEX(`id1_type2`) where id1 = 100 and link_type = 1 and time >= 0 order by time desc; select case when variable_value-@c = 0 then 'true' else 'false' end from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked'; --echo ## HA_READ_PREFIX_LAST --echo # BF len 20 +--disable_cursor_protocol select variable_value into @c from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked'; +--enable_cursor_protocol select id1, id2, link_type, visibility, data, time, version from linktable FORCE INDEX(`id1_type`) where id1 = 100 and link_type = 1 and visibility = 1 order by time desc; select case when variable_value-@c > 0 then 'true' else 'false' end from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked'; --echo # BF len 19 +--disable_cursor_protocol select variable_value into @c from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked'; +--enable_cursor_protocol select id1, id2, link_type, visibility, data, time, version from linktable FORCE INDEX(`id1_type2`) where id1 = 100 and link_type = 1 order by time desc; select case when variable_value-@c = 0 then 'true' else 'false' end from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked'; --echo # BF len 12 +--disable_cursor_protocol select variable_value into @c from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked'; +--enable_cursor_protocol select id1, id2, link_type, visibility, data, time, version from linktable FORCE INDEX(`id1_type3`) where id1 = 100 and visibility = 1 order by time desc; select case when variable_value-@c = 0 then 'true' else 'false' end from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked'; @@ -125,7 +141,9 @@ explain select * from t1 where kp0=1 and kp1=1 and kp2=0x12FFFFFFFFFF order by kp3 desc; show status like '%rocksdb_bloom_filter_prefix%'; +--disable_cursor_protocol select variable_value into @c from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked'; +--enable_cursor_protocol select * from t1 where kp0=1 and kp1=1 and kp2=0x12FFFFFFFFFF order by kp3 desc; show status like '%rocksdb_bloom_filter_prefix%'; --echo # The following MUST show TRUE: diff --git a/storage/rocksdb/mysql-test/rocksdb/t/bloomfilter_bulk_load.test b/storage/rocksdb/mysql-test/rocksdb/t/bloomfilter_bulk_load.test index 09d9d734f9e..e159cab2f0c 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/bloomfilter_bulk_load.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/bloomfilter_bulk_load.test @@ -21,12 +21,16 @@ while ($t <= 2) { set session rocksdb_bulk_load=0; # bloom filter should be useful on insert (calling GetForUpdate) +--disable_cursor_protocol select variable_value into @h from information_schema.global_status where variable_name='rocksdb_block_cache_filter_hit'; +--enable_cursor_protocol insert into r1 values (100, 100); select variable_value-@h from information_schema.global_status where variable_name='rocksdb_block_cache_filter_hit'; # cf2 has no bloo filter in the bottommost level +--disable_cursor_protocol select variable_value into @h from information_schema.global_status where variable_name='rocksdb_block_cache_filter_hit'; +--enable_cursor_protocol insert into r2 values (100, 100); select variable_value-@h from information_schema.global_status where variable_name='rocksdb_block_cache_filter_hit'; diff --git a/storage/rocksdb/mysql-test/rocksdb/t/cardinality.test b/storage/rocksdb/mysql-test/rocksdb/t/cardinality.test index 1dcb176e4fa..6dcea5ccc4e 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/cardinality.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/cardinality.test @@ -21,8 +21,10 @@ column_name="a"; ANALYZE TABLE t0; --enable_result_log +--disable_cursor_protocol SELECT table_rows into @N FROM information_schema.tables WHERE table_name = "t0"; +--enable_cursor_protocol SELECT FLOOR(@N/cardinality) FROM information_schema.statistics where table_name="t0" and column_name="id"; SELECT FLOOR(@N/cardinality) FROM @@ -35,8 +37,10 @@ SET GLOBAL rocksdb_force_flush_memtable_now = 1; ANALYZE TABLE t0; --enable_result_log +--disable_cursor_protocol SELECT table_rows into @N FROM information_schema.tables WHERE table_name = "t0"; +--enable_cursor_protocol SELECT FLOOR(@N/cardinality) FROM information_schema.statistics where table_name="t0" and column_name="id"; SELECT FLOOR(@N/cardinality) FROM @@ -111,8 +115,10 @@ while ($i<100) # Cardinality of key c should be 1 for c, 10 for b, 100 for a and the other fields. SET GLOBAL rocksdb_force_flush_memtable_now = 1; ANALYZE TABLE t2; +--disable_cursor_protocol --echo cardinality of the columns after 'a' must be equal to the cardinality of column 'a' SELECT CARDINALITY INTO @c FROM information_schema.statistics WHERE TABLE_NAME='t2' AND INDEX_NAME='c' AND COLUMN_NAME='a'; +--enable_cursor_protocol SELECT COLUMN_NAME, CARDINALITY = @c FROM information_schema.statistics WHERE TABLE_NAME='t2' AND INDEX_NAME='c' AND SEQ_IN_INDEX > 3; drop table t1, t2; diff --git a/storage/rocksdb/mysql-test/rocksdb/t/drop_table3.inc b/storage/rocksdb/mysql-test/rocksdb/t/drop_table3.inc index 1a044384a45..dd9a19a29cb 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/drop_table3.inc +++ b/storage/rocksdb/mysql-test/rocksdb/t/drop_table3.inc @@ -29,7 +29,9 @@ let $max = 50000; let $table = t1; --source drop_table3_repopulate_table.inc +--disable_cursor_protocol select variable_value into @a from information_schema.global_status where variable_name='rocksdb_compact_read_bytes'; +--enable_cursor_protocol if ($truncate_table) { truncate table t1; diff --git a/storage/rocksdb/mysql-test/rocksdb/t/handler_basic.test b/storage/rocksdb/mysql-test/rocksdb/t/handler_basic.test index 22b5d69780d..21ee4b9b3ba 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/handler_basic.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/handler_basic.test @@ -8,6 +8,8 @@ DROP TABLE IF EXISTS t1; --enable_warnings +--disable_cursor_protocol + FLUSH STATUS; CREATE TABLE t1 (id INT PRIMARY KEY, a VARCHAR(100), b INT, INDEX b(b)) ENGINE=rocksdb; @@ -49,5 +51,7 @@ FLUSH STATUS; SELECT * FROM t1 WHERE id < 8 ORDER BY id; SHOW SESSION STATUS LIKE 'Handler_read%'; +--enable_cursor_protocol + # Cleanup DROP TABLE t1; diff --git a/storage/rocksdb/mysql-test/rocksdb/t/hermitage.inc b/storage/rocksdb/mysql-test/rocksdb/t/hermitage.inc index 17baf5b6c57..ba88c603568 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/hermitage.inc +++ b/storage/rocksdb/mysql-test/rocksdb/t/hermitage.inc @@ -111,7 +111,9 @@ commit; connection con1; update test set value = value + 10; connection con2; +--disable_cursor_protocol select variable_value into @a from information_schema.global_status where variable_name='rocksdb_snapshot_conflict_errors'; +--enable_cursor_protocol select * from test; send delete from test where value = 20; connection con1; diff --git a/storage/rocksdb/mysql-test/rocksdb/t/no_merge_sort.test b/storage/rocksdb/mysql-test/rocksdb/t/no_merge_sort.test index ccef7182c11..cde1d4ef1fc 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/no_merge_sort.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/no_merge_sort.test @@ -21,8 +21,10 @@ while ($i < 30) { inc $j; } + --disable_cursor_protocol select variable_value into @s from information_schema.global_status where variable_name='Sort_merge_passes'; eval SELECT a, b, c FROM ti_nk ORDER BY a,b,c INTO OUTFILE '$datadir/select.out'; + --enable_cursor_protocol --remove_file $datadir/select.out select case when variable_value-@s = 0 then 'true' else 'false' end as skip_merge_sort from information_schema.global_status where variable_name='Sort_merge_passes'; inc $i; diff --git a/storage/rocksdb/mysql-test/rocksdb/t/perf_context.test b/storage/rocksdb/mysql-test/rocksdb/t/perf_context.test index ee41324a34d..26bea857ed3 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/perf_context.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/perf_context.test @@ -72,8 +72,10 @@ AND VALUE > 0; SELECT COUNT(*) from INFORMATION_SCHEMA.ROCKSDB_PERF_CONTEXT_GLOBAL WHERE STAT_TYPE = 'IO_WRITE_NANOS' AND VALUE > 0; +--disable_cursor_protocol SELECT VALUE INTO @a from INFORMATION_SCHEMA.ROCKSDB_PERF_CONTEXT_GLOBAL WHERE STAT_TYPE = 'IO_WRITE_NANOS'; +--enable_cursor_protocol # Single statement writes do show up in per-table stats INSERT INTO t2 VALUES (5), (6), (7), (8); @@ -83,8 +85,10 @@ WHERE TABLE_NAME = 't2' AND STAT_TYPE = 'IO_WRITE_NANOS' AND VALUE > 0; +--disable_cursor_protocol SELECT VALUE INTO @b from INFORMATION_SCHEMA.ROCKSDB_PERF_CONTEXT_GLOBAL WHERE STAT_TYPE = 'IO_WRITE_NANOS'; +--enable_cursor_protocol SELECT CASE WHEN @b - @a > 0 THEN 'true' ELSE 'false' END; diff --git a/storage/rocksdb/mysql-test/rocksdb/t/prefix_extractor_override.test b/storage/rocksdb/mysql-test/rocksdb/t/prefix_extractor_override.test index 8fa43e15827..ffad670a0bf 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/prefix_extractor_override.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/prefix_extractor_override.test @@ -22,7 +22,9 @@ set global rocksdb_force_flush_memtable_now = 1; SELECT * FROM information_schema.rocksdb_cf_options WHERE option_type like '%prefix_extractor%'; # BF used (4+8+8+8) +--disable_cursor_protocol select variable_value into @u from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked'; +--enable_cursor_protocol SELECT COUNT(*) FROM t1 WHERE id1=1 AND id2=1 AND id3=1; select variable_value-@u from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked'; @@ -48,7 +50,9 @@ SELECT * FROM information_schema.rocksdb_cf_options WHERE option_type like '%pre # Satisfies can_use_bloom_filter (4+8+8+8), but can't use because the old SST # files have old prefix extractor +--disable_cursor_protocol select variable_value into @u from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked'; +--enable_cursor_protocol SELECT COUNT(*) FROM t1 WHERE id1=1 AND id2=1 AND id3=1; select variable_value-@u from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked'; @@ -67,7 +71,9 @@ set global rocksdb_force_flush_memtable_now = 1; # BF used w/ new prefix extractor (4+8+8+8) (still increments once because it # needs to check the new SST file, but doesnt increment for SST file with old # extractor) +--disable_cursor_protocol select variable_value into @u from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked'; +--enable_cursor_protocol SELECT COUNT(*) FROM t1 WHERE id1=1 AND id2=1 AND id3=1; select variable_value-@u from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked'; @@ -81,7 +87,9 @@ set global rocksdb_force_flush_memtable_now = 1; # should have 3 sst files, one with old prefix extractor and two with new SELECT COUNT(*) FROM information_schema.rocksdb_index_file_map WHERE COLUMN_FAMILY != 1; +--disable_cursor_protocol select variable_value into @u from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked'; +--enable_cursor_protocol SELECT COUNT(*) FROM t1 WHERE id1=1 AND id2=1 AND id3=1; select variable_value-@u from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked'; @@ -89,7 +97,9 @@ SET @@global.rocksdb_update_cf_options = ''; set global rocksdb_compact_cf='cf1'; # Select the updated, make sure bloom filter is checked now +--disable_cursor_protocol select variable_value into @u from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked'; +--enable_cursor_protocol SELECT COUNT(*) FROM t1 WHERE id1=1 AND id2=30 AND id3=30; select variable_value-@u from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked'; diff --git a/storage/rocksdb/mysql-test/rocksdb/t/read_only_tx.test b/storage/rocksdb/mysql-test/rocksdb/t/read_only_tx.test index 3a1025a3623..dfd119a0a8c 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/read_only_tx.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/read_only_tx.test @@ -18,8 +18,10 @@ CREATE TABLE t1 (id INT, value int, PRIMARY KEY (id), INDEX (value)) ENGINE=Rock INSERT INTO t1 VALUES (1,1); # Read-only, long-running transaction. SingleDelete/Put shouldn't increase much. +--disable_cursor_protocol select variable_value into @p from information_schema.global_status where variable_name='rocksdb_number_sst_entry_put'; select variable_value into @s from information_schema.global_status where variable_name='rocksdb_number_sst_entry_singledelete'; +--enable_cursor_protocol #-- replace_result $uuid uuid START TRANSACTION WITH CONSISTENT SNAPSHOT; diff --git a/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_qcache.test b/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_qcache.test index 0369e758f5d..e2c13748386 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_qcache.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_qcache.test @@ -11,6 +11,7 @@ set @@global.query_cache_size=1024*1024; --enable_connect_log +--disable_cursor_protocol create table t1 (pk int primary key, c char(8)) engine=RocksDB; insert into t1 values (1,'new'),(2,'new'); @@ -35,6 +36,7 @@ show status like 'Qcache_not_cached'; show global status like 'Qcache_hits'; drop table t1; +--enable_cursor_protocol # # Cleanup diff --git a/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_row_stats.test b/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_row_stats.test index ebcc741fc17..ec99aa98278 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_row_stats.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_row_stats.test @@ -1,6 +1,7 @@ source include/have_rocksdb.inc; create table t1 (a int primary key) engine=rocksdb; +--disable_cursor_protocol -- echo Verify rocksdb_rows_inserted select variable_value into @old_rows_inserted from information_schema.global_status where variable_name = 'rocksdb_rows_inserted'; insert into t1 values(1); @@ -51,6 +52,7 @@ select variable_value into @old_system_rows_deleted from information_schema.glob delete from t1; select variable_value into @new_system_rows_deleted from information_schema.global_status where variable_name = 'rocksdb_system_rows_deleted'; select @new_system_rows_deleted - @old_system_rows_deleted; +--enable_cursor_protocol drop table t1; use test; diff --git a/storage/rocksdb/mysql-test/rocksdb/t/select.test b/storage/rocksdb/mysql-test/rocksdb/t/select.test index 3d9bdc7b4b8..fc6cd7c5d10 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/select.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/select.test @@ -68,6 +68,7 @@ SELECT * FROM t2 WHERE a>0 PROCEDURE ANALYSE(); # SELECT INTO let $datadir = `SELECT @@datadir`; +--disable_cursor_protocol --replace_result $datadir eval SELECT t1.a, t2.b FROM t2, t1 WHERE t1.a = t2.a ORDER BY t2.b, t1.a @@ -94,6 +95,7 @@ SELECT t1.*, t2.* FROM t1, t2 ORDER BY t2.b, t1.a, t2.a, t1.b, t1.pk, t2.pk LIMI SELECT MIN(a), MAX(a) FROM t1 INTO @min, @max; SELECT @min, @max; +--enable_cursor_protocol # Joins diff --git a/storage/rocksdb/mysql-test/rocksdb/t/show_table_status.test b/storage/rocksdb/mysql-test/rocksdb/t/show_table_status.test index 55854710c31..5fc52a5142c 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/show_table_status.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/show_table_status.test @@ -81,9 +81,11 @@ flush tables; select create_time is not null, update_time is not null, check_time from information_schema.tables where table_schema=database() and table_name='t1'; +--disable_cursor_protocol select create_time, update_time into @create_tm, @update_tm from information_schema.tables where table_schema=database() and table_name='t1'; +--enable_cursor_protocol select sleep(3); insert into t1 values (2); @@ -109,9 +111,11 @@ where table_schema=database() and table_name='t1'; insert into t1 values (5,5); +--disable_cursor_protocol select create_time, update_time into @create_tm, @update_tm from information_schema.tables where table_schema=database() and table_name='t1'; +--enable_cursor_protocol --echo # Then, an in-place ALTER TABLE: select sleep(2); @@ -126,9 +130,11 @@ where table_schema=database() and table_name='t1'; --echo # Check TRUNCATE TABLE insert into t1 values (10,10); +--disable_cursor_protocol select create_time, update_time into @create_tm, @update_tm from information_schema.tables where table_schema=database() and table_name='t1'; +--enable_cursor_protocol select sleep(2); truncate table t1; diff --git a/storage/rocksdb/mysql-test/rocksdb/t/singledelete.test b/storage/rocksdb/mysql-test/rocksdb/t/singledelete.test index 5a9d17e0255..9de2a899eda 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/singledelete.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/singledelete.test @@ -3,8 +3,10 @@ # only SingleDelete increases CREATE TABLE t1 (id INT, value int, PRIMARY KEY (id), INDEX (value)) ENGINE=RocksDB; INSERT INTO t1 VALUES (1,1); +--disable_cursor_protocol select variable_value into @s from information_schema.global_status where variable_name='rocksdb_number_sst_entry_singledelete'; select variable_value into @d from information_schema.global_status where variable_name='rocksdb_number_sst_entry_delete'; +--enable_cursor_protocol --disable_query_log let $i = 1; while ($i <= 10000) { @@ -21,8 +23,10 @@ select case when variable_value-@d < 10 then 'true' else 'false' end from inform # both SingleDelete and Delete increases CREATE TABLE t2 (id INT, value int, PRIMARY KEY (id), INDEX (value)) ENGINE=RocksDB; INSERT INTO t2 VALUES (1,1); +--disable_cursor_protocol select variable_value into @s from information_schema.global_status where variable_name='rocksdb_number_sst_entry_singledelete'; select variable_value into @d from information_schema.global_status where variable_name='rocksdb_number_sst_entry_delete'; +--enable_cursor_protocol --disable_query_log let $i = 1; while ($i <= 10000) { @@ -38,8 +42,10 @@ select case when variable_value-@d > 9000 then 'true' else 'false' end from info # only Delete increases CREATE TABLE t3 (id INT, value int, PRIMARY KEY (id)) ENGINE=RocksDB; INSERT INTO t3 VALUES (1,1); +--disable_cursor_protocol select variable_value into @s from information_schema.global_status where variable_name='rocksdb_number_sst_entry_singledelete'; select variable_value into @d from information_schema.global_status where variable_name='rocksdb_number_sst_entry_delete'; +--enable_cursor_protocol --disable_query_log let $i = 1; while ($i <= 10000) { @@ -55,8 +61,10 @@ select case when variable_value-@d > 9000 then 'true' else 'false' end from info # only SingleDelete increases CREATE TABLE t4 (id INT, PRIMARY KEY (id)) ENGINE=RocksDB; INSERT INTO t4 VALUES (1); +--disable_cursor_protocol select variable_value into @s from information_schema.global_status where variable_name='rocksdb_number_sst_entry_singledelete'; select variable_value into @d from information_schema.global_status where variable_name='rocksdb_number_sst_entry_delete'; +--enable_cursor_protocol --disable_query_log let $i = 1; while ($i <= 10000) { @@ -72,8 +80,10 @@ select case when variable_value-@d < 10 then 'true' else 'false' end from inform # only SingleDelete increases CREATE TABLE t5 (id1 INT, id2 INT, PRIMARY KEY (id1, id2), INDEX(id2)) ENGINE=RocksDB; INSERT INTO t5 VALUES (1, 1); +--disable_cursor_protocol select variable_value into @s from information_schema.global_status where variable_name='rocksdb_number_sst_entry_singledelete'; select variable_value into @d from information_schema.global_status where variable_name='rocksdb_number_sst_entry_delete'; +--enable_cursor_protocol --disable_query_log let $i = 1; while ($i <= 10000) { diff --git a/storage/rocksdb/mysql-test/rocksdb/t/ttl_primary.test b/storage/rocksdb/mysql-test/rocksdb/t/ttl_primary.test index 38bfb2eef8f..d8f17a7cbb9 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/ttl_primary.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/ttl_primary.test @@ -516,7 +516,9 @@ set global rocksdb_enable_ttl=0; set global rocksdb_force_flush_memtable_now=1; set global rocksdb_compact_cf='default'; +--disable_cursor_protocol select variable_value into @c from information_schema.global_status where variable_name='rocksdb_rows_expired'; +--enable_cursor_protocol set global rocksdb_enable_ttl=1; set global rocksdb_compact_cf='default'; @@ -537,7 +539,9 @@ INSERT INTO t1 values (1); INSERT INTO t1 values (2); INSERT INTO t1 values (3); +--disable_cursor_protocol select variable_value into @c from information_schema.global_status where variable_name='rocksdb_rows_expired'; +--enable_cursor_protocol set global rocksdb_force_flush_memtable_now=1; set global rocksdb_compact_cf='default'; select variable_value-@c from information_schema.global_status where variable_name='rocksdb_rows_expired'; diff --git a/storage/rocksdb/mysql-test/rocksdb/t/ttl_primary_read_filtering.test b/storage/rocksdb/mysql-test/rocksdb/t/ttl_primary_read_filtering.test index 7a7609f456e..a452e932bb5 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/ttl_primary_read_filtering.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/ttl_primary_read_filtering.test @@ -24,7 +24,9 @@ set global rocksdb_force_flush_memtable_now=1; --sorted_result SELECT * FROM t1; +--disable_cursor_protocol select variable_value into @c from information_schema.global_status where variable_name='rocksdb_rows_expired'; +--enable_cursor_protocol set global rocksdb_compact_cf='default'; select variable_value-@c from information_schema.global_status where variable_name='rocksdb_rows_expired'; @@ -78,7 +80,9 @@ INSERT INTO t1 values (7); set global rocksdb_debug_ttl_rec_ts = 0; # should return nothing. +--disable_cursor_protocol select variable_value into @a from information_schema.global_status where variable_name='rocksdb_rows_filtered'; +--enable_cursor_protocol --sorted_result SELECT * FROM t1; select variable_value-@a from information_schema.global_status where variable_name='rocksdb_rows_filtered'; @@ -87,7 +91,9 @@ select variable_value-@a from information_schema.global_status where variable_na set global rocksdb_enable_ttl_read_filtering=0; # should return everything +--disable_cursor_protocol select variable_value into @a from information_schema.global_status where variable_name='rocksdb_rows_filtered'; +--enable_cursor_protocol --sorted_result SELECT * FROM t1; select variable_value-@a from information_schema.global_status where variable_name='rocksdb_rows_filtered'; @@ -96,7 +102,9 @@ select variable_value-@a from information_schema.global_status where variable_na set global rocksdb_enable_ttl_read_filtering=1; # should return nothing. +--disable_cursor_protocol select variable_value into @a from information_schema.global_status where variable_name='rocksdb_rows_filtered'; +--enable_cursor_protocol --sorted_result SELECT * FROM t1; select variable_value-@a from information_schema.global_status where variable_name='rocksdb_rows_filtered'; @@ -125,7 +133,9 @@ INSERT INTO t1 values (1,2,2); INSERT INTO t1 values (1,2,3); set global rocksdb_debug_ttl_rec_ts = 0; +--disable_cursor_protocol select variable_value into @c from information_schema.global_status where variable_name='rocksdb_rows_expired'; +--enable_cursor_protocol set global rocksdb_force_flush_memtable_now=1; @@ -301,27 +311,35 @@ set global rocksdb_compact_cf='default'; # this connection the records have 'expired' already so they are filtered out # even though they have not yet been removed by compaction +--disable_cursor_protocol select variable_value into @a from information_schema.global_status where variable_name='rocksdb_rows_filtered'; +--enable_cursor_protocol --sorted_result SELECT * FROM t1; select variable_value-@a from information_schema.global_status where variable_name='rocksdb_rows_filtered'; --echo # Switching to connection 1 connection con1; +--disable_cursor_protocol select variable_value into @a from information_schema.global_status where variable_name='rocksdb_rows_filtered'; +--enable_cursor_protocol --sorted_result SELECT * FROM t1; # <= shouldn't be filtered out here select variable_value-@a from information_schema.global_status where variable_name='rocksdb_rows_filtered'; UPDATE t1 set a = a + 1; +--disable_cursor_protocol select variable_value into @a from information_schema.global_status where variable_name='rocksdb_rows_filtered'; +--enable_cursor_protocol --sorted_result SELECT * FROM t1; # <= shouldn't be filtered out here select variable_value-@a from information_schema.global_status where variable_name='rocksdb_rows_filtered'; COMMIT; +--disable_cursor_protocol select variable_value into @a from information_schema.global_status where variable_name='rocksdb_rows_filtered'; +--enable_cursor_protocol --sorted_result # <= filtered out here because time has passed. SELECT * FROM t1; select variable_value-@a from information_schema.global_status where variable_name='rocksdb_rows_filtered'; diff --git a/storage/rocksdb/mysql-test/rocksdb/t/ttl_secondary.test b/storage/rocksdb/mysql-test/rocksdb/t/ttl_secondary.test index fb439e109e7..49d097b1056 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/ttl_secondary.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/ttl_secondary.test @@ -582,7 +582,9 @@ set global rocksdb_enable_ttl=0; set global rocksdb_force_flush_memtable_now=1; set global rocksdb_compact_cf='default'; +--disable_cursor_protocol select variable_value into @c from information_schema.global_status where variable_name='rocksdb_rows_expired'; +--enable_cursor_protocol set global rocksdb_enable_ttl=1; set global rocksdb_compact_cf='default'; @@ -604,7 +606,9 @@ INSERT INTO t1 values (1, 1); INSERT INTO t1 values (2, 2); INSERT INTO t1 values (3, 3); +--disable_cursor_protocol select variable_value into @c from information_schema.global_status where variable_name='rocksdb_rows_expired'; +--enable_cursor_protocol set global rocksdb_force_flush_memtable_now=1; set global rocksdb_compact_cf='default'; select variable_value-@c from information_schema.global_status where variable_name='rocksdb_rows_expired'; diff --git a/storage/rocksdb/mysql-test/rocksdb/t/ttl_secondary_read_filtering.test b/storage/rocksdb/mysql-test/rocksdb/t/ttl_secondary_read_filtering.test index f6042cc517e..0e83a0f003e 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/ttl_secondary_read_filtering.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/ttl_secondary_read_filtering.test @@ -29,7 +29,9 @@ SELECT * FROM t1 FORCE INDEX (PRIMARY); --sorted_result SELECT * FROM t1 FORCE INDEX (kb); +--disable_cursor_protocol select variable_value into @c from information_schema.global_status where variable_name='rocksdb_rows_expired'; +--enable_cursor_protocol set global rocksdb_debug_ttl_ignore_pk = 1; set global rocksdb_compact_cf='default'; set global rocksdb_debug_ttl_ignore_pk = 0; @@ -145,7 +147,9 @@ INSERT INTO t1 values (1,2,2); INSERT INTO t1 values (1,2,3); set global rocksdb_debug_ttl_rec_ts = 0; +--disable_cursor_protocol select variable_value into @c from information_schema.global_status where variable_name='rocksdb_rows_expired'; +--enable_cursor_protocol set global rocksdb_force_flush_memtable_now=1; diff --git a/storage/rocksdb/mysql-test/rocksdb/t/type_char_indexes_collation.test b/storage/rocksdb/mysql-test/rocksdb/t/type_char_indexes_collation.test index d231236bd92..f5134b841aa 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/type_char_indexes_collation.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/type_char_indexes_collation.test @@ -45,8 +45,10 @@ explain select hex(c2) from t IGNORE INDEX (sk1) order by c2; --let $file1=$MYSQLTEST_VARDIR/tmp/filesort_order --let $file2=$MYSQLTEST_VARDIR/tmp/sk_order --disable_query_log +--disable_cursor_protocol --eval select hex(weight_string(c1)) INTO OUTFILE '$file1' from t order by c1 --eval select hex(weight_string(c1)) INTO OUTFILE '$file2' from t IGNORE INDEX (sk1) order by c1 +--enable_cursor_protocol --enable_query_log --diff_files $file1 $file2 @@ -54,8 +56,10 @@ explain select hex(c2) from t IGNORE INDEX (sk1) order by c2; --remove_file $file2 --disable_query_log +--disable_cursor_protocol --eval select hex(weight_string(c2)) INTO OUTFILE '$file1' from t order by c2 --eval select hex(weight_string(c2)) INTO OUTFILE '$file2' from t IGNORE INDEX (sk1) order by c2 +--enable_cursor_protocol --enable_query_log --diff_files $file1 $file2 diff --git a/storage/rocksdb/mysql-test/rocksdb/t/type_float.inc b/storage/rocksdb/mysql-test/rocksdb/t/type_float.inc index ff58b73a91b..032a81a80cc 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/type_float.inc +++ b/storage/rocksdb/mysql-test/rocksdb/t/type_float.inc @@ -56,6 +56,8 @@ INSERT INTO t1 (f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10,pk) VALUES (-9999 --sorted_result --query_vertical SELECT f,f0,r1_1,f23_0,f20_3,d,d1_0,d10_10,d53,d53_10 FROM t1 +#Enable after fix MDEV-34624 +--disable_cursor_protocol --sorted_result query_vertical SELECT @@ -69,6 +71,7 @@ SELECT CONCAT('', MAX(d10_10)), CONCAT('', MAX(d53)), CONCAT('', MAX(d53_10)) FROM t1; +--enable_cursor_protocol # Invalid values 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 080ba735a32..325a7523974 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,9 +41,11 @@ 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_cursor_protocol --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_cursor_protocol --enable_query_log eval $COMMAND_BEFORE_LOAD_DATA; @@ -56,9 +58,11 @@ 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_cursor_protocol --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_cursor_protocol --enable_query_log --remove_file $MYSQLTEST_VARDIR/tmp/spider_outfile.tsv 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 fd31047ab58..f52d415a032 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,9 +54,11 @@ 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_cursor_protocol --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_cursor_protocol --enable_query_log eval $COMMAND_BEFORE_LOAD_DATA; @@ -72,9 +74,11 @@ 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_cursor_protocol --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_cursor_protocol --enable_query_log --remove_file $MYSQLTEST_VARDIR/tmp/spider_outfile.tsv 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 f354d49190a..c1be155b70b 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,6 +272,7 @@ let $MYSQLD_DATADIR= `select @@datadir`; use test; let $benchmark_file= `select replace(concat("benchmark_",uuid(),".out"),"-","_")`; --replace_regex /benchmark_.*.out/benchmark.out/ +--disable_cursor_protocol --disable_ps2_protocol eval select * from test1.benchmark into outfile '$benchmark_file'; --enable_ps2_protocol @@ -289,6 +290,7 @@ 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 +--enable_cursor_protocol # # Consistency verification diff --git a/storage/tokudb/mysql-test/rpl/r/rpl_tokudb_update_pk_uc1_lookup1.result b/storage/tokudb/mysql-test/rpl/r/rpl_tokudb_update_pk_uc1_lookup1.result index bfd640e52e9..b5d1251efef 100644 --- a/storage/tokudb/mysql-test/rpl/r/rpl_tokudb_update_pk_uc1_lookup1.result +++ b/storage/tokudb/mysql-test/rpl/r/rpl_tokudb_update_pk_uc1_lookup1.result @@ -21,8 +21,10 @@ update t set b=b+2 where a=1; update t set b=b+3 where a=4; update t set b=b+4 where a=3; update t set b=b+1 where 1<=a and a<=3; +--disable_cursor_protocol select unix_timestamp() into @tstart; select unix_timestamp() into @tend; +--enable_cursor_protocol select @tend-@tstart <= 5; @tend-@tstart <= 5 0 diff --git a/storage/tokudb/mysql-test/rpl/t/rpl_parallel_tokudb_delete_pk.test b/storage/tokudb/mysql-test/rpl/t/rpl_parallel_tokudb_delete_pk.test index bedeb9513be..2f776730506 100644 --- a/storage/tokudb/mysql-test/rpl/t/rpl_parallel_tokudb_delete_pk.test +++ b/storage/tokudb/mysql-test/rpl/t/rpl_parallel_tokudb_delete_pk.test @@ -39,14 +39,18 @@ source include/diff_tables.inc; # delete a row connection master; delete from t where a=2; +--disable_cursor_protocol select unix_timestamp() into @tstart; +--enable_cursor_protocol # wait for the delete to finish on the slave connection master; sync_slave_with_master; # source include/sync_slave_sql_with_master.inc; connection master; +--disable_cursor_protocol select unix_timestamp() into @tend; +--enable_cursor_protocol select @tend-@tstart <= 5; # assert no delay in the delete time # diff tables diff --git a/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_delete_pk.test b/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_delete_pk.test index bedeb9513be..2f776730506 100644 --- a/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_delete_pk.test +++ b/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_delete_pk.test @@ -39,14 +39,18 @@ source include/diff_tables.inc; # delete a row connection master; delete from t where a=2; +--disable_cursor_protocol select unix_timestamp() into @tstart; +--enable_cursor_protocol # wait for the delete to finish on the slave connection master; sync_slave_with_master; # source include/sync_slave_sql_with_master.inc; connection master; +--disable_cursor_protocol select unix_timestamp() into @tend; +--enable_cursor_protocol select @tend-@tstart <= 5; # assert no delay in the delete time # diff tables diff --git a/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_delete_pk_lookup1.test b/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_delete_pk_lookup1.test index 9e9aaede416..076590696aa 100644 --- a/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_delete_pk_lookup1.test +++ b/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_delete_pk_lookup1.test @@ -40,7 +40,9 @@ source include/diff_tables.inc; # delete a row connection master; delete from t where a=2; +--disable_cursor_protocol select unix_timestamp() into @tstart; +--enable_cursor_protocol # wait for the delete to finish on the slave connection master; @@ -48,7 +50,9 @@ sync_slave_with_master; # source include/sync_slave_sql_with_master.inc; connection master; +--disable_cursor_protocol select unix_timestamp() into @tend; +--enable_cursor_protocol select @tend-@tstart > 5; # assert big delay in the delete time # diff tables diff --git a/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_read_only_ff.test b/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_read_only_ff.test index 7b3e8f0c0d3..5b76669c4d1 100644 --- a/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_read_only_ff.test +++ b/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_read_only_ff.test @@ -22,7 +22,9 @@ connection master; # select @@autocommit; eval create table t (a bigint not null, primary key(a)) engine=$engine; # show create table t; +--disable_cursor_protocol select unix_timestamp() into @tstart; +--enable_cursor_protocol insert into t values (1); insert into t values (2),(3); insert into t values (4); diff --git a/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_read_only_ft.test b/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_read_only_ft.test index 7b3e8f0c0d3..5b76669c4d1 100644 --- a/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_read_only_ft.test +++ b/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_read_only_ft.test @@ -22,7 +22,9 @@ connection master; # select @@autocommit; eval create table t (a bigint not null, primary key(a)) engine=$engine; # show create table t; +--disable_cursor_protocol select unix_timestamp() into @tstart; +--enable_cursor_protocol insert into t values (1); insert into t values (2),(3); insert into t values (4); diff --git a/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_read_only_tf.test b/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_read_only_tf.test index 7b3e8f0c0d3..5b76669c4d1 100644 --- a/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_read_only_tf.test +++ b/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_read_only_tf.test @@ -22,7 +22,9 @@ connection master; # select @@autocommit; eval create table t (a bigint not null, primary key(a)) engine=$engine; # show create table t; +--disable_cursor_protocol select unix_timestamp() into @tstart; +--enable_cursor_protocol insert into t values (1); insert into t values (2),(3); insert into t values (4); diff --git a/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_read_only_tt.test b/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_read_only_tt.test index 7b3e8f0c0d3..5b76669c4d1 100644 --- a/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_read_only_tt.test +++ b/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_read_only_tt.test @@ -22,7 +22,9 @@ connection master; # select @@autocommit; eval create table t (a bigint not null, primary key(a)) engine=$engine; # show create table t; +--disable_cursor_protocol select unix_timestamp() into @tstart; +--enable_cursor_protocol insert into t values (1); insert into t values (2),(3); insert into t values (4); diff --git a/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_update_pk_uc0_lookup0.test b/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_update_pk_uc0_lookup0.test index 6dd9b660eed..38965783651 100644 --- a/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_update_pk_uc0_lookup0.test +++ b/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_update_pk_uc0_lookup0.test @@ -42,14 +42,18 @@ update t set b=b+2 where a=1; update t set b=b+3 where a=4; update t set b=b+4 where a=3; update t set b=b+1 where 1<=a and a<=3; +--disable_cursor_protocol select unix_timestamp() into @tstart; +--enable_cursor_protocol # wait for the delete to finish on the slave connection master; sync_slave_with_master; # source include/sync_slave_sql_with_master.inc; connection master; +--disable_cursor_protocol select unix_timestamp() into @tend; +--enable_cursor_protocol select @tend-@tstart <= 5; # assert no delay in the delete time connection slave; diff --git a/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_update_pk_uc0_lookup1.test b/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_update_pk_uc0_lookup1.test index 6dd9b660eed..38965783651 100644 --- a/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_update_pk_uc0_lookup1.test +++ b/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_update_pk_uc0_lookup1.test @@ -42,14 +42,18 @@ update t set b=b+2 where a=1; update t set b=b+3 where a=4; update t set b=b+4 where a=3; update t set b=b+1 where 1<=a and a<=3; +--disable_cursor_protocol select unix_timestamp() into @tstart; +--enable_cursor_protocol # wait for the delete to finish on the slave connection master; sync_slave_with_master; # source include/sync_slave_sql_with_master.inc; connection master; +--disable_cursor_protocol select unix_timestamp() into @tend; +--enable_cursor_protocol select @tend-@tstart <= 5; # assert no delay in the delete time connection slave; diff --git a/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_update_pk_uc1_lookup0.test b/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_update_pk_uc1_lookup0.test index 6dd9b660eed..38965783651 100644 --- a/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_update_pk_uc1_lookup0.test +++ b/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_update_pk_uc1_lookup0.test @@ -42,14 +42,18 @@ update t set b=b+2 where a=1; update t set b=b+3 where a=4; update t set b=b+4 where a=3; update t set b=b+1 where 1<=a and a<=3; +--disable_cursor_protocol select unix_timestamp() into @tstart; +--enable_cursor_protocol # wait for the delete to finish on the slave connection master; sync_slave_with_master; # source include/sync_slave_sql_with_master.inc; connection master; +--disable_cursor_protocol select unix_timestamp() into @tend; +--enable_cursor_protocol select @tend-@tstart <= 5; # assert no delay in the delete time connection slave; diff --git a/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_update_pk_uc1_lookup1.test b/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_update_pk_uc1_lookup1.test index 6dd9b660eed..38965783651 100644 --- a/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_update_pk_uc1_lookup1.test +++ b/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_update_pk_uc1_lookup1.test @@ -42,14 +42,18 @@ update t set b=b+2 where a=1; update t set b=b+3 where a=4; update t set b=b+4 where a=3; update t set b=b+1 where 1<=a and a<=3; +--disable_cursor_protocol select unix_timestamp() into @tstart; +--enable_cursor_protocol # wait for the delete to finish on the slave connection master; sync_slave_with_master; # source include/sync_slave_sql_with_master.inc; connection master; +--disable_cursor_protocol select unix_timestamp() into @tend; +--enable_cursor_protocol select @tend-@tstart <= 5; # assert no delay in the delete time connection slave; diff --git a/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_update_unique_uc0_lookup0.test b/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_update_unique_uc0_lookup0.test index 93fef3699d9..ab012da4aaa 100644 --- a/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_update_unique_uc0_lookup0.test +++ b/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_update_unique_uc0_lookup0.test @@ -42,14 +42,18 @@ update t set b=b+2 where a=1; update t set b=b+3 where a=4; update t set b=b+4 where a=3; update t set b=b+1 where 1<=a and a<=3; +--disable_cursor_protocol select unix_timestamp() into @tstart; +--enable_cursor_protocol # wait for the delete to finish on the slave connection master; sync_slave_with_master; # source include/sync_slave_sql_with_master.inc; connection master; +--disable_cursor_protocol select unix_timestamp() into @tend; +--enable_cursor_protocol select @tend-@tstart <= 5; # assert no delay in the delete time connection slave; diff --git a/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_update_unique_uc0_lookup1.test b/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_update_unique_uc0_lookup1.test index c8976db8ccd..3d6eeb9f4ef 100644 --- a/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_update_unique_uc0_lookup1.test +++ b/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_update_unique_uc0_lookup1.test @@ -42,14 +42,18 @@ update t set b=b+2 where a=1; update t set b=b+3 where a=4; update t set b=b+4 where a=3; update t set b=b+1 where 1<=a and a<=3; +--disable_cursor_protocol select unix_timestamp() into @tstart; +--enable_cursor_protocol # wait for the delete to finish on the slave connection master; sync_slave_with_master; # source include/sync_slave_sql_with_master.inc; connection master; +--disable_cursor_protocol select unix_timestamp() into @tend; +--enable_cursor_protocol select @tend-@tstart <= 5; # assert no delay in the delete time connection slave; diff --git a/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_write_pk.test b/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_write_pk.test index 0ed12b34e1f..4bb41c7fba7 100644 --- a/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_write_pk.test +++ b/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_write_pk.test @@ -22,7 +22,9 @@ connection master; # select @@autocommit; eval create table t (a bigint not null, primary key(a)) engine=$engine; # show create table t; +--disable_cursor_protocol select unix_timestamp() into @tstart; +--enable_cursor_protocol insert into t values (1); insert into t values (2),(3); insert into t values (4); diff --git a/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_write_pk_uc1.test b/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_write_pk_uc1.test index 0ed12b34e1f..4bb41c7fba7 100644 --- a/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_write_pk_uc1.test +++ b/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_write_pk_uc1.test @@ -22,7 +22,9 @@ connection master; # select @@autocommit; eval create table t (a bigint not null, primary key(a)) engine=$engine; # show create table t; +--disable_cursor_protocol select unix_timestamp() into @tstart; +--enable_cursor_protocol insert into t values (1); insert into t values (2),(3); insert into t values (4); diff --git a/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_write_unique.test b/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_write_unique.test index fc4c9597dac..7ccaf72cdb7 100644 --- a/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_write_unique.test +++ b/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_write_unique.test @@ -22,7 +22,9 @@ connection master; # select @@autocommit; eval create table t (a bigint not null, b bigint not null, primary key(a), unique key(b)) engine=$engine; # show create table t; +--disable_cursor_protocol select unix_timestamp() into @tstart; +--enable_cursor_protocol insert into t values (1,2); insert into t values (2,3),(3,4); insert into t values (4,5); diff --git a/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_write_unique_uc1.test b/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_write_unique_uc1.test index fc4c9597dac..7ccaf72cdb7 100644 --- a/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_write_unique_uc1.test +++ b/storage/tokudb/mysql-test/rpl/t/rpl_tokudb_write_unique_uc1.test @@ -22,7 +22,9 @@ connection master; # select @@autocommit; eval create table t (a bigint not null, b bigint not null, primary key(a), unique key(b)) engine=$engine; # show create table t; +--disable_cursor_protocol select unix_timestamp() into @tstart; +--enable_cursor_protocol insert into t values (1,2); insert into t values (2,3),(3,4); insert into t values (4,5); 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 535f887c929..6b895578de6 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,7 +9,9 @@ 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_cursor_protocol --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; @@ -40,5 +42,6 @@ flush status; select x,id from t force index (x) where x=2 and id=0; show status like 'handler_read%'; --enable_ps2_protocol +--enable_cursor_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 e9c82405262..e6e6d114698 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,7 +8,9 @@ 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_cursor_protocol --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; @@ -39,5 +41,6 @@ flush status; select x,id from t force index (x) where x=2 and id=0; show status like 'handler_read%'; --enable_ps2_protocol +--enable_cursor_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 e5722dce563..89b021cbf34 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,7 +9,9 @@ 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_cursor_protocol --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; @@ -20,5 +22,6 @@ 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 +--enable_cursor_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 d68a1bcf7f7..162a1cf624e 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,7 +8,9 @@ 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_cursor_protocol --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; @@ -19,5 +21,6 @@ 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 +--enable_cursor_protocol drop table t; diff --git a/storage/tokudb/mysql-test/tokudb/t/rows-32m-0.test b/storage/tokudb/mysql-test/tokudb/t/rows-32m-0.test index 58a5ac1b8e3..b3317f0c666 100644 --- a/storage/tokudb/mysql-test/tokudb/t/rows-32m-0.test +++ b/storage/tokudb/mysql-test/tokudb/t/rows-32m-0.test @@ -12,7 +12,9 @@ drop table if exists t; create table t (id int not null primary key, v longblob not null); +--disable_cursor_protocol select @@max_allowed_packet into @my_max_allowed_packet; +--enable_cursor_protocol --disable_warnings set global max_allowed_packet=100000000; --enable_warnings diff --git a/storage/tokudb/mysql-test/tokudb/t/rows-32m-1.test b/storage/tokudb/mysql-test/tokudb/t/rows-32m-1.test index 39feddf77be..8c2f29687d3 100644 --- a/storage/tokudb/mysql-test/tokudb/t/rows-32m-1.test +++ b/storage/tokudb/mysql-test/tokudb/t/rows-32m-1.test @@ -12,7 +12,9 @@ drop table if exists t; create table t (id int not null primary key, v0 longblob not null,v1 longblob not null); +--disable_cursor_protocol select @@max_allowed_packet into @my_max_allowed_packet; +--enable_cursor_protocol --disable_warnings set global max_allowed_packet=100000000; --enable_warnings diff --git a/storage/tokudb/mysql-test/tokudb/t/rows-32m-rand-insert.test b/storage/tokudb/mysql-test/tokudb/t/rows-32m-rand-insert.test index c26e79913d0..4c03852d280 100644 --- a/storage/tokudb/mysql-test/tokudb/t/rows-32m-rand-insert.test +++ b/storage/tokudb/mysql-test/tokudb/t/rows-32m-rand-insert.test @@ -10,7 +10,9 @@ drop table if exists t; create table t (id int not null primary key, v longblob not null); +--disable_cursor_protocol select @@max_allowed_packet into @my_max_allowed_packet; +--enable_cursor_protocol --disable_warnings set global max_allowed_packet=100000000; --enable_warnings diff --git a/storage/tokudb/mysql-test/tokudb/t/rows-32m-seq-insert.test b/storage/tokudb/mysql-test/tokudb/t/rows-32m-seq-insert.test index 7ee84c69eca..184ecdf26c4 100644 --- a/storage/tokudb/mysql-test/tokudb/t/rows-32m-seq-insert.test +++ b/storage/tokudb/mysql-test/tokudb/t/rows-32m-seq-insert.test @@ -10,7 +10,9 @@ drop table if exists t; create table t (id int not null auto_increment primary key, v longblob not null); +--disable_cursor_protocol select @@max_allowed_packet into @my_max_allowed_packet; +--enable_cursor_protocol --disable_warnings set global max_allowed_packet=100000000; --enable_warnings diff --git a/storage/tokudb/mysql-test/tokudb/t/type_date.test b/storage/tokudb/mysql-test/tokudb/t/type_date.test index ed330a2d748..9799dcebade 100644 --- a/storage/tokudb/mysql-test/tokudb/t/type_date.test +++ b/storage/tokudb/mysql-test/tokudb/t/type_date.test @@ -203,12 +203,15 @@ CREATE TABLE t2 (a DATE); CREATE INDEX i ON t1 (a); INSERT INTO t1 VALUES ('1000-00-00'),('1000-00-00'); INSERT INTO t2 VALUES ('1000-00-00'),('1000-00-00'); +#Check after fix MDEV-31516 +--disable_cursor_protocol SELECT * FROM t1 WHERE a = '1000-00-00'; SELECT * FROM t2 WHERE a = '1000-00-00'; SET SQL_MODE=TRADITIONAL; EXPLAIN SELECT * FROM t1 WHERE a = '1000-00-00'; SELECT * FROM t1 WHERE a = '1000-00-00'; SELECT * FROM t2 WHERE a = '1000-00-00'; +--enable_cursor_protocol --error ER_TRUNCATED_WRONG_VALUE INSERT INTO t1 VALUES ('1000-00-00'); SET SQL_MODE=DEFAULT; diff --git a/storage/tokudb/mysql-test/tokudb/t/type_float.test b/storage/tokudb/mysql-test/tokudb/t/type_float.test index 8c83913f1c8..7cd7f7cbe50 100644 --- a/storage/tokudb/mysql-test/tokudb/t/type_float.test +++ b/storage/tokudb/mysql-test/tokudb/t/type_float.test @@ -324,8 +324,10 @@ let $nine_65= select format(-1.7976931348623157E+307,256) as foo; select least(-1.1111111111111111111111111, - group_concat(1.7976931348623157E+308)) as foo; +--disable_cursor_protocol eval select concat((truncate((-1.7976931348623157E+307),(0x1e))), ($nine_65)) into @a; +--enable_cursor_protocol --enable_result_log --echo End of 5.0 tests diff --git a/storage/tokudb/mysql-test/tokudb/t/type_newdecimal.test b/storage/tokudb/mysql-test/tokudb/t/type_newdecimal.test index 3d44a5b78f4..bb5e7fd5568 100644 --- a/storage/tokudb/mysql-test/tokudb/t/type_newdecimal.test +++ b/storage/tokudb/mysql-test/tokudb/t/type_newdecimal.test @@ -611,7 +611,10 @@ select round(99999999999999999.999,3); select round(-99999999999999999.999,3); #-- should return -100000000000000000.000 # +#enable after fix MDEV-31729 +--disable_cursor_protocol select truncate(99999999999999999999999999999999999999,49); +--enable_cursor_protocol #-- should return 99999999999999999999999999999999999999.000 # select truncate(99.999999999999999999999999999999999999,49); @@ -1268,6 +1271,8 @@ let $nine_81= 999999999999999999999999999999999999999999999999999999999999999999999999999999999; eval SELECT substring(('M') FROM ($nine_81)) AS foo; +#enable after fix MDEV-31729 +--disable_cursor_protocol eval SELECT min($nine_81) AS foo; eval SELECT multipolygonfromtext(('4294967294.1'),($nine_81)) AS foo; eval SELECT convert(($nine_81), decimal(30,30)) AS foo; @@ -1279,6 +1284,7 @@ eval SELECT date_sub(($nine_81), day_minute) AS foo; eval SELECT truncate($nine_81, 28) AS foo; +--enable_cursor_protocol --echo End of 5.0 tests diff --git a/storage/tokudb/mysql-test/tokudb/t/type_temporal_fractional.test b/storage/tokudb/mysql-test/tokudb/t/type_temporal_fractional.test index 06794257969..00b3094f4dd 100644 --- a/storage/tokudb/mysql-test/tokudb/t/type_temporal_fractional.test +++ b/storage/tokudb/mysql-test/tokudb/t/type_temporal_fractional.test @@ -1907,7 +1907,9 @@ SELECT * FROM t1 WHERE a=@a; SET @a=112233.123456e0; SELECT * FROM t1 WHERE a=@a; SET @a=NULL; +--disable_cursor_protocol SELECT a INTO @a FROM t1 LIMIT 1; +--enable_cursor_protocol SELECT @a; DROP TABLE t1; @@ -3896,7 +3898,9 @@ SELECT * FROM t1 WHERE a=@a; SET @a=0.123456e0; SELECT * FROM t1 WHERE a=@a; SET @a=NULL; +--disable_cursor_protocol SELECT a INTO @a FROM t1 LIMIT 1; +--enable_cursor_protocol SELECT @a; DROP TABLE t1; # MEMORY does not support BLOB @@ -5716,7 +5720,9 @@ SELECT @a; # Nothing is found, not enough precision for DOUBLE SELECT * FROM t1 WHERE a=@a; SET @a=NULL; +--disable_cursor_protocol SELECT a INTO @a FROM t1 LIMIT 1; +--enable_cursor_protocol SELECT @a; DROP TABLE t1; # MEMORY does not support BLOB diff --git a/storage/tokudb/mysql-test/tokudb/t/type_year.test b/storage/tokudb/mysql-test/tokudb/t/type_year.test index 048758268c8..6abb53156cf 100644 --- a/storage/tokudb/mysql-test/tokudb/t/type_year.test +++ b/storage/tokudb/mysql-test/tokudb/t/type_year.test @@ -158,7 +158,10 @@ DROP TABLE t1; CREATE TABLE t1(c1 YEAR(4)); INSERT INTO t1 VALUES (1901),(2155),(0000); SELECT * FROM t1; +#Check after fix MDEV-31730 +--disable_cursor_protocol SELECT COUNT(*) AS total_rows, MIN(c1) AS min_value, MAX(c1) FROM t1; +--enable_cursor_protocol DROP TABLE t1; --echo # diff --git a/storage/tokudb/mysql-test/tokudb_add_index/t/falcon_bug_23818_A.test b/storage/tokudb/mysql-test/tokudb_add_index/t/falcon_bug_23818_A.test index f4a931dbe81..72b7aadf898 100644 --- a/storage/tokudb/mysql-test/tokudb_add_index/t/falcon_bug_23818_A.test +++ b/storage/tokudb/mysql-test/tokudb_add_index/t/falcon_bug_23818_A.test @@ -19,9 +19,11 @@ set @a = 32710; let $k = 200; while ($k) { + --disable_cursor_protocol SELECT @a + 1 into @a; SELECT rand(@a) * DEGREES(@a) into @b; SELECT FLOOR(MOD(@b,255)) into @c; + --enable_cursor_protocol SELECT @a, @b, @c; UPDATE t1 SET a = a + 1; UPDATE t1 SET b = repeat(hex(@c), rand(@c) * 550); diff --git a/storage/tokudb/mysql-test/tokudb_add_index/t/falcon_bug_23818_B.test b/storage/tokudb/mysql-test/tokudb_add_index/t/falcon_bug_23818_B.test index 96612a99804..725db98799b 100644 --- a/storage/tokudb/mysql-test/tokudb_add_index/t/falcon_bug_23818_B.test +++ b/storage/tokudb/mysql-test/tokudb_add_index/t/falcon_bug_23818_B.test @@ -19,9 +19,11 @@ set @a = 5510; let $k = 200; while ($k) { + --disable_cursor_protocol SELECT @a + 1 into @a; SELECT rand(@a) * DEGREES(@a) into @b; SELECT FLOOR(MOD(@b,255)) into @c; + --enable_cursor_protocol SELECT @a, @b, @c; UPDATE t1 SET a = a + 1; UPDATE t1 SET b = repeat(hex(@c), rand(@c) * 550); diff --git a/storage/tokudb/mysql-test/tokudb_add_index/t/falcon_bug_23818_C.test b/storage/tokudb/mysql-test/tokudb_add_index/t/falcon_bug_23818_C.test index 79f19c54d39..72fd4adfc9d 100644 --- a/storage/tokudb/mysql-test/tokudb_add_index/t/falcon_bug_23818_C.test +++ b/storage/tokudb/mysql-test/tokudb_add_index/t/falcon_bug_23818_C.test @@ -19,9 +19,11 @@ set @a = 28410; let $k = 200; while ($k) { + --disable_cursor_protocol SELECT @a + 1 into @a; SELECT rand(@a) * DEGREES(@a) into @b; SELECT FLOOR(MOD(@b,255)) into @c; + --enable_cursor_protocol SELECT @a, @b, @c; UPDATE t1 SET a = a + 1; UPDATE t1 SET b = repeat(hex(@c), rand(@c) * 550);