1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-31005: Make working cursor-protocol

Updated tests: cases with bugs or which cannot be run
with the cursor-protocol were excluded with
"--disable_cursor_protocol"/"--enable_cursor_protocol"

Fix for v.10.5
This commit is contained in:
Lena Startseva
2024-05-23 08:54:14 +07:00
parent ab569524dc
commit 0a5e4a0191
366 changed files with 1799 additions and 30 deletions

View File

@ -258,8 +258,10 @@ select * from t2;
insert into t2 (a) values (1025); insert into t2 (a) values (1025);
--replace_result $MYSQLTEST_VARDIR .. --replace_result $MYSQLTEST_VARDIR ..
--disable_cursor_protocol
--error ER_DUP_ENTRY --error ER_DUP_ENTRY
eval select f2(25) into outfile "$MYSQLTEST_VARDIR/tmp/dml.out" from t1; eval select f2(25) into outfile "$MYSQLTEST_VARDIR/tmp/dml.out" from t1;
--enable_cursor_protocol
select * from t2; select * from t2;
rollback; rollback;
select * from t2; select * from t2;
@ -279,8 +281,10 @@ select * from t2;
--echo ======================================================================= --echo =======================================================================
insert into t2 (a) values (1027); insert into t2 (a) values (1027);
--disable_cursor_protocol
--error ER_DUP_ENTRY --error ER_DUP_ENTRY
select f2(27) into @foo; select f2(27) into @foo;
--enable_cursor_protocol
select * from t2; select * from t2;
rollback; rollback;
select * from t2; select * from t2;

View File

@ -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 (3, repeat(0xF1F2,11));
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12)); INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
#enable after fix MDEV-31512
--disable_cursor_protocol
#check after fix MDEV-29290 #check after fix MDEV-29290
--disable_view_protocol --disable_view_protocol
# Check pattern (important for ucs2, utf16, utf32) # Check pattern (important for ucs2, utf16, utf32)
@ -24,5 +26,6 @@ SELECT hex(concat(repeat(0xF1F2, 10), '%'));
--echo 3 rows expected --echo 3 rows expected
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%'); SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
DROP TABLE t1; --enable_cursor_protocol
--enable_view_protocol --enable_view_protocol
DROP TABLE t1;

View File

@ -1646,7 +1646,10 @@ SELECT GROUP_CONCAT(IF(a,a,'')) FROM t1;
SELECT GROUP_CONCAT(CASE WHEN a THEN a ELSE '' END) FROM t1; SELECT GROUP_CONCAT(CASE WHEN a THEN a ELSE '' END) FROM t1;
--disable_view_protocol --disable_view_protocol
--enable_metadata --enable_metadata
#Check after fix MDEV-31512
--disable_cursor_protocol
SELECT COALESCE(a,'') FROM t1 GROUP BY 1; SELECT COALESCE(a,'') FROM t1 GROUP BY 1;
--enable_cursor_protocol
--disable_metadata --disable_metadata
--enable_view_protocol --enable_view_protocol
--echo # All columns must be VARCHAR(9) with the same length: --echo # All columns must be VARCHAR(9) with the same length:

View File

@ -168,7 +168,9 @@ while ($_dt_tables)
--disable_ps2_protocol --disable_ps2_protocol
--let $_dt_outfile= `SELECT @@datadir` --let $_dt_outfile= `SELECT @@datadir`
--let $_dt_outfile= $_dt_outfile/diff_table-$_dt_connection-$_dt_database-$_dt_table --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`; eval SELECT * INTO OUTFILE '$_dt_outfile' FROM $_dt_database.$_dt_table ORDER BY `$_dt_column_list`;
--enable_cursor_protocol
--enable_ps2_protocol --enable_ps2_protocol
# Compare files. # Compare files.

View File

@ -28,6 +28,7 @@
--echo # --echo #
--disable_ps2_protocol --disable_ps2_protocol
--disable_view_protocol --disable_view_protocol
--disable_cursor_protocol
if ($select) { if ($select) {
--disable_query_log --disable_query_log
--eval $select INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/before_explain.txt' --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 --enable_query_log
--echo --echo
--enable_cursor_protocol
--enable_view_protocol --enable_view_protocol
--enable_ps2_protocol --enable_ps2_protocol

View File

@ -824,6 +824,7 @@ eval CREATE TABLE t2 (
i $datetime DEFAULT $current_timestamp ON UPDATE $current_timestamp NOT NULL i $datetime DEFAULT $current_timestamp ON UPDATE $current_timestamp NOT NULL
); );
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
SELECT 1 INTO OUTFILE 't3.dat' FROM dual; SELECT 1 INTO OUTFILE 't3.dat' FROM dual;
@ -833,6 +834,7 @@ FROM dual;
SELECT 1, 2 INTO OUTFILE 't5.dat' FROM dual; SELECT 1, 2 INTO OUTFILE 't5.dat' FROM dual;
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
--echo # Mon Aug 1 15:11:19 2011 UTC --echo # Mon Aug 1 15:11:19 2011 UTC
SET TIMESTAMP = 1312211479.918273; SET TIMESTAMP = 1312211479.918273;
@ -931,11 +933,13 @@ remove_file $MYSQLD_DATADIR/test/t5.dat;
--echo # Mon Aug 1 15:11:19 2011 UTC --echo # Mon Aug 1 15:11:19 2011 UTC
SET TIMESTAMP = 1312211479.089786; SET TIMESTAMP = 1312211479.089786;
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
SELECT 1 INTO OUTFILE "file1.dat" FROM dual; SELECT 1 INTO OUTFILE "file1.dat" FROM dual;
SELECT NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL SELECT NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
INTO OUTFILE "file2.dat" FROM dual; INTO OUTFILE "file2.dat" FROM dual;
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
--echo # Too short row --echo # Too short row

View File

@ -55,6 +55,7 @@ set LOCAL query_cache_type=ON;
set GLOBAL query_cache_size=1355776; set GLOBAL query_cache_size=1355776;
--disable_ps2_protocol --disable_ps2_protocol
--disable_cursor_protocol
reset query cache; reset query cache;
flush status; flush status;
@ -173,6 +174,7 @@ show status like "Qcache_queries_in_cache";
show status like "Qcache_hits"; show status like "Qcache_hits";
show status like "Qcache_not_cached"; show status like "Qcache_not_cached";
--enable_cursor_protocol
--enable_ps2_protocol --enable_ps2_protocol
# Cleanup # Cleanup

View File

@ -206,6 +206,7 @@ execute full_info ;
--error 1064 --error 1064
prepare stmt1 from "select ? := c1 from t9 where c1= 1" ; prepare stmt1 from "select ? := c1 from t9 where c1= 1" ;
--disable_cursor_protocol
--disable_query_log --disable_query_log
select '------ select column, .. into @parm,.. ------' as test_sequence ; select '------ select column, .. into @parm,.. ------' as test_sequence ;
--enable_query_log --enable_query_log
@ -243,6 +244,7 @@ into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08,
@arg17, @arg18, @arg19, @arg20, @arg21, @arg22, @arg23, @arg24, @arg17, @arg18, @arg19, @arg20, @arg21, @arg22, @arg23, @arg24,
@arg25, @arg26, @arg27, @arg28, @arg29, @arg30, @arg31, @arg32 @arg25, @arg26, @arg27, @arg28, @arg29, @arg30, @arg31, @arg32
from t9 where c1= ?" ; from t9 where c1= ?" ;
--enable_cursor_protocol
set @my_key= 1 ; set @my_key= 1 ;
execute stmt1 using @my_key ; execute stmt1 using @my_key ;
# get as much information about the parameters as possible # get as much information about the parameters as possible

View File

@ -28,6 +28,7 @@ drop table if exists t1,t2,t3;
set @save_query_cache_size = @@global.query_cache_size; set @save_query_cache_size = @@global.query_cache_size;
set GLOBAL query_cache_size = 1355776; set GLOBAL query_cache_size = 1355776;
--disable_cursor_protocol
# #
# Without auto_commit. # Without auto_commit.
# #
@ -86,6 +87,7 @@ show status like "Qcache_hits";
commit; commit;
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
drop table t3,t2,t1; drop table t3,t2,t1;
--enable_cursor_protocol
eval CREATE TABLE t1 (id int(11) NOT NULL auto_increment, PRIMARY KEY (id))$partitions_id; eval CREATE TABLE t1 (id int(11) NOT NULL auto_increment, PRIMARY KEY (id))$partitions_id;
select count(*) from t1; select count(*) from t1;
@ -128,6 +130,7 @@ connection default;
# This should be 'YES'. # This should be 'YES'.
SHOW VARIABLES LIKE 'have_query_cache'; SHOW VARIABLES LIKE 'have_query_cache';
--disable_cursor_protocol
SET GLOBAL query_cache_size = 204800; SET GLOBAL query_cache_size = 204800;
flush status; flush status;
SET @@autocommit=1; SET @@autocommit=1;
@ -190,6 +193,7 @@ disconnect connection1;
connection default; connection default;
set @@global.query_cache_size = @save_query_cache_size; set @@global.query_cache_size = @save_query_cache_size;
drop table t2; drop table t2;
--enable_cursor_protocol
SET global query_cache_type=default; SET global query_cache_type=default;
--enable_view_protocol --enable_view_protocol

View File

@ -45,9 +45,11 @@ show status like "Qcache_queries_in_cache";
show status like "Qcache_hits"; show status like "Qcache_hits";
--disable_ps2_protocol --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; 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_queries_in_cache";
show status like "Qcache_hits"; show status like "Qcache_hits";
@ -81,9 +83,11 @@ show status like "Qcache_queries_in_cache";
show status like "Qcache_hits"; show status like "Qcache_hits";
--disable_ps2_protocol --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; 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_queries_in_cache";
show status like "Qcache_hits"; show status like "Qcache_hits";
@ -118,6 +122,7 @@ show status like "Qcache_queries_in_cache";
show status like "Qcache_hits"; show status like "Qcache_hits";
--disable_ps2_protocol --disable_ps2_protocol
--disable_cursor_protocol
BEGIN; BEGIN;
UPDATE `t1` SET `cool` = 1 WHERE `id` = 1; UPDATE `t1` SET `cool` = 1 WHERE `id` = 1;
SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 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; SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1;
ROLLBACK; ROLLBACK;
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_queries_in_cache";
show status like "Qcache_hits"; show status like "Qcache_hits";

View File

@ -1,3 +1,5 @@
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
eval select "Outfile OK" into outfile "$MYSQLTEST_VARDIR/tmp/outfile.test"; eval select "Outfile OK" into outfile "$MYSQLTEST_VARDIR/tmp/outfile.test";
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol

View File

@ -35,7 +35,9 @@ SET sql_mode=DEFAULT;
--eval INSERT INTO t1 VALUES (DEFAULT,DEFAULT); --eval INSERT INTO t1 VALUES (DEFAULT,DEFAULT);
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--disable_ps2_protocol --disable_ps2_protocol
--disable_cursor_protocol
--eval SELECT a INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/mdev-7824.txt' FROM t1 --eval SELECT a INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/mdev-7824.txt' FROM t1
--enable_cursor_protocol
DELETE FROM t1; DELETE FROM t1;
--enable_ps2_protocol --enable_ps2_protocol
SET sql_mode=TRADITIONAL; SET sql_mode=TRADITIONAL;

View File

@ -46,9 +46,11 @@ if (`SELECT LENGTH(@@secure_file_priv) > 0`)
--let $_wvtf_suffix= `SELECT UUID()` --let $_wvtf_suffix= `SELECT UUID()`
--let $_wvtf_tmp_file= $MYSQLTEST_VARDIR/_wvtf_$_wvtf_suffix --let $_wvtf_tmp_file= $MYSQLTEST_VARDIR/_wvtf_$_wvtf_suffix
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
--eval SELECT '$write_var' INTO DUMPFILE '$_wvtf_tmp_file' --eval SELECT '$write_var' INTO DUMPFILE '$_wvtf_tmp_file'
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
--copy_file $_wvtf_tmp_file $write_to_file --copy_file $_wvtf_tmp_file $write_to_file
--remove_file $_wvtf_tmp_file --remove_file $_wvtf_tmp_file
} }

View File

@ -985,6 +985,7 @@ while ($count)
commit; commit;
--enable_query_log --enable_query_log
--disable_cursor_protocol
select index_length into @unpaked_keys_size from select index_length into @unpaked_keys_size from
information_schema.tables where table_name='t1'; information_schema.tables where table_name='t1';
alter table t1 pack_keys=1; 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 select max_data_length into @changed_max_data_length from
information_schema.tables where table_name='t1'; information_schema.tables where table_name='t1';
select (@orig_max_data_length > @changed_max_data_length); select (@orig_max_data_length > @changed_max_data_length);
--enable_cursor_protocol
drop table t1; drop table t1;

View File

@ -1,6 +1,8 @@
--source include/not_embedded.inc --source include/not_embedded.inc
--disable_cursor_protocol
select priv into @root_priv from mysql.global_priv where user='root' and host='localhost'; 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'; select * from mysql.user where user = 'root' and host = 'localhost';
--echo # Test syntax --echo # Test syntax

View File

@ -11,9 +11,11 @@ set default_storage_engine=innodb;
# #
create table t1 (pk int auto_increment primary key, f varchar(20)); create table t1 (pk int auto_increment primary key, f varchar(20));
insert t1 (f) values ('a'), ('b'), ('c'), ('d'); insert t1 (f) values ('a'), ('b'), ('c'), ('d');
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
select null, f into outfile 'load.data' from t1 limit 1; select null, f into outfile 'load.data' from t1 limit 1;
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
load data infile 'load.data' into table t1; load data infile 'load.data' into table t1;
insert t1 (f) values ('<==='); insert t1 (f) values ('<===');
select * from t1; select * from t1;

View File

@ -45,9 +45,11 @@ remove_file $MYSQLTEST_VARDIR/tmp/bootstrap_error.sql;
--echo # --echo #
--disable_query_log --disable_query_log
create table t1 select 2 as a, concat(repeat('MySQL', @@max_allowed_packet/10), ';') as b; create table t1 select 2 as a, concat(repeat('MySQL', @@max_allowed_packet/10), ';') as b;
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
eval select * into outfile '$MYSQLTEST_VARDIR/tmp/long_query.sql' from t1; eval select * into outfile '$MYSQLTEST_VARDIR/tmp/long_query.sql' from t1;
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
--enable_query_log --enable_query_log
--source include/kill_mysqld.inc --source include/kill_mysqld.inc
--error 1 --error 1

View File

@ -20,6 +20,7 @@ create table t9 (c1 int);
create table t10 (c1 int); create table t10 (c1 int);
--enable_warnings --enable_warnings
--disable_cursor_protocol
# Query PS to know initial read count for frm file. # 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 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' 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 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' like "%show_table_lw_db%" AND FILE_NAME like "%.frm%" AND EVENT_NAME='wait/io/file/sql/FRM'
into @count_read_after; into @count_read_after;
--enable_cursor_protocol
select @count_read_after-@count_read_before; select @count_read_after-@count_read_before;
show full tables; show full tables;
--disable_cursor_protocol
# Query PS to know read count for frm file after above query. COUNT_READ # 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. # 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 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' like "%show_table_lw_db%" AND FILE_NAME like "%.frm%" AND EVENT_NAME='wait/io/file/sql/FRM'
into @count_read_after; into @count_read_after;
--enable_cursor_protocol
select @count_read_after-@count_read_before; select @count_read_after-@count_read_before;

View File

@ -62,6 +62,7 @@ while ($1)
commit; commit;
--enable_query_log --enable_query_log
--disable_cursor_protocol
flush status; flush status;
select count(distinct n) from t1; select count(distinct n) from t1;
show status like 'Created_tmp_disk_tables'; show status like 'Created_tmp_disk_tables';
@ -83,6 +84,7 @@ flush status;
select count(distinct s) from t1; select count(distinct s) from t1;
show status like 'Created_tmp_disk_tables'; show status like 'Created_tmp_disk_tables';
drop table t1; drop table t1;
--enable_cursor_protocol
--enable_ps2_protocol --enable_ps2_protocol
# End of 4.1 tests # End of 4.1 tests

View File

@ -77,9 +77,11 @@ select hex(convert(_big5 0xC84041 using ucs2));
set names big5; set names big5;
create table t1 (a blob); create table t1 (a blob);
insert into t1 values (0xEE00); insert into t1 values (0xEE00);
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
select * into outfile 'test/t1.txt' from t1; select * into outfile 'test/t1.txt' from t1;
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
delete from t1; delete from t1;
let $MYSQLD_DATADIR= `select @@datadir`; let $MYSQLD_DATADIR= `select @@datadir`;
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR

View File

@ -1,3 +1,4 @@
set names binary; set names binary;
--source include/ctype_numconv.inc --source include/ctype_numconv.inc
@ -232,8 +233,11 @@ SELECT DATE_FORMAT('2004-02-02','%W');
SELECT HEX(DATE_FORMAT('2004-02-02','%W')); SELECT HEX(DATE_FORMAT('2004-02-02','%W'));
#Enable after fix MDEV-33936 #Enable after fix MDEV-33936
--disable_view_protocol --disable_view_protocol
#enable after fix MDEV-34215
--disable_cursor_protocol
SELECT DATE_FORMAT(TIME'-01:01:01','%h'); SELECT DATE_FORMAT(TIME'-01:01:01','%h');
SELECT HEX(DATE_FORMAT(TIME'-01:01:01','%h')); SELECT HEX(DATE_FORMAT(TIME'-01:01:01','%h'));
--enable_cursor_protocol
--enable_view_protocol --enable_view_protocol
--echo # latin1 format, binary result --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')); SELECT HEX(DATE_FORMAT('2004-02-02',_latin1'%W'));
#Enable after fix MDEV-33936 #Enable after fix MDEV-33936
--disable_view_protocol --disable_view_protocol
#enable after fix MDEV-34215
--disable_cursor_protocol
SELECT DATE_FORMAT(TIME'-01:01:01',_latin1'%h'); SELECT DATE_FORMAT(TIME'-01:01:01',_latin1'%h');
SELECT HEX(DATE_FORMAT(TIME'-01:01:01',_latin1'%h')); SELECT HEX(DATE_FORMAT(TIME'-01:01:01',_latin1'%h'));
--enable_cursor_protocol
--enable_view_protocol --enable_view_protocol
--echo # Binary format, latin1 result --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')); SELECT HEX(DATE_FORMAT('2004-02-02',_binary'%W'));
#Enable after fix MDEV-33936 #Enable after fix MDEV-33936
--disable_view_protocol --disable_view_protocol
#enable after fix MDEV-34215
--disable_cursor_protocol
SELECT DATE_FORMAT(TIME'-01:01:01',_binary'%h'); SELECT DATE_FORMAT(TIME'-01:01:01',_binary'%h');
SELECT HEX(DATE_FORMAT(TIME'-01:01:01',_binary'%h')); SELECT HEX(DATE_FORMAT(TIME'-01:01:01',_binary'%h'));
--enable_cursor_protocol
--enable_view_protocol --enable_view_protocol
--echo # --echo #
--echo # End of 10.4 tests --echo # End of 10.4 tests

View File

@ -20,10 +20,13 @@ drop table com1;
create table `clock$` (a int); create table `clock$` (a int);
drop table `clock$`; drop table `clock$`;
# Enable after fix MDEV-31553
--disable_cursor_protocol
# Enable after fix MDEV-29295 # Enable after fix MDEV-29295
--disable_view_protocol --disable_view_protocol
select convert(convert(',' using filename) using binary); select convert(convert(',' using filename) using binary);
--enable_view_protocol --enable_view_protocol
--enable_cursor_protocol
--echo # --echo #
--echo # MDEV-7677 my_charset_handler_filename has a wrong "ismbchar" member --echo # MDEV-7677 my_charset_handler_filename has a wrong "ismbchar" member

View File

@ -64,8 +64,10 @@ CREATE TABLE t1(a MEDIUMTEXT CHARACTER SET gbk,
INSERT INTO t1 VALUES INSERT INTO t1 VALUES
(REPEAT(0x1125,200000), REPEAT(0x1125,200000)), ('', ''), ('', ''); (REPEAT(0x1125,200000), REPEAT(0x1125,200000)), ('', ''), ('', '');
--disable_cursor_protocol
SELECT a FROM t1 GROUP BY 1 LIMIT 1 INTO @nullll; SELECT a FROM t1 GROUP BY 1 LIMIT 1 INTO @nullll;
SELECT b 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; DROP TABLES t1;

View File

@ -75,9 +75,11 @@ DROP TABLE t1;
--echo # Problem # 1 (original report): wrong parsing of ucs2 data --echo # Problem # 1 (original report): wrong parsing of ucs2 data
SET character_set_connection=ucs2; SET character_set_connection=ucs2;
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
SELECT '00' UNION SELECT '10' INTO OUTFILE 'tmpp.txt'; SELECT '00' UNION SELECT '10' INTO OUTFILE 'tmpp.txt';
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
CREATE TABLE t1(a INT); CREATE TABLE t1(a INT);
LOAD DATA INFILE 'tmpp.txt' INTO TABLE t1 CHARACTER SET ucs2 LOAD DATA INFILE 'tmpp.txt' INTO TABLE t1 CHARACTER SET ucs2
(@b) SET a=REVERSE(@b); (@b) SET a=REVERSE(@b);
@ -90,7 +92,9 @@ remove_file $MYSQLD_DATADIR/test/tmpp.txt;
--disable_ps2_protocol --disable_ps2_protocol
--echo # Problem # 2 : if you write and read ucs2 data to a file they're lost --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; SELECT '00' UNION SELECT '10' INTO OUTFILE 'tmpp2.txt' CHARACTER SET ucs2;
--enable_cursor_protocol
--enable_ps2_protocol --enable_ps2_protocol
CREATE TABLE t1(a INT); CREATE TABLE t1(a INT);
LOAD DATA INFILE 'tmpp2.txt' INTO TABLE t1 CHARACTER SET ucs2 LOAD DATA INFILE 'tmpp2.txt' INTO TABLE t1 CHARACTER SET ucs2

View File

@ -741,6 +741,8 @@ CREATE TABLE t1 (
s3 MEDIUMTEXT CHARACTER SET utf16, s3 MEDIUMTEXT CHARACTER SET utf16,
s4 LONGTEXT CHARACTER SET utf16 s4 LONGTEXT CHARACTER SET utf16
); );
#check after fix MDEV-31540
--disable_cursor_protocol
--disable_view_protocol --disable_view_protocol
--enable_metadata --enable_metadata
SET NAMES utf8, @@character_set_results=NULL; SET NAMES utf8, @@character_set_results=NULL;
@ -751,6 +753,7 @@ SET NAMES utf8;
SELECT *, HEX(s1) FROM t1; SELECT *, HEX(s1) FROM t1;
--disable_metadata --disable_metadata
--enable_view_protocol --enable_view_protocol
--enable_cursor_protocol
CREATE TABLE t2 AS SELECT CONCAT(s1) FROM t1; CREATE TABLE t2 AS SELECT CONCAT(s1) FROM t1;
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
DROP TABLE t1, t2; DROP TABLE t1, t2;

View File

@ -703,6 +703,8 @@ CREATE TABLE t1 (
s3 MEDIUMTEXT CHARACTER SET utf16le, s3 MEDIUMTEXT CHARACTER SET utf16le,
s4 LONGTEXT CHARACTER SET utf16le s4 LONGTEXT CHARACTER SET utf16le
); );
#check after fix MDEV-31540
--disable_cursor_protocol
--disable_view_protocol --disable_view_protocol
--enable_metadata --enable_metadata
SET NAMES utf8, @@character_set_results=NULL; SET NAMES utf8, @@character_set_results=NULL;
@ -713,6 +715,7 @@ SET NAMES utf8;
SELECT *, HEX(s1) FROM t1; SELECT *, HEX(s1) FROM t1;
--disable_metadata --disable_metadata
--enable_view_protocol --enable_view_protocol
--enable_cursor_protocol
CREATE TABLE t2 AS SELECT CONCAT(s1) FROM t1; CREATE TABLE t2 AS SELECT CONCAT(s1) FROM t1;
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
DROP TABLE t1, t2; DROP TABLE t1, t2;

View File

@ -795,6 +795,8 @@ CREATE TABLE t1 (
s3 MEDIUMTEXT CHARACTER SET utf32, s3 MEDIUMTEXT CHARACTER SET utf32,
s4 LONGTEXT CHARACTER SET utf32 s4 LONGTEXT CHARACTER SET utf32
); );
#check after fix MDEV-31540
--disable_cursor_protocol
--disable_view_protocol --disable_view_protocol
--enable_metadata --enable_metadata
SET NAMES utf8mb4, @@character_set_results=NULL; SET NAMES utf8mb4, @@character_set_results=NULL;
@ -805,6 +807,7 @@ SET NAMES utf8mb4;
SELECT *, HEX(s1) FROM t1; SELECT *, HEX(s1) FROM t1;
--disable_metadata --disable_metadata
--enable_view_protocol --enable_view_protocol
--enable_cursor_protocol
CREATE TABLE t2 AS SELECT CONCAT(s1) FROM t1; CREATE TABLE t2 AS SELECT CONCAT(s1) FROM t1;
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
DROP TABLE t1, t2; DROP TABLE t1, t2;
@ -1131,8 +1134,11 @@ SELECT HEX(DATE_FORMAT(TIME'-01:01:01','%h'));
--echo # utf8 format, utf32 result --echo # utf8 format, utf32 result
SELECT DATE_FORMAT('2004-02-02',_utf8'%W'); SELECT DATE_FORMAT('2004-02-02',_utf8'%W');
SELECT HEX(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 DATE_FORMAT(TIME'-01:01:01',_utf8'%h');
SELECT HEX(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 --echo # utf32 format, utf8 result
SET NAMES utf8; SET NAMES utf8;

View File

@ -1501,8 +1501,11 @@ SELECT HEX(LPAD(_utf8 0xD18F, 3, 0x20));
SELECT HEX(INSERT(_utf8 0xD18F, 2, 1, 0x20)); SELECT HEX(INSERT(_utf8 0xD18F, 2, 1, 0x20));
#Enable view-protocol after fix MDEV-33942 #Enable view-protocol after fix MDEV-33942
--disable_view_protocol --disable_view_protocol
#Enable after fix MDEV-31512
--disable_cursor_protocol
SELECT HEX(INSERT(_utf8 0xD18FD18E, 2, 1, 0x20)); SELECT HEX(INSERT(_utf8 0xD18FD18E, 2, 1, 0x20));
--enable_view_protocol --enable_view_protocol
--enable_cursor_protocol
--echo # --echo #
--echo # Bug#11752408 - 43593: DUMP/BACKUP/RESTORE/UPGRADE TOOLS FAILS BECAUSE OF UTF8_GENERAL_CI --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 --disable_view_protocol
--enable_metadata --enable_metadata
#Check after fix MDEV-31512
--disable_cursor_protocol
SET NAMES utf8, @@character_set_results=NULL; SET NAMES utf8, @@character_set_results=NULL;
SELECT *, HEX(s1) FROM t1; SELECT *, HEX(s1) FROM t1;
SET NAMES latin1; SET NAMES latin1;
SELECT *, HEX(s1) FROM t1; SELECT *, HEX(s1) FROM t1;
SET NAMES utf8; SET NAMES utf8;
SELECT *, HEX(s1) FROM t1; SELECT *, HEX(s1) FROM t1;
--enable_cursor_protocol
--disable_metadata --disable_metadata
--enable_view_protocol --enable_view_protocol
CREATE TABLE t2 AS SELECT CONCAT(s1) FROM t1; CREATE TABLE t2 AS SELECT CONCAT(s1) FROM t1;

View File

@ -1798,12 +1798,15 @@ CREATE TABLE t1 (
s4 LONGTEXT CHARACTER SET utf8mb4 s4 LONGTEXT CHARACTER SET utf8mb4
); );
--enable_metadata --enable_metadata
#Check after fix MDEV-31512
--disable_cursor_protocol
SET NAMES utf8mb4, @@character_set_results=NULL; SET NAMES utf8mb4, @@character_set_results=NULL;
SELECT *, HEX(s1) FROM t1; SELECT *, HEX(s1) FROM t1;
SET NAMES latin1; SET NAMES latin1;
SELECT *, HEX(s1) FROM t1; SELECT *, HEX(s1) FROM t1;
SET NAMES utf8mb4; SET NAMES utf8mb4;
SELECT *, HEX(s1) FROM t1; SELECT *, HEX(s1) FROM t1;
--enable_cursor_protocol
--disable_metadata --disable_metadata
CREATE TABLE t2 AS SELECT CONCAT(s1) FROM t1; CREATE TABLE t2 AS SELECT CONCAT(s1) FROM t1;
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
@ -1953,7 +1956,9 @@ DROP TABLE t1;
SET NAMES utf8mb4; SET NAMES utf8mb4;
SELECT COLUMN_JSON(COLUMN_CREATE(_utf8mb4 0xF09F988E, 1)); SELECT COLUMN_JSON(COLUMN_CREATE(_utf8mb4 0xF09F988E, 1));
--disable_cursor_protocol
SELECT COLUMN_LIST(COLUMN_CREATE(_utf8mb4 0xF09F988E, 1)); SELECT COLUMN_LIST(COLUMN_CREATE(_utf8mb4 0xF09F988E, 1));
--enable_cursor_protocol
SELECT COLUMN_GET(COLUMN_CREATE(_utf8mb4 0xF09F988E, 1), _utf8mb4 0xF09F988E SELECT COLUMN_GET(COLUMN_CREATE(_utf8mb4 0xF09F988E, 1), _utf8mb4 0xF09F988E
as int); as int);

View File

@ -859,6 +859,8 @@ INSERT INTO example1463 VALUES ('David', 'Unknown', 100);
INSERT INTO example1463 VALUES ('Edward', 'Success', 150); INSERT INTO example1463 VALUES ('Edward', 'Success', 150);
INSERT INTO example1463 VALUES ('Edward', 'Pending', 150); INSERT INTO example1463 VALUES ('Edward', 'Pending', 150);
#Enable after fix MDEV-31720
--disable_cursor_protocol
SELECT Customer, Success, SUM(OrderSize) SELECT Customer, Success, SUM(OrderSize)
FROM (SELECT Customer, FROM (SELECT Customer,
CASE WHEN DeliveryStatus='Success' THEN 'Yes' ELSE 'No' END AS Success, CASE WHEN DeliveryStatus='Success' THEN 'Yes' ELSE 'No' END AS Success,
@ -866,6 +868,7 @@ SELECT Customer, Success, SUM(OrderSize)
FROM example1463) as subQ FROM example1463) as subQ
GROUP BY Success, Customer GROUP BY Success, Customer
WITH ROLLUP; WITH ROLLUP;
--enable_cursor_protocol
SELECT Customer, Success, SUM(OrderSize) SELECT Customer, Success, SUM(OrderSize)
FROM (SELECT Customer, FROM (SELECT Customer,
CASE WHEN DeliveryStatus='Success' THEN 'Yes' ELSE 'No' END AS Success, CASE WHEN DeliveryStatus='Success' THEN 'Yes' ELSE 'No' END AS Success,

View File

@ -42,6 +42,7 @@ explain extended
select * from (select * from t1 where f1 in (2,3)) tt join 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; (select * from t1 where f1 in (1,2)) aa on tt.f1=aa.f1;
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
flush status; flush status;
explain extended explain extended
@ -51,6 +52,7 @@ flush status;
select * from (select * from t1 where f1 in (2,3)) tt where f11=2; select * from (select * from t1 where f1 in (2,3)) tt where f11=2;
show status like 'Handler_read%'; show status like 'Handler_read%';
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
--echo for merged views --echo for merged views
create view v1 as select * from t1; create view v1 as select * from t1;
@ -72,12 +74,14 @@ explain extended
select * from v3 join v4 on f1=f2; select * from v3 join v4 on f1=f2;
--disable_ps2_protocol --disable_ps2_protocol
--disable_cursor_protocol
flush status; flush status;
explain extended select * from v4 where f2 in (1,3); explain extended select * from v4 where f2 in (1,3);
show status like 'Handler_read%'; show status like 'Handler_read%';
flush status; flush status;
select * from v4 where f2 in (1,3); select * from v4 where f2 in (1,3);
show status like 'Handler_read%'; show status like 'Handler_read%';
--enable_cursor_protocol
--echo for materialized derived tables --echo for materialized derived tables
--echo explain for simple derived --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; explain select * from t1 join (select * from t2 group by f2) tt on f1=f2;
show status like 'Handler_read%'; show status like 'Handler_read%';
flush status; flush status;
--disable_cursor_protocol
select * from t1 join (select * from t2 group by f2) tt on f1=f2; select * from t1 join (select * from t2 group by f2) tt on f1=f2;
show status like 'Handler_read%'; show status like 'Handler_read%';
--enable_cursor_protocol
--enable_ps2_protocol --enable_ps2_protocol
--echo for materialized views --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; select * from t1 join v2 on f1=f2;
explain extended explain extended
select * from t1,v3 as v31,v3 where t1.f1=v31.f1 and t1.f1=v3.f1; select * from t1,v3 as v31,v3 where t1.f1=v31.f1 and t1.f1=v3.f1;
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
flush status; flush status;
select * from t1,v3 as v31,v3 where t1.f1=v31.f1 and t1.f1=v3.f1; 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; select * from t1 join v2 on f1=f2;
show status like 'Handler_read%'; show status like 'Handler_read%';
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
explain extended select * from v1 join v4 on f1=f2; explain extended select * from v1 join v4 on f1=f2;
explain format=json 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 (select * from (select * from t1 where f1 < 7 group by f1) tt where f1 > 2) z
on x.f1 = z.f1; on x.f1 = z.f1;
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
flush status; flush status;
select * from select * from
@ -175,6 +184,7 @@ join
show status like 'Handler_read%'; show status like 'Handler_read%';
flush status; flush status;
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
--echo merged in merged derived join merged in merged derived --echo merged in merged derived join merged in merged derived
explain extended select * from explain extended select * from

View File

@ -460,6 +460,7 @@ INSERT INTO t1 VALUES (2,2,'APPLE');
INSERT INTO t1 VALUES (3,2,'APPLE'); INSERT INTO t1 VALUES (3,2,'APPLE');
INSERT INTO t1 VALUES (4,3,'PEAR'); INSERT INTO t1 VALUES (4,3,'PEAR');
--disable_cursor_protocol
SELECT DISTINCT fruit_id, fruit_name INTO @v1, @v2 FROM t1 WHERE fruit_name = SELECT DISTINCT fruit_id, fruit_name INTO @v1, @v2 FROM t1 WHERE fruit_name =
'APPLE'; 'APPLE';
SELECT @v1, @v2; SELECT @v1, @v2;
@ -508,6 +509,7 @@ SELECT DISTINCT @v19:= fruit_id, @v20:= fruit_name INTO OUTFILE
--enable_ps2_protocol --enable_ps2_protocol
LOAD DATA INFILE '../../tmp/data2.tmp' INTO TABLE t2; LOAD DATA INFILE '../../tmp/data2.tmp' INTO TABLE t2;
--remove_file $MYSQLTEST_VARDIR/tmp/data2.tmp --remove_file $MYSQLTEST_VARDIR/tmp/data2.tmp
--enable_cursor_protocol
SELECT @v19, @v20; SELECT @v19, @v20;
SELECT * FROM t2; SELECT * FROM t2;

View File

@ -6,6 +6,8 @@
drop table if exists t1; drop table if exists t1;
--enable_warnings --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)); create table t1 (nr int(5) not null auto_increment,b blob,str char(10), primary key (nr));
--disable_ps2_protocol --disable_ps2_protocol
select count(*) from t1; select count(*) from t1;
@ -24,6 +26,7 @@ drop table t1;
select * from t2; select * from t2;
--enable_ps2_protocol --enable_ps2_protocol
show status like "Empty_queries"; show status like "Empty_queries";
--enable_cursor_protocol
--echo # End of 4.1 tests --echo # End of 4.1 tests

View File

@ -966,7 +966,9 @@ DROP USER evtest1@localhost;
# scheduler to detect that # scheduler to detect that
--echo Sleep 4 seconds --echo Sleep 4 seconds
sleep 4; sleep 4;
--disable_cursor_protocol
SELECT COUNT(*) INTO @row_cnt FROM events_test.event_log; SELECT COUNT(*) INTO @row_cnt FROM events_test.event_log;
--enable_cursor_protocol
# Give the event mechanism ~ 4 seconds to do something wrong # Give the event mechanism ~ 4 seconds to do something wrong
# (execute the event of the dropped user -> inser rows). # (execute the event of the dropped user -> inser rows).
--echo Sleep 4 seconds --echo Sleep 4 seconds
@ -1186,9 +1188,11 @@ drop procedure if exists p;
set @old_mode= @@sql_mode; set @old_mode= @@sql_mode;
set @@sql_mode= cast(pow(2,32)-1 as unsigned integer); set @@sql_mode= cast(pow(2,32)-1 as unsigned integer);
create event e1 on schedule every 1 day do select 1; create event e1 on schedule every 1 day do select 1;
--disable_cursor_protocol
select @@sql_mode into @full_mode; select @@sql_mode into @full_mode;
set @@sql_mode= @old_mode; set @@sql_mode= @old_mode;
select replace(@full_mode, 'ALLOW_INVALID_DATES', 'INVALID_DATES') into @full_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; select name from mysql.event where name = 'e1' and sql_mode = @full_mode;
drop event e1; drop event e1;

View File

@ -48,7 +48,9 @@ set names latin1;
# #
# Bug#15463: EXPLAIN SELECT..INTO hangs the client (QB, command line) # Bug#15463: EXPLAIN SELECT..INTO hangs the client (QB, command line)
# #
--disable_cursor_protocol
select 3 into @v1; select 3 into @v1;
--enable_cursor_protocol
explain select 3 into @v1; explain select 3 into @v1;
# #
@ -154,7 +156,9 @@ DROP TABLE t1;
CREATE TABLE t1 (f1 INT not null); CREATE TABLE t1 (f1 INT not null);
--disable_cursor_protocol
SELECT @@session.sql_mode INTO @old_sql_mode; SELECT @@session.sql_mode INTO @old_sql_mode;
--enable_cursor_protocol
SET SESSION sql_mode='ONLY_FULL_GROUP_BY'; SET SESSION sql_mode='ONLY_FULL_GROUP_BY';
# EXPLAIN EXTENDED (with subselect). used to crash. should give NOTICE. # EXPLAIN EXTENDED (with subselect). used to crash. should give NOTICE.

View File

@ -39,10 +39,12 @@ let $count = query_get_value($show_count_statement, Value, 1);
let $opt = query_get_value($show_opt_statement, Value, 1); let $opt = query_get_value($show_opt_statement, Value, 1);
--disable_ps2_protocol --disable_ps2_protocol
--disable_cursor_protocol
--disable_query_log --disable_query_log
eval select $count - $base_count into @cluster_lookups; eval select $count - $base_count into @cluster_lookups;
eval select $opt - $base_opt into @cluster_lookups_avoided; eval select $opt - $base_opt into @cluster_lookups_avoided;
--enable_query_log --enable_query_log
--enable_cursor_protocol
select @cluster_lookups; select @cluster_lookups;
select @cluster_lookups_avoided; 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 $count = query_get_value($show_count_statement, Value, 1);
let $opt = query_get_value($show_opt_statement, Value, 1); let $opt = query_get_value($show_opt_statement, Value, 1);
--disable_cursor_protocol
--disable_query_log --disable_query_log
eval select $count - $base_count into @cluster_lookups; eval select $count - $base_count into @cluster_lookups;
eval select $opt - $base_opt into @cluster_lookups_avoided; eval select $opt - $base_opt into @cluster_lookups_avoided;
--enable_query_log --enable_query_log
--enable_cursor_protocol
select @cluster_lookups; select @cluster_lookups;
select @cluster_lookups_avoided; 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 $count = query_get_value($show_count_statement, Value, 1);
let $opt = query_get_value($show_opt_statement, Value, 1); let $opt = query_get_value($show_opt_statement, Value, 1);
--disable_cursor_protocol
--disable_query_log --disable_query_log
eval select $count - $base_count into @cluster_lookups; eval select $count - $base_count into @cluster_lookups;
eval select $opt - $base_opt into @cluster_lookups_avoided; eval select $opt - $base_opt into @cluster_lookups_avoided;
--enable_query_log --enable_query_log
--enable_cursor_protocol
select @cluster_lookups; select @cluster_lookups;
select @cluster_lookups_avoided; 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 $count = query_get_value($show_count_statement, Value, 1);
let $opt = query_get_value($show_opt_statement, Value, 1); let $opt = query_get_value($show_opt_statement, Value, 1);
--disable_cursor_protocol
--disable_query_log --disable_query_log
eval select $count - $base_count into @cluster_lookups; eval select $count - $base_count into @cluster_lookups;
eval select $opt - $base_opt into @cluster_lookups_avoided; eval select $opt - $base_opt into @cluster_lookups_avoided;
--enable_query_log --enable_query_log
--enable_cursor_protocol
select @cluster_lookups; select @cluster_lookups;
select @cluster_lookups_avoided; 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 $count = query_get_value($show_count_statement, Value, 1);
let $opt = query_get_value($show_opt_statement, Value, 1); let $opt = query_get_value($show_opt_statement, Value, 1);
--disable_cursor_protocol
--disable_query_log --disable_query_log
eval select $count - $base_count into @cluster_lookups; eval select $count - $base_count into @cluster_lookups;
eval select $opt - $base_opt into @cluster_lookups_avoided; eval select $opt - $base_opt into @cluster_lookups_avoided;
--enable_query_log --enable_query_log
--enable_cursor_protocol
select @cluster_lookups; select @cluster_lookups;
select @cluster_lookups_avoided; 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 $count = query_get_value($show_count_statement, Value, 1);
let $opt = query_get_value($show_opt_statement, Value, 1); let $opt = query_get_value($show_opt_statement, Value, 1);
--disable_cursor_protocol
--disable_query_log --disable_query_log
eval select $count - $base_count into @cluster_lookups; eval select $count - $base_count into @cluster_lookups;
eval select $opt - $base_opt into @cluster_lookups_avoided; eval select $opt - $base_opt into @cluster_lookups_avoided;
--enable_query_log --enable_query_log
--enable_cursor_protocol
select @cluster_lookups; select @cluster_lookups;
select @cluster_lookups_avoided; 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 $count = query_get_value($show_count_statement, Value, 1);
let $opt = query_get_value($show_opt_statement, Value, 1); let $opt = query_get_value($show_opt_statement, Value, 1);
--disable_cursor_protocol
--disable_query_log --disable_query_log
eval select $count - $base_count into @cluster_lookups; eval select $count - $base_count into @cluster_lookups;
eval select $opt - $base_opt into @cluster_lookups_avoided; eval select $opt - $base_opt into @cluster_lookups_avoided;
--enable_query_log --enable_query_log
--enable_cursor_protocol
select @cluster_lookups; select @cluster_lookups;
select @cluster_lookups_avoided; 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 $count = query_get_value($show_count_statement, Value, 1);
let $opt = query_get_value($show_opt_statement, Value, 1); let $opt = query_get_value($show_opt_statement, Value, 1);
--disable_cursor_protocol
--disable_query_log --disable_query_log
eval select $count - $base_count into @cluster_lookups; eval select $count - $base_count into @cluster_lookups;
eval select $opt - $base_opt into @cluster_lookups_avoided; eval select $opt - $base_opt into @cluster_lookups_avoided;
--enable_query_log --enable_query_log
--enable_cursor_protocol
select @cluster_lookups; select @cluster_lookups;
select @cluster_lookups_avoided; 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 $count = query_get_value($show_count_statement, Value, 1);
let $opt = query_get_value($show_opt_statement, Value, 1); let $opt = query_get_value($show_opt_statement, Value, 1);
--disable_cursor_protocol
--disable_query_log --disable_query_log
eval select $count - $base_count into @cluster_lookups; eval select $count - $base_count into @cluster_lookups;
eval select $opt - $base_opt into @cluster_lookups_avoided; eval select $opt - $base_opt into @cluster_lookups_avoided;
--enable_query_log --enable_query_log
--disable_cursor_protocol
select @cluster_lookups; select @cluster_lookups;
select @cluster_lookups_avoided; 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 $count = query_get_value($show_count_statement, Value, 1);
let $opt = query_get_value($show_opt_statement, Value, 1); let $opt = query_get_value($show_opt_statement, Value, 1);
--disable_cursor_protocol
--disable_query_log --disable_query_log
eval select $count - $base_count into @cluster_lookups; eval select $count - $base_count into @cluster_lookups;
eval select $opt - $base_opt into @cluster_lookups_avoided; eval select $opt - $base_opt into @cluster_lookups_avoided;
--enable_query_log --enable_query_log
--enable_cursor_protocol
select @cluster_lookups; select @cluster_lookups;
select @cluster_lookups_avoided; select @cluster_lookups_avoided;

View File

@ -23,7 +23,9 @@ let $restart_parameters=--ssl-key=$ssl_key --ssl-cert=$ssl_cert;
--source include/start_mysqld.inc --source include/start_mysqld.inc
connect ssl_con,localhost,root,,,,,SSL; 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'; 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`; let $ssl_not_after=`SELECT @ssl_not_after`;
remove_file $ssl_cert; remove_file $ssl_cert;

View File

@ -24,7 +24,10 @@ EXPLAIN SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE();
create table t1 (v varchar(128)); 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'); 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(); select * from t1 procedure analyse();
--enable_cursor_protocol
drop table t1; drop table t1;
#decimal-related test #decimal-related test

View File

@ -54,7 +54,13 @@ DROP TABLE t1;
CREATE TABLE t1 (a INT); CREATE TABLE t1 (a INT);
INSERT t1 VALUES (1),(2); 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; SELECT CHAR_LENGTH(a), DES_DECRYPT(a) FROM (SELECT _utf8 0xC2A2 AS a FROM t1) AS t2;
--enable_cursor_protocol
DROP TABLE t1; DROP TABLE t1;
--Echo End of 10.5 tests --Echo End of 10.5 tests

View File

@ -489,6 +489,8 @@ SELECT LENGTH(SHA2( 'computed', 512 )) / 2 * 8 = 512;
--echo # Bug#54661 sha2() returns BINARY result --echo # Bug#54661 sha2() returns BINARY result
--echo # --echo #
#Check after fix MDEV-31540
--disable_cursor_protocol
--disable_view_protocol --disable_view_protocol
--enable_metadata --enable_metadata
SET NAMES binary; SET NAMES binary;
@ -499,6 +501,7 @@ SET NAMES latin1;
SELECT sha2('1',224); SELECT sha2('1',224);
--disable_metadata --disable_metadata
--disable_view_protocol --disable_view_protocol
--enable_cursor_protocol
--echo # --echo #
--echo # Start of 10.1 tests --echo # Start of 10.1 tests

View File

@ -409,11 +409,14 @@ drop table t1;
# #
create table t1 (f1 int unsigned, f2 varchar(255)); create table t1 (f1 int unsigned, f2 varchar(255));
insert into t1 values (1,repeat('a',255)),(2,repeat('b',255)); insert into t1 values (1,repeat('a',255)),(2,repeat('b',255));
#Enable after fix MDEV-31540
--disable_cursor_protocol
--enable_metadata --enable_metadata
--disable_view_protocol --disable_view_protocol
select f2,group_concat(f1) from t1 group by f2; select f2,group_concat(f1) from t1 group by f2;
--enable_view_protocol --enable_view_protocol
--disable_metadata --disable_metadata
--enable_cursor_protocol
drop table t1; drop table t1;
# End of 4.1 tests # End of 4.1 tests
@ -499,11 +502,14 @@ set names latin1;
# #
create table t1 (f1 int unsigned, f2 varchar(255)); create table t1 (f1 int unsigned, f2 varchar(255));
insert into t1 values (1,repeat('a',255)),(2,repeat('b',255)); insert into t1 values (1,repeat('a',255)),(2,repeat('b',255));
#Enable after fix MDEV-31540
--disable_cursor_protocol
--enable_metadata --enable_metadata
--disable_view_protocol --disable_view_protocol
select f2,group_concat(f1) from t1 group by f2; select f2,group_concat(f1) from t1 group by f2;
--enable_view_protocol --enable_view_protocol
--disable_metadata --disable_metadata
--enable_cursor_protocol
drop table t1; drop table t1;
# #

View File

@ -170,8 +170,10 @@ DROP TABLE t1;
--echo # MDEV-4269: crash when grouping by values() --echo # MDEV-4269: crash when grouping by values()
--echo # --echo #
--disable_cursor_protocol
SELECT @@default_storage_engine INTO @old_engine; SELECT @@default_storage_engine INTO @old_engine;
set default_storage_engine=innodb; set default_storage_engine=innodb;
--enable_cursor_protocol
create table y select 1 b; create table y select 1 b;
select 1 from y group by b; select 1 from y group by b;

View File

@ -24,7 +24,10 @@ select json_array(1);
--disable_view_protocol --disable_view_protocol
select json_array(1, "text", false, null); select json_array(1, "text", false, null);
#enable after fix MDEV-31554
--disable_cursor_protocol
select json_array_append('["a", "b"]', '$', FALSE); select json_array_append('["a", "b"]', '$', FALSE);
--enable_cursor_protocol
--enable_view_protocol --enable_view_protocol
select json_array_append('{"k1":1, "k2":["a", "b"]}', '$.k2', 2); select json_array_append('{"k1":1, "k2":["a", "b"]}', '$.k2', 2);
select json_array_append('["a", ["b", "c"], "d"]', '$[0]', 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('[10, 20, [30, 40], 1, 10]', '$[1]', '$[25]') as exp;
select json_extract( '[{"a": [3, 4]}, {"b": 2}]', '$[0].a', '$[1].a') 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; 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]}', '$.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]}', '$.a[2]', 2) as exp;
select json_insert('{"a":1, "b":{"c":1}, "d":[1, 2]}', '$.b.c', 'word') 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; 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, '$.c', '[true, false]') as exp;
select json_replace('{ "a": 1, "b": [2, 3]}', '$.a', 10, '$.b', '[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('{"a":"b"}','{"c":"d"}');
SELECT JSON_MERGE('[1, 2]', '{"id": 47}'); 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('{"k1":123, "k2":345}');
select json_type('[123, "k2", 345]'); select json_type('[123, "k2", 345]');
select json_type("true"); select json_type("true");
select json_type('123'); select json_type('123');
select json_type('123.12'); 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}');
select json_keys('{"a":{"c":1, "d":2}, "b":2}', "$.a"); 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; select json_search( json_col, 'all', 'foot' ) as ex from t1;
drop table t1; drop table t1;
#enable after fix MDEV-31554
--disable_cursor_protocol
select json_unquote('"abc"'); select json_unquote('"abc"');
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. # 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; create table t1 (c VARCHAR(8)) DEFAULT CHARSET=latin1;
insert into t1 values ('abc'),('def'); 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; select json_object('foo', json_unquote(json_object('bar', c)),'qux', c) as fld from t1;
--enable_cursor_protocol
drop table t1; drop table t1;
select json_object("a", json_object("b", "abcd")); select json_object("a", json_object("b", "abcd"));
#enable after fix MDEV-31554
--disable_cursor_protocol
select json_object("a", '{"b": "abcd"}'); select json_object("a", '{"b": "abcd"}');
--enable_cursor_protocol
select json_object("a", json_compact('{"b": "abcd"}')); select json_object("a", json_compact('{"b": "abcd"}'));
select json_compact(NULL); 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_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; 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_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; 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 (") # 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 # MDEV-16750 JSON_SET mishandles unicode every second pair of arguments.
--echo # --echo #
#enable after fix MDEV-31554
--disable_cursor_protocol
SELECT JSON_SET('{}', '$.a', _utf8 0xC3B6) as exp; SELECT JSON_SET('{}', '$.a', _utf8 0xC3B6) as exp;
SELECT JSON_SET('{}', '$.a', _utf8 0xC3B6, '$.b', _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; SELECT JSON_SET('{}', '$.a', _utf8 X'C3B6', '$.x', 1, '$.b', _utf8 X'C3B6') as exp;
--enable_cursor_protocol
--echo # --echo #
--echo # MDEV-17121 JSON_ARRAY_APPEND --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('a', 60)));
insert into t1 values (concat('x64-', repeat('b', 60))); insert into t1 values (concat('x64-', repeat('b', 60)));
insert into t1 values (concat('x64-', repeat('c', 60))); insert into t1 values (concat('x64-', repeat('c', 60)));
#enable after fix MDEV-31554
--disable_cursor_protocol
#enable after MDEV-32454 fix #enable after MDEV-32454 fix
--disable_view_protocol --disable_view_protocol
--disable_ps2_protocol --disable_ps2_protocol
select json_arrayagg(a) from t1; select json_arrayagg(a) from t1;
--enable_ps2_protocol --enable_ps2_protocol
--enable_view_protocol --enable_view_protocol
--enable_cursor_protocol
drop table t1; drop table t1;
SET group_concat_max_len= default; SET group_concat_max_len= default;

View File

@ -567,11 +567,14 @@ select (1.175494351E-37 div 1.7976931348623157E+308);
select round(999999999, -9); select round(999999999, -9);
select round(999999999.0, -9); select round(999999999.0, -9);
#enable after fix MDEV-31555
--disable_cursor_protocol
#enable after fix MDEV-29526 #enable after fix MDEV-29526
--disable_view_protocol --disable_view_protocol
select round(999999999999999999, -18); select round(999999999999999999, -18);
select round(999999999999999999.0, -18); select round(999999999999999999.0, -18);
--enable_view_protocol --enable_view_protocol
--enable_cursor_protocol
--echo # --echo #
--echo # Bug#12537160 ASSERTION FAILED: --echo # Bug#12537160 ASSERTION FAILED:

View File

@ -248,6 +248,7 @@ SELECT NAME_CONST('var', 'value') COLLATE latin1_general_cs;
# #
# Bug #35848: UUID() returns UUIDs with the wrong time # Bug #35848: UUID() returns UUIDs with the wrong time
# #
--disable_cursor_protocol
select @@session.time_zone into @save_tz; select @@session.time_zone into @save_tz;
# make sure all times are UTC so the DayNr won't differ # 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 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 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; 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 # these should be identical; date part of UUID should be current date
select @my_uuid_date - @my_uuid_synthetic; select @my_uuid_date - @my_uuid_synthetic;

View File

@ -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 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'); select replace('aaaa','a','b'),replace('aaaa','aa','b'),replace('aaaa','a','bb'),replace('aaaa','','b'),replace('bbbb','a','c');
--disable_view_protocol --disable_view_protocol
#chaeck after fix MDEV-31540
--disable_cursor_protocol
--enable_metadata --enable_metadata
select replace('aaaa','a','bbbb'); select replace('aaaa','a','bbbb');
--disable_metadata --disable_metadata
--enable_cursor_protocol
--enable_view_protocol --enable_view_protocol
select replace(concat(lcase(concat('THIS',' ','IS',' ','A',' ')),ucase('false'),' ','test'),'FALSE','REAL') as exp; 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'); 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 # Bug #6564: QUOTE(NULL
# #
#enable after fix MDEV-31587
--disable_cursor_protocol
select concat('a', quote(NULL)); select concat('a', quote(NULL));
--enable_cursor_protocol
# #
# Wrong usage of functions # Wrong usage of functions
@ -741,8 +747,11 @@ create table t1 (i int);
insert into t1 values (1000000000),(1); insert into t1 values (1000000000),(1);
--enable_metadata --enable_metadata
--disable_view_protocol --disable_view_protocol
#check after fix MDEV-31540
--disable_cursor_protocol
select lpad(i, 7, ' ') as t from t1; select lpad(i, 7, ' ') as t from t1;
select rpad(i, 7, ' ') as t from t1; select rpad(i, 7, ' ') as t from t1;
--enable_cursor_protocol
--enable_view_protocol --enable_view_protocol
--disable_metadata --disable_metadata
drop table t1; drop table t1;
@ -893,6 +902,8 @@ select format(NULL, NULL);
select format(pi(), NULL); select format(pi(), NULL);
select format(NULL, 2); select format(NULL, 2);
#check after fix MDEV-31587
--disable_cursor_protocol
#enable after fix MDEV-28585 #enable after fix MDEV-28585
--disable_view_protocol --disable_view_protocol
select benchmark(NULL, NULL); select benchmark(NULL, NULL);
@ -900,16 +911,20 @@ select benchmark(0, NULL);
select benchmark(100, NULL); select benchmark(100, NULL);
select benchmark(NULL, 1+1); select benchmark(NULL, 1+1);
--enable_view_protocol --enable_view_protocol
--enable_cursor_protocol
# #
# Bug #20752: BENCHMARK with many iterations returns too quickly # Bug #20752: BENCHMARK with many iterations returns too quickly
# #
# not a string, but belongs with the above Bug#22684 # not a string, but belongs with the above Bug#22684
#check after fix MDEV-31587
--disable_cursor_protocol
#enable after fix MDEV-28585 #enable after fix MDEV-28585
--disable_view_protocol --disable_view_protocol
select benchmark(-1, 1); select benchmark(-1, 1);
--enable_view_protocol --enable_view_protocol
--enable_cursor_protocol
# #
# Please note: # Please note:
# 1) The collation of the password is irrelevant, the encryption uses # 1) The collation of the password is irrelevant, the encryption uses
@ -977,26 +992,26 @@ select left('hello', -1);
select left('hello', -4294967295); select left('hello', -4294967295);
#enable after fix MDEV-29552 #enable after fix MDEV-29552
--disable_view_protocol --disable_view_protocol
#enable after fix MDEV-34213
--disable_cursor_protocol
select left('hello', 4294967295); select left('hello', 4294967295);
--enable_view_protocol
select left('hello', -4294967296); select left('hello', -4294967296);
#enable after fix MDEV-29552
--disable_view_protocol
select left('hello', 4294967296); select left('hello', 4294967296);
--enable_view_protocol
select left('hello', -4294967297); select left('hello', -4294967297);
#enable after fix MDEV-29552
--disable_view_protocol
select left('hello', 4294967297); select left('hello', 4294967297);
--enable_cursor_protocol
--enable_view_protocol --enable_view_protocol
#view protocol generates additional warning #view protocol generates additional warning
--disable_view_protocol --disable_view_protocol
select left('hello', -18446744073709551615); select left('hello', -18446744073709551615);
select left('hello', 18446744073709551615); select left('hello', 18446744073709551615);
select left('hello', -18446744073709551616); select left('hello', -18446744073709551616);
#enable after fix MDEV-34213
--disable_cursor_protocol
select left('hello', 18446744073709551616); select left('hello', 18446744073709551616);
select left('hello', -18446744073709551617); select left('hello', -18446744073709551617);
select left('hello', 18446744073709551617); select left('hello', 18446744073709551617);
--enable_cursor_protocol
--enable_view_protocol --enable_view_protocol
select right('hello', 10); select right('hello', 10);
@ -1005,26 +1020,26 @@ select right('hello', -1);
select right('hello', -4294967295); select right('hello', -4294967295);
#enable after fix MDEV-29552 #enable after fix MDEV-29552
--disable_view_protocol --disable_view_protocol
#enable after fix MDEV-34213
--disable_cursor_protocol
select right('hello', 4294967295); select right('hello', 4294967295);
--enable_view_protocol
select right('hello', -4294967296); select right('hello', -4294967296);
#enable after fix MDEV-29552
--disable_view_protocol
select right('hello', 4294967296); select right('hello', 4294967296);
--enable_view_protocol
select right('hello', -4294967297); select right('hello', -4294967297);
#enable after fix MDEV-29552
--disable_view_protocol
select right('hello', 4294967297); select right('hello', 4294967297);
--enable_cursor_protocol
--enable_view_protocol --enable_view_protocol
#view protocol generates additional warning #view protocol generates additional warning
--disable_view_protocol --disable_view_protocol
select right('hello', -18446744073709551615); select right('hello', -18446744073709551615);
select right('hello', 18446744073709551615); select right('hello', 18446744073709551615);
select right('hello', -18446744073709551616); select right('hello', -18446744073709551616);
#enable after fix MDEV-34213
--disable_cursor_protocol
select right('hello', 18446744073709551616); select right('hello', 18446744073709551616);
select right('hello', -18446744073709551617); select right('hello', -18446744073709551617);
select right('hello', 18446744073709551617); select right('hello', 18446744073709551617);
--enable_cursor_protocol
--enable_view_protocol --enable_view_protocol
select substring('hello', 2, -1); select substring('hello', 2, -1);
@ -1049,6 +1064,8 @@ select substring('hello', 18446744073709551617, 1);
#enable after fix MDEV-28652 #enable after fix MDEV-28652
--disable_view_protocol --disable_view_protocol
select substring('hello', 1, -1); 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, 4294967295); select substring('hello', 1, 4294967295);
select substring('hello', 1, -4294967296); select substring('hello', 1, -4294967296);
@ -1064,6 +1081,7 @@ select substring('hello', 1, -18446744073709551616);
select substring('hello', 1, 18446744073709551616); select substring('hello', 1, 18446744073709551616);
select substring('hello', 1, -18446744073709551617); select substring('hello', 1, -18446744073709551617);
select substring('hello', 1, 18446744073709551617); select substring('hello', 1, 18446744073709551617);
--enable_cursor_protocol
--enable_view_protocol --enable_view_protocol
select substring('hello', -1, -1); select substring('hello', -1, -1);
select substring('hello', -4294967295, -4294967295); select substring('hello', -4294967295, -4294967295);
@ -1395,7 +1413,10 @@ create table t1(a float);
insert into t1 values (1.33); insert into t1 values (1.33);
--enable_metadata --enable_metadata
--disable_view_protocol --disable_view_protocol
#check after fix MDEV-31540
--disable_cursor_protocol
select format(a, 2) from t1; select format(a, 2) from t1;
--enable_cursor_protocol
--enable_view_protocol --enable_view_protocol
--disable_metadata --disable_metadata
drop table t1; drop table t1;
@ -1510,9 +1531,11 @@ SELECT CONVERT(('' IN (REVERSE(CAST(('') AS DECIMAL)), '')), CHAR(3));
--echo # --echo #
CREATE TABLE t1 ( a TEXT ); CREATE TABLE t1 ( a TEXT );
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
--eval SELECT 'aaaaaaaaaaaaaa' INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/bug58165.txt'; --eval SELECT 'aaaaaaaaaaaaaa' INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/bug58165.txt';
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
SELECT insert( substring_index( 'a', 'a', 'b' ), 1, 0, 'x' ); SELECT insert( substring_index( 'a', 'a', 'b' ), 1, 0, 'x' );
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/bug58165.txt' INTO TABLE t1; --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, 'ar_SA');
SELECT format(12345678901234567890.123, 3, 'be_BY'); SELECT format(12345678901234567890.123, 3, 'be_BY');
SELECT format(12345678901234567890.123, 3, 'de_DE'); 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_IN');
SELECT format(12345678901234567890.123, 3, 'en_US'); SELECT format(12345678901234567890.123, 3, 'en_US');
--enable_cursor_protocol
SELECT format(12345678901234567890.123, 3, 'it_CH'); SELECT format(12345678901234567890.123, 3, 'it_CH');
SELECT format(12345678901234567890.123, 3, 'ru_RU'); SELECT format(12345678901234567890.123, 3, 'ru_RU');
#checkafter fix MDEV-31512
--disable_cursor_protocol
SELECT format(12345678901234567890.123, 3, 'ta_IN'); SELECT format(12345678901234567890.123, 3, 'ta_IN');
--enable_cursor_protocol
CREATE TABLE t1 (fmt CHAR(5) NOT NULL); CREATE TABLE t1 (fmt CHAR(5) NOT NULL);
INSERT INTO t1 VALUES ('ar_AE'); 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 ('it_CH');
INSERT INTO t1 VALUES ('ru_RU'); INSERT INTO t1 VALUES ('ru_RU');
INSERT INTO t1 VALUES ('ta_IN'); 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, 3, fmt) FROM t1 ORDER BY fmt;
SELECT fmt, format(12345678901234567890.123, 0, 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; 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(-02345678901234567890, 3, fmt) FROM t1 ORDER BY fmt;
SELECT fmt, format(-00345678901234567890, 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; SELECT fmt, format(-00045678901234567890, 3, fmt) FROM t1 ORDER BY fmt;
--enable_cursor_protocol
DROP TABLE t1; DROP TABLE t1;
SELECT format(123, 1, 'Non-existent-locale'); SELECT format(123, 1, 'Non-existent-locale');
@ -2062,7 +2094,10 @@ DROP TABLE t1;
--disable_view_protocol --disable_view_protocol
CREATE TABLE t1 (a INT, b TIME, c TIME); 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'); 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; SELECT REPLACE( BINARY c, a, b ) f FROM t1 GROUP BY f WITH ROLLUP;
--enable_cursor_protocol
DROP TABLE t1; DROP TABLE t1;
--enable_view_protocol --enable_view_protocol

View File

@ -1294,7 +1294,10 @@ SET TIME_ZONE='+02:00';
--echo # --echo #
CREATE TABLE t1 (a DATE); CREATE TABLE t1 (a DATE);
INSERT INTO t1 VALUES ('2005-05-04'),('2000-02-23'); 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; 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; SELECT * FROM t1 GROUP BY FROM_UNIXTIME(CONCAT(a,'10'))+0;
DROP TABLE t1; DROP TABLE t1;
@ -1608,7 +1611,10 @@ SELECT DATE_ADD('2001-01-01 10:20:30',INTERVAL 250000000000.0 SECOND) AS c1, DAT
--echo # --echo #
--enable_metadata --enable_metadata
--disable_view_protocol --disable_view_protocol
#check after fix MDEV-31540
--disable_cursor_protocol
SELECT DATE_ADD('2011-01-02 12:13:14', INTERVAL 1 MINUTE); SELECT DATE_ADD('2011-01-02 12:13:14', INTERVAL 1 MINUTE);
--enable_cursor_protocol
--enable_view_protocol --enable_view_protocol
--disable_metadata --disable_metadata
@ -2241,11 +2247,13 @@ SET @sav_slow_query_log= @@session.slow_query_log;
--disable_ps2_protocol --disable_ps2_protocol
# @@slow_query_log ON check # @@slow_query_log ON check
SET @@session.slow_query_log= ON; SET @@session.slow_query_log= ON;
--disable_cursor_protocol
SELECT current_timestamp(6),fn_sleep_before_now() INTO @ts_cur, @ts_func; SELECT current_timestamp(6),fn_sleep_before_now() INTO @ts_cur, @ts_func;
--enable_ps2_protocol --enable_ps2_protocol
SELECT a FROM t_ts LIMIT 1 into @ts_func; SELECT a FROM t_ts LIMIT 1 into @ts_func;
SELECT a FROM t_trig LIMIT 1 into @ts_trig; SELECT a FROM t_trig LIMIT 1 into @ts_trig;
--enable_cursor_protocol
if (!`SELECT @ts_cur = @ts_func and @ts_func = @ts_trig`) if (!`SELECT @ts_cur = @ts_func and @ts_func = @ts_trig`)
{ {
SELECT @ts_cur, @ts_func, @ts_trig; SELECT @ts_cur, @ts_func, @ts_trig;
@ -2257,10 +2265,12 @@ DELETE FROM t_trig;
--disable_ps2_protocol --disable_ps2_protocol
# @@slow_query_log OFF check # @@slow_query_log OFF check
SET @@session.slow_query_log= OFF; SET @@session.slow_query_log= OFF;
--disable_cursor_protocol
SELECT current_timestamp(6),fn_sleep_before_now() INTO @ts_cur, @func_ts; SELECT current_timestamp(6),fn_sleep_before_now() INTO @ts_cur, @func_ts;
--enable_ps2_protocol --enable_ps2_protocol
SELECT a FROM t_ts LIMIT 1 into @ts_func; SELECT a FROM t_ts LIMIT 1 into @ts_func;
SELECT a FROM t_trig LIMIT 1 into @ts_trig; SELECT a FROM t_trig LIMIT 1 into @ts_trig;
--enable_cursor_protocol
if (!`SELECT @ts_cur = @ts_func and @ts_func = @ts_trig`) if (!`SELECT @ts_cur = @ts_func and @ts_func = @ts_trig`)
{ {
SELECT @ts_cur, @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 #enable after fix MDEV-29534
--disable_view_protocol --disable_view_protocol
SET time_zone='+00:00'; SET time_zone='+00:00';
#check after fix MDEV-31495
--disable_cursor_protocol
SELECT NULLIF(FROM_UNIXTIME('foo'), '2012-12-12 21:10:14'); SELECT NULLIF(FROM_UNIXTIME('foo'), '2012-12-12 21:10:14');
--enable_cursor_protocol
SET time_zone=DEFAULT; SET time_zone=DEFAULT;
--enable_view_protocol --enable_view_protocol

View File

@ -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 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; 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; 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 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; 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 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; 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; 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 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 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; SELECT DAYOFMONTH(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;

View File

@ -282,6 +282,7 @@ GET DIAGNOSTICS CONDITION ABS(2) @var = CLASS_ORIGIN;
GET DIAGNOSTICS CONDITION 1.1 @var = CLASS_ORIGIN; GET DIAGNOSTICS CONDITION 1.1 @var = CLASS_ORIGIN;
GET DIAGNOSTICS CONDITION "1" @var = CLASS_ORIGIN; GET DIAGNOSTICS CONDITION "1" @var = CLASS_ORIGIN;
--disable_cursor_protocol
# Reset warnings # Reset warnings
SELECT COUNT(max_questions) INTO @var FROM mysql.user; SELECT COUNT(max_questions) INTO @var FROM mysql.user;
@ -301,6 +302,7 @@ GET DIAGNOSTICS CONDITION @cond @var1 = CLASS_ORIGIN;
# Reset warnings # Reset warnings
SELECT COUNT(max_questions) INTO @var FROM mysql.user; SELECT COUNT(max_questions) INTO @var FROM mysql.user;
--enable_cursor_protocol
DELIMITER |; DELIMITER |;
CREATE PROCEDURE p1() CREATE PROCEDURE p1()
@ -367,7 +369,9 @@ GET DIAGNOSTICS @var = NUMBER;
SELECT @var; SELECT @var;
--enable_view_protocol --enable_view_protocol
--disable_cursor_protocol
SELECT COUNT(max_questions) INTO @var FROM mysql.user; SELECT COUNT(max_questions) INTO @var FROM mysql.user;
--enable_cursor_protocol
GET DIAGNOSTICS @var = NUMBER; GET DIAGNOSTICS @var = NUMBER;
SELECT @var; SELECT @var;

View File

@ -403,9 +403,12 @@ select (asWKT(geomfromwkb((0x010100000000000000000024400000000000002440)))) as e
--enable_metadata --enable_metadata
--disable_view_protocol --disable_view_protocol
#check after fix MDEV-31540
--disable_cursor_protocol
create table t1 (g GEOMETRY); create table t1 (g GEOMETRY);
select * from t1; select * from t1;
select asbinary(g) from t1; select asbinary(g) from t1;
--enable_cursor_protocol
--enable_view_protocol --enable_view_protocol
--disable_metadata --disable_metadata
drop table t1; drop table t1;
@ -3245,6 +3248,8 @@ CREATE TABLE t1 (
g GEOMETRY g GEOMETRY
) CHARACTER SET utf8; ) CHARACTER SET utf8;
#check after fix MDEV-31540
--disable_cursor_protocol
--disable_view_protocol --disable_view_protocol
--enable_metadata --enable_metadata
SELECT * FROM t1; SELECT * FROM t1;
@ -3350,6 +3355,7 @@ FROM t1;
--disable_metadata --disable_metadata
--enable_view_protocol --enable_view_protocol
--enable_cursor_protocol
DROP TABLE t1; DROP TABLE t1;
--echo # --echo #

View File

@ -10,7 +10,9 @@ set GLOBAL sql_mode="";
set LOCAL sql_mode=""; set LOCAL sql_mode="";
SET @old_log_bin_trust_function_creators= @@global.log_bin_trust_function_creators; SET @old_log_bin_trust_function_creators= @@global.log_bin_trust_function_creators;
SET GLOBAL log_bin_trust_function_creators = 1; 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'; select priv into @root_priv from mysql.global_priv where user='root' and host='localhost';
--enable_cursor_protocol
connect (master,localhost,root,,); connect (master,localhost,root,,);
connection master; connection master;

View File

@ -4,7 +4,10 @@
# Save the initial number of concurrent sessions # Save the initial number of concurrent sessions
--source include/count_sessions.inc --source include/count_sessions.inc
--disable_cursor_protocol
select priv into @root_priv from mysql.global_priv where user='root' and host='localhost'; select priv into @root_priv from mysql.global_priv where user='root' and host='localhost';
--enable_cursor_protocol
set GLOBAL sql_mode=""; set GLOBAL sql_mode="";
set LOCAL sql_mode=""; set LOCAL sql_mode="";
SET NAMES binary; SET NAMES binary;
@ -655,8 +658,10 @@ DROP DATABASE db1;
# work out who we are. # work out who we are.
USE mysql; USE mysql;
--disable_cursor_protocol
SELECT LEFT(CURRENT_USER(),INSTR(CURRENT_USER(),'@')-1) INTO @u; SELECT LEFT(CURRENT_USER(),INSTR(CURRENT_USER(),'@')-1) INTO @u;
SELECT MID(CURRENT_USER(),INSTR(CURRENT_USER(),'@')+1) INTO @h; SELECT MID(CURRENT_USER(),INSTR(CURRENT_USER(),'@')+1) INTO @h;
--enable_cursor_protocol
# show current privs. # show current privs.
SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h; 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 # --echo #
INSERT INTO t1 VALUES (1), (2), (3); INSERT INTO t1 VALUES (1), (2), (3);
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
--eval SELECT a INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/bug27480.txt' FROM t1 --eval SELECT a INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/bug27480.txt' FROM t1
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/bug27480.txt' INTO TABLE t1 --eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/bug27480.txt' INTO TABLE t1
--remove_file $MYSQLTEST_VARDIR/tmp/bug27480.txt --remove_file $MYSQLTEST_VARDIR/tmp/bug27480.txt

View File

@ -21,7 +21,10 @@ flush privileges;
--enable_metadata --enable_metadata
--disable_view_protocol --disable_view_protocol
# Check after fix MDEV-31540
--disable_cursor_protocol
select user(); select user();
--enable_cursor_protocol
--enable_view_protocol --enable_view_protocol
--disable_metadata --disable_metadata
@ -43,7 +46,10 @@ flush privileges;
--enable_metadata --enable_metadata
--disable_view_protocol --disable_view_protocol
# Check after fix MDEV-31540
--disable_cursor_protocol
select user(); select user();
--enable_cursor_protocol
--enable_view_protocol --enable_view_protocol
--disable_metadata --disable_metadata

View File

@ -284,6 +284,7 @@ drop table t1;
CREATE TABLE t1 (a char(1)); CREATE TABLE t1 (a char(1));
INSERT INTO t1 VALUES ('A'),('B'),('A'),('B'),('A'),('B'),(NULL),('a'),('b'),(NULL),('A'),('B'),(NULL); INSERT INTO t1 VALUES ('A'),('B'),('A'),('B'),('A'),('B'),(NULL),('a'),('b'),(NULL),('A'),('B'),(NULL);
flush status; flush status;
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
SELECT a FROM t1 GROUP BY a; SELECT a FROM t1 GROUP BY a;
SELECT a,count(*) 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 FROM t1 GROUP BY 1;
SELECT binary a,count(*) FROM t1 GROUP BY 1; SELECT binary a,count(*) FROM t1 GROUP BY 1;
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
--disable_ps_protocol --disable_ps_protocol
show status like 'Created%tables'; show status like 'Created%tables';
--enable_ps_protocol --enable_ps_protocol
# Do the same tests with on-disk temporary tables # Do the same tests with on-disk temporary tables
set tmp_memory_table_size=0; set tmp_memory_table_size=0;
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
SELECT a FROM t1 GROUP BY a; SELECT a FROM t1 GROUP BY a;
SELECT a,count(*) 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 FROM t1 GROUP BY 1;
SELECT binary a,count(*) FROM t1 GROUP BY 1; SELECT binary a,count(*) FROM t1 GROUP BY 1;
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
--disable_ps_protocol --disable_ps_protocol
show status like 'Created%tables'; show status like 'Created%tables';
--enable_ps_protocol --enable_ps_protocol
@ -1666,7 +1670,7 @@ DROP TABLE t1, t2;
# an additional util connection and other statistics data # an additional util connection and other statistics data
--disable_ps2_protocol --disable_ps2_protocol
--disable_view_protocol --disable_view_protocol
--disable_cursor_protocol
FLUSH STATUS; # this test case *must* use Aria temp tables FLUSH STATUS; # this test case *must* use Aria temp tables
CREATE TABLE t1 (f1 INT, f2 decimal(20,1), f3 blob); 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 --echo the value below *must* be 1
show status like 'Created_tmp_disk_tables'; show status like 'Created_tmp_disk_tables';
--enable_cursor_protocol
--enable_view_protocol --enable_view_protocol
--enable_ps2_protocol --enable_ps2_protocol

View File

@ -1726,6 +1726,8 @@ explain select
and t1.PARENT_ID = t2.PARENT_ID and t1.PARENT_ID = t2.PARENT_ID
and t2.CHILD_FIELD = "ZZZZ"; and t2.CHILD_FIELD = "ZZZZ";
#Enable after fix MDEV-31552
--disable_cursor_protocol
select select
t1.PARENT_ID, t1.PARENT_ID,
min(CHILD_FIELD) min(CHILD_FIELD)
@ -1733,6 +1735,7 @@ select
where t1.PARENT_ID = 1 where t1.PARENT_ID = 1
and t1.PARENT_ID = t2.PARENT_ID and t1.PARENT_ID = t2.PARENT_ID
and t2.CHILD_FIELD = "ZZZZ"; and t2.CHILD_FIELD = "ZZZZ";
--enable_cursor_protocol
select select
1, 1,
@ -1764,6 +1767,8 @@ explain select
and t1.PARENT_ID = t2.PARENT_ID and t1.PARENT_ID = t2.PARENT_ID
and t2.CHILD_FIELD = "ZZZZ"; and t2.CHILD_FIELD = "ZZZZ";
#Enable after fix MDEV-31552
--disable_cursor_protocol
select select
t1.PARENT_ID, t1.PARENT_ID,
min(CHILD_FIELD) min(CHILD_FIELD)
@ -1771,6 +1776,7 @@ select
where t1.PARENT_ID = 1 where t1.PARENT_ID = 1
and t1.PARENT_ID = t2.PARENT_ID and t1.PARENT_ID = t2.PARENT_ID
and t2.CHILD_FIELD = "ZZZZ"; and t2.CHILD_FIELD = "ZZZZ";
--enable_cursor_protocol
drop table t1,t2; drop table t1,t2;
@ -1897,6 +1903,8 @@ explain select
and t1.PARENT_ID = t2.PARENT_ID and t1.PARENT_ID = t2.PARENT_ID
and t2.CHILD_FIELD = "ZZZZ"; and t2.CHILD_FIELD = "ZZZZ";
#Enable after fix MDEV-31552
--disable_cursor_protocol
select select
t1.PARENT_ID, t1.PARENT_ID,
min(CHILD_FIELD) min(CHILD_FIELD)
@ -1904,6 +1912,7 @@ select
where t1.PARENT_ID = 1 where t1.PARENT_ID = 1
and t1.PARENT_ID = t2.PARENT_ID and t1.PARENT_ID = t2.PARENT_ID
and t2.CHILD_FIELD = "ZZZZ"; and t2.CHILD_FIELD = "ZZZZ";
--enable_cursor_protocol
select select
1, 1,
@ -1935,6 +1944,8 @@ explain select
and t1.PARENT_ID = t2.PARENT_ID and t1.PARENT_ID = t2.PARENT_ID
and t2.CHILD_FIELD = "ZZZZ"; and t2.CHILD_FIELD = "ZZZZ";
#Enable after fix MDEV-31552
--disable_cursor_protocol
select select
t1.PARENT_ID, t1.PARENT_ID,
min(CHILD_FIELD) min(CHILD_FIELD)
@ -1942,6 +1953,7 @@ select
where t1.PARENT_ID = 1 where t1.PARENT_ID = 1
and t1.PARENT_ID = t2.PARENT_ID and t1.PARENT_ID = t2.PARENT_ID
and t2.CHILD_FIELD = "ZZZZ"; and t2.CHILD_FIELD = "ZZZZ";
--enable_cursor_protocol
drop table t1,t2; drop table t1,t2;

View File

@ -9,6 +9,7 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a INT, INDEX (a)); CREATE TABLE t1 (a INT, INDEX (a));
INSERT INTO t1 VALUES (),(),(),(),(),(),(),(),(),(); INSERT INTO t1 VALUES (),(),(),(),(),(),(),(),(),();
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
FLUSH STATUS; FLUSH STATUS;
SELECT a FROM t1 ORDER BY a LIMIT 1; 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; SELECT a FROM t1 ORDER BY a DESC LIMIT 3;
SHOW STATUS LIKE 'HANDLER_READ%'; SHOW STATUS LIKE 'HANDLER_READ%';
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
DROP TABLE t1; DROP TABLE t1;

View File

@ -1811,14 +1811,18 @@ drop database mysqltest;
--disable_result_log --disable_result_log
SELECT * FROM INFORMATION_SCHEMA.TABLES; SELECT * FROM INFORMATION_SCHEMA.TABLES;
--enable_result_log --enable_result_log
--disable_cursor_protocol
SELECT VARIABLE_VALUE INTO @val1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE SELECT VARIABLE_VALUE INTO @val1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE
VARIABLE_NAME LIKE 'Opened_tables'; VARIABLE_NAME LIKE 'Opened_tables';
--enable_cursor_protocol
--disable_result_log --disable_result_log
SELECT ENGINE FROM INFORMATION_SCHEMA.TABLES; SELECT ENGINE FROM INFORMATION_SCHEMA.TABLES;
--enable_result_log --enable_result_log
--echo # The below SELECT query should give same output as above SELECT query. --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 SELECT VARIABLE_VALUE INTO @val2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE
VARIABLE_NAME LIKE 'Opened_tables'; VARIABLE_NAME LIKE 'Opened_tables';
--enable_cursor_protocol
--echo # The below select should return '1' --echo # The below select should return '1'
SELECT @val1 = @val2; SELECT @val1 = @val2;

View File

@ -10,8 +10,10 @@
# Bug#23240 --init-file statements with NOW() reports '1970-01-01 11:00:00'as the date time # 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() ); INSERT INTO init_file.startup VALUES ( NOW() );
--disable_cursor_protocol
SELECT * INTO @X FROM init_file.startup limit 0,1; SELECT * INTO @X FROM init_file.startup limit 0,1;
SELECT * INTO @Y FROM init_file.startup limit 1,1; SELECT * INTO @Y FROM init_file.startup limit 1,1;
--enable_cursor_protocol
SELECT YEAR(@X)-YEAR(@Y); SELECT YEAR(@X)-YEAR(@Y);
--echo ok --echo ok

View File

@ -29,6 +29,7 @@ ANALYZE TABLE lineitem PERSISTENT FOR COLUMNS() INDEXES();
--enable_result_log --enable_result_log
--enable_query_log --enable_query_log
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
explain explain
select count(*) from lineitem where l_orderkey=130 and l_shipdate='1992-07-01'; 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; and o_orderkey=l_orderkey and p_partkey=l_partkey;
show /*d*/ status like 'handler_read%'; show /*d*/ status like 'handler_read%';
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
--echo # --echo #
--echo # Bug mdev-3851: ref access used instead of expected eq_ref access --echo # Bug mdev-3851: ref access used instead of expected eq_ref access
@ -326,7 +328,9 @@ from t1 A, t1 B;
explain explain
select * from t1, t2 where t2.a=t1.a and t2.b < 2; select * from t1, t2 where t2.a=t1.a and t2.b < 2;
flush status; flush status;
--disable_cursor_protocol
select * from t1, t2 where t2.a=t1.a and t2.b < 2; select * from t1, t2 where t2.a=t1.a and t2.b < 2;
--enable_cursor_protocol
show /*e*/ status like 'handler_read%'; show /*e*/ status like 'handler_read%';
--enable_ps2_protocol --enable_ps2_protocol

View File

@ -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; REPLACE INTO v1 SET f2 = 1;
SELECT * from t1; SELECT * from t1;
drop view v1; drop view v1;
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
SELECT 0,0 INTO OUTFILE 't1.txt'; SELECT 0,0 INTO OUTFILE 't1.txt';
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
CREATE ALGORITHM = MERGE VIEW v1 AS SELECT f1, f2 FROM t1 WHERE f1 = 'x' WITH CHECK OPTION; CREATE ALGORITHM = MERGE VIEW v1 AS SELECT f1, f2 FROM t1 WHERE f1 = 'x' WITH CHECK OPTION;
--error ER_TRUNCATED_WRONG_VALUE --error ER_TRUNCATED_WRONG_VALUE
LOAD DATA INFILE 't1.txt' INTO TABLE v1; LOAD DATA INFILE 't1.txt' INTO TABLE v1;

View File

@ -251,9 +251,11 @@ DROP TABLE t1;
create or replace table t1 (a int, b int invisible); create or replace table t1 (a int, b int invisible);
insert into t1 values (1),(2); insert into t1 values (1),(2);
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
select * from t1 into outfile 'f'; select * from t1 into outfile 'f';
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
load data infile 'f' into table t1; load data infile 'f' into table t1;
select a,b from t1; select a,b from t1;
load data infile 'f' into table t1 (a,@v) SET b=@v; load data infile 'f' into table t1 (a,@v) SET b=@v;
@ -263,9 +265,11 @@ select a,b from t1;
truncate table t1; truncate table t1;
insert into t1(a,b) values (1,1),(2,2); insert into t1(a,b) values (1,1),(2,2);
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
select a,b from t1 into outfile 'a'; select a,b from t1 into outfile 'a';
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
load data infile 'a' into table t1(a,b); load data infile 'a' into table t1(a,b);
select a,b from t1; select a,b from t1;
load data infile 'a' into table t1 (a,@v) SET b=@v; load data infile 'a' into table t1 (a,@v) SET b=@v;

View File

@ -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)); create table t3 (a int not null, primary key(a));
insert into t3 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); insert into t3 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
--disable_cursor_protocol
flush status; flush status;
--disable_ps2_protocol --disable_ps2_protocol
select * from t1, t2, t3 where t3.a=t1.a and t2.a=t1.b; 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; 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: --echo We expect rnd_next=5, and read_key must be 0 because of short-cutting:
show status like 'Handler_read%'; show status like 'Handler_read%';
--enable_cursor_protocol
drop table t1, t2, t3; 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'); (8,'dd'),(9,'e'),(10,'ee');
INSERT INTO t2 VALUES (2,NULL); INSERT INTO t2 VALUES (2,NULL);
ANALYZE TABLE t1,t2; ANALYZE TABLE t1,t2;
--disable_cursor_protocol
FLUSH STATUS; FLUSH STATUS;
--disable_ps2_protocol --disable_ps2_protocol
SELECT * FROM t1 JOIN t2 ON t1.v = t2.v WHERE t2.v IS NULL ORDER BY 1; SELECT * FROM t1 JOIN t2 ON t1.v = t2.v WHERE t2.v IS NULL ORDER BY 1;
--enable_ps2_protocol --enable_ps2_protocol
SHOW STATUS LIKE 'Handler_read_%'; SHOW STATUS LIKE 'Handler_read_%';
--enable_cursor_protocol
DROP TABLE t1, t2; DROP TABLE t1, t2;
--echo End of 5.1 tests --echo End of 5.1 tests

View File

@ -885,9 +885,11 @@ INSERT INTO t2 VALUES
EXPLAIN EXPLAIN
SELECT t1.id, a FROM t1 LEFT JOIN t2 ON t1.id=t2.id WHERE t2.b IS NULL; SELECT t1.id, a FROM t1 LEFT JOIN t2 ON t1.id=t2.id WHERE t2.b IS NULL;
--disable_cursor_protocol
flush status; flush status;
SELECT t1.id, a FROM t1 LEFT JOIN t2 ON t1.id=t2.id WHERE t2.b IS NULL; SELECT t1.id, a FROM t1 LEFT JOIN t2 ON t1.id=t2.id WHERE t2.b IS NULL;
show status like 'Handler_read%'; show status like 'Handler_read%';
--enable_cursor_protocol
DROP TABLE t1,t2; DROP TABLE t1,t2;
--enable_ps2_protocol --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 # table is used in the on condition of an outer join
--echo # --echo #
--disable_ps2_protocol --disable_ps2_protocol
--disable_view_protocol
create table t1 (a int); create table t1 (a int);
insert into t1 values (NULL), (NULL), (NULL), (NULL); insert into t1 values (NULL), (NULL), (NULL), (NULL);
insert into t1 select * from t1; 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); insert into t3 values (22, 100), (53, 301), (64, 402), (22, 102), (22, 101);
analyze table t1,t2,t3; analyze table t1,t2,t3;
--disable_view_protocol
--disable_cursor_protocol
flush status; flush status;
select sum(t3.b) from t1 left join t3 on t3.a=t1.a and t1.a is not null; 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%"; show status like "handler_read%";
flush status; flush status;
select sum(t3.b) from t2 left join t3 on t3.a=t2.a and t2.a <> 10; select sum(t3.b) from t2 left join t3 on t3.a=t2.a and t2.a <> 10;
show status like "handler_read%"; show status like "handler_read%";
--enable_cursor_protocol
--enable_view_protocol
drop table t1,t2,t3; drop table t1,t2,t3;
--enable_view_protocol
--enable_ps2_protocol --enable_ps2_protocol
--echo # --echo #

View File

@ -303,7 +303,9 @@ update t1 set p=3 where p=1;
update t2 set i=2 where i=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'; 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'; select variable_value into @key_blocks_unused from information_schema.session_status where variable_name = 'Key_blocks_unused';
--enable_cursor_protocol
--replace_column 7 # --replace_column 7 #
select * from information_schema.key_caches where segment_number is null; select * from information_schema.key_caches where segment_number is null;

View File

@ -33,6 +33,8 @@ DROP TABLE t1;
SELECT LAST_VALUE(@last_a:=1,@last_b:=1); SELECT LAST_VALUE(@last_a:=1,@last_b:=1);
select @last_b; select @last_b;
--enable_ps_protocol --enable_ps_protocol
#Check after fix MDEV-31540
--disable_cursor_protocol
SELECT LAST_VALUE(@last_a:=1,@last_b:=1.0); SELECT LAST_VALUE(@last_a:=1,@last_b:=1.0);
select @last_b; select @last_b;
SELECT LAST_VALUE(@last_a:=1,@last_b:="hello"); 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_b;
SELECT LAST_VALUE(@last_a:=1,@last_b:="2001-02-03",NULL); SELECT LAST_VALUE(@last_a:=1,@last_b:="2001-02-03",NULL);
select @last_b; select @last_b;
--enable_cursor_protocol
--disable_metadata --disable_metadata
--error ER_PARSE_ERROR --error ER_PARSE_ERROR
SELECT LAST_VALUE(); SELECT LAST_VALUE();

View File

@ -23,6 +23,8 @@ insert into t2i values ('bb'), ('cc'), ('dd'), ('ff');
--echo Simple joins --echo Simple joins
--echo ========================================================================= --echo =========================================================================
#Check after fix MDEV-31522
--disable_cursor_protocol
--echo Simple nested loops join without blocking --echo Simple nested loops join without blocking
set @@join_cache_level=0; set @@join_cache_level=0;
explain 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 15;
SELECT DISTINCT a FROM t1, t2 HAVING a > ' ' LIMIT ROWS EXAMINED 16; SELECT DISTINCT a FROM t1, t2 HAVING a > ' ' LIMIT ROWS EXAMINED 16;
--enable_cursor_protocol
drop table t1,t2,t3; 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 GROUP BY field1, field2, field3, field4, field5
LIMIT ROWS EXAMINED 120; LIMIT ROWS EXAMINED 120;
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
FLUSH STATUS; FLUSH STATUS;
SELECT a AS field1, alias2.d AS field2, alias2.f AS field3, alias2.e AS field4, b AS field5 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_read%';
SHOW STATUS LIKE 'Handler_tmp%'; SHOW STATUS LIKE 'Handler_tmp%';
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
drop table t1, t2; drop table t1, t2;

View File

@ -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); create table t1(id integer not null auto_increment primary key);
insert into t1 values(0); insert into t1 values(0);
disable_query_log; disable_query_log;
--disable_cursor_protocol
eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t1' from t1; eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t1' from t1;
--enable_cursor_protocol
delete from t1; delete from t1;
eval load data infile '$MYSQLTEST_VARDIR/tmp/t1' into table t1; eval load data infile '$MYSQLTEST_VARDIR/tmp/t1' into table t1;
enable_query_log; enable_query_log;
@ -49,9 +51,11 @@ select * from t1;
remove_file $MYSQLTEST_VARDIR/tmp/t1; remove_file $MYSQLTEST_VARDIR/tmp/t1;
disable_query_log; disable_query_log;
--disable_cursor_protocol
eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t1' eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t1'
FIELDS TERMINATED BY '' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\r\n' FIELDS TERMINATED BY '' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\r\n'
FROM t1; FROM t1;
--enable_cursor_protocol
delete from t1; delete from t1;
eval load data infile '$MYSQLTEST_VARDIR/tmp/t1' into table t1 eval load data infile '$MYSQLTEST_VARDIR/tmp/t1' into table t1
FIELDS TERMINATED BY '' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\r\n'; FIELDS TERMINATED BY '' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\r\n';
@ -94,9 +98,11 @@ INSERT INTO t1 (c1) VALUES
SELECT * FROM t1; SELECT * FROM t1;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t1' FIELDS ENCLOSED BY 'r' FROM t1; eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t1' FIELDS ENCLOSED BY 'r' FROM t1;
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
cat_file $MYSQLTEST_VARDIR/tmp/t1; cat_file $MYSQLTEST_VARDIR/tmp/t1;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
@ -184,9 +190,11 @@ create table t1(f1 int);
insert into t1 values(1),(null); insert into t1 values(1),(null);
create table t2(f2 int auto_increment primary key); create table t2(f2 int auto_increment primary key);
disable_query_log; disable_query_log;
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
eval select * into outfile '$MYSQLTEST_VARDIR/tmp/t1' from t1; eval select * into outfile '$MYSQLTEST_VARDIR/tmp/t1' from t1;
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
SET @OLD_SQL_MODE=@@SQL_MODE, @@SQL_MODE=NO_AUTO_VALUE_ON_ZERO; SET @OLD_SQL_MODE=@@SQL_MODE, @@SQL_MODE=NO_AUTO_VALUE_ON_ZERO;
eval load data infile '$MYSQLTEST_VARDIR/tmp/t1' into table t2; eval load data infile '$MYSQLTEST_VARDIR/tmp/t1' into table t2;
enable_query_log; enable_query_log;
@ -203,20 +211,24 @@ create table t1(f1 int, f2 timestamp not null default current_timestamp);
create table t2(f1 int); create table t2(f1 int);
insert into t2 values(1),(2); insert into t2 values(1),(2);
disable_query_log; disable_query_log;
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
eval select * into outfile '$MYSQLTEST_VARDIR/tmp/t2' from t2; eval select * into outfile '$MYSQLTEST_VARDIR/tmp/t2' from t2;
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
eval load data infile '$MYSQLTEST_VARDIR/tmp/t2' ignore into table t1; eval load data infile '$MYSQLTEST_VARDIR/tmp/t2' ignore into table t1;
enable_query_log; enable_query_log;
select f1 from t1 where f2 <> '0000-00-00 00:00:00' order by f1; select f1 from t1 where f2 <> '0000-00-00 00:00:00' order by f1;
remove_file $MYSQLTEST_VARDIR/tmp/t2; remove_file $MYSQLTEST_VARDIR/tmp/t2;
delete from t1; delete from t1;
disable_query_log; disable_query_log;
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t2' eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t2'
FIELDS TERMINATED BY '' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\r\n' FIELDS TERMINATED BY '' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\r\n'
FROM t2; FROM t2;
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
eval load data infile '$MYSQLTEST_VARDIR/tmp/t2' ignore into table t1 eval load data infile '$MYSQLTEST_VARDIR/tmp/t2' ignore into table t1
FIELDS TERMINATED BY '' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\r\n'; FIELDS TERMINATED BY '' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\r\n';
enable_query_log; 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; SELECT * FROM t1;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t1' FIELDS ENCLOSED BY '-' FROM t1; eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t1' FIELDS ENCLOSED BY '-' FROM t1;
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
cat_file $MYSQLTEST_VARDIR/tmp/t1; cat_file $MYSQLTEST_VARDIR/tmp/t1;
echo EOF; echo EOF;
@ -376,8 +390,10 @@ SET sql_mode = '';
--disable_ps2_protocol --disable_ps2_protocol
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--disable_cursor_protocol
--eval SELECT '1 \\\\aa\n' INTO DUMPFILE '$file' --eval SELECT '1 \\\\aa\n' INTO DUMPFILE '$file'
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
CREATE TABLE t1 (id INT, val1 CHAR(3)) ENGINE=MyISAM; 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 # show we can write this with OUTFILE, forcing the parameters for now
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
--eval SELECT * INTO OUTFILE '$file2' FIELDS ESCAPED BY '' TERMINATED BY ' ' FROM t1 --eval SELECT * INTO OUTFILE '$file2' FIELDS ESCAPED BY '' TERMINATED BY ' ' FROM t1
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
--diff_files $file $file2 --diff_files $file $file2
--remove_file $file2 --remove_file $file2
# now show the OUTFILE defaults are correct with NO_BACKSLASH_ESCAPES # now show the OUTFILE defaults are correct with NO_BACKSLASH_ESCAPES
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
--eval SELECT * INTO OUTFILE '$file2' FIELDS TERMINATED BY ' ' FROM t1 --eval SELECT * INTO OUTFILE '$file2' FIELDS TERMINATED BY ' ' FROM t1
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
--diff_files $file $file2 --diff_files $file $file2
--remove_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 --echo 1.1 NO_BACKSLASH_ESCAPES, use defaults for ESCAPED BY
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
--eval SELECT * INTO OUTFILE '$file' FIELDS TERMINATED BY ' ' FROM t1 ORDER BY id --eval SELECT * INTO OUTFILE '$file' FIELDS TERMINATED BY ' ' FROM t1 ORDER BY id
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--eval LOAD DATA INFILE '$file' INTO TABLE t2 FIELDS TERMINATED BY ' ' --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 --echo 1.2 NO_BACKSLASH_ESCAPES, override defaults for ESCAPED BY
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
--eval SELECT * INTO OUTFILE '$file' FIELDS ESCAPED BY '\' TERMINATED BY ' ' FROM t1 ORDER BY id --eval SELECT * INTO OUTFILE '$file' FIELDS ESCAPED BY '\' TERMINATED BY ' ' FROM t1 ORDER BY id
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--eval LOAD DATA INFILE '$file' INTO TABLE t2 FIELDS ESCAPED BY '\' TERMINATED BY ' ' --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 --echo 2.1 !NO_BACKSLASH_ESCAPES, use defaults for ESCAPED BY
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
--eval SELECT * INTO OUTFILE '$file' FIELDS TERMINATED BY ' ' FROM t1 ORDER BY id --eval SELECT * INTO OUTFILE '$file' FIELDS TERMINATED BY ' ' FROM t1 ORDER BY id
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--eval LOAD DATA INFILE '$file' INTO TABLE t2 FIELDS TERMINATED BY ' ' --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 --echo 2.2 !NO_BACKSLASH_ESCAPES, override defaults for ESCAPED BY
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
--eval SELECT * INTO OUTFILE '$file' FIELDS ESCAPED BY '' TERMINATED BY ' ' FROM t1 ORDER BY id --eval SELECT * INTO OUTFILE '$file' FIELDS ESCAPED BY '' TERMINATED BY ' ' FROM t1 ORDER BY id
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--eval LOAD DATA INFILE '$file' INTO TABLE t2 FIELDS ESCAPED BY '' TERMINATED BY ' ' --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 NAMES latin1;
SET character_set_filesystem=filename; SET character_set_filesystem=filename;
select @@character_set_filesystem; select @@character_set_filesystem;
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
SELECT * INTO OUTFILE 't-1' FROM t1; SELECT * INTO OUTFILE 't-1' FROM t1;
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
DELETE FROM t1; DELETE FROM t1;
LOAD DATA INFILE 't-1' INTO TABLE t1; LOAD DATA INFILE 't-1' INTO TABLE t1;
SELECT * FROM t1; SELECT * FROM t1;
@ -568,9 +598,11 @@ select @@character_set_filesystem;
--echo # --echo #
CREATE TABLE t1(col0 LONGBLOB); CREATE TABLE t1(col0 LONGBLOB);
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
SELECT 'test' INTO OUTFILE 't1.txt'; SELECT 'test' INTO OUTFILE 't1.txt';
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
LOAD DATA INFILE 't1.txt' IGNORE INTO TABLE t1 SET col0=col0; LOAD DATA INFILE 't1.txt' IGNORE INTO TABLE t1 SET col0=col0;
SELECT * FROM t1; SELECT * FROM t1;
@ -639,9 +671,11 @@ disconnect con1;
--echo # --echo #
CREATE TABLE t1(f1 INT); CREATE TABLE t1(f1 INT);
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
EVAL SELECT 0xE1BB30 INTO OUTFILE 't1.dat'; EVAL SELECT 0xE1BB30 INTO OUTFILE 't1.dat';
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
--disable_warnings --disable_warnings
LOAD DATA INFILE 't1.dat' IGNORE INTO TABLE t1 CHARACTER SET utf8; LOAD DATA INFILE 't1.dat' IGNORE INTO TABLE t1 CHARACTER SET utf8;
--enable_warnings --enable_warnings
@ -658,7 +692,9 @@ remove_file $MYSQLD_DATADIR/test/t1.dat;
--disable_ps2_protocol --disable_ps2_protocol
--let $file=$MYSQLTEST_VARDIR/tmp/bug11735141.txt --let $file=$MYSQLTEST_VARDIR/tmp/bug11735141.txt
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--disable_cursor_protocol
--eval SELECT '1\n' INTO DUMPFILE '$file' --eval SELECT '1\n' INTO DUMPFILE '$file'
--enable_cursor_protocol
--enable_ps2_protocol --enable_ps2_protocol
create table t1(a point); 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); INSERT INTO t1 VALUES (1,1);
CREATE TABLE t2 (c INT); CREATE TABLE t2 (c INT);
CREATE VIEW v AS SELECT t1.* FROM t1 JOIN t2; CREATE VIEW v AS SELECT t1.* FROM t1 JOIN t2;
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
SELECT a, b INTO OUTFILE '15645.data' FROM t1; SELECT a, b INTO OUTFILE '15645.data' FROM t1;
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
--error ER_WRONG_USAGE --error ER_WRONG_USAGE
LOAD DATA INFILE '15645.data' IGNORE INTO TABLE v (a,b); LOAD DATA INFILE '15645.data' IGNORE INTO TABLE v (a,b);
--error ER_WRONG_USAGE --error ER_WRONG_USAGE

View File

@ -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 --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 SELECT VARIABLE_VALUE INTO @global_slow_queries
FROM INFORMATION_SCHEMA.GLOBAL_STATUS FROM INFORMATION_SCHEMA.GLOBAL_STATUS
WHERE VARIABLE_NAME='SLOW_QUERIES'; WHERE VARIABLE_NAME='SLOW_QUERIES';
SELECT sleep(0.2) INTO @tmp FROM DUAL; SELECT sleep(0.2) INTO @tmp FROM DUAL;
--enable_cursor_protocol
SELECT SELECT
CAST(VARIABLE_VALUE AS UNSIGNED)-@global_slow_queries AS Slow_queries_increment CAST(VARIABLE_VALUE AS UNSIGNED)-@global_slow_queries AS Slow_queries_increment
FROM FROM
@ -88,11 +90,13 @@ SELECT
--echo # Although this query is disallowed by log_slow_filter, it should still increment Slow_queries --echo # Although this query is disallowed by log_slow_filter, it should still increment Slow_queries
SET log_slow_filter=filesort; SET log_slow_filter=filesort;
--disable_cursor_protocol
SELECT sleep(0.2) INTO @tmp FROM DUAL; SELECT sleep(0.2) INTO @tmp FROM DUAL;
SELECT VARIABLE_VALUE INTO @global_slow_queries SELECT VARIABLE_VALUE INTO @global_slow_queries
FROM INFORMATION_SCHEMA.GLOBAL_STATUS FROM INFORMATION_SCHEMA.GLOBAL_STATUS
WHERE VARIABLE_NAME='SLOW_QUERIES'; WHERE VARIABLE_NAME='SLOW_QUERIES';
SELECT sleep(0.2) INTO @tmp FROM DUAL; SELECT sleep(0.2) INTO @tmp FROM DUAL;
--enable_cursor_protocol
SELECT SELECT
CAST(VARIABLE_VALUE AS UNSIGNED)-@global_slow_queries AS Slow_queries_increment CAST(VARIABLE_VALUE AS UNSIGNED)-@global_slow_queries AS Slow_queries_increment
FROM FROM

View File

@ -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 # Bug#21557 entries in the general query log truncated at 1000 characters.
--echo # --echo #
--disable_cursor_protocol
select CONNECTION_ID() into @thread_id; select CONNECTION_ID() into @thread_id;
--enable_cursor_protocol
--disable_ps_protocol --disable_ps_protocol
truncate table mysql.general_log; truncate table mysql.general_log;
--enable_ps_protocol --enable_ps_protocol
@ -1006,9 +1008,12 @@ INSERT INTO t1 VALUES (3,3,3);
INSERT INTO t1 VALUES (4,4,4); INSERT INTO t1 VALUES (4,4,4);
--disable_ps2_protocol --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 - 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 - 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; 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 --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; SELECT start_time, rows_examined, rows_sent, sql_text FROM mysql.slow_log WHERE sql_text LIKE '%Bug#31700%' ORDER BY start_time;

View File

@ -12,9 +12,11 @@ insert into t1 () values
(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(), (),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),
(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(), (),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),
(),(),(),(); (),(),(),();
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
select * into outfile 'load.data' from t1; select * into outfile 'load.data' from t1;
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
create temporary table tmp (a varchar(1024), b int, c int, d int, e linestring, unique (e)); 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; load data infile 'load.data' into table tmp;
delete from tmp; delete from tmp;
@ -226,9 +228,11 @@ drop table t1;
--echo # --echo #
CREATE TABLE t1 (data VARCHAR(4), unique(data) using hash) with system versioning; CREATE TABLE t1 (data VARCHAR(4), unique(data) using hash) with system versioning;
INSERT INTO t1 VALUES ('A'); INSERT INTO t1 VALUES ('A');
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
SELECT * INTO OUTFILE 'load.data' from t1; SELECT * INTO OUTFILE 'load.data' from t1;
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
--error ER_DUP_ENTRY --error ER_DUP_ENTRY
LOAD DATA INFILE 'load.data' INTO TABLE t1; LOAD DATA INFILE 'load.data' INTO TABLE t1;
select * from t1; select * from t1;
@ -242,9 +246,11 @@ DROP TABLE t1;
CREATE TABLE t1 (data VARCHAR(7961)) ENGINE=InnoDB; CREATE TABLE t1 (data VARCHAR(7961)) ENGINE=InnoDB;
INSERT INTO t1 VALUES ('f'), ('o'), ('o'); INSERT INTO t1 VALUES ('f'), ('o'), ('o');
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
SELECT * INTO OUTFILE 'load.data' from t1; SELECT * INTO OUTFILE 'load.data' from t1;
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
ALTER IGNORE TABLE t1 ADD UNIQUE INDEX (data); ALTER IGNORE TABLE t1 ADD UNIQUE INDEX (data);
SELECT * FROM t1; SELECT * FROM t1;
@ -509,9 +515,11 @@ drop table t2;
--echo # --echo #
create table t1 (pk int primary key, f blob, unique(f)) engine=innodb; create table t1 (pk int primary key, f blob, unique(f)) engine=innodb;
insert t1 values (1, null); insert t1 values (1, null);
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
select * into outfile 't1.data' from t1; select * into outfile 't1.data' from t1;
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
load data infile 't1.data' replace into table t1; load data infile 't1.data' replace into table t1;
select * from t1; select * from t1;
drop table t1; drop table t1;

View File

@ -13,6 +13,7 @@ set LOCAL query_cache_type=ON;
drop database if exists MySQLtesT; drop database if exists MySQLtesT;
--enable_warnings --enable_warnings
--disable_cursor_protocol
create database MySQLtesT; create database MySQLtesT;
create table MySQLtesT.t1 (a int); create table MySQLtesT.t1 (a int);
select * from MySQLtesT.t1; select * from MySQLtesT.t1;
@ -30,6 +31,7 @@ disable_result_log;
select * from MySQL.db; select * from MySQL.db;
enable_result_log; enable_result_log;
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
--enable_cursor_protocol
set GLOBAL query_cache_size=@save_query_cache_size; set GLOBAL query_cache_size=@save_query_cache_size;
set GLOBAL query_cache_type=default; set GLOBAL query_cache_type=default;

View File

@ -10,12 +10,14 @@
# different connections simultaneously, to force queueing occurs. # different connections simultaneously, to force queueing occurs.
# Verify connections are intact, even if queueing time exceeds wait_timeout # Verify connections are intact, even if queueing time exceeds wait_timeout
--disable_cursor_protocol
SELECT SELECT
@@global.wait_timeout, @@global.thread_pool_max_threads, @@global.thread_pool_size, @@global.wait_timeout, @@global.thread_pool_max_threads, @@global.thread_pool_size,
@@global.thread_pool_oversubscribe, @@global.thread_pool_stall_limit @@global.thread_pool_oversubscribe, @@global.thread_pool_stall_limit
INTO INTO
@_wait_timeout,@_thread_pool_max_threads,@_thread_pool_size, @_wait_timeout,@_thread_pool_max_threads,@_thread_pool_size,
@_thread_pool_oversubscribe,@_thread_pool_stall_limit; @_thread_pool_oversubscribe,@_thread_pool_stall_limit;
--enable_cursor_protocol
SET @@global.wait_timeout=1, SET @@global.wait_timeout=1,
@@global.thread_pool_max_threads=2, @@global.thread_pool_max_threads=2,

View File

@ -48,10 +48,12 @@ let $wait_condition=
INFO = "INSERT INTO t1(id) SELECT id FROM t2"; INFO = "INSERT INTO t1(id) SELECT id FROM t2";
--source include/wait_condition.inc --source include/wait_condition.inc
--disable_cursor_protocol
SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST
WHERE STATE = 'wait_in_enable_indexes' AND WHERE STATE = 'wait_in_enable_indexes' AND
INFO = "INSERT INTO t1(id) SELECT id FROM t2" INFO = "INSERT INTO t1(id) SELECT id FROM t2"
INTO @thread_id; INTO @thread_id;
--enable_cursor_protocol
KILL QUERY @thread_id; KILL QUERY @thread_id;
CHECK TABLE t1; CHECK TABLE t1;

View File

@ -81,8 +81,10 @@ drop table t6;
# type to avoid Inno's column-number limits (~1000 columns) etc. # type to avoid Inno's column-number limits (~1000 columns) etc.
# Here because it needs Inno-engine. # Here because it needs Inno-engine.
--disable_cursor_protocol
SELECT @@global.default_storage_engine INTO @old_engine; SELECT @@global.default_storage_engine INTO @old_engine;
SET GLOBAL default_storage_engine=InnoDB; SET GLOBAL default_storage_engine=InnoDB;
--enable_cursor_protocol
--disable_query_log --disable_query_log
CREATE TABLE `t1` ( CREATE TABLE `t1` (

View File

@ -326,7 +326,10 @@ SELECT NOT NOT NULLIF(2,3);
CREATE TABLE t1 (a YEAR(2)); CREATE TABLE t1 (a YEAR(2));
INSERT INTO t1 VALUES (0); INSERT INTO t1 VALUES (0);
SELECT a,NULLIF(a,2000),NULLIF(2000,a) FROM t1; 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; SELECT a,NULLIF(a,2001),NULLIF(2001,a) FROM t1;
--enable_cursor_protocol
DROP TABLE t1; DROP TABLE t1;
--echo # --echo #

View File

@ -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; LEFT JOIN t3 ON t2.b=t3.b;
FLUSH STATUS ; FLUSH STATUS ;
--disable_ps2_protocol --disable_ps2_protocol
--disable_cursor_protocol
SELECT SQL_CALC_FOUND_ROWS * FROM t1 LEFT JOIN t2 ON t1.a=t2.a SELECT SQL_CALC_FOUND_ROWS * FROM t1 LEFT JOIN t2 ON t1.a=t2.a
LEFT JOIN t3 ON t2.b=t3.b; LEFT JOIN t3 ON t2.b=t3.b;
--disable_view_protocol --disable_view_protocol
SELECT FOUND_ROWS(); SELECT FOUND_ROWS();
--enable_cursor_protocol
SHOW STATUS LIKE "handler_read%"; SHOW STATUS LIKE "handler_read%";
--enable_view_protocol --enable_view_protocol
--enable_ps2_protocol --enable_ps2_protocol

View File

@ -832,7 +832,10 @@ eval set @tmp_tables_before =
CAST(REPLACE('$q', 'Created_tmp_tables', '') AS UNSIGNED); CAST(REPLACE('$q', 'Created_tmp_tables', '') AS UNSIGNED);
--enable_query_log --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; 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 # this query creates one temporary table in itself, which we are not
# interested in. # interested in.
@ -854,7 +857,10 @@ eval set @tmp_tables_before =
CAST(REPLACE('$q', 'Created_tmp_tables', '') AS UNSIGNED); CAST(REPLACE('$q', 'Created_tmp_tables', '') AS UNSIGNED);
--enable_query_log --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; SELECT a FROM t1 IGNORE INDEX FOR ORDER BY (a, ab) ORDER BY a;
--enable_cursor_protocol
--disable_query_log --disable_query_log
--let $q = `show status like 'Created_tmp_tables';` --let $q = `show status like 'Created_tmp_tables';`
@ -1884,6 +1890,7 @@ insert into t1
analyze table t1; analyze table t1;
--enable_result_log --enable_result_log
--disable_cursor_protocol
--disable_view_protocol --disable_view_protocol
--disable_ps2_protocol --disable_ps2_protocol
explain explain
@ -1907,6 +1914,7 @@ select b, count(*) num_cnt from t1
show status like '%Handler_read%'; show status like '%Handler_read%';
--enable_ps2_protocol --enable_ps2_protocol
--enable_view_protocol --enable_view_protocol
--enable_cursor_protocol
drop table t0, t1; drop table t0, t1;

View File

@ -145,16 +145,20 @@ set sort_buffer_size= 2097152;
--source include/analyze-format.inc --source include/analyze-format.inc
eval ANALYZE FORMAT=JSON SELECT id, names, address FROM t3 ORDER BY names, address; eval ANALYZE FORMAT=JSON SELECT id, names, address FROM t3 ORDER BY names, address;
flush status; flush status;
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
evalp SELECT id, names, address INTO OUTFILE '$file1' FROM t3 ORDER BY names, address; evalp SELECT id, names, address INTO OUTFILE '$file1' FROM t3 ORDER BY names, address;
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
--echo # Sort_merge_passes should be 0 --echo # Sort_merge_passes should be 0
show status like '%sort%'; show status like '%sort%';
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
evalp SELECT id, names, address INTO OUTFILE '$file2' FROM t3 FORCE INDEX(idx) ORDER BY names, address; evalp SELECT id, names, address INTO OUTFILE '$file2' FROM t3 FORCE INDEX(idx) ORDER BY names, address;
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
diff_files $file1 $file2; diff_files $file1 $file2;
@ -171,9 +175,11 @@ set sort_buffer_size= 1097152;
--source include/analyze-format.inc --source include/analyze-format.inc
eval ANALYZE FORMAT=JSON SELECT id, names, address FROM t3 ORDER BY names, address; eval ANALYZE FORMAT=JSON SELECT id, names, address FROM t3 ORDER BY names, address;
flush status; flush status;
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
evalp SELECT id, names, address INTO OUTFILE '$file1' FROM t3 ORDER BY names, address; evalp SELECT id, names, address INTO OUTFILE '$file1' FROM t3 ORDER BY names, address;
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
--echo # Sort_merge_passes should be 0 --echo # Sort_merge_passes should be 0
show status like '%sort%'; show status like '%sort%';

View File

@ -21,29 +21,41 @@ drop table if exists t1;
create table t1 (`a` blob); create table t1 (`a` blob);
insert into t1 values("hello world"),("Hello mars"),(NULL); insert into t1 values("hello world"),("Hello mars"),(NULL);
disable_query_log; disable_query_log;
--disable_cursor_protocol
eval select * into outfile "../../tmp/outfile-test.1" from t1; eval select * into outfile "../../tmp/outfile-test.1" from t1;
--enable_cursor_protocol
enable_query_log; enable_query_log;
select load_file(concat(@tmpdir,"/outfile-test.1")); select load_file(concat(@tmpdir,"/outfile-test.1"));
disable_query_log; disable_query_log;
--disable_cursor_protocol
eval select * into dumpfile "../../tmp/outfile-test.2" from t1 limit 1; eval select * into dumpfile "../../tmp/outfile-test.2" from t1 limit 1;
--enable_cursor_protocol
enable_query_log; enable_query_log;
select load_file(concat(@tmpdir,"/outfile-test.2")); select load_file(concat(@tmpdir,"/outfile-test.2"));
disable_query_log; disable_query_log;
--disable_cursor_protocol
eval select * into dumpfile "../../tmp/outfile-test.3" from t1 where a is null; eval select * into dumpfile "../../tmp/outfile-test.3" from t1 where a is null;
--enable_cursor_protocol
enable_query_log; enable_query_log;
select load_file(concat(@tmpdir,"/outfile-test.3")); select load_file(concat(@tmpdir,"/outfile-test.3"));
# the following should give errors # the following should give errors
disable_query_log; disable_query_log;
--disable_cursor_protocol
--error ER_FILE_EXISTS_ERROR --error ER_FILE_EXISTS_ERROR
eval select * into outfile "../../tmp/outfile-test.1" from t1; eval select * into outfile "../../tmp/outfile-test.1" from t1;
--enable_cursor_protocol
--disable_cursor_protocol
--error ER_FILE_EXISTS_ERROR --error ER_FILE_EXISTS_ERROR
eval select * into dumpfile "../../tmp/outfile-test.2" from t1; eval select * into dumpfile "../../tmp/outfile-test.2" from t1;
--enable_cursor_protocol
--disable_cursor_protocol
--error ER_FILE_EXISTS_ERROR --error ER_FILE_EXISTS_ERROR
eval select * into dumpfile "../../tmp/outfile-test.3" from t1; eval select * into dumpfile "../../tmp/outfile-test.3" from t1;
--enable_cursor_protocol
enable_query_log; enable_query_log;
select load_file(concat(@tmpdir,"/outfile-test.not-exist")); select load_file(concat(@tmpdir,"/outfile-test.not-exist"));
--remove_file $MYSQLTEST_VARDIR/tmp/outfile-test.1 --remove_file $MYSQLTEST_VARDIR/tmp/outfile-test.1
@ -53,7 +65,9 @@ drop table t1;
# Bug#8191 SELECT INTO OUTFILE insists on FROM clause # Bug#8191 SELECT INTO OUTFILE insists on FROM clause
disable_query_log; disable_query_log;
--disable_cursor_protocol
eval select 1 into outfile "../../tmp/outfile-test.4"; eval select 1 into outfile "../../tmp/outfile-test.4";
--enable_cursor_protocol
enable_query_log; enable_query_log;
select load_file(concat(@tmpdir,"/outfile-test.4")); select load_file(concat(@tmpdir,"/outfile-test.4"));
--remove_file $MYSQLTEST_VARDIR/tmp/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 # Bug#13202 SELECT * INTO OUTFILE ... FROM information_schema.schemata now fails
# #
disable_query_log; disable_query_log;
--disable_cursor_protocol
eval SELECT * INTO OUTFILE "../../tmp/outfile-test.4" eval SELECT * INTO OUTFILE "../../tmp/outfile-test.4"
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
FROM information_schema.schemata LIMIT 0, 5; FROM information_schema.schemata LIMIT 0, 5;
--enable_cursor_protocol
# enable_query_log; # enable_query_log;
--remove_file $MYSQLTEST_VARDIR/tmp/outfile-test.4 --remove_file $MYSQLTEST_VARDIR/tmp/outfile-test.4
use information_schema; use information_schema;
# disable_query_log; # disable_query_log;
--disable_cursor_protocol
eval SELECT * INTO OUTFILE "../../tmp/outfile-test.4" eval SELECT * INTO OUTFILE "../../tmp/outfile-test.4"
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
FROM schemata LIMIT 0, 5; FROM schemata LIMIT 0, 5;
--enable_cursor_protocol
enable_query_log; enable_query_log;
--remove_file $MYSQLTEST_VARDIR/tmp/outfile-test.4 --remove_file $MYSQLTEST_VARDIR/tmp/outfile-test.4
use test; use test;
@ -97,8 +115,10 @@ use test;
# It should not be possible to write to a file outside of vardir # It should not be possible to write to a file outside of vardir
create table t1(a int); create table t1(a int);
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
--disable_cursor_protocol
--error ER_OPTION_PREVENTS_STATEMENT --error ER_OPTION_PREVENTS_STATEMENT
eval select * into outfile "$MYSQL_TEST_DIR/outfile-test1" from t1; eval select * into outfile "$MYSQL_TEST_DIR/outfile-test1" from t1;
--enable_cursor_protocol
drop table t1; drop table t1;
# #
@ -110,6 +130,7 @@ create user user_1@localhost;
grant all on mysqltest.* to user_1@localhost; grant all on mysqltest.* to user_1@localhost;
connect (con28181_1,localhost,user_1,,mysqltest); connect (con28181_1,localhost,user_1,,mysqltest);
--disable_cursor_protocol
--error ER_ACCESS_DENIED_ERROR --error ER_ACCESS_DENIED_ERROR
eval select schema_name eval select schema_name
into outfile "../../tmp/outfile-test.4" into outfile "../../tmp/outfile-test.4"
@ -117,18 +138,21 @@ fields terminated by ',' optionally enclosed by '"'
lines terminated by '\n' lines terminated by '\n'
from information_schema.schemata from information_schema.schemata
where schema_name like 'mysqltest'; where schema_name like 'mysqltest';
--enable_cursor_protocol
connection default; connection default;
disconnect con28181_1; disconnect con28181_1;
grant file on *.* to user_1@localhost; grant file on *.* to user_1@localhost;
connect (con28181_2,localhost,user_1,,mysqltest); connect (con28181_2,localhost,user_1,,mysqltest);
--disable_cursor_protocol
eval select schema_name eval select schema_name
into outfile "../../tmp/outfile-test.4" into outfile "../../tmp/outfile-test.4"
fields terminated by ',' optionally enclosed by '"' fields terminated by ',' optionally enclosed by '"'
lines terminated by '\n' lines terminated by '\n'
from information_schema.schemata from information_schema.schemata
where schema_name like 'mysqltest'; where schema_name like 'mysqltest';
--enable_cursor_protocol
connection default; connection default;
disconnect con28181_2; disconnect con28181_2;

View File

@ -15,7 +15,9 @@ INSERT INTO t1 VALUES (101, 202, '-r-', '=raker=');
--echo # $clauses, warning: --echo # $clauses, warning:
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--disable_cursor_protocol
--eval SELECT $fields INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/bug31663.txt' $clauses FROM t1 --eval SELECT $fields INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/bug31663.txt' $clauses FROM t1
--enable_cursor_protocol
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--eval SELECT LOAD_FILE('$MYSQLTEST_VARDIR/tmp/bug31663.txt') as exp --eval SELECT LOAD_FILE('$MYSQLTEST_VARDIR/tmp/bug31663.txt') as exp
--eval CREATE TABLE t2 SELECT $fields FROM t1 --eval CREATE TABLE t2 SELECT $fields FROM t1
@ -30,7 +32,9 @@ DROP TABLE t2;
--echo # Only numeric fields, $clauses, no warnings: --echo # Only numeric fields, $clauses, no warnings:
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--disable_cursor_protocol
--eval SELECT $fields INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/bug31663.txt' $clauses FROM t1 --eval SELECT $fields INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/bug31663.txt' $clauses FROM t1
--enable_cursor_protocol
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--eval SELECT LOAD_FILE('$MYSQLTEST_VARDIR/tmp/bug31663.txt') as exp --eval SELECT LOAD_FILE('$MYSQLTEST_VARDIR/tmp/bug31663.txt') as exp
--eval CREATE TABLE t2 SELECT $fields FROM t1 --eval CREATE TABLE t2 SELECT $fields FROM t1
@ -45,7 +49,9 @@ DROP TABLE t2;
--echo # $clauses, warning: --echo # $clauses, warning:
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--disable_cursor_protocol
--eval SELECT $fields INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/bug31663.txt' $clauses FROM t1 --eval SELECT $fields INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/bug31663.txt' $clauses FROM t1
--enable_cursor_protocol
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--eval SELECT LOAD_FILE('$MYSQLTEST_VARDIR/tmp/bug31663.txt') as exp --eval SELECT LOAD_FILE('$MYSQLTEST_VARDIR/tmp/bug31663.txt') as exp
--eval CREATE TABLE t2 SELECT $fields FROM t1 --eval CREATE TABLE t2 SELECT $fields FROM t1
@ -60,7 +66,9 @@ DROP TABLE t2;
--echo # $clauses, warning: --echo # $clauses, warning:
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--disable_cursor_protocol
--eval SELECT $fields INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/bug31663.txt' $clauses FROM t1 --eval SELECT $fields INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/bug31663.txt' $clauses FROM t1
--enable_cursor_protocol
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--eval SELECT LOAD_FILE('$MYSQLTEST_VARDIR/tmp/bug31663.txt') as exp --eval SELECT LOAD_FILE('$MYSQLTEST_VARDIR/tmp/bug31663.txt') as exp
--eval CREATE TABLE t2 SELECT $fields FROM t1 --eval CREATE TABLE t2 SELECT $fields FROM t1
@ -75,7 +83,9 @@ DROP TABLE t2;
--echo # Only string fields, $clauses, no warnings: --echo # Only string fields, $clauses, no warnings:
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--disable_cursor_protocol
--eval SELECT $fields INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/bug31663.txt' $clauses FROM t1 --eval SELECT $fields INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/bug31663.txt' $clauses FROM t1
--enable_cursor_protocol
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--eval SELECT LOAD_FILE('$MYSQLTEST_VARDIR/tmp/bug31663.txt') as exp --eval SELECT LOAD_FILE('$MYSQLTEST_VARDIR/tmp/bug31663.txt') as exp
--eval CREATE TABLE t2 SELECT $fields FROM t1 --eval CREATE TABLE t2 SELECT $fields FROM t1
@ -98,7 +108,9 @@ SELECT HEX(c1) FROM t1;
--let $file=$MYSQLTEST_VARDIR/tmp/bug32533.txt --let $file=$MYSQLTEST_VARDIR/tmp/bug32533.txt
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--disable_cursor_protocol
--eval SELECT * INTO OUTFILE '$file' FIELDS ENCLOSED BY 0xC3 FROM t1 --eval SELECT * INTO OUTFILE '$file' FIELDS ENCLOSED BY 0xC3 FROM t1
--enable_cursor_protocol
TRUNCATE t1; TRUNCATE t1;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --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 --echo # Error on multi-character ENCLOSED/ESCAPED BY
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--disable_cursor_protocol
--error 1083 --error 1083
--eval SELECT * FROM t1 INTO OUTFILE '$file' FIELDS ENCLOSED BY '12345' --eval SELECT * FROM t1 INTO OUTFILE '$file' FIELDS ENCLOSED BY '12345'
--enable_cursor_protocol
--remove_file $file --remove_file $file
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--disable_cursor_protocol
--error 1083 --error 1083
--eval SELECT * FROM t1 INTO OUTFILE '$file' FIELDS ESCAPED BY '12345' --eval SELECT * FROM t1 INTO OUTFILE '$file' FIELDS ESCAPED BY '12345'
--enable_cursor_protocol
--remove_file $file --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 --echo # LOAD DATA rises error or has unpredictable result -- to be fixed later
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--disable_cursor_protocol
--eval SELECT * FROM t1 INTO OUTFILE '$file' FIELDS ENCLOSED BY 'ъ' --eval SELECT * FROM t1 INTO OUTFILE '$file' FIELDS ENCLOSED BY 'ъ'
--enable_cursor_protocol
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--error 1083 # backward compatibility --error 1083 # backward compatibility
--eval LOAD DATA INFILE '$file' INTO TABLE t2 CHARACTER SET binary FIELDS ENCLOSED BY 'ъ' --eval LOAD DATA INFILE '$file' INTO TABLE t2 CHARACTER SET binary FIELDS ENCLOSED BY 'ъ'
--remove_file $file --remove_file $file
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--disable_cursor_protocol
--eval SELECT * FROM t1 INTO OUTFILE '$file' FIELDS ESCAPED BY 'ъ' --eval SELECT * FROM t1 INTO OUTFILE '$file' FIELDS ESCAPED BY 'ъ'
--enable_cursor_protocol
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--error 1083 # backward compatibility --error 1083 # backward compatibility
--eval LOAD DATA INFILE '$file' INTO TABLE t2 CHARACTER SET binary FIELDS ESCAPED BY 'ъ' --eval LOAD DATA INFILE '$file' INTO TABLE t2 CHARACTER SET binary FIELDS ESCAPED BY 'ъ'
--remove_file $file --remove_file $file
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--disable_cursor_protocol
--eval SELECT * FROM t1 INTO OUTFILE '$file' FIELDS TERMINATED BY 'ъ' --eval SELECT * FROM t1 INTO OUTFILE '$file' FIELDS TERMINATED BY 'ъ'
--enable_cursor_protocol
--echo ################################################## --echo ##################################################
--cat_file $file --cat_file $file
--echo ################################################## --echo ##################################################
@ -174,7 +196,9 @@ SELECT * FROM t1;
SELECT * FROM t2; SELECT * FROM t2;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--disable_cursor_protocol
--eval SELECT * FROM t1 INTO OUTFILE '$file' LINES STARTING BY 'ъ' --eval SELECT * FROM t1 INTO OUTFILE '$file' LINES STARTING BY 'ъ'
--enable_cursor_protocol
--echo ################################################## --echo ##################################################
--cat_file $file --cat_file $file
--echo ################################################## --echo ##################################################
@ -185,7 +209,9 @@ TRUNCATE t2;
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c; SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--disable_cursor_protocol
--eval SELECT * FROM t1 INTO OUTFILE '$file' LINES TERMINATED BY 'ъ' --eval SELECT * FROM t1 INTO OUTFILE '$file' LINES TERMINATED BY 'ъ'
--enable_cursor_protocol
--echo ################################################## --echo ##################################################
--cat_file $file --cat_file $file
--echo ################################################## --echo ##################################################
@ -200,7 +226,9 @@ SELECT * FROM t2;
--echo # Default (binary) charset: --echo # Default (binary) charset:
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--disable_cursor_protocol
--eval SELECT * INTO OUTFILE '$file' FROM t1 --eval SELECT * INTO OUTFILE '$file' FROM t1
--enable_cursor_protocol
--echo ################################################## --echo ##################################################
--cat_file $file --cat_file $file
--echo ################################################## --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): --echo # latin1 charset (INTO OUTFILE warning is expected):
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--disable_cursor_protocol
--eval SELECT * INTO OUTFILE '$file' CHARACTER SET latin1 FROM t1 --eval SELECT * INTO OUTFILE '$file' CHARACTER SET latin1 FROM t1
--enable_cursor_protocol
--echo ################################################## --echo ##################################################
--cat_file $file --cat_file $file
--echo ################################################## --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): --echo # KOI8-R charset (INTO OUTFILE warning is expected):
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--disable_cursor_protocol
--eval SELECT * INTO OUTFILE '$file' CHARACTER SET koi8r FROM t1 --eval SELECT * INTO OUTFILE '$file' CHARACTER SET koi8r FROM t1
--enable_cursor_protocol
--echo ################################################## --echo ##################################################
--cat_file $file --cat_file $file
--echo ################################################## --echo ##################################################
@ -242,7 +274,9 @@ SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
--echo # UTF-8 charset: --echo # UTF-8 charset:
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--disable_cursor_protocol
--eval SELECT * INTO OUTFILE '$file' CHARACTER SET utf8 FROM t1 --eval SELECT * INTO OUTFILE '$file' CHARACTER SET utf8 FROM t1
--enable_cursor_protocol
--echo ################################################## --echo ##################################################
--cat_file $file --cat_file $file
--echo ################################################## --echo ##################################################
@ -274,7 +308,9 @@ let $length= 800;
--eval INSERT INTO t1 VALUES (REPEAT('.', $length)) --eval INSERT INTO t1 VALUES (REPEAT('.', $length))
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--disable_cursor_protocol
--eval SELECT * INTO OUTFILE $file CHARACTER SET latin1 FROM t1 --eval SELECT * INTO OUTFILE $file CHARACTER SET latin1 FROM t1
--enable_cursor_protocol
--echo # should be greater than $length --echo # should be greater than $length
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR

View File

@ -896,6 +896,7 @@ SELECT 1 FROM t1 UNION SELECT 1 FROM t1 ORDER BY 1 LIMIT 1 FOR UPDATE;
--echo # "INTO" clause tests --echo # "INTO" clause tests
--disable_cursor_protocol
SELECT 1 FROM t1 INTO @var17727401; SELECT 1 FROM t1 INTO @var17727401;
SELECT 1 FROM DUAL INTO @var17727401; SELECT 1 FROM DUAL INTO @var17727401;
SELECT 1 INTO @var17727401; SELECT 1 INTO @var17727401;
@ -940,6 +941,7 @@ SELECT 1 INTO @var17727401 FROM t1 PROCEDURE ANALYSE();
--error ER_PARSE_ERROR --error ER_PARSE_ERROR
SELECT 1 FROM t1 PROCEDURE ANALYSE() INTO @var17727401; SELECT 1 FROM t1 PROCEDURE ANALYSE() INTO @var17727401;
--enable_cursor_protocol
--echo # ORDER and LIMIT clause combinations --echo # ORDER and LIMIT clause combinations

View File

@ -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); EXPLAIN PARTITIONS SELECT c1 FROM t1 WHERE (c1 > 10 AND c1 < 13) OR (c1 > 17 AND c1 < 20);
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
FLUSH STATUS; FLUSH STATUS;
SELECT c1 FROM t1 WHERE (c1 > 10 AND c1 < 13) OR (c1 > 17 AND c1 < 20); 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_%'; SHOW STATUS LIKE 'Handler_read_%';
DROP TABLE t1,t2; DROP TABLE t1,t2;
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
# Bug#37329 Range scan on partitioned tables shows higher Handler_read_next # Bug#37329 Range scan on partitioned tables shows higher Handler_read_next
# (marked as duplicate of Bug#35931) # (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); EXPLAIN PARTITIONS SELECT c1 FROM t1 WHERE (c1 > 2 AND c1 < 5);
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
FLUSH STATUS; FLUSH STATUS;
SELECT c1 FROM t1 WHERE (c1 > 2 AND c1 < 5); 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_%'; SHOW STATUS LIKE 'Handler_read_%';
DROP TABLE t1,t2; DROP TABLE t1,t2;
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED --error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
create table t1 (a int) partition by list ((a/3)*10 div 1) create table t1 (a int) partition by list ((a/3)*10 div 1)

View File

@ -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 general_log RENAME TO gl_nonpartitioned;
ALTER TABLE gl_partitioned RENAME TO general_log; ALTER TABLE gl_partitioned RENAME TO general_log;
--disable_cursor_protocol
SELECT @@global.log_output INTO @old_glo; SELECT @@global.log_output INTO @old_glo;
--enable_cursor_protocol
SET GLOBAL log_output='table'; SET GLOBAL log_output='table';
SET GLOBAL general_log =1; SET GLOBAL general_log =1;

View File

@ -9,6 +9,7 @@ WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
--echo # --echo #
--echo # Bug#13559657: PARTITION SELECTION DOES NOT WORK WITH VIEWS --echo # Bug#13559657: PARTITION SELECTION DOES NOT WORK WITH VIEWS
--echo # --echo #
--disable_cursor_protocol
--disable_view_protocol --disable_view_protocol
--disable_ps2_protocol --disable_ps2_protocol
CREATE TABLE t1 (a int) CREATE TABLE t1 (a int)
@ -623,6 +624,7 @@ SELECT * FROM t3 PARTITION (pNeg);
DROP TABLE t1, t2, t3; DROP TABLE t1, t2, t3;
--enable_ps2_protocol --enable_ps2_protocol
--enable_view_protocol --enable_view_protocol
--enable_cursor_protocol
--echo # Test from superseeded WL# 2682 --echo # Test from superseeded WL# 2682
# Partition select tests. # Partition select tests.
# #

View File

@ -87,7 +87,9 @@ UNINSTALL PLUGIN example;
# #
INSTALL PLUGIN example SONAME 'ha_example'; INSTALL PLUGIN example SONAME 'ha_example';
--disable_cursor_protocol
select @@session.sql_mode into @old_sql_mode; select @@session.sql_mode into @old_sql_mode;
--enable_cursor_protocol
# first, try normal sql_mode (no error, send OK) # first, try normal sql_mode (no error, send OK)
set session sql_mode=''; set session sql_mode='';

View File

@ -66,7 +66,10 @@ set debug_sync='reset';
SET NAMES utf8; SET NAMES utf8;
--vertical_results --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%'; SELECT INFO, INFO_BINARY, 'xxx😎yyy' AS utf8mb4_string FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO LIKE '%xxx%yyy%';
--enable_cursor_protocol
--horizontal_results --horizontal_results
--echo # --echo #

View File

@ -2002,7 +2002,10 @@ prepare stmt from "create view v1 as select * from `t1` `b`";
prepare stmt from "select ?"; prepare stmt from "select ?";
set @arg= 123456789.987654321; set @arg= 123456789.987654321;
#Enable after fix MDEV-31495
--disable_cursor_protocol
select @arg; select @arg;
--enable_cursor_protocol
execute stmt using @arg; execute stmt using @arg;
set @arg= "string"; set @arg= "string";
select @arg; select @arg;
@ -2011,7 +2014,10 @@ set @arg= 123456;
select @arg; select @arg;
execute stmt using @arg; execute stmt using @arg;
set @arg= cast(-12345.54321 as decimal(20, 10)); set @arg= cast(-12345.54321 as decimal(20, 10));
#Enable after fix MDEV-31495
--disable_cursor_protocol
select @arg; select @arg;
--enable_cursor_protocol
execute stmt using @arg; execute stmt using @arg;
deallocate prepare stmt; deallocate prepare stmt;
@ -3335,6 +3341,8 @@ SELECT @x_str_1, @x_int_1, @x_int_2, @x_int_3;
--echo --echo
--echo -- Testing decs... --echo -- Testing decs...
#Enable after fix MDEV-31495
--disable_cursor_protocol
--echo --echo
EXECUTE stmt_dec USING @x_int_1, @x_dec_1, @x_dec_2, @x_dec_3; 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; 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 --echo
EXECUTE stmt_dec USING @x_int_1, @x_dec_1, @x_dec_2, @x_dec_3; 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; SELECT @x_int_1, @x_dec_1, @x_dec_2, @x_dec_3;
--enable_cursor_protocol
--echo --echo
DEALLOCATE PREPARE stmt_str; DEALLOCATE PREPARE stmt_str;
@ -3574,7 +3583,9 @@ execute st;
show status like '%Handler_read%'; show status like '%Handler_read%';
flush status; flush status;
--disable_ps2_protocol --disable_ps2_protocol
--disable_cursor_protocol
select * from t1 use index() where a=3; select * from t1 use index() where a=3;
--enable_cursor_protocol
show status like '%Handler_read%'; show status like '%Handler_read%';
--enable_ps2_protocol --enable_ps2_protocol
flush status; flush status;

View File

@ -21,6 +21,7 @@ SET LOCAL query_cache_type= ON;
# Reset query cache variables. # Reset query cache variables.
--disable_cursor_protocol
flush query cache; # This crashed in some versions flush query cache; # This crashed in some versions
flush query cache; # This crashed in some versions flush query cache; # This crashed in some versions
reset query cache; reset query cache;
@ -1802,6 +1803,7 @@ SELECT foo( LAST_INSERT_ID() ) from t1;
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
DROP FUNCTION foo; DROP FUNCTION foo;
drop table t1; drop table t1;
--enable_cursor_protocol
--echo # --echo #
--echo # MDEV-33861: main.query_cache fails with embedded after --echo # MDEV-33861: main.query_cache fails with embedded after

View File

@ -94,7 +94,9 @@ connection con1;
--reap --reap
SHOW STATUS LIKE "Qcache_queries_in_cache"; SHOW STATUS LIKE "Qcache_queries_in_cache";
--echo # Test that it's cacheable --echo # Test that it's cacheable
--disable_cursor_protocol
SELECT * FROM t1; SELECT * FROM t1;
--enable_cursor_protocol
SHOW STATUS LIKE "Qcache_queries_in_cache"; SHOW STATUS LIKE "Qcache_queries_in_cache";
disconnect con1; disconnect con1;

View File

@ -20,7 +20,9 @@ create table t2 ( t2id int unsigned, id int unsigned, primary key(t2id, id), for
--disable_view_protocol --disable_view_protocol
insert into t1 values (1); insert into t1 values (1);
insert into t2 values (1,1); insert into t2 values (1,1);
--disable_cursor_protocol
select * from t2; select * from t2;
--enable_cursor_protocol
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
delete from t1; 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 `t1$ї` values (1);
insert into `t2$ї`values (1,1); insert into `t2$ї`values (1,1);
--disable_cursor_protocol
select * from `t2$ї`; select * from `t2$ї`;
--enable_cursor_protocol
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
delete from `t1$ї`; 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-1` values (1);
insert into `#mysql50#t-2`values (1,1); insert into `#mysql50#t-2`values (1,1);
--disable_cursor_protocol
select * from `#mysql50#t-2`; select * from `#mysql50#t-2`;
--enable_cursor_protocol
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
delete from `#mysql50#t-1`; delete from `#mysql50#t-1`;

View File

@ -40,6 +40,7 @@ while ($1)
# #
--disable_ps2_protocol --disable_ps2_protocol
--disable_view_protocol --disable_view_protocol
--disable_cursor_protocol
set @save_table_definition_cache= @@global.table_definition_cache; set @save_table_definition_cache= @@global.table_definition_cache;
set @@global.table_definition_cache=512; 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; 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.query_cache_size=0;
set @@global.table_definition_cache=@save_table_definition_cache; set @@global.table_definition_cache=@save_table_definition_cache;
--enable_cursor_protocol
--enable_view_protocol --enable_view_protocol
--enable_ps2_protocol --enable_ps2_protocol
@ -88,8 +90,10 @@ eval CREATE TABLE t0 (a INT) ENGINE=MERGE UNION($str);
SET GLOBAL query_cache_size = 1048576; SET GLOBAL query_cache_size = 1048576;
FLUSH STATUS; FLUSH STATUS;
--disable_view_protocol --disable_view_protocol
--disable_cursor_protocol
SELECT a FROM t0 WHERE a = 1; SELECT a FROM t0 WHERE a = 1;
SHOW STATUS LIKE "Qcache_queries_in_cache"; SHOW STATUS LIKE "Qcache_queries_in_cache";
--enable_cursor_protocol
--enable_view_protocol --enable_view_protocol
let $c= 255; let $c= 255;

View File

@ -26,6 +26,7 @@ drop table if exists t1, t2, t3, t11, t21;
# #
# FLUSH QUERY CACHE # FLUSH QUERY CACHE
# #
--disable_cursor_protocol
create table t1 (a int not null); create table t1 (a int not null);
insert into t1 values (1),(2),(3); insert into t1 values (1),(2),(3);
create table t2 (a int not null); create table t2 (a int not null);
@ -85,6 +86,7 @@ flush query cache;
show status like "Qcache_total_blocks"; show status like "Qcache_total_blocks";
show status like "Qcache_free_blocks"; show status like "Qcache_free_blocks";
drop table t1, t2, t3, t11, t21; drop table t1, t2, t3, t11, t21;
--enable_cursor_protocol
# #
# do not use QC if tables locked (Bug#12385) # do not use QC if tables locked (Bug#12385)
@ -114,6 +116,7 @@ disconnect root2;
# improved to also test Bug#3583 and Bug#12990 # improved to also test Bug#3583 and Bug#12990
# #
--disable_ps2_protocol --disable_ps2_protocol
--disable_cursor_protocol
flush query cache; flush query cache;
reset query cache; reset query cache;
flush status; flush status;
@ -186,6 +189,7 @@ call f1();
call f3(); call f3();
call f3(); call f3();
call f1(); call f1();
--enable_cursor_protocol
drop procedure f1; drop procedure f1;
drop procedure f2; 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 # Bug #30269 Query cache eats memory
# #
--disable_cursor_protocol
--disable_warnings --disable_warnings
DROP DATABASE IF EXISTS bug30269; DROP DATABASE IF EXISTS bug30269;
--enable_warnings --enable_warnings
@ -269,6 +274,7 @@ SELECT id FROM test1 WHERE id>2;
show status like 'Qcache_queries_in_cache'; show status like 'Qcache_queries_in_cache';
SELECT id FROM view1 WHERE id>2; SELECT id FROM view1 WHERE id>2;
show status like 'Qcache_queries_in_cache'; show status like 'Qcache_queries_in_cache';
--enable_cursor_protocol
connection default; connection default;
USE test; USE test;

View File

@ -18,6 +18,7 @@ set GLOBAL query_cache_size=1355776;
flush status; flush status;
create table t1 (a int, b int); create table t1 (a int, b int);
--disable_cursor_protocol
# queries with following views should not be in query cache # 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 v1 (c,d) as select sql_no_cache a,b from t1;
create view v2 (c,d) as select a+rand(),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; drop view v1;
set query_cache_type=default; set query_cache_type=default;
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
drop table t1; drop table t1;
@ -110,6 +112,7 @@ drop table t1;
# #
# BUG#15119: returning temptable view from the query cache. # BUG#15119: returning temptable view from the query cache.
# #
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
flush status; flush status;
create table t1 (a int, b int); create table t1 (a int, b int);
@ -137,6 +140,7 @@ show status like "Qcache_inserts";
show status like "Qcache_hits"; show status like "Qcache_hits";
drop table t1; drop table t1;
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
--echo # --echo #
--echo # Bug46615 Assertion in Query_cache::invalidate in INSERT in a VIEW of a MERGE table --echo # Bug46615 Assertion in Query_cache::invalidate in INSERT in a VIEW of a MERGE table

View File

@ -698,6 +698,7 @@ DROP INDEX CityName on City;
CREATE INDEX Name ON City(Name); CREATE INDEX Name ON City(Name);
CREATE INDEX Population ON City(Population); CREATE INDEX Population ON City(Population);
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
--disable_view_protocol --disable_view_protocol
--replace_column 9 # --replace_column 9 #
@ -761,6 +762,7 @@ ORDER BY Population LIMIT 5;
SHOW STATUS LIKE 'Handler_read_%'; SHOW STATUS LIKE 'Handler_read_%';
--enable_view_protocol --enable_view_protocol
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
set optimizer_switch=@save_optimizer_switch; set optimizer_switch=@save_optimizer_switch;

View File

@ -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';
select wss_type from t1 where wss_type =102935229216544093; select wss_type from t1 where wss_type =102935229216544093;
drop table t1; drop table t1;
--disable_cursor_protocol
select 1+2,"aaaa",3.13*2.0 into @a,@b,@c; select 1+2,"aaaa",3.13*2.0 into @a,@b,@c;
--enable_cursor_protocol
select @a; select @a;
select @b; select @b;
#Enable after fix MDEV-31495
--disable_cursor_protocol
select @c; select @c;
--enable_cursor_protocol
# #
# Test of removing redundant braces in the FROM part # 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 * FROM t1 WHERE a = 50 AND b = 3);
select found_rows(); select found_rows();
SELECT * FROM t1; SELECT * FROM t1;
# Check after fix MDEV-31522
--disable_cursor_protocol
select count(*) from t1; select count(*) from t1;
--enable_cursor_protocol
select found_rows(); select found_rows();
select count(*) from t1 limit 2,3; select count(*) from t1 limit 2,3;
select found_rows(); select found_rows();
@ -3727,6 +3735,7 @@ DROP TABLE t1;
# #
# Bug #32942 now() - interval '7200' second is NOT pre-calculated, causing "full table scan" # Bug #32942 now() - interval '7200' second is NOT pre-calculated, causing "full table scan"
# #
--disable_cursor_protocol
--disable_ps2_protocol --disable_ps2_protocol
--disable_view_protocol --disable_view_protocol
CREATE TABLE t1 (a INT, b INT); CREATE TABLE t1 (a INT, b INT);
@ -3744,6 +3753,7 @@ SHOW STATUS LIKE 'Handler_read%';
DROP TABLE t1, t2; DROP TABLE t1, t2;
--enable_view_protocol --enable_view_protocol
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol
# #
# Bug#40953 SELECT query throws "ERROR 1062 (23000): Duplicate entry..." error # 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); INSERT INTO t1 VALUES (2),(3);
--echo # Should not crash --echo # Should not crash
--disable_cursor_protocol
--error ER_SUBQUERY_NO_1_ROW --error ER_SUBQUERY_NO_1_ROW
SELECT 1 FROM t1 WHERE a <> 1 AND NOT SELECT 1 FROM t1 WHERE a <> 1 AND NOT
ROW(1,a) <=> ROW(1,(SELECT 1 FROM t1)) ROW(1,a) <=> ROW(1,(SELECT 1 FROM t1))
INTO @var0; INTO @var0;
--enable_cursor_protocol
DROP TABLE t1; DROP TABLE t1;

View File

@ -178,14 +178,19 @@ DROP TABLE t1;
# #
# Bug #6089: queries which don't use any tables # Bug #6089: queries which don't use any tables
# #
# Check after fix MDEV-31522
--disable_cursor_protocol
SELECT 'foo'; SELECT 'foo';
--enable_cursor_protocol
SELECT FOUND_ROWS(); SELECT FOUND_ROWS();
SELECT SQL_CALC_FOUND_ROWS 'foo'; SELECT SQL_CALC_FOUND_ROWS 'foo';
SELECT FOUND_ROWS(); SELECT FOUND_ROWS();
SELECT SQL_CALC_FOUND_ROWS 'foo' limit 0; SELECT SQL_CALC_FOUND_ROWS 'foo' limit 0;
# Check after fix MDEV-31522
--disable_cursor_protocol
SELECT FOUND_ROWS(); SELECT FOUND_ROWS();
SELECT FOUND_ROWS(); SELECT FOUND_ROWS();
--enable_cursor_protocol
SELECT SQL_CALC_FOUND_ROWS 'foo' UNION SELECT 'bar' LIMIT 0; SELECT SQL_CALC_FOUND_ROWS 'foo' UNION SELECT 'bar' LIMIT 0;
SELECT FOUND_ROWS(); SELECT FOUND_ROWS();

View File

@ -9,7 +9,9 @@ source include/have_debug.inc;
call mtr.add_suppression('Thread .* did not exit'); call mtr.add_suppression('Thread .* did not exit');
set @old_dbug=@@global.debug_dbug; set @old_dbug=@@global.debug_dbug;
set global debug_dbug='+d,CONNECT_wait'; set global debug_dbug='+d,CONNECT_wait';
--disable_cursor_protocol
select variable_value into @cons from information_schema.global_status where variable_name='connections'; 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 &; 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'; let $wait_condition= select variable_value>@cons from information_schema.global_status where variable_name='connections';
source include/wait_condition.inc; source include/wait_condition.inc;

View File

@ -12,6 +12,7 @@
--echo # limit efficiently --echo # limit efficiently
--echo # --echo #
--disable_cursor_protocol
CREATE TABLE t1 (i INT); CREATE TABLE t1 (i INT);
INSERT INTO t1 VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19), INSERT INTO t1 VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19),
(20),(21),(22),(23),(24),(25); (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; DROP TABLE t1, t2;
--enable_ps2_protocol --enable_ps2_protocol
--enable_cursor_protocol

View File

@ -11,7 +11,9 @@ drop table if exists t1, t2;
--disable_ps2_protocol --disable_ps2_protocol
# Backup the mysql.proc table # Backup the mysql.proc table
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--disable_cursor_protocol
eval SELECT * FROM mysql.proc INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/proc.txt'; eval SELECT * FROM mysql.proc INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/proc.txt';
--enable_cursor_protocol
--enable_ps2_protocol --enable_ps2_protocol
# Make sure we don't have any procedures left. # Make sure we don't have any procedures left.

View File

@ -5,18 +5,24 @@
--echo # Warmup round, this might allocate some memory for session variable --echo # Warmup round, this might allocate some memory for session variable
--echo # and the output --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 @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'; 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; CREATE PROCEDURE sp0() SELECT 1;
SHOW CREATE PROCEDURE sp0; SHOW CREATE PROCEDURE sp0;
DROP PROCEDURE sp0; DROP PROCEDURE sp0;
#Check that CREATE/SHOW does not use memory in caches. #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 @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'; 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; CREATE PROCEDURE sp1() SELECT 1;
SHOW CREATE PROCEDURE sp1; SHOW CREATE PROCEDURE sp1;
--disable_cursor_protocol
SELECT VARIABLE_VALUE-@local_mem_used FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='MEMORY_USED'; 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 # 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'; #SELECT VARIABLE_VALUE-@global_mem_used FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='MEMORY_USED';
DROP PROCEDURE sp1; DROP PROCEDURE sp1;

Some files were not shown because too many files have changed in this diff Show More