MDEV-31003: Second execution for ps-protocol

This patch adds for "--ps-protocol" second execution
of queries "SELECT".
Also in this patch it is added ability to disable/enable
(--disable_ps2_protocol/--enable_ps2_protocol) second
execution for "--ps-prototocol" in testcases.
This commit is contained in:
Lena Startseva 2023-05-31 11:57:45 +07:00
parent 23dae6173c
commit 9854fb6fa7
400 changed files with 1339 additions and 42 deletions

View File

@ -116,7 +116,7 @@ static my_bool opt_compress= 0, silent= 0, verbose= 0;
static my_bool debug_info_flag= 0, debug_check_flag= 0; static my_bool debug_info_flag= 0, debug_check_flag= 0;
static my_bool tty_password= 0; static my_bool tty_password= 0;
static my_bool opt_mark_progress= 0; static my_bool opt_mark_progress= 0;
static my_bool ps_protocol= 0, ps_protocol_enabled= 0; static my_bool ps_protocol= 0, ps_protocol_enabled= 0, ps2_protocol_enabled= 0;
static my_bool sp_protocol= 0, sp_protocol_enabled= 0; static my_bool sp_protocol= 0, sp_protocol_enabled= 0;
static my_bool view_protocol= 0, view_protocol_enabled= 0; static my_bool view_protocol= 0, view_protocol_enabled= 0;
static my_bool service_connection_enabled= 1; static my_bool service_connection_enabled= 1;
@ -157,6 +157,7 @@ static struct property prop_list[] = {
{ &display_session_track_info, 0, 1, 1, "$ENABLED_STATE_CHANGE_INFO" }, { &display_session_track_info, 0, 1, 1, "$ENABLED_STATE_CHANGE_INFO" },
{ &display_metadata, 0, 0, 0, "$ENABLED_METADATA" }, { &display_metadata, 0, 0, 0, "$ENABLED_METADATA" },
{ &ps_protocol_enabled, 0, 0, 0, "$ENABLED_PS_PROTOCOL" }, { &ps_protocol_enabled, 0, 0, 0, "$ENABLED_PS_PROTOCOL" },
{ &ps2_protocol_enabled, 0, 0, 0, "$ENABLED_PS2_PROTOCOL" },
{ &view_protocol_enabled, 0, 0, 0, "$ENABLED_VIEW_PROTOCOL"}, { &view_protocol_enabled, 0, 0, 0, "$ENABLED_VIEW_PROTOCOL"},
{ &service_connection_enabled, 0, 1, 0, "$ENABLED_SERVICE_CONNECTION"}, { &service_connection_enabled, 0, 1, 0, "$ENABLED_SERVICE_CONNECTION"},
{ &disable_query_log, 0, 0, 1, "$ENABLED_QUERY_LOG" }, { &disable_query_log, 0, 0, 1, "$ENABLED_QUERY_LOG" },
@ -173,6 +174,7 @@ enum enum_prop {
P_SESSION_TRACK, P_SESSION_TRACK,
P_META, P_META,
P_PS, P_PS,
P_PS2,
P_VIEW, P_VIEW,
P_CONN, P_CONN,
P_QUERY, P_QUERY,
@ -263,6 +265,7 @@ static size_t suite_dir_len, overlay_dir_len;
/* Precompiled re's */ /* Precompiled re's */
static regex_t ps_re; /* the query can be run using PS protocol */ static regex_t ps_re; /* the query can be run using PS protocol */
static regex_t ps2_re; /* the query can be run using PS protocol with second execution*/
static regex_t sp_re; /* the query can be run as a SP */ static regex_t sp_re; /* the query can be run as a SP */
static regex_t view_re; /* the query can be run as a view*/ static regex_t view_re; /* the query can be run as a view*/
@ -381,6 +384,7 @@ enum enum_commands {
Q_LOWERCASE, Q_LOWERCASE,
Q_START_TIMER, Q_END_TIMER, Q_START_TIMER, Q_END_TIMER,
Q_CHARACTER_SET, Q_DISABLE_PS_PROTOCOL, Q_ENABLE_PS_PROTOCOL, Q_CHARACTER_SET, Q_DISABLE_PS_PROTOCOL, Q_ENABLE_PS_PROTOCOL,
Q_DISABLE_PS2_PROTOCOL, Q_ENABLE_PS2_PROTOCOL,
Q_DISABLE_VIEW_PROTOCOL, Q_ENABLE_VIEW_PROTOCOL, Q_DISABLE_VIEW_PROTOCOL, Q_ENABLE_VIEW_PROTOCOL,
Q_DISABLE_SERVICE_CONNECTION, Q_ENABLE_SERVICE_CONNECTION, Q_DISABLE_SERVICE_CONNECTION, Q_ENABLE_SERVICE_CONNECTION,
Q_ENABLE_NON_BLOCKING_API, Q_DISABLE_NON_BLOCKING_API, Q_ENABLE_NON_BLOCKING_API, Q_DISABLE_NON_BLOCKING_API,
@ -474,6 +478,8 @@ const char *command_names[]=
"character_set", "character_set",
"disable_ps_protocol", "disable_ps_protocol",
"enable_ps_protocol", "enable_ps_protocol",
"disable_ps2_protocol",
"enable_ps2_protocol",
"disable_view_protocol", "disable_view_protocol",
"enable_view_protocol", "enable_view_protocol",
"disable_service_connection", "disable_service_connection",
@ -8347,6 +8353,19 @@ void run_query_stmt(struct st_connection *cn, struct st_command *command,
} }
#endif #endif
/*
Execute the query first time if second execution enable
*/
if(ps2_protocol_enabled && match_re(&ps2_re, query))
{
if (do_stmt_execute(cn))
{
handle_error(command, mysql_stmt_errno(stmt),
mysql_stmt_error(stmt), mysql_stmt_sqlstate(stmt), ds);
goto end;
}
}
/* /*
Execute the query Execute the query
*/ */
@ -9298,6 +9317,13 @@ void init_re(void)
"[[:space:]]*UNINSTALL[[:space:]]+|" "[[:space:]]*UNINSTALL[[:space:]]+|"
"[[:space:]]*UPDATE[[:space:]]" "[[:space:]]*UPDATE[[:space:]]"
")"; ")";
/*
Filter for queries that can be run for second
execution of prepare statement
*/
const char *ps2_re_str =
"^("
"[[:space:]]*SELECT[[:space:]])";
/* /*
Filter for queries that can be run using the Filter for queries that can be run using the
@ -9313,6 +9339,7 @@ void init_re(void)
"[[:space:]]*SELECT[[:space:]])"; "[[:space:]]*SELECT[[:space:]])";
init_re_comp(&ps_re, ps_re_str); init_re_comp(&ps_re, ps_re_str);
init_re_comp(&ps2_re, ps2_re_str);
init_re_comp(&sp_re, sp_re_str); init_re_comp(&sp_re, sp_re_str);
init_re_comp(&view_re, view_re_str); init_re_comp(&view_re, view_re_str);
} }
@ -9349,6 +9376,7 @@ int match_re(regex_t *re, char *str)
void free_re(void) void free_re(void)
{ {
regfree(&ps_re); regfree(&ps_re);
regfree(&ps2_re);
regfree(&sp_re); regfree(&sp_re);
regfree(&view_re); regfree(&view_re);
} }
@ -9700,6 +9728,9 @@ int main(int argc, char **argv)
if (cursor_protocol) if (cursor_protocol)
ps_protocol= 1; ps_protocol= 1;
/* Enable second execution of SELECT for ps-protocol
if ps-protocol is used */
ps2_protocol_enabled= ps_protocol;
ps_protocol_enabled= ps_protocol; ps_protocol_enabled= ps_protocol;
sp_protocol_enabled= sp_protocol; sp_protocol_enabled= sp_protocol;
view_protocol_enabled= view_protocol; view_protocol_enabled= view_protocol;
@ -10127,6 +10158,12 @@ int main(int argc, char **argv)
case Q_ENABLE_PS_PROTOCOL: case Q_ENABLE_PS_PROTOCOL:
set_property(command, P_PS, ps_protocol); set_property(command, P_PS, ps_protocol);
break; break;
case Q_DISABLE_PS2_PROTOCOL:
set_property(command, P_PS2, 0);
break;
case Q_ENABLE_PS2_PROTOCOL:
set_property(command, P_PS2, ps_protocol);
break;
case Q_DISABLE_VIEW_PROTOCOL: case Q_DISABLE_VIEW_PROTOCOL:
set_property(command, P_VIEW, 0); set_property(command, P_VIEW, 0);
/* Close only util connections */ /* Close only util connections */

View File

@ -1,4 +1,6 @@
--disable_ps2_protocol
--connection slave --connection slave
SET @saved_slave_type_conversions = @@slave_type_conversions; SET @saved_slave_type_conversions = @@slave_type_conversions;
@ -257,4 +259,4 @@ SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
DROP TABLE t1,t2; DROP TABLE t1,t2;
--sync_slave_with_master --sync_slave_with_master
--enable_ps2_protocol

View File

@ -6,6 +6,7 @@
## - $engine_type should be set ## - $engine_type should be set
## ##
--disable_ps2_protocol
set sql_mode=no_engine_substitution; set sql_mode=no_engine_substitution;
eval set default_storage_engine = $engine_type; eval set default_storage_engine = $engine_type;
set autocommit=1; set autocommit=1;
@ -782,3 +783,4 @@ call p_verify_status_increment(0, 0, 0, 0);
drop table t1, t2, t3; drop table t1, t2, t3;
drop procedure p_verify_status_increment; drop procedure p_verify_status_increment;
drop function f1; drop function f1;
--enable_ps2_protocol

View File

@ -463,6 +463,7 @@ select * from t1;
show create table t1; show create table t1;
drop table t1; drop table t1;
--disable_ps2_protocol
# Ensure that row_count() value is reset after drop table. # Ensure that row_count() value is reset after drop table.
select 1; select 1;
select hex(concat(row_count())); select hex(concat(row_count()));
@ -474,6 +475,7 @@ select hex(concat(found_rows()));
create table t1 as select concat(found_rows()) as c1; create table t1 as select concat(found_rows()) as c1;
show create table t1; show create table t1;
drop table t1; drop table t1;
--enable_ps2_protocol
create table t1 as select concat(uuid_short()) as c1; create table t1 as select concat(uuid_short()) as c1;
show create table t1; show create table t1;

View File

@ -165,9 +165,11 @@ while ($_dt_tables)
# Now that we have the comma-separated list of columns, we can write # Now that we have the comma-separated list of columns, we can write
# the table to a file. # the table to a file.
--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
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_ps2_protocol
# Compare files. # Compare files.
if ($_dt_prev_outfile) if ($_dt_prev_outfile)

View File

@ -26,6 +26,7 @@
--echo # query: $query --echo # query: $query
--echo # select: $select --echo # select: $select
--echo # --echo #
--disable_ps2_protocol
--disable_view_protocol --disable_view_protocol
if ($select) { if ($select) {
--disable_query_log --disable_query_log
@ -160,3 +161,4 @@ SHOW STATUS WHERE (Variable_name LIKE 'Sort%' OR
--echo --echo
--enable_view_protocol --enable_view_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_ps2_protocol
SELECT 1 INTO OUTFILE 't3.dat' FROM dual; SELECT 1 INTO OUTFILE 't3.dat' FROM dual;
SELECT NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL SELECT NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
@ -831,6 +832,7 @@ INTO OUTFILE 't4.dat'
FROM dual; FROM dual;
SELECT 1, 2 INTO OUTFILE 't5.dat' FROM dual; SELECT 1, 2 INTO OUTFILE 't5.dat' FROM dual;
--enable_ps2_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;
@ -929,9 +931,11 @@ 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_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
--echo # Too short row --echo # Too short row

View File

@ -54,6 +54,8 @@ set GLOBAL query_cache_type=ON;
set LOCAL query_cache_type=ON; set LOCAL query_cache_type=ON;
set GLOBAL query_cache_size=1355776; set GLOBAL query_cache_size=1355776;
--disable_ps2_protocol
reset query cache; reset query cache;
flush status; flush status;
connect (root,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (root,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
@ -171,6 +173,8 @@ show status like "Qcache_queries_in_cache";
show status like "Qcache_hits"; show status like "Qcache_hits";
show status like "Qcache_not_cached"; show status like "Qcache_not_cached";
--enable_ps2_protocol
# Cleanup # Cleanup
connection root; connection root;

View File

@ -869,6 +869,7 @@ SET optimizer_switch=@save_optimizer_switch;
DROP TABLE t1,t2; DROP TABLE t1,t2;
--disable_ps2_protocol
--echo # check "Handler_pushed" status varuiables --echo # check "Handler_pushed" status varuiables
CREATE TABLE t1 ( CREATE TABLE t1 (
c1 CHAR(1), c1 CHAR(1),
@ -890,6 +891,7 @@ SELECT * FROM t1 WHERE (c2='3' or c2='4') and c2 % 2 = 0 ;
show status like "Handler_icp%"; show status like "Handler_icp%";
DROP TABLE t1; DROP TABLE t1;
--enable_ps2_protocol
# #
# MDEV-308 lp:1008516 - Failing assertion: templ->mysql_col_len == len # MDEV-308 lp:1008516 - Failing assertion: templ->mysql_col_len == len

View File

@ -14,6 +14,7 @@
# old name was innodb_cache.test # old name was innodb_cache.test
# main code went into include/query_cache.inc # main code went into include/query_cache.inc
# #
--disable_ps2_protocol
--disable_view_protocol --disable_view_protocol
SET global query_cache_type=ON; SET global query_cache_type=ON;
SET local query_cache_type=ON; SET local query_cache_type=ON;
@ -192,3 +193,4 @@ drop table t2;
SET global query_cache_type=default; SET global query_cache_type=default;
--enable_view_protocol --enable_view_protocol
--enable_ps2_protocol

View File

@ -44,13 +44,14 @@ flush status;
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
show status like "Qcache_hits"; show status like "Qcache_hits";
--disable_ps2_protocol
SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1;
SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1;
SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1;
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
show status like "Qcache_hits"; show status like "Qcache_hits";
--enable_ps2_protocol
drop table t1; drop table t1;
@ -79,12 +80,14 @@ flush status;
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
show status like "Qcache_hits"; show status like "Qcache_hits";
--disable_ps2_protocol
SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1;
SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1;
SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1;
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
show status like "Qcache_hits"; show status like "Qcache_hits";
--enable_ps2_protocol
drop table t1; drop table t1;
@ -114,6 +117,7 @@ INSERT INTO t1 VALUES (1, now(), 0);
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
show status like "Qcache_hits"; show status like "Qcache_hits";
--disable_ps2_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;
@ -126,6 +130,7 @@ SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1;
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
show status like "Qcache_hits"; show status like "Qcache_hits";
--enable_ps2_protocol
drop table t1; drop table t1;

View File

@ -23,6 +23,8 @@
set GLOBAL query_cache_type=ON; set GLOBAL query_cache_type=ON;
set LOCAL query_cache_type=ON; set LOCAL query_cache_type=ON;
--disable_ps2_protocol
connect (con1,localhost,root,,test,$MASTER_MYPORT,); connect (con1,localhost,root,,test,$MASTER_MYPORT,);
connection default; connection default;
@ -252,6 +254,7 @@ set @a=10;
execute stmt1 using @a; execute stmt1 using @a;
show status like 'Qcache_hits'; show status like 'Qcache_hits';
--enable_ps2_protocol
drop table t1; drop table t1;
disconnect con1; disconnect con1;

View File

@ -1 +1,3 @@
--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

View File

@ -34,8 +34,10 @@ SET sql_mode=DEFAULT;
--eval CREATE TABLE t1 (a $type DEFAULT $defval, b $type DEFAULT $defval) --eval CREATE TABLE t1 (a $type DEFAULT $defval, b $type DEFAULT $defval)
--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
--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
DELETE FROM t1; DELETE FROM t1;
--enable_ps2_protocol
SET sql_mode=TRADITIONAL; SET sql_mode=TRADITIONAL;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--error ER_INVALID_DEFAULT_VALUE_FOR_FIELD --error ER_INVALID_DEFAULT_VALUE_FOR_FIELD

View File

@ -46,7 +46,9 @@ 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_ps2_protocol
--eval SELECT '$write_var' INTO DUMPFILE '$_wvtf_tmp_file' --eval SELECT '$write_var' INTO DUMPFILE '$_wvtf_tmp_file'
--enable_ps2_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

@ -19,7 +19,9 @@ SET @@global.slow_query_log = ON;
create table t1 (a int); create table t1 (a int);
INSERT INTO t1 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t1 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
--disable_ps2_protocol
select * from t1 where a<3; select * from t1 where a<3;
--enable_ps2_protocol
drop table t1; drop table t1;
let SLOW_LOG_FILE= `select @@slow_query_log_file`; let SLOW_LOG_FILE= `select @@slow_query_log_file`;

View File

@ -11,7 +11,9 @@ 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_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
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,7 +45,9 @@ 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_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_query_log --enable_query_log
--source include/kill_mysqld.inc --source include/kill_mysqld.inc
--error 1 --error 1

View File

@ -6,6 +6,7 @@
--echo # Bug #39022: Mysql randomly crashing in lock_sec_rec_cons_read_sees --echo # Bug #39022: Mysql randomly crashing in lock_sec_rec_cons_read_sees
--echo # --echo #
--disable_ps2_protocol
call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction"); call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction");
CREATE TABLE t1(a TINYINT NOT NULL,b TINYINT,PRIMARY KEY(b)) ENGINE=innodb; CREATE TABLE t1(a TINYINT NOT NULL,b TINYINT,PRIMARY KEY(b)) ENGINE=innodb;
@ -56,3 +57,4 @@ disconnect thread1;
connection default; connection default;
DROP TABLE t1,t2; DROP TABLE t1,t2;
--enable_ps2_protocol

View File

@ -402,9 +402,11 @@ SET @@GLOBAL.max_allowed_packet=2048;
# reconnect to make the new max packet size take effect # reconnect to make the new max packet size take effect
--connect (newconn, localhost, root,,) --connect (newconn, localhost, root,,)
--disable_ps2_protocol
SELECT CONVERT('a', BINARY(2049)); SELECT CONVERT('a', BINARY(2049));
SELECT CONVERT('a', CHAR(2049)); SELECT CONVERT('a', CHAR(2049));
SELECT length(CONVERT(repeat('a',2048), CHAR(2049))); SELECT length(CONVERT(repeat('a',2048), CHAR(2049)));
--enable_ps2_protocol
connection default; connection default;
disconnect newconn; disconnect newconn;

View File

@ -172,7 +172,10 @@ insert t1 (b) values (1);
insert t1 (b) values (10); insert t1 (b) values (10);
select * from t1 where a is null; select * from t1 where a is null;
set sql_auto_is_null=1; set sql_auto_is_null=1;
#Enable after fix MDEV-31307
--disable_ps2_protocol
select * from t1 where a is null; select * from t1 where a is null;
--enable_ps2_protocol
--error ER_CONSTRAINT_FAILED --error ER_CONSTRAINT_FAILED
insert t1 (b) values (1); insert t1 (b) values (1);
drop table t1; drop table t1;

View File

@ -8,6 +8,8 @@ eval CREATE TABLE t1(a $typec);
ALTER TABLE t1 ADD KEY(a(10)); ALTER TABLE t1 ADD KEY(a(10));
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
--disable_ps2_protocol
--echo # Make sure column was actually compressed --echo # Make sure column was actually compressed
INSERT INTO t1 VALUES(REPEAT('a', 1000)); INSERT INTO t1 VALUES(REPEAT('a', 1000));
SELECT LEFT(a, 10), LENGTH(a) FROM t1; SELECT LEFT(a, 10), LENGTH(a) FROM t1;
@ -94,6 +96,8 @@ SELECT * FROM t1 ORDER BY a;
SELECT a+1 FROM t1 ORDER BY 1; SELECT a+1 FROM t1 ORDER BY 1;
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME IN('Column_compressions', 'Column_decompressions'); SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME IN('Column_compressions', 'Column_decompressions');
--enable_ps2_protocol
DROP TABLE t1; DROP TABLE t1;
--echo # --echo #

View File

@ -48,6 +48,7 @@ select count(distinct n1), count(distinct n2) from t1;
select count(distinct n2), n1 from t1 group by n1; select count(distinct n2), n1 from t1 group by n1;
drop table t1; drop table t1;
--disable_ps2_protocol
# test the conversion from tree to MyISAM # test the conversion from tree to MyISAM
create table t1 (n int default NULL); create table t1 (n int default NULL);
let $1=5000; let $1=5000;
@ -82,5 +83,6 @@ 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_ps2_protocol
# End of 4.1 tests # End of 4.1 tests

View File

@ -77,7 +77,9 @@ 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_ps2_protocol
select * into outfile 'test/t1.txt' from t1; select * into outfile 'test/t1.txt' from t1;
--enable_ps2_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

@ -75,7 +75,9 @@ 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_ps2_protocol
SELECT '00' UNION SELECT '10' INTO OUTFILE 'tmpp.txt'; SELECT '00' UNION SELECT '10' INTO OUTFILE 'tmpp.txt';
--enable_ps2_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);
@ -86,9 +88,10 @@ DROP TABLE t1;
let $MYSQLD_DATADIR= `select @@datadir`; let $MYSQLD_DATADIR= `select @@datadir`;
remove_file $MYSQLD_DATADIR/test/tmpp.txt; remove_file $MYSQLD_DATADIR/test/tmpp.txt;
--disable_ps2_protocol
--echo # Problem # 2 : if you write and read ucs2 data to a file they're lost --echo # Problem # 2 : if you write and read ucs2 data to a file they're lost
SELECT '00' UNION SELECT '10' INTO OUTFILE 'tmpp2.txt' CHARACTER SET ucs2; SELECT '00' UNION SELECT '10' INTO OUTFILE 'tmpp2.txt' CHARACTER SET ucs2;
--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
(@b) SET a=REVERSE(@b); (@b) SET a=REVERSE(@b);

View File

@ -19,7 +19,9 @@ create table t1 (sal int(10),id int(10));
INSERT INTO t1 (sal,id) VALUES (5000,1); INSERT INTO t1 (sal,id) VALUES (5000,1);
INSERT INTO t1 (sal,id) VALUES (2000,1); INSERT INTO t1 (sal,id) VALUES (2000,1);
INSERT INTO t1 (sal,id) VALUES (1000,1); INSERT INTO t1 (sal,id) VALUES (1000,1);
--disable_ps2_protocol
select f1(sal) from t1 where id>= 1; select f1(sal) from t1 where id>= 1;
--enable_ps2_protocol
select * from t2; select * from t2;
drop table t2; drop table t2;
drop function f1; drop function f1;
@ -96,9 +98,12 @@ end|
delimiter ;| delimiter ;|
#Check after fix MDEV-31281
--disable_ps2_protocol
select f1(10); select f1(10);
select f1(sal) from t1; select f1(sal) from t1;
select f1(sal) from t1 where 1=0; select f1(sal) from t1 where 1=0;
--enable_ps2_protocol
drop function f1; drop function f1;
delimiter |; delimiter |;

View File

@ -3,6 +3,8 @@
--source include/default_optimizer_switch.inc --source include/default_optimizer_switch.inc
--disable_ps2_protocol
flush status; flush status;
show status like "%custom_aggregate%"; show status like "%custom_aggregate%";
create table t2 (sal int(10)); create table t2 (sal int(10));
@ -73,6 +75,8 @@ with agg_sum as (
select * from agg_sum; select * from agg_sum;
show status like "%custom_aggregate%"; show status like "%custom_aggregate%";
--enable_ps2_protocol
drop table t2,t1,t3; drop table t2,t1,t3;
drop function f1; drop function f1;
drop function f2; drop function f2;

View File

@ -381,6 +381,7 @@ DROP TABLE IF EXISTS t1;
--enable_warnings --enable_warnings
# #
# Test. # Test.
--disable_ps2_protocol
CREATE TABLE t1 (c1 INT) ENGINE=MyISAM; CREATE TABLE t1 (c1 INT) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (1);
SELECT GET_LOCK('mysqltest_lock', 100); SELECT GET_LOCK('mysqltest_lock', 100);
@ -417,6 +418,7 @@ disconnect con1;
disconnect con2; disconnect con2;
connection default; connection default;
DROP TABLE t1; DROP TABLE t1;
--enable_ps2_protocol
# #
# Cleanup after test case. # Cleanup after test case.

View File

@ -451,6 +451,7 @@ DELETE t1 FROM db1.t1, db2.t1;
# Test multiple-table cross database deletes # Test multiple-table cross database deletes
--disable_ps2_protocol
DELETE t1 FROM db1.t2 AS t1, db2.t2 AS t2 WHERE t2.a = 1 AND t1.a = t2.a; DELETE t1 FROM db1.t2 AS t1, db2.t2 AS t2 WHERE t2.a = 1 AND t1.a = t2.a;
SELECT ROW_COUNT(); SELECT ROW_COUNT();
CALL count_rows(); CALL count_rows();
@ -462,6 +463,7 @@ DROP DATABASE db1;
DROP DATABASE db2; DROP DATABASE db2;
DROP PROCEDURE count_rows; DROP PROCEDURE count_rows;
DROP TABLE t1, t2; DROP TABLE t1, t2;
--enable_ps2_protocol
--echo # --echo #
--echo # Bug#46958: Assertion in Diagnostics_area::set_ok_status, trigger, --echo # Bug#46958: Assertion in Diagnostics_area::set_ok_status, trigger,

View File

@ -896,11 +896,14 @@ select distinct t1.id, tt.id, tt.data
(select t1.id, 'yes' as data from t1) as tt (select t1.id, 'yes' as data from t1) as tt
on t1.id = tt.id; on t1.id = tt.id;
#Check after fix MDEV-31277
--disable_ps2_protocol
select distinct t1.id, tt.id, tt.data select distinct t1.id, tt.id, tt.data
from t1 from t1
left join left join
(select t1.id, 'yes' as data from t1 where id > 1) as tt (select t1.id, 'yes' as data from t1 where id > 1) as tt
on t1.id = tt.id; on t1.id = tt.id;
--enable_ps2_protocol
drop table t1; drop table t1;

View File

@ -1895,9 +1895,9 @@ DELIMITER ;$$
CALL p1('a'); CALL p1('a');
DROP PROCEDURE p1; DROP PROCEDURE p1;
--disable_ps2_protocol
SELECT a FROM (SELECT "aa" a) t WHERE REGEXP_INSTR(t.a, (SELECT MAX('aa') FROM DUAL LIMIT 1)); SELECT a FROM (SELECT "aa" a) t WHERE REGEXP_INSTR(t.a, (SELECT MAX('aa') FROM DUAL LIMIT 1));
--enable_ps2_protocol
DELIMITER $$; DELIMITER $$;
CREATE OR REPLACE FUNCTION f1(a VARCHAR(10), b VARCHAR(10)) RETURNS INT CREATE OR REPLACE FUNCTION f1(a VARCHAR(10), b VARCHAR(10)) RETURNS INT

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_ps2_protocol
flush status; flush status;
explain extended explain extended
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;
@ -49,6 +50,7 @@ show status like 'Handler_read%';
flush status; 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
--echo for merged views --echo for merged views
create view v1 as select * from t1; create view v1 as select * from t1;
@ -69,6 +71,7 @@ explain extended
select * from v3 join v4 on f1=f2; select * from v3 join v4 on f1=f2;
select * from v3 join v4 on f1=f2; select * from v3 join v4 on f1=f2;
--disable_ps2_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%';
@ -91,6 +94,7 @@ show status like 'Handler_read%';
flush status; flush status;
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_ps2_protocol
--echo for materialized views --echo for materialized views
drop view v1,v2,v3; drop view v1,v2,v3;
@ -106,6 +110,7 @@ explain extended select * from t1 join v2 on f1=f2;
select * from t1 join v2 on f1=f2; 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_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;
show status like 'Handler_read%'; show status like 'Handler_read%';
@ -116,6 +121,7 @@ show status like 'Handler_read%';
flush status; 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
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;
@ -159,6 +165,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_ps2_protocol
flush status; flush status;
select * from select * from
(select * from (select * from t1 where f1 < 7 group by f1) tt where f1 > 2) x (select * from (select * from t1 where f1 < 7 group by f1) tt where f1 > 2) x
@ -167,6 +174,7 @@ join
on x.f1 = z.f1; on x.f1 = z.f1;
show status like 'Handler_read%'; show status like 'Handler_read%';
flush status; flush status;
--enable_ps2_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

@ -494,14 +494,18 @@ DROP TABLE IF EXISTS t2;
CREATE TABLE t2 (fruit_id INT NOT NULL, fruit_name varchar(20) CREATE TABLE t2 (fruit_id INT NOT NULL, fruit_name varchar(20)
default NULL); default NULL);
--disable_ps2_protocol
SELECT DISTINCT fruit_id, fruit_name INTO OUTFILE SELECT DISTINCT fruit_id, fruit_name INTO OUTFILE
'../../tmp/data1.tmp' FROM t1 WHERE fruit_name = 'APPLE'; '../../tmp/data1.tmp' FROM t1 WHERE fruit_name = 'APPLE';
--enable_ps2_protocol
LOAD DATA INFILE '../../tmp/data1.tmp' INTO TABLE t2; LOAD DATA INFILE '../../tmp/data1.tmp' INTO TABLE t2;
--error 0,1 --error 0,1
--remove_file $MYSQLTEST_VARDIR/tmp/data1.tmp --remove_file $MYSQLTEST_VARDIR/tmp/data1.tmp
--disable_ps2_protocol
SELECT DISTINCT @v19:= fruit_id, @v20:= fruit_name INTO OUTFILE SELECT DISTINCT @v19:= fruit_id, @v20:= fruit_name INTO OUTFILE
'../../tmp/data2.tmp' FROM t1 WHERE fruit_name = 'APPLE'; '../../tmp/data2.tmp' FROM t1 WHERE fruit_name = 'APPLE';
--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

View File

@ -7,9 +7,11 @@ drop table if exists t1;
--enable_warnings --enable_warnings
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
select count(*) from t1; select count(*) from t1;
select * from t1; select * from t1;
select * from t1 limit 0; select * from t1 limit 0;
--enable_ps2_protocol
show status like "Empty_queries"; show status like "Empty_queries";
drop table t1; drop table t1;
@ -17,8 +19,10 @@ drop table t1;
# Accessing a non existing table should not increase Empty_queries # Accessing a non existing table should not increase Empty_queries
# #
--disable_ps2_protocol
--error 1146 --error 1146
select * from t2; select * from t2;
--enable_ps2_protocol
show status like "Empty_queries"; show status like "Empty_queries";
# End of 4.1 tests # End of 4.1 tests

View File

@ -80,10 +80,12 @@ SET optimizer_switch='outer_join_with_cache=off';
SET SESSION debug_dbug= '+d,only_one_Unique_may_be_created'; SET SESSION debug_dbug= '+d,only_one_Unique_may_be_created';
--disable_ps2_protocol
--replace_column 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x --replace_column 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x
EXPLAIN EXPLAIN
SELECT * FROM t1 LEFT JOIN t2 ON ( t2.a < 10 OR t2.b < 10 ); SELECT * FROM t1 LEFT JOIN t2 ON ( t2.a < 10 OR t2.b < 10 );
SELECT * FROM t1 LEFT JOIN t2 ON ( t2.a < 10 OR t2.b < 10 ); SELECT * FROM t1 LEFT JOIN t2 ON ( t2.a < 10 OR t2.b < 10 );
--enable_ps2_protocol
SET debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;

View File

@ -94,8 +94,10 @@ end|
delimiter ;| delimiter ;|
flush status; flush status;
--disable_ps2_protocol
--error 1062 --error 1062
select f1(), f2(); select f1(), f2();
--enable_ps2_protocol
show status like 'Com_insert'; show status like 'Com_insert';
select * from t1; select * from t1;
select * from t2; select * from t2;

View File

@ -38,6 +38,7 @@ select "no-op query";
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_ps2_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;
@ -662,6 +663,8 @@ eval set @cluster_lookups_avoided = $opt - $base_opt;
select @cluster_lookups; select @cluster_lookups;
select @cluster_lookups_avoided; select @cluster_lookups_avoided;
--enable_ps2_protocol
DROP TABLE t1; DROP TABLE t1;
--echo # --echo #

View File

@ -8,6 +8,8 @@ drop table if exists t1;
set sql_mode=""; set sql_mode="";
--disable_ps2_protocol
flush status; flush status;
show status like "feature%"; show status like "feature%";
@ -114,7 +116,7 @@ select updatexml('<div><div><span>1</span><span>2</span></div></div>',
'/','<tr><td>1</td><td>2</td></tr>') as upd1; '/','<tr><td>1</td><td>2</td></tr>') as upd1;
--replace_result 4 2 --replace_result 4 2
show status like "feature_xml"; show status like "feature_xml";
--enable_ps2_protocol
--echo # --echo #
--echo # Feature delayed_keys --echo # Feature delayed_keys

View File

@ -61,6 +61,7 @@ select grp,group_concat(c order by c) from t1 group by grp;
# Test warnings # Test warnings
--disable_ps2_protocol
set group_concat_max_len = 4; set group_concat_max_len = 4;
select grp,group_concat(c) from t1 group by grp; select grp,group_concat(c) from t1 group by grp;
show warnings; show warnings;
@ -72,6 +73,7 @@ set group_concat_max_len = 1024;
select group_concat(sum(c)) from t1 group by grp; select group_concat(sum(c)) from t1 group by grp;
--error 1054 --error 1054
select grp,group_concat(c order by 2) from t1 group by grp; select grp,group_concat(c order by 2) from t1 group by grp;
--enable_ps2_protocol
drop table t1; drop table t1;
@ -237,10 +239,12 @@ select group_concat(distinct b) from t1 group by a;
select group_concat(b order by b) from t1 group by a; select group_concat(b order by b) from t1 group by a;
select group_concat(distinct b order by b) from t1 group by a; select group_concat(distinct b order by b) from t1 group by a;
set local group_concat_max_len=4; set local group_concat_max_len=4;
--disable_ps2_protocol
select group_concat(b) from t1 group by a; select group_concat(b) from t1 group by a;
select group_concat(distinct b) from t1 group by a; select group_concat(distinct b) from t1 group by a;
select group_concat(b order by b) from t1 group by a; select group_concat(b order by b) from t1 group by a;
select group_concat(distinct b order by b) from t1 group by a; select group_concat(distinct b order by b) from t1 group by a;
--enable_ps2_protocol
# #
# long blobs # long blobs
@ -256,10 +260,12 @@ select group_concat(distinct b) from t1 group by a;
select group_concat(b order by b) from t1 group by a; select group_concat(b order by b) from t1 group by a;
select group_concat(distinct b order by b) from t1 group by a; select group_concat(distinct b order by b) from t1 group by a;
set local group_concat_max_len=400; set local group_concat_max_len=400;
--disable_ps2_protocol
select group_concat(b) from t1 group by a; select group_concat(b) from t1 group by a;
select group_concat(distinct b) from t1 group by a; select group_concat(distinct b) from t1 group by a;
select group_concat(b order by b) from t1 group by a; select group_concat(b order by b) from t1 group by a;
select group_concat(distinct b order by b) from t1 group by a; select group_concat(distinct b order by b) from t1 group by a;
--enable_ps2_protocol
drop table t1; drop table t1;
@ -517,10 +523,12 @@ CREATE TABLE t1( a VARCHAR( 10 ), b INT );
INSERT INTO t1 VALUES ( repeat( 'a', 10 ), 1), INSERT INTO t1 VALUES ( repeat( 'a', 10 ), 1),
( repeat( 'b', 10 ), 2); ( repeat( 'b', 10 ), 2);
SET group_concat_max_len = 20; SET group_concat_max_len = 20;
--disable_ps2_protocol
SELECT GROUP_CONCAT( a ) FROM t1; SELECT GROUP_CONCAT( a ) FROM t1;
SELECT GROUP_CONCAT( DISTINCT a ) FROM t1; SELECT GROUP_CONCAT( DISTINCT a ) FROM t1;
SELECT GROUP_CONCAT( a ORDER BY b ) FROM t1; SELECT GROUP_CONCAT( a ORDER BY b ) FROM t1;
SELECT GROUP_CONCAT( DISTINCT a ORDER BY b ) FROM t1; SELECT GROUP_CONCAT( DISTINCT a ORDER BY b ) FROM t1;
--enable_ps2_protocol
SET group_concat_max_len = DEFAULT; SET group_concat_max_len = DEFAULT;
DROP TABLE t1; DROP TABLE t1;
# Bug #23856:GROUP_CONCAT and ORDER BY: junk from previous rows for query on I_S # Bug #23856:GROUP_CONCAT and ORDER BY: junk from previous rows for query on I_S
@ -787,7 +795,9 @@ INSERT INTO t1 VALUES ('555555', 5);
SET group_concat_max_len = 5; SET group_concat_max_len = 5;
SET @old_sql_mode = @@sql_mode, @@sql_mode = 'traditional'; SET @old_sql_mode = @@sql_mode, @@sql_mode = 'traditional';
--disable_ps2_protocol
SELECT GROUP_CONCAT(a), b FROM t1 GROUP BY b LIMIT 3; SELECT GROUP_CONCAT(a), b FROM t1 GROUP BY b LIMIT 3;
--enable_ps2_protocol
--error ER_CUT_VALUE_GROUP_CONCAT --error ER_CUT_VALUE_GROUP_CONCAT
INSERT INTO t2 SELECT GROUP_CONCAT(a), b FROM t1 GROUP BY b; INSERT INTO t2 SELECT GROUP_CONCAT(a), b FROM t1 GROUP BY b;
UPDATE t1 SET a = '11111' WHERE b = 1; UPDATE t1 SET a = '11111' WHERE b = 1;
@ -864,6 +874,7 @@ CREATE TABLE t2 SELECT GROUP_CONCAT(UPPER(f1) ORDER BY f2) FROM t1;
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
DROP TABLE t2; DROP TABLE t2;
--disable_ps2_protocol
SET group_concat_max_len= 1024; SET group_concat_max_len= 1024;
SELECT LENGTH(GROUP_CONCAT(f1 ORDER BY f2)) FROM t1; SELECT LENGTH(GROUP_CONCAT(f1 ORDER BY f2)) FROM t1;
@ -873,6 +884,7 @@ SELECT LENGTH(GROUP_CONCAT(f1 ORDER BY f2)) FROM t1 GROUP BY f2;
INSERT INTO t1 VALUES (REPEAT('a', 499999), 3), (REPEAT('b', 500000), 4); INSERT INTO t1 VALUES (REPEAT('a', 499999), 3), (REPEAT('b', 500000), 4);
SELECT LENGTH(GROUP_CONCAT(f1 ORDER BY f2)) FROM t1 GROUP BY f2; SELECT LENGTH(GROUP_CONCAT(f1 ORDER BY f2)) FROM t1 GROUP BY f2;
--enable_ps2_protocol
DROP TABLE t1; DROP TABLE t1;
SET group_concat_max_len= DEFAULT; SET group_concat_max_len= DEFAULT;
@ -882,8 +894,10 @@ SET group_concat_max_len= DEFAULT;
# #
set session group_concat_max_len=1024; set session group_concat_max_len=1024;
set max_session_mem_used=16*1024*1024; # 8M..32M set max_session_mem_used=16*1024*1024; # 8M..32M
--disable_ps2_protocol
SELECT GROUP_CONCAT(concat(seq/1.1), concat(seq/1.1), concat(seq/1.1), concat(seq/1.1), concat(seq/1.1), concat(seq/1.1), concat(seq/1.1), concat(seq/1.1) ORDER BY 2,1,3,4,6,5,8,7) AS c SELECT GROUP_CONCAT(concat(seq/1.1), concat(seq/1.1), concat(seq/1.1), concat(seq/1.1), concat(seq/1.1), concat(seq/1.1), concat(seq/1.1), concat(seq/1.1) ORDER BY 2,1,3,4,6,5,8,7) AS c
FROM seq_1_to_200000; FROM seq_1_to_200000;
--enable_ps2_protocol
set max_session_mem_used=default; set max_session_mem_used=default;
set session group_concat_max_len=default; set session group_concat_max_len=default;

View File

@ -223,12 +223,15 @@ drop table t1;
# #
# Item_func_like::fix_fields, ESCAPE, const_item() # Item_func_like::fix_fields, ESCAPE, const_item()
# #
#Enable after fix MDEV-31282
--disable_ps2_protocol
create table t1(f1 int); create table t1(f1 int);
insert into t1 values(1); insert into t1 values(1);
--error ER_WRONG_ARGUMENTS --error ER_WRONG_ARGUMENTS
update (select 1 like 2 escape (1 in (select 1 from t1))) x, t1 as d set d.f1 = 1; update (select 1 like 2 escape (1 in (select 1 from t1))) x, t1 as d set d.f1 = 1;
select * from (select 1 like 2 escape (1 in (select 1 from t1))) x; select * from (select 1 like 2 escape (1 in (select 1 from t1))) x;
drop table t1; drop table t1;
--enable_ps2_protocol
# #
# Item_func_like::walk # Item_func_like::walk

View File

@ -31,7 +31,9 @@ explain extended select log10(100),log10(18),log10(-4),log10(0),log10(NULL);
select pow(10,log10(10)),power(2,4); select pow(10,log10(10)),power(2,4);
explain extended select pow(10,log10(10)),power(2,4); explain extended select pow(10,log10(10)),power(2,4);
set @@rand_seed1=10000000,@@rand_seed2=1000000; set @@rand_seed1=10000000,@@rand_seed2=1000000;
--disable_ps2_protocol
select rand(999999),rand(); select rand(999999),rand();
--enable_ps2_protocol
explain extended select rand(999999),rand(); explain extended select rand(999999),rand();
select pi(),format(sin(pi()/2),6),format(cos(pi()/2),6),format(abs(tan(pi())),6),format(cot(1),6),format(asin(1),6),format(acos(0),6),format(atan(1),6); select pi(),format(sin(pi()/2),6),format(cos(pi()/2),6),format(abs(tan(pi())),6),format(cot(1),6),format(asin(1),6),format(acos(0),6),format(atan(1),6);
explain extended select pi(),format(sin(pi()/2),6),format(cos(pi()/2),6),format(abs(tan(pi())),6),format(cot(1),6),format(asin(1),6),format(acos(0),6),format(atan(1),6); explain extended select pi(),format(sin(pi()/2),6),format(cos(pi()/2),6),format(abs(tan(pi())),6),format(cot(1),6),format(asin(1),6),format(acos(0),6),format(atan(1),6);

View File

@ -54,6 +54,7 @@ drop table t1;
# Bug#16501: IS_USED_LOCK does not appear to work # Bug#16501: IS_USED_LOCK does not appear to work
# #
--disable_ps2_protocol
CREATE TABLE t1 (conn CHAR(7), connection_id INT); CREATE TABLE t1 (conn CHAR(7), connection_id INT);
INSERT INTO t1 VALUES ('default', CONNECTION_ID()); INSERT INTO t1 VALUES ('default', CONNECTION_ID());
@ -85,6 +86,7 @@ disconnect con1;
connection default; connection default;
DROP TABLE t1; DROP TABLE t1;
--enable_ps2_protocol
# #
# Bug #21531: EXPORT_SET() doesn't accept args with coercible character sets # Bug #21531: EXPORT_SET() doesn't accept args with coercible character sets
@ -148,15 +150,19 @@ select avg(a) from table_26093;
select benchmark(100, (select avg(a) from table_26093)); select benchmark(100, (select avg(a) from table_26093));
set @invoked := 0; set @invoked := 0;
--disable_ps2_protocol
select benchmark(100, (select avg(func_26093_a(a)) from table_26093)); select benchmark(100, (select avg(func_26093_a(a)) from table_26093));
--enable_ps2_protocol
# Returns only 10, since intermediate results are cached. # Returns only 10, since intermediate results are cached.
select @invoked; select @invoked;
set @invoked := 0; set @invoked := 0;
--disable_ps2_protocol
#enable after fix MDEV-27871 #enable after fix MDEV-27871
--disable_view_protocol --disable_view_protocol
select benchmark(100, (select avg(func_26093_b(a, rand())) from table_26093)); select benchmark(100, (select avg(func_26093_b(a, rand())) from table_26093));
--enable_view_protocol --enable_view_protocol
--enable_ps2_protocol
# Returns 1000, due to rand() preventing caching. # Returns 1000, due to rand() preventing caching.
select @invoked; select @invoked;
@ -631,6 +637,7 @@ DROP TABLE t1;
--echo # GET_LOCK, RELEASE_LOCK, IS_USED_LOCK functions test --echo # GET_LOCK, RELEASE_LOCK, IS_USED_LOCK functions test
--echo # --echo #
--disable_ps2_protocol
--disable_service_connection --disable_service_connection
--echo # IS_USED_LOCK, IS_FREE_LOCK: the lock is not acquired --echo # IS_USED_LOCK, IS_FREE_LOCK: the lock is not acquired
@ -794,6 +801,7 @@ select is_free_lock(repeat('a', 193));
select release_lock(repeat('a', 193)); select release_lock(repeat('a', 193));
--enable_service_connection --enable_service_connection
--enable_ps2_protocol
--echo --echo
--echo # -- --echo # --
@ -1224,8 +1232,10 @@ DROP TABLE t1;
--echo # MDEV-20517 Assertion `!is_expensive()' failed in Item::value_depends_on_sql_mode_const_item --echo # MDEV-20517 Assertion `!is_expensive()' failed in Item::value_depends_on_sql_mode_const_item
--echo # --echo #
--disable_ps2_protocol
SELECT ( 1 LIKE GET_LOCK( 'foo', 0 ) ) - 2; SELECT ( 1 LIKE GET_LOCK( 'foo', 0 ) ) - 2;
SELECT RELEASE_LOCK('foo'); SELECT RELEASE_LOCK('foo');
--enable_ps2_protocol
--echo # --echo #
--echo # End of 10.2 tests --echo # End of 10.2 tests

View File

@ -90,12 +90,16 @@ delimiter ;//
--echo --echo
--echo # One f1_simple_insert execution per row, no NOT NULL violation --echo # One f1_simple_insert execution per row, no NOT NULL violation
--disable_ps2_protocol
SELECT f1_simple_insert(1); SELECT f1_simple_insert(1);
--enable_ps2_protocol
SELECT * FROM t1_not_null ORDER BY f1,f2; SELECT * FROM t1_not_null ORDER BY f1,f2;
ROLLBACK; ROLLBACK;
SELECT * FROM t1_not_null; SELECT * FROM t1_not_null;
# #
--disable_ps2_protocol
SELECT f1_simple_insert(1) FROM t1_select; SELECT f1_simple_insert(1) FROM t1_select;
--enable_ps2_protocol
SELECT * FROM t1_not_null ORDER BY f1,f2; SELECT * FROM t1_not_null ORDER BY f1,f2;
ROLLBACK; ROLLBACK;
SELECT * FROM t1_not_null; SELECT * FROM t1_not_null;
@ -219,7 +223,9 @@ eval $f1_insert_select;
--echo # - t1_not_null gets a row inserted --echo # - t1_not_null gets a row inserted
--echo # is covered by the manual. --echo # is covered by the manual.
# Non strict sqlmode + INSERT SELECT --> NULL adjusted to default # Non strict sqlmode + INSERT SELECT --> NULL adjusted to default
--disable_ps2_protocol
SELECT f1_insert_select(2); SELECT f1_insert_select(2);
--enable_ps2_protocol
SELECT * FROM t1_not_null ORDER BY f1,f2; SELECT * FROM t1_not_null ORDER BY f1,f2;
ROLLBACK; ROLLBACK;
SELECT * FROM t1_not_null ORDER BY f1,f2; SELECT * FROM t1_not_null ORDER BY f1,f2;
@ -295,7 +301,9 @@ eval $f1_insert_with_two_rows;
--echo # - t1_not_null gets a row inserted --echo # - t1_not_null gets a row inserted
--echo # is covered by the manual. --echo # is covered by the manual.
# Non strict sqlmode + multiple-row INSERT --> NULL adjusted to default # Non strict sqlmode + multiple-row INSERT --> NULL adjusted to default
--disable_ps2_protocol
SELECT f1_insert_with_two_rows(); SELECT f1_insert_with_two_rows();
--enable_ps2_protocol
SELECT * FROM t1_not_null ORDER BY f1,f2; SELECT * FROM t1_not_null ORDER BY f1,f2;
ROLLBACK; ROLLBACK;
SELECT * FROM t1_not_null ORDER BY f1,f2; SELECT * FROM t1_not_null ORDER BY f1,f2;

View File

@ -1518,7 +1518,9 @@ 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_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
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;

View File

@ -2282,9 +2282,11 @@ delimiter ;//
SET @sav_slow_query_log= @@session.slow_query_log; SET @sav_slow_query_log= @@session.slow_query_log;
--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;
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
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;
@ -2296,9 +2298,11 @@ if (!`SELECT @ts_cur = @ts_func and @ts_func = @ts_trig`)
DELETE FROM t_ts; DELETE FROM t_ts;
DELETE FROM t_trig; DELETE FROM t_trig;
--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;
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
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;
if (!`SELECT @ts_cur = @ts_func and @ts_func = @ts_trig`) if (!`SELECT @ts_cur = @ts_func and @ts_func = @ts_trig`)
@ -2350,9 +2354,11 @@ SELECT
--echo # MDEV-14032 SEC_TO_TIME executes side effect two times --echo # MDEV-14032 SEC_TO_TIME executes side effect two times
--echo # --echo #
--disable_ps2_protocol
SET @a=10000000; SET @a=10000000;
SELECT SEC_TO_TIME(@a:=@a+1); SELECT SEC_TO_TIME(@a:=@a+1);
SELECT @a; SELECT @a;
--enable_ps2_protocol
CREATE TABLE t1 (a TEXT); CREATE TABLE t1 (a TEXT);
DELIMITER $$; DELIMITER $$;
@ -2363,7 +2369,9 @@ BEGIN
END; END;
$$ $$
DELIMITER ;$$ DELIMITER ;$$
--disable_ps2_protocol
SELECT SEC_TO_TIME(f1()); SELECT SEC_TO_TIME(f1());
--enable_ps2_protocol
SELECT * FROM t1; SELECT * FROM t1;
DROP TABLE t1; DROP TABLE t1;
DROP FUNCTION f1; DROP FUNCTION f1;

View File

@ -114,7 +114,9 @@ drop table t1;
--echo # BUG#11898467 - SERVER CRASHES ON SELECT HEX(WEIGHT_STRING(STR AS [CHAR|BINARY](N))) IF N IS BIG --echo # BUG#11898467 - SERVER CRASHES ON SELECT HEX(WEIGHT_STRING(STR AS [CHAR|BINARY](N))) IF N IS BIG
--echo # --echo #
SELECT HEX(WEIGHT_STRING('ab' AS CHAR(1000000000000000000))); SELECT HEX(WEIGHT_STRING('ab' AS CHAR(1000000000000000000)));
--disable_ps2_protocol
SELECT HEX(WEIGHT_STRING('ab' AS BINARY(1000000000000000000))); SELECT HEX(WEIGHT_STRING('ab' AS BINARY(1000000000000000000)));
--enable_ps2_protocol
disconnect conn1; disconnect conn1;
connection default; connection default;

View File

@ -838,7 +838,9 @@ 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_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
--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

@ -1032,9 +1032,11 @@ EXPLAIN SELECT a FROM t1 IGNORE INDEX FOR JOIN (PRIMARY,i2);
EXPLAIN SELECT a FROM t1 IGNORE INDEX FOR GROUP BY (PRIMARY,i2) GROUP BY a; EXPLAIN SELECT a FROM t1 IGNORE INDEX FOR GROUP BY (PRIMARY,i2) GROUP BY a;
--echo # Here's a proof it is really doing sorting: --echo # Here's a proof it is really doing sorting:
flush status; flush status;
--disable_ps2_protocol
--disable_result_log --disable_result_log
SELECT a FROM t1 IGNORE INDEX FOR GROUP BY (PRIMARY,i2) GROUP BY a; SELECT a FROM t1 IGNORE INDEX FOR GROUP BY (PRIMARY,i2) GROUP BY a;
--enable_result_log --enable_result_log
--enable_ps2_protocol
show status like 'Sort_%'; show status like 'Sort_%';
--echo # Proof ends. --echo # Proof ends.
--echo # --echo #
@ -1045,9 +1047,11 @@ show status like 'Sort_%';
EXPLAIN SELECT a FROM t1 IGNORE INDEX FOR ORDER BY (PRIMARY,i2) ORDER BY a; EXPLAIN SELECT a FROM t1 IGNORE INDEX FOR ORDER BY (PRIMARY,i2) ORDER BY a;
--echo # Here's a proof it is really doing sorting: --echo # Here's a proof it is really doing sorting:
flush status; flush status;
--disable_ps2_protocol
--disable_result_log --disable_result_log
SELECT a FROM t1 IGNORE INDEX FOR ORDER BY (PRIMARY,i2) ORDER BY a; SELECT a FROM t1 IGNORE INDEX FOR ORDER BY (PRIMARY,i2) ORDER BY a;
--enable_result_log --enable_result_log
--enable_ps2_protocol
show status like 'Sort_%'; show status like 'Sort_%';
--echo # Proof ends. --echo # Proof ends.
--echo # --echo #
@ -1400,7 +1404,9 @@ let $query0=SELECT col1 AS field1, col1 AS field2
# Needs to be range to exercise bug # Needs to be range to exercise bug
--eval EXPLAIN $query0; --eval EXPLAIN $query0;
FLUSH STATUS; FLUSH STATUS;
--disable_ps2_protocol
--eval $query0; --eval $query0;
--enable_ps2_protocol
SHOW SESSION STATUS LIKE 'Sort_scan%'; SHOW SESSION STATUS LIKE 'Sort_scan%';
let $query=SELECT SQL_BIG_RESULT col1 AS field1, col1 AS field2 let $query=SELECT SQL_BIG_RESULT col1 AS field1, col1 AS field2
@ -1409,7 +1415,9 @@ let $query=SELECT SQL_BIG_RESULT col1 AS field1, col1 AS field2
# Needs to be range to exercise bug # Needs to be range to exercise bug
--eval EXPLAIN $query --eval EXPLAIN $query
FLUSH STATUS; FLUSH STATUS;
--disable_ps2_protocol
--eval $query --eval $query
--enable_ps2_protocol
SHOW SESSION STATUS LIKE 'Sort_scan%'; SHOW SESSION STATUS LIKE 'Sort_scan%';
CREATE VIEW v1 AS SELECT * FROM t1; CREATE VIEW v1 AS SELECT * FROM t1;
@ -1643,6 +1651,7 @@ DROP TABLE t1, t2;
#the view protocol creates #the view protocol creates
# an additional util connection and other statistics data # an additional util connection and other statistics data
--disable_ps2_protocol
--disable_view_protocol --disable_view_protocol
FLUSH STATUS; # this test case *must* use Aria temp tables FLUSH STATUS; # this test case *must* use Aria temp tables
@ -1655,6 +1664,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_view_protocol --enable_view_protocol
--enable_ps2_protocol
--echo # --echo #
--echo # Bug #1002146: Unneeded filesort if usage of join buffer is not allowed --echo # Bug #1002146: Unneeded filesort if usage of join buffer is not allowed

View File

@ -919,7 +919,7 @@ DROP TABLE t1,t2;
# #
# Bug#24156: Loose index scan not used with CREATE TABLE ...SELECT and similar statements # Bug#24156: Loose index scan not used with CREATE TABLE ...SELECT and similar statements
# #
--disable_ps2_protocol
CREATE TABLE t1 (a INT, b INT, INDEX (a,b)); CREATE TABLE t1 (a INT, b INT, INDEX (a,b));
INSERT INTO t1 (a, b) VALUES (1,1), (1,2), (1,3), (1,4), (1,5), INSERT INTO t1 (a, b) VALUES (1,1), (1,2), (1,3), (1,4), (1,5),
(2,2), (2,3), (2,1), (3,1), (4,1), (4,2), (4,3), (4,4), (4,5), (4,6); (2,2), (2,3), (2,1), (3,1), (4,1), (4,2), (4,3), (4,4), (4,5), (4,6);
@ -977,6 +977,7 @@ DELETE FROM t3 WHERE (SELECT (SELECT MAX(b) FROM t1 GROUP BY a HAVING a < 2) x
SHOW STATUS LIKE 'handler_read__e%'; SHOW STATUS LIKE 'handler_read__e%';
DROP TABLE t1,t2,t3; DROP TABLE t1,t2,t3;
--enable_ps2_protocol
# #
# Bug#25602: queries with DISTINCT and SQL_BIG_RESULT hint # Bug#25602: queries with DISTINCT and SQL_BIG_RESULT hint

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_ps2_protocol
FLUSH STATUS; FLUSH STATUS;
SELECT a FROM t1 ORDER BY a LIMIT 1; SELECT a FROM t1 ORDER BY a LIMIT 1;
SHOW STATUS LIKE 'HANDLER_READ%'; SHOW STATUS LIKE 'HANDLER_READ%';
@ -24,6 +25,7 @@ SHOW STATUS LIKE 'HANDLER_READ%';
FLUSH STATUS; 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
DROP TABLE t1; DROP TABLE t1;

View File

@ -892,8 +892,10 @@ CREATE TABLE t1 (t INT, u INT, KEY(t));
INSERT INTO t1 VALUES(10, 10), (11, 11), (12, 12), (12, 13),(14, 15), (15, 16), INSERT INTO t1 VALUES(10, 10), (11, 11), (12, 12), (12, 13),(14, 15), (15, 16),
(16, 17), (17, 17); (16, 17), (17, 17);
ANALYZE TABLE t1; ANALYZE TABLE t1;
--disable_ps2_protocol
SELECT t, next_seq_value() r FROM t1 FORCE INDEX(t) SELECT t, next_seq_value() r FROM t1 FORCE INDEX(t)
GROUP BY t HAVING r = 1 ORDER BY t1.u; GROUP BY t HAVING r = 1 ORDER BY t1.u;
--enable_ps2_protocol
DROP TABLE t1; DROP TABLE t1;
DROP FUNCTION next_seq_value; DROP FUNCTION next_seq_value;

View File

@ -1409,12 +1409,13 @@ set global init_connect="";
# #
# Bug#34517 SHOW GLOBAL STATUS does not work properly in embedded server. # Bug#34517 SHOW GLOBAL STATUS does not work properly in embedded server.
# #
--disable_ps2_protocol
create table t0 select * from information_schema.global_status where VARIABLE_NAME='COM_SELECT'; create table t0 select * from information_schema.global_status where VARIABLE_NAME='COM_SELECT';
SELECT 1; SELECT 1;
select a.VARIABLE_VALUE - b.VARIABLE_VALUE from t0 b, information_schema.global_status a select a.VARIABLE_VALUE - b.VARIABLE_VALUE from t0 b, information_schema.global_status a
where a.VARIABLE_NAME = b.VARIABLE_NAME; where a.VARIABLE_NAME = b.VARIABLE_NAME;
drop table t0; drop table t0;
--enable_ps2_protocol
# #
# Bug#35275 INFORMATION_SCHEMA.TABLES.CREATE_OPTIONS omits KEY_BLOCK_SIZE # Bug#35275 INFORMATION_SCHEMA.TABLES.CREATE_OPTIONS omits KEY_BLOCK_SIZE

View File

@ -1,3 +1,4 @@
--disable_ps2_protocol
# #
# MDEV-8633: information_schema.index_statistics doesn't delete item when drop table indexes or drop table; # MDEV-8633: information_schema.index_statistics doesn't delete item when drop table indexes or drop table;
# #
@ -45,3 +46,4 @@ drop table just_a_test;
select * from information_schema.index_statistics where table_schema='test' and table_name='just_a_test'; select * from information_schema.index_statistics where table_schema='test' and table_name='just_a_test';
select * from information_schema.table_statistics where table_schema='test' and table_name='just_a_test'; select * from information_schema.table_statistics where table_schema='test' and table_name='just_a_test';
set global userstat=@save_userstat; set global userstat=@save_userstat;
--enable_ps2_protocol

View File

@ -27,6 +27,7 @@ ANALYZE TABLE lineitem PERSISTENT FOR COLUMNS() INDEXES();
--enable_result_log --enable_result_log
--enable_query_log --enable_query_log
--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';
flush status; flush status;
@ -149,6 +150,7 @@ select o_orderkey, p_partkey
where p_retailprice > 1100 and o_orderdate='1997-01-01' where p_retailprice > 1100 and o_orderdate='1997-01-01'
and o_orderkey=l_orderkey and p_partkey=l_partkey; and o_orderkey=l_orderkey and p_partkey=l_partkey;
show status like 'handler_read%'; show status like 'handler_read%';
--enable_ps2_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
@ -317,12 +319,14 @@ select
A.a + 10 * B.a, A.a + 10 * B.a, A.a + 10 * B.a A.a + 10 * B.a, A.a + 10 * B.a, A.a + 10 * B.a
from t1 A, t1 B; from t1 A, t1 B;
--disable_ps2_protocol
--replace_column 9 # --replace_column 9 #
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;
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;
show status like 'handler_read%'; show status like 'handler_read%';
--enable_ps2_protocol
drop table t1,t2; drop table t1,t2;

View File

@ -210,6 +210,7 @@ drop table t1;
# (and thus for values returned by mysql_affected_rows()) # (and thus for values returned by mysql_affected_rows())
# for various forms of INSERT # for various forms of INSERT
# #
--disable_ps2_protocol
create table t1 (id int primary key, data int); create table t1 (id int primary key, data int);
insert into t1 values (1, 1), (2, 2), (3, 3); insert into t1 values (1, 1), (2, 2), (3, 3);
select row_count(); select row_count();
@ -227,6 +228,7 @@ select row_count();
insert into t1 values (5, 5) on duplicate key update data= data + 10; insert into t1 values (5, 5) on duplicate key update data= data + 10;
select row_count(); select row_count();
drop table t1; drop table t1;
--enable_ps2_protocol
# #
# Bug#25123: ON DUPLICATE KEY clause allows fields not from the insert table # Bug#25123: ON DUPLICATE KEY clause allows fields not from the insert table
@ -284,8 +286,10 @@ BEGIN
END | END |
delimiter ;| delimiter ;|
--disable_ps2_protocol
SELECT f1(); SELECT f1();
SELECT f2(); SELECT f2();
--enable_ps2_protocol
INSERT INTO t1 VALUES (3); INSERT INTO t1 VALUES (3);
INSERT DELAYED INTO t1 VALUES (4); INSERT DELAYED INTO t1 VALUES (4);
@ -592,7 +596,9 @@ CREATE ALGORITHM = MERGE VIEW v1 AS SELECT f1, f2 FROM t1 WHERE f1 = cast('' as
REPLACE INTO v1 SET f2 = 1; REPLACE INTO v1 SET f2 = 1;
SELECT * from t1; SELECT * from t1;
drop view v1; drop view v1;
--disable_ps2_protocol
SELECT 0,0 INTO OUTFILE 't1.txt'; SELECT 0,0 INTO OUTFILE 't1.txt';
--enable_ps2_protocol
CREATE ALGORITHM = MERGE VIEW v1 AS SELECT f1, f2 FROM t1 WHERE f1 = 'x' WITH CHECK OPTION; 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,7 +251,9 @@ 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_ps2_protocol
select * from t1 into outfile 'f'; select * from t1 into outfile 'f';
--enable_ps2_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;
@ -261,7 +263,9 @@ 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_ps2_protocol
select a,b from t1 into outfile 'a'; select a,b from t1 into outfile 'a';
--enable_ps2_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

@ -659,7 +659,9 @@ create table t3 (a int not null, primary key(a));
insert into t3 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); insert into t3 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
flush status; flush status;
--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;
--enable_ps2_protocol
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%';
@ -958,7 +960,9 @@ INSERT INTO t1 VALUES (3,'b'),(4,NULL),(5,'c'),(6,'cc'),(7,'d'),
INSERT INTO t2 VALUES (2,NULL); INSERT INTO t2 VALUES (2,NULL);
ANALYZE TABLE t1,t2; ANALYZE TABLE t1,t2;
FLUSH STATUS; FLUSH STATUS;
--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
SHOW STATUS LIKE 'Handler_read_%'; SHOW STATUS LIKE 'Handler_read_%';
DROP TABLE t1, t2; DROP TABLE t1, t2;

View File

@ -1645,6 +1645,7 @@ insert into t2 values (3,1, 'qwerty'),(3,4, 'qwerty');
insert into t2 values (4,1, 'qwerty'),(4,2, 'qwerty'),(4,3, 'qwerty'), insert into t2 values (4,1, 'qwerty'),(4,2, 'qwerty'),(4,3, 'qwerty'),
(4,4, 'qwerty'); (4,4, 'qwerty');
--disable_ps2_protocol
flush status; flush status;
set join_cache_level=5; set join_cache_level=5;
select t2.f1, t2.f2, t2.f3 from t1,t2 select t2.f1, t2.f2, t2.f3 from t1,t2
@ -1678,6 +1679,8 @@ explain select t2.f1, t2.f2, t2.f3 from t1,t2
where t1.f1=t2.f1 and t2.f2 between t1.f1 and t2.f2; where t1.f1=t2.f1 and t2.f2 between t1.f1 and t2.f2;
show status like "Handler_icp%"; show status like "Handler_icp%";
--enable_ps2_protocol
drop table t1,t2; drop table t1,t2;
set join_cache_level=@save_join_cache_level; set join_cache_level=@save_join_cache_level;
@ -4029,6 +4032,8 @@ insert into t1 values (1), (2);
insert into t2 values (1), (2); insert into t2 values (1), (2);
insert into t3 values (2); insert into t3 values (2);
--disable_ps2_protocol
explain explain
select count(*) from t1 straight_join t2 select count(*) from t1 straight_join t2
where c1 = c2-0 and c2 <= (select max(c3) from t3 where c3 = 2 and @counter:=@counter+1); where c1 = c2-0 and c2 <= (select max(c3) from t3 where c3 = 2 and @counter:=@counter+1);
@ -4055,6 +4060,8 @@ where c1 = c2-0 and
select @counter; select @counter;
--enable_ps2_protocol
drop table t1,t2,t3; drop table t1,t2,t3;
set expensive_subquery_limit=@save_expensive_subquery_limit; set expensive_subquery_limit=@save_expensive_subquery_limit;

View File

@ -685,9 +685,15 @@ create table t1 (a int, b varchar(20));
create table t2 (a int, c varchar(20)); create table t2 (a int, c varchar(20));
insert into t1 values (1,"aaaaaaaaaa"),(2,"bbbbbbbbbb"); insert into t1 values (1,"aaaaaaaaaa"),(2,"bbbbbbbbbb");
insert into t2 values (1,"cccccccccc"),(2,"dddddddddd"); insert into t2 values (1,"cccccccccc"),(2,"dddddddddd");
#Enable after fix MDEV-31276
--disable_ps2_protocol
select group_concat(t1.b,t2.c) from t1 left join t2 using(a) group by t1.a; select group_concat(t1.b,t2.c) from t1 left join t2 using(a) group by t1.a;
--enable_ps2_protocol
select group_concat(t1.b,t2.c) from t1 inner join t2 using(a) group by t1.a; select group_concat(t1.b,t2.c) from t1 inner join t2 using(a) group by t1.a;
#Enable after fix MDEV-31276
--disable_ps2_protocol
select group_concat(t1.b,t2.c) from t1 left join t2 using(a) group by a; select group_concat(t1.b,t2.c) from t1 left join t2 using(a) group by a;
--enable_ps2_protocol
select group_concat(t1.b,t2.c) from t1 inner join t2 using(a) group by a; select group_concat(t1.b,t2.c) from t1 inner join t2 using(a) group by a;
drop table t1, t2; drop table t1, t2;
set group_concat_max_len=default; set group_concat_max_len=default;
@ -874,6 +880,7 @@ DROP TABLE t1,t2;
# Bug 28188: 'not exists' optimization for outer joins # Bug 28188: 'not exists' optimization for outer joins
# #
--disable_ps2_protocol
CREATE TABLE t1 (id int PRIMARY KEY, a varchar(8)); CREATE TABLE t1 (id int PRIMARY KEY, a varchar(8));
CREATE TABLE t2 (id int NOT NULL, b int NOT NULL, INDEX idx(id)); CREATE TABLE t2 (id int NOT NULL, b int NOT NULL, INDEX idx(id));
INSERT INTO t1 VALUES INSERT INTO t1 VALUES
@ -889,7 +896,7 @@ SELECT t1.id, a FROM t1 LEFT JOIN t2 ON t1.id=t2.id WHERE t2.b IS NULL;
show status like 'Handler_read%'; show status like 'Handler_read%';
DROP TABLE t1,t2; DROP TABLE t1,t2;
--enable_ps2_protocol
# #
# Bug 28571: outer join with false on condition over constant tables # Bug 28571: outer join with false on condition over constant tables
# #
@ -1369,6 +1376,7 @@ drop table t1,t2,t3,t4;
--echo # Bug#57024: Poor performance when conjunctive condition over the outer --echo # Bug#57024: Poor performance when conjunctive condition over the outer
--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_view_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);
@ -1411,6 +1419,7 @@ show status like "handler_read%";
drop table t1,t2,t3; drop table t1,t2,t3;
--enable_view_protocol --enable_view_protocol
--enable_ps2_protocol
--echo # --echo #
--echo # Bug#57688 Assertion `!table || (!table->write_set || bitmap_is_set(table->write_set, field --echo # Bug#57688 Assertion `!table || (!table->write_set || bitmap_is_set(table->write_set, field
@ -2363,8 +2372,11 @@ create view v1 as select * from t1
left join ( select 'Y' AS Voted, ElectionID from t2 ) AS T left join ( select 'Y' AS Voted, ElectionID from t2 ) AS T
on T.ElectionID = t1.Election on T.ElectionID = t1.Election
limit 9; limit 9;
#enable after fix MDEV-31277
--disable_ps2_protocol
# limit X causes merge algorithm select as opposed to temp table # limit X causes merge algorithm select as opposed to temp table
select * from v1; select * from v1;
--enable_ps2_protocol
drop table t1, t2; drop table t1, t2;
drop view v1; drop view v1;
@ -2379,7 +2391,10 @@ create view v10 as select *, 'U' as u from t10 left join (select 'Y' as y, t20.b
create table t30 (c int); create table t30 (c int);
insert into t30 values (1),(3); insert into t30 values (1),(3);
create view v20 as select * from t30 left join (select 'X' as x, v10.u, v10.y, v10.b from v10) dt2 on t30.c=dt2.b limit 6; create view v20 as select * from t30 left join (select 'X' as x, v10.u, v10.y, v10.b from v10) dt2 on t30.c=dt2.b limit 6;
#check after fix MDEV-31277
--disable_ps2_protocol
select * from v20 limit 9; select * from v20 limit 9;
--enable_ps2_protocol
drop view v10, v20; drop view v10, v20;
drop table t10, t20, t30; drop table t10, t20, t30;
@ -2393,6 +2408,8 @@ insert into t3 values (3),(1);
create table t1 (a int); create table t1 (a int);
insert into t1 values (1),(2),(7),(1); insert into t1 values (1),(2),(7),(1);
#check after fix MDEV-31277
--disable_ps2_protocol
select * from select * from
( (
select * from select * from
@ -2405,6 +2422,7 @@ select * from
on dt1.a=dt2.b on dt1.a=dt2.b
limit 9 limit 9
) dt; ) dt;
--enable_ps2_protocol
## Same as dt3 above ## Same as dt3 above
create view v3(x,c) as select * from (select 'X' as x, t3.c from t3) dt3; create view v3(x,c) as select * from (select 'X' as x, t3.c from t3) dt3;
@ -2418,7 +2436,10 @@ create view v0(y,b,x,c) as select * from v2 left join v3 on v2.b=v3.c;
# Same as above select statement # Same as above select statement
create view v1 as select 'Z' as z, t1.a, v0.* from t1 left join v0 on t1.a=v0.b limit 9; create view v1 as select 'Z' as z, t1.a, v0.* from t1 left join v0 on t1.a=v0.b limit 9;
#check after fix MDEV-31277
--disable_ps2_protocol
select * from v1; select * from v1;
--enable_ps2_protocol
set statement join_cache_level=0 for set statement join_cache_level=0 for
select * from v1; select * from v1;

View File

@ -276,6 +276,7 @@ DROP TABLE t1;
# Test usage of the KEY_CACHE table from information schema # Test usage of the KEY_CACHE table from information schema
# for a simple key cache # for a simple key cache
--disable_ps2_protocol
set global key_buffer_size=@save_key_buffer_size; set global key_buffer_size=@save_key_buffer_size;
set global key_cache_block_size=@save_key_cache_block_size; set global key_cache_block_size=@save_key_cache_block_size;
select @@key_buffer_size; select @@key_buffer_size;
@ -536,6 +537,7 @@ set global keycache2.key_buffer_size=0;
set global key_buffer_size=@save_key_buffer_size; set global key_buffer_size=@save_key_buffer_size;
set global key_cache_segments=@save_key_cache_segments; set global key_cache_segments=@save_key_cache_segments;
set global key_cache_file_hash_size=@save_key_cache_file_hash_size; set global key_cache_file_hash_size=@save_key_cache_file_hash_size;
--enable_ps2_protocol
# End of 5.2 tests # End of 5.2 tests

View File

@ -489,6 +489,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_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
FROM t1, t2 AS alias2, t2 AS alias3 FROM t1, t2 AS alias2, t2 AS alias3
@ -506,6 +507,7 @@ GROUP BY field1, field2, field3, field4, field5
LIMIT ROWS EXAMINED 124; 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
drop table t1, t2; drop table t1, t2;
@ -550,10 +552,12 @@ INSERT INTO t2 VALUES
(5, 0),(3, 4),(6, 1), (5, 0),(3, 4),(6, 1),
(5, 8),(4, 9),(8, 1); (5, 8),(4, 9),(8, 1);
--disable_ps2_protocol
SELECT (SELECT MAX(c) FROM t1, t2) SELECT (SELECT MAX(c) FROM t1, t2)
FROM t2 FROM t2
WHERE c = (SELECT MAX(b) FROM t2) WHERE c = (SELECT MAX(b) FROM t2)
LIMIT ROWS EXAMINED 3; LIMIT ROWS EXAMINED 3;
--enable_ps2_protocol
drop table t1, t2; drop table t1, t2;

View File

@ -36,6 +36,7 @@ drop table t1;
# #
# Bug #12053 LOAD DATA INFILE ignores NO_AUTO_VALUE_ON_ZERO setting # Bug #12053 LOAD DATA INFILE ignores NO_AUTO_VALUE_ON_ZERO setting
# #
--disable_ps2_protocol
SET @OLD_SQL_MODE=@@SQL_MODE, @@SQL_MODE=NO_AUTO_VALUE_ON_ZERO; 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);
@ -59,6 +60,7 @@ select * from t1;
remove_file $MYSQLTEST_VARDIR/tmp/t1; remove_file $MYSQLTEST_VARDIR/tmp/t1;
SET @@SQL_MODE=@OLD_SQL_MODE; SET @@SQL_MODE=@OLD_SQL_MODE;
drop table t1; drop table t1;
--enable_ps2_protocol
# #
# Bug #11203: LOAD DATA does not accept same characters for ESCAPED and # Bug #11203: LOAD DATA does not accept same characters for ESCAPED and
@ -92,7 +94,9 @@ INSERT INTO t1 (c1) VALUES
SELECT * FROM t1; SELECT * FROM t1;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--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
cat_file $MYSQLTEST_VARDIR/tmp/t1; cat_file $MYSQLTEST_VARDIR/tmp/t1;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
@ -183,7 +187,9 @@ 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_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
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;
@ -200,16 +206,20 @@ 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_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
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_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
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;
@ -228,7 +238,9 @@ INSERT INTO t1 (c1, c2, c3, c4) VALUES (10, '1970-02-01 01:02:03', 1.1E-100, 1.1
SELECT * FROM t1; SELECT * FROM t1;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--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
cat_file $MYSQLTEST_VARDIR/tmp/t1; cat_file $MYSQLTEST_VARDIR/tmp/t1;
echo EOF; echo EOF;
@ -365,8 +377,10 @@ SET @OLD_SQL_MODE=@@SESSION.SQL_MODE;
SET sql_mode = ''; SET sql_mode = '';
--disable_ps2_protocol
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--eval SELECT '1 \\\\aa\n' INTO DUMPFILE '$file' --eval SELECT '1 \\\\aa\n' INTO DUMPFILE '$file'
--enable_ps2_protocol
CREATE TABLE t1 (id INT, val1 CHAR(3)) ENGINE=MyISAM; CREATE TABLE t1 (id INT, val1 CHAR(3)) ENGINE=MyISAM;
@ -378,13 +392,17 @@ SELECT * FROM t1;
# show we can write this with OUTFILE, forcing the parameters for now # 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_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
--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_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
--diff_files $file $file2 --diff_files $file $file2
--remove_file $file2 --remove_file $file2
@ -417,7 +435,9 @@ INSERT INTO t1 (id, val1) VALUES (3, '\tx');
--echo 1.1 NO_BACKSLASH_ESCAPES, use defaults for ESCAPED BY --echo 1.1 NO_BACKSLASH_ESCAPES, use defaults for ESCAPED BY
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--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
--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 ' '
@ -439,7 +459,9 @@ eval SELECT LOAD_FILE("$file");
--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_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
--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 ' '
@ -465,7 +487,9 @@ 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_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
--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 ' '
@ -493,7 +517,9 @@ 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_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
--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,7 +570,9 @@ 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_ps2_protocol
SELECT * INTO OUTFILE 't-1' FROM t1; SELECT * INTO OUTFILE 't-1' FROM t1;
--enable_ps2_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;
@ -566,7 +594,9 @@ select @@character_set_filesystem;
--echo # --echo #
CREATE TABLE t1(col0 LONGBLOB); CREATE TABLE t1(col0 LONGBLOB);
--disable_ps2_protocol
SELECT 'test' INTO OUTFILE 't1.txt'; SELECT 'test' INTO OUTFILE 't1.txt';
--enable_ps2_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;
@ -635,7 +665,9 @@ disconnect con1;
--echo # --echo #
CREATE TABLE t1(f1 INT); CREATE TABLE t1(f1 INT);
--disable_ps2_protocol
EVAL SELECT 0xE1BB30 INTO OUTFILE 't1.dat'; EVAL SELECT 0xE1BB30 INTO OUTFILE 't1.dat';
--enable_ps2_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
@ -649,9 +681,11 @@ remove_file $MYSQLD_DATADIR/test/t1.dat;
--echo # WHEN ERROR OCCURS --echo # WHEN ERROR OCCURS
--echo # --echo #
--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
--eval SELECT '1\n' INTO DUMPFILE '$file' --eval SELECT '1\n' INTO DUMPFILE '$file'
--enable_ps2_protocol
create table t1(a point); create table t1(a point);
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
@ -737,7 +771,9 @@ CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a), UNIQUE(b));
INSERT INTO t1 VALUES (1,1); 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_ps2_protocol
SELECT a, b INTO OUTFILE '15645.data' FROM t1; SELECT a, b INTO OUTFILE '15645.data' FROM t1;
--enable_ps2_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

@ -8,6 +8,7 @@ drop DATABASE if exists mysqltest_1;
# Test to see if select will get the lock ahead of low priority update # Test to see if select will get the lock ahead of low priority update
--disable_ps2_protocol
connect (locker,localhost,root,,); connect (locker,localhost,root,,);
connect (locker2,localhost,root,,); connect (locker2,localhost,root,,);
connect (reader,localhost,root,,); connect (reader,localhost,root,,);
@ -87,6 +88,7 @@ select release_lock("mysqltest_lock");
connection writer; connection writer;
reap; reap;
drop table t1; drop table t1;
--enable_ps2_protocol
# #
# Test problem when using locks with multi-updates # Test problem when using locks with multi-updates

View File

@ -44,6 +44,7 @@ show fields from mysql.slow_log;
# #
# Check flush command # Check flush command
# #
--disable_ps2_protocol
flush slow logs; flush slow logs;
@ -115,6 +116,7 @@ select * from t;
show session status like 'Slow_queries'; show session status like 'Slow_queries';
drop table t; drop table t;
--enable_ps2_protocol
--echo # --echo #
--echo # End of 10.3 tests --echo # End of 10.3 tests

View File

@ -16,6 +16,7 @@ connect (con2,localhost,root,,);
# #
# Bug #27638: slow logging to CSV table inserts bad query_time and lock_time values # Bug #27638: slow logging to CSV table inserts bad query_time and lock_time values
# #
--disable_ps2_protocol
connection con1; connection con1;
set session long_query_time=10; set session long_query_time=10;
select get_lock('bug27638', 1); select get_lock('bug27638', 1);
@ -36,5 +37,6 @@ connection default;
disconnect con1; disconnect con1;
disconnect con2; disconnect con2;
--enable_ps2_protocol
set @@global.log_output = @log_output.saved; set @@global.log_output = @log_output.saved;

View File

@ -1051,12 +1051,14 @@ INSERT INTO t1 VALUES (2,2,2);
INSERT INTO t1 VALUES (3,3,3); INSERT INTO t1 VALUES (3,3,3);
INSERT INTO t1 VALUES (4,4,4); INSERT INTO t1 VALUES (4,4,4);
--disable_ps2_protocol
SELECT SQL_NO_CACHE 'Bug#31700 - SCAN',f1,f2,f3,SLEEP(1.1) FROM t1 WHERE f3=4; SELECT SQL_NO_CACHE 'Bug#31700 - 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;
--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;
--enable_ps2_protocol
DROP TABLE t1; DROP TABLE t1;

View File

@ -12,7 +12,9 @@ insert into t1 () values
(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(), (),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),
(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(), (),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),
(),(),(),(); (),(),(),();
--disable_ps2_protocol
select * into outfile 'load.data' from t1; select * into outfile 'load.data' from t1;
--enable_ps2_protocol
create temporary table tmp (a varchar(1024), b int, c int, d int, e linestring, unique (e)); 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;
@ -223,7 +225,9 @@ 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_ps2_protocol
SELECT * INTO OUTFILE 'load.data' from t1; SELECT * INTO OUTFILE 'load.data' from t1;
--enable_ps2_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;
@ -237,7 +241,9 @@ 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_ps2_protocol
SELECT * INTO OUTFILE 'load.data' from t1; SELECT * INTO OUTFILE 'load.data' from t1;
--enable_ps2_protocol
ALTER IGNORE TABLE t1 ADD UNIQUE INDEX (data); ALTER IGNORE TABLE t1 ADD UNIQUE INDEX (data);
SELECT * FROM t1; SELECT * FROM t1;

View File

@ -2023,7 +2023,9 @@ BEGIN
RETURN (SELECT MAX(c1) FROM tm1); RETURN (SELECT MAX(c1) FROM tm1);
END| END|
DELIMITER ;| DELIMITER ;|
--disable_ps2_protocol
SELECT f1() FROM (SELECT 1 UNION SELECT 1) c1; SELECT f1() FROM (SELECT 1 UNION SELECT 1) c1;
--enable_ps2_protocol
DROP FUNCTION f1; DROP FUNCTION f1;
DROP TABLE tm1, t1, t2; DROP TABLE tm1, t1, t2;
# #

View File

@ -273,6 +273,7 @@ drop table t1;
--echo # --echo #
--echo # Test of MRR handler counters --echo # Test of MRR handler counters
--echo # --echo #
--disable_ps2_protocol
flush status; flush status;
show status like 'Handler_mrr%'; show status like 'Handler_mrr%';
create table t0 (a int); create table t0 (a int);
@ -321,6 +322,7 @@ show status like 'handler_mrr%';
set join_cache_level= @join_cache_level_save; set join_cache_level= @join_cache_level_save;
set join_buffer_size= @join_buffer_size_save; set join_buffer_size= @join_buffer_size_save;
--enable_ps2_protocol
drop table t0, t1; drop table t0, t1;

View File

@ -2810,6 +2810,7 @@ drop database d;
--echo # MDEV-21786: --echo # MDEV-21786:
--echo # mysqldump will forget sequence definition details on --no-data dump --echo # mysqldump will forget sequence definition details on --no-data dump
--echo # --echo #
--disable_ps2_protocol
create database d; create database d;
CREATE SEQUENCE d.s1 START WITH 100 INCREMENT BY 10 MINVALUE=100 MAXVALUE=1100 CYCLE; CREATE SEQUENCE d.s1 START WITH 100 INCREMENT BY 10 MINVALUE=100 MAXVALUE=1100 CYCLE;
@ -2860,6 +2861,7 @@ show create sequence d2.s1;
drop sequence d.s1, d.s2, d.s3, d.s4; drop sequence d.s1, d.s2, d.s3, d.s4;
drop database d; drop database d;
drop database d2; drop database d2;
--enable_ps2_protocol
--echo # --echo #
--echo # MDEV-20070 --echo # MDEV-20070

View File

@ -29,7 +29,9 @@ SET GLOBAL profiling=on;
create user mysqltest1@localhost; create user mysqltest1@localhost;
connect (con1,localhost,mysqltest1,,); connect (con1,localhost,mysqltest1,,);
connection con1; connection con1;
--disable_ps2_protocol
SELECT @a, @b; SELECT @a, @b;
--enable_ps2_protocol
--replace_column 2 # --replace_column 2 #
SHOW PROFILES; SHOW PROFILES;

View File

@ -1084,6 +1084,7 @@ DROP TABLE t1;
# Testing with side effects # Testing with side effects
--disable_ps2_protocol
CREATE TABLE t1 (a INT); CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2),(3); INSERT INTO t1 VALUES (1),(2),(3);
SET @a=0; SET @a=0;
@ -1092,6 +1093,7 @@ SELECT @a;
SET @a=0; SET @a=0;
SELECT NULLIF(AVG(a),0), NULLIF(AVG(LAST_VALUE(@a:=@a+1,a)),0) FROM t1; SELECT NULLIF(AVG(a),0), NULLIF(AVG(LAST_VALUE(@a:=@a+1,a)),0) FROM t1;
SELECT @a; SELECT @a;
--enable_ps2_protocol
# There should not be cache in here: # There should not be cache in here:

View File

@ -233,6 +233,7 @@ SELECT COUNT(*) FROM t3;
EXPLAIN SELECT SQL_CALC_FOUND_ROWS * FROM t1 LEFT JOIN t2 ON t1.a=t2.a 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
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;
@ -240,6 +241,7 @@ SELECT SQL_CALC_FOUND_ROWS * FROM t1 LEFT JOIN t2 ON t1.a=t2.a
SELECT FOUND_ROWS(); SELECT FOUND_ROWS();
SHOW STATUS LIKE "handler_read%"; SHOW STATUS LIKE "handler_read%";
--enable_view_protocol --enable_view_protocol
--enable_ps2_protocol
DROP TABLE t1,t2,t3,t4; DROP TABLE t1,t2,t3,t4;
# End of 4.1 tests # End of 4.1 tests

View File

@ -18,8 +18,11 @@ select {fn length("hello")}, { date "1997-10-20" };
create table t1 (a int not null auto_increment,b int not null,primary key (a,b)); create table t1 (a int not null auto_increment,b int not null,primary key (a,b));
insert into t1 SET A=NULL,B=1; insert into t1 SET A=NULL,B=1;
insert into t1 SET a=null,b=2; insert into t1 SET a=null,b=2;
#Enable after fix MDEV-31307
--disable_ps2_protocol
select * from t1 where a is null and b=2; select * from t1 where a is null and b=2;
select * from t1 where a is null; select * from t1 where a is null;
--enable_ps2_protocol
explain select * from t1 where b is null; explain select * from t1 where b is null;
drop table t1; drop table t1;
@ -28,8 +31,11 @@ drop table t1;
# #
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY); CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY);
INSERT INTO t1 VALUES (NULL); INSERT INTO t1 VALUES (NULL);
#Enable after fix MDEV-31307
--disable_ps2_protocol
SELECT sql_no_cache a, last_insert_id() FROM t1 WHERE a IS NULL; SELECT sql_no_cache a, last_insert_id() FROM t1 WHERE a IS NULL;
SELECT sql_no_cache a, last_insert_id() FROM t1 WHERE a IS NULL; SELECT sql_no_cache a, last_insert_id() FROM t1 WHERE a IS NULL;
--enable_ps2_protocol
SELECT sql_no_cache a, last_insert_id() FROM t1; SELECT sql_no_cache a, last_insert_id() FROM t1;
DROP TABLE t1; DROP TABLE t1;

View File

@ -450,6 +450,7 @@ DROP TABLE t;
--echo # MDEV-14041 Server crashes in String::length on queries with functions and ROLLUP --echo # MDEV-14041 Server crashes in String::length on queries with functions and ROLLUP
--echo # --echo #
--disable_ps2_protocol
#enable view protocol after fix MDEV-28538 #enable view protocol after fix MDEV-28538
--disable_view_protocol --disable_view_protocol
@ -460,6 +461,7 @@ SELECT HEX( RELEASE_LOCK( 'foo' ) ) AS f FROM t1 GROUP BY f WITH ROLLUP;
DROP TABLE t1; DROP TABLE t1;
--enable_view_protocol --enable_view_protocol
--enable_ps2_protocol
CREATE TABLE t1 (i INT); CREATE TABLE t1 (i INT);
INSERT INTO t1 VALUES (1),(2); INSERT INTO t1 VALUES (1),(2);

View File

@ -21,6 +21,7 @@ create view v2 as select * from t1 where t1.a=1 group by t1.b;
set optimizer_trace="enabled=on"; set optimizer_trace="enabled=on";
--echo # Mergeable views/derived tables --echo # Mergeable views/derived tables
--disable_ps2_protocol
--disable_view_protocol --disable_view_protocol
select * from v1; select * from v1;
select * from information_schema.OPTIMIZER_TRACE; select * from information_schema.OPTIMIZER_TRACE;
@ -31,6 +32,7 @@ select * from information_schema.OPTIMIZER_TRACE;
select * from v2; select * from v2;
select * from information_schema.OPTIMIZER_TRACE; select * from information_schema.OPTIMIZER_TRACE;
--enable_view_protocol --enable_view_protocol
--enable_ps2_protocol
drop table t1,t2; drop table t1,t2;
drop view v1,v2; drop view v1,v2;
drop function f1; drop function f1;

View File

@ -66,7 +66,9 @@ grant show view on db1.v1 to 'bar'@'%';
--change_user foo --change_user foo
select current_user(); select current_user();
set optimizer_trace="enabled=on"; set optimizer_trace="enabled=on";
--disable_ps2_protocol
select * from db1.v1; select * from db1.v1;
--enable_ps2_protocol
select * from information_schema.OPTIMIZER_TRACE; select * from information_schema.OPTIMIZER_TRACE;
set optimizer_trace="enabled=off"; set optimizer_trace="enabled=off";

View File

@ -347,6 +347,8 @@ DROP TABLE t1;
--echo # MDEV-14835: conversion to TVC with BIGINT or YEAR values --echo # MDEV-14835: conversion to TVC with BIGINT or YEAR values
--echo # --echo #
#Enable after fix MDEV-31178
--disable_ps2_protocol
SET @@in_predicate_conversion_threshold= 2; SET @@in_predicate_conversion_threshold= 2;
CREATE TABLE t1 (a BIGINT); CREATE TABLE t1 (a BIGINT);
@ -362,6 +364,7 @@ SELECT * FROM t2 WHERE y IN ('2009','2011');
DROP TABLE t1,t2; DROP TABLE t1,t2;
SET @@in_predicate_conversion_threshold= default; SET @@in_predicate_conversion_threshold= default;
--enable_ps2_protocol
--echo # --echo #
--echo # MDEV-17222: conversion to TVC with no names for constants --echo # MDEV-17222: conversion to TVC with no names for constants

View File

@ -1463,6 +1463,7 @@ SELECT * FROM t1 WHERE f1>10 ORDER BY f2, f0 LIMIT 0;
SELECT * FROM t1 WHERE f1>10 ORDER BY f2, f0 LIMIT 10 OFFSET 10; SELECT * FROM t1 WHERE f1>10 ORDER BY f2, f0 LIMIT 10 OFFSET 10;
SELECT * FROM t1 WHERE f1>10 ORDER BY f2, f0 LIMIT 0 OFFSET 10; SELECT * FROM t1 WHERE f1>10 ORDER BY f2, f0 LIMIT 0 OFFSET 10;
--disable_ps2_protocol
################ ################
## Test with SQL_CALC_FOUND_ROWS ## Test with SQL_CALC_FOUND_ROWS
set sort_buffer_size= 32768; set sort_buffer_size= 32768;
@ -1509,6 +1510,7 @@ SELECT SQL_CALC_FOUND_ROWS * FROM t1 JOIN tmp on t1.f2=tmp.f2
WHERE t1.f2>20 WHERE t1.f2>20
ORDER BY tmp.f1, f0 LIMIT 30 OFFSET 30; ORDER BY tmp.f1, f0 LIMIT 30 OFFSET 30;
SELECT FOUND_ROWS(); SELECT FOUND_ROWS();
--enable_ps2_protocol
################ ################
## Test views ## Test views
@ -1533,6 +1535,7 @@ GROUP BY 1 ORDER BY 2,1 LIMIT 0;
################ ################
## Test SP ## Test SP
--disable_ps2_protocol
delimiter |; delimiter |;
CREATE PROCEDURE wl1393_sp_test() CREATE PROCEDURE wl1393_sp_test()
BEGIN BEGIN
@ -1546,6 +1549,7 @@ END|
CALL wl1393_sp_test()| CALL wl1393_sp_test()|
DROP PROCEDURE wl1393_sp_test| DROP PROCEDURE wl1393_sp_test|
delimiter ;| delimiter ;|
--enable_ps2_protocol
################ ################
## Test with subqueries ## Test with subqueries
@ -1880,6 +1884,7 @@ insert into t1
analyze table t1; analyze table t1;
--enable_result_log --enable_result_log
--disable_ps2_protocol
explain explain
select b, count(*) num_cnt from t1 select b, count(*) num_cnt from t1
where a > 9750 group by b order by num_cnt; where a > 9750 group by b order by num_cnt;
@ -1899,6 +1904,7 @@ select b, count(*) num_cnt from t1
where a > 9750 group by b order by num_cnt limit 1; where a > 9750 group by b order by num_cnt limit 1;
--enable_result_log --enable_result_log
show status like '%Handler_read%'; show status like '%Handler_read%';
--enable_ps2_protocol
drop table t0, t1; drop table t0, t1;

View File

@ -57,7 +57,9 @@ set sort_buffer_size= 32768;
FLUSH STATUS; FLUSH STATUS;
SHOW SESSION STATUS LIKE 'Sort%'; SHOW SESSION STATUS LIKE 'Sort%';
--disable_ps2_protocol
SELECT * FROM t1 ORDER BY f2 LIMIT 100; SELECT * FROM t1 ORDER BY f2 LIMIT 100;
--enable_ps2_protocol
SHOW SESSION STATUS LIKE 'Sort%'; SHOW SESSION STATUS LIKE 'Sort%';

View File

@ -8,6 +8,7 @@ enable_query_log;
# 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_ps2_protocol
# #
# test of into outfile|dumpfile # test of into outfile|dumpfile
@ -139,3 +140,4 @@ drop database mysqltest;
# Wait till we reached the initial number of concurrent sessions # Wait till we reached the initial number of concurrent sessions
--source include/wait_until_count_sessions.inc --source include/wait_until_count_sessions.inc
--enable_ps2_protocol

View File

@ -5,6 +5,7 @@ DROP TABLE IF EXISTS t1, t2;
#enable view protocol after fix MDEV-27871 #enable view protocol after fix MDEV-27871
-- source include/no_view_protocol.inc -- source include/no_view_protocol.inc
--disable_ps2_protocol
--echo # --echo #
--echo # Bug#31663 FIELDS TERMINATED BY special character --echo # Bug#31663 FIELDS TERMINATED BY special character
--echo # --echo #
@ -291,7 +292,7 @@ let $length= 800;
SELECT LENGTH(a) FROM t2; SELECT LENGTH(a) FROM t2;
DROP TABLE t1, t2; DROP TABLE t1, t2;
--enable_ps2_protocol
########################################################################### ###########################################################################
--echo # End of 5.1 tests. --echo # End of 5.1 tests.

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_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);
SHOW STATUS LIKE 'Handler_read_%'; SHOW STATUS LIKE 'Handler_read_%';
@ -484,6 +485,7 @@ FLUSH STATUS;
SELECT c1 FROM t2 WHERE (c1 > 10 AND c1 < 13) OR (c1 > 17 AND c1 < 20); 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
# 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)
@ -505,6 +507,7 @@ INSERT INTO `t2` VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13),
EXPLAIN PARTITIONS SELECT c1 FROM t1 WHERE (c1 > 2 AND c1 < 5); EXPLAIN PARTITIONS SELECT c1 FROM t1 WHERE (c1 > 2 AND c1 < 5);
--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);
SHOW STATUS LIKE 'Handler_read_%'; SHOW STATUS LIKE 'Handler_read_%';
@ -527,6 +530,7 @@ FLUSH STATUS;
SELECT c1 FROM t2 WHERE (c1 > 12 AND c1 < 15); 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
--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

@ -10,6 +10,7 @@ WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
--echo # Bug#13559657: PARTITION SELECTION DOES NOT WORK WITH VIEWS --echo # Bug#13559657: PARTITION SELECTION DOES NOT WORK WITH VIEWS
--echo # --echo #
--disable_view_protocol --disable_view_protocol
--disable_ps2_protocol
CREATE TABLE t1 (a int) CREATE TABLE t1 (a int)
ENGINE = InnoDB ENGINE = InnoDB
PARTITION BY HASH (a) PARTITIONS 2; PARTITION BY HASH (a) PARTITIONS 2;
@ -85,7 +86,6 @@ SELECT * FROM v1;
SELECT * FROM t1; SELECT * FROM t1;
DROP VIEW v1; DROP VIEW v1;
DROP TABLE t1; DROP TABLE t1;
--enable_service_connection
--echo # Original tests for WL#5217 --echo # Original tests for WL#5217
--echo # Must have InnoDB as engine to get the same statistics results. --echo # Must have InnoDB as engine to get the same statistics results.
@ -101,7 +101,6 @@ eval $get_handler_status_counts;
eval $get_handler_status_counts; eval $get_handler_status_counts;
--echo # OK, seems to add number of variables processed before HANDLER_WRITE --echo # OK, seems to add number of variables processed before HANDLER_WRITE
--echo # and number of variables + 1 evaluated in the previous call in RND_NEXT --echo # and number of variables + 1 evaluated in the previous call in RND_NEXT
--disable_service_connection
CREATE TABLE t1 CREATE TABLE t1
(a INT NOT NULL, (a INT NOT NULL,
b varchar (64), b varchar (64),
@ -622,6 +621,7 @@ eval $get_handler_status_counts;
SELECT * FROM t3 PARTITION (pNeg); SELECT * FROM t3 PARTITION (pNeg);
DROP TABLE t1, t2, t3; DROP TABLE t1, t2, t3;
--enable_ps2_protocol
--enable_view_protocol --enable_view_protocol
--echo # Test from superseeded WL# 2682 --echo # Test from superseeded WL# 2682
# Partition select tests. # Partition select tests.

View File

@ -963,6 +963,7 @@ ANALYZE TABLE t1,t2;
EXPLAIN SELECT a, MAX(b) FROM t1 WHERE a IN (10,100) GROUP BY a; EXPLAIN SELECT a, MAX(b) FROM t1 WHERE a IN (10,100) GROUP BY a;
EXPLAIN SELECT a, MAX(b) FROM t2 WHERE a IN (10,100) GROUP BY a; EXPLAIN SELECT a, MAX(b) FROM t2 WHERE a IN (10,100) GROUP BY a;
--disable_ps2_protocol
FLUSH status; FLUSH status;
SELECT a, MAX(b) FROM t1 WHERE a IN (10, 100) GROUP BY a; SELECT a, MAX(b) FROM t1 WHERE a IN (10, 100) GROUP BY a;
--echo # Should be no more than 4 reads. --echo # Should be no more than 4 reads.
@ -972,6 +973,7 @@ FLUSH status;
SELECT a, MAX(b) FROM t2 WHERE a IN (10, 100) GROUP BY a; SELECT a, MAX(b) FROM t2 WHERE a IN (10, 100) GROUP BY a;
--echo # Should be no more than 4 reads. --echo # Should be no more than 4 reads.
SHOW status LIKE 'handler_read_key'; SHOW status LIKE 'handler_read_key';
--enable_ps2_protocol
--echo # --echo #
--echo # MDEV-18501 Partition pruning doesn't work for historical queries --echo # MDEV-18501 Partition pruning doesn't work for historical queries

View File

@ -4495,7 +4495,10 @@ select 2 BETWEEN 1 AND 3 IN (SELECT 0 UNION SELECT 1), 2 BETWEEN 1 AND (3 IN (SE
create or replace view v1 as select 2 LIKE 1 ESCAPE 3 IN (SELECT 0 UNION SELECT 1), 2 LIKE 1 ESCAPE (3 IN (SELECT 0 UNION SELECT 1)), (2 LIKE 1 ESCAPE 3) IN (SELECT 0 UNION SELECT 1); create or replace view v1 as select 2 LIKE 1 ESCAPE 3 IN (SELECT 0 UNION SELECT 1), 2 LIKE 1 ESCAPE (3 IN (SELECT 0 UNION SELECT 1)), (2 LIKE 1 ESCAPE 3) IN (SELECT 0 UNION SELECT 1);
Select view_definition from information_schema.views where table_schema='test' and table_name='v1'; Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
#Enable after fix MDEV-31282
--disable_ps2_protocol
select 2 LIKE 1 ESCAPE 3 IN (SELECT 0 UNION SELECT 1), 2 LIKE 1 ESCAPE (3 IN (SELECT 0 UNION SELECT 1)), (2 LIKE 1 ESCAPE 3) IN (SELECT 0 UNION SELECT 1) union select * from v1; select 2 LIKE 1 ESCAPE 3 IN (SELECT 0 UNION SELECT 1), 2 LIKE 1 ESCAPE (3 IN (SELECT 0 UNION SELECT 1)), (2 LIKE 1 ESCAPE 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
--enable_ps2_protocol
create or replace view v1 as select 3 BETWEEN 1 AND 2 AND NULL, 3 BETWEEN (1 AND 2) AND NULL, 3 BETWEEN 1 AND (2 AND NULL), (3 BETWEEN 1 AND 2) AND NULL; create or replace view v1 as select 3 BETWEEN 1 AND 2 AND NULL, 3 BETWEEN (1 AND 2) AND NULL, 3 BETWEEN 1 AND (2 AND NULL), (3 BETWEEN 1 AND 2) AND NULL;
Select view_definition from information_schema.views where table_schema='test' and table_name='v1'; Select view_definition from information_schema.views where table_schema='test' and table_name='v1';

View File

@ -56,6 +56,7 @@ insert into t1(b) select b from t2;
select count(*) from t1; select count(*) from t1;
select count(*) from t2; select count(*) from t2;
--disable_ps2_protocol
flush tables; flush status; flush tables; flush status;
show status like "key_read%"; show status like "key_read%";
@ -99,6 +100,7 @@ flush tables; flush status;
show status like "key_read%"; show status like "key_read%";
load index into cache t3 key (b), t2 key (c) ; load index into cache t3 key (b), t2 key (c) ;
show status like "key_read%"; show status like "key_read%";
--enable_ps2_protocol
drop table t1, t2; drop table t1, t2;

View File

@ -1,6 +1,7 @@
--source include/have_profiling.inc --source include/have_profiling.inc
--source include/no_view_protocol.inc --source include/no_view_protocol.inc
--disable_ps2_protocol
# Verify that the protocol isn't violated if we ask for profiling info # Verify that the protocol isn't violated if we ask for profiling info
# before profiling has recorded anything. # before profiling has recorded anything.
show profiles; show profiles;
@ -257,7 +258,7 @@ drop function if exists f1;
#--eval select 1; select 2; select 3; #--eval select 1; select 2; select 3;
## two continuations, one starting ## two continuations, one starting
#select state from information_schema.profiling where seq=1 order by query_id desc limit 3; #select state from information_schema.profiling where seq=1 order by query_id desc limit 3;
--enable_ps2_protocol
## last thing in the file ## last thing in the file
set session profiling = OFF; set session profiling = OFF;

View File

@ -466,6 +466,7 @@ deallocate prepare stmt;
# Bug#6088 "FOUND_ROWS returns wrong values for prepared statements when # Bug#6088 "FOUND_ROWS returns wrong values for prepared statements when
# LIMIT is used" # LIMIT is used"
# #
--disable_ps2_protocol
create table t1 (a int); create table t1 (a int);
insert into t1 (a) values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10); insert into t1 (a) values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
prepare stmt from "select sql_calc_found_rows * from t1 limit 2"; prepare stmt from "select sql_calc_found_rows * from t1 limit 2";
@ -477,6 +478,7 @@ execute stmt;
select found_rows(); select found_rows();
deallocate prepare stmt; deallocate prepare stmt;
drop table t1; drop table t1;
--enable_ps2_protocol
# #
# Bug#6047 "permission problem when executing mysql_stmt_execute with derived # Bug#6047 "permission problem when executing mysql_stmt_execute with derived
@ -558,13 +560,14 @@ drop table t1;
# #
# Bug #6089: FOUND_ROWS returns wrong values when no table/view is used # Bug #6089: FOUND_ROWS returns wrong values when no table/view is used
# #
--disable_ps2_protocol
prepare stmt from "SELECT SQL_CALC_FOUND_ROWS 'foo' UNION SELECT 'bar' LIMIT 0"; prepare stmt from "SELECT SQL_CALC_FOUND_ROWS 'foo' UNION SELECT 'bar' LIMIT 0";
execute stmt; execute stmt;
SELECT FOUND_ROWS(); SELECT FOUND_ROWS();
execute stmt; execute stmt;
SELECT FOUND_ROWS(); SELECT FOUND_ROWS();
deallocate prepare stmt; deallocate prepare stmt;
--enable_ps2_protocol
# #
# Bug#9096 "select doesn't return all matched records if prepared statements # Bug#9096 "select doesn't return all matched records if prepared statements
@ -1412,11 +1415,13 @@ DEALLOCATE PREPARE b12651;
# Bug #14956: ROW_COUNT() returns incorrect result after EXECUTE of prepared # Bug #14956: ROW_COUNT() returns incorrect result after EXECUTE of prepared
# statement # statement
# #
--disable_ps2_protocol
create table t1 (id int); create table t1 (id int);
prepare ins_call from "insert into t1 (id) values (1)"; prepare ins_call from "insert into t1 (id) values (1)";
execute ins_call; execute ins_call;
select row_count(); select row_count();
drop table t1; drop table t1;
--enable_ps2_protocol
# #
# BUG#16474: SP crashed MySQL # BUG#16474: SP crashed MySQL
@ -3568,8 +3573,10 @@ flush status;
execute st; execute st;
show status like '%Handler_read%'; show status like '%Handler_read%';
flush status; flush status;
--disable_ps2_protocol
select * from t1 use index() where a=3; select * from t1 use index() where a=3;
show status like '%Handler_read%'; show status like '%Handler_read%';
--enable_ps2_protocol
flush status; flush status;
execute st; execute st;
show status like '%Handler_read%'; show status like '%Handler_read%';

View File

@ -203,7 +203,9 @@ END|
DELIMITER ;| DELIMITER ;|
--disable_ps2_protocol
SELECT * FROM t2 WHERE a = @@sort_buffer_size AND p1(@@sort_buffer_size + 1) > a - 1; SELECT * FROM t2 WHERE a = @@sort_buffer_size AND p1(@@sort_buffer_size + 1) > a - 1;
--enable_ps2_protocol
DROP TABLE t2; DROP TABLE t2;
DROP FUNCTION p1; DROP FUNCTION p1;

View File

@ -3,6 +3,7 @@
-- source include/no_valgrind_without_big.inc -- source include/no_valgrind_without_big.inc
-- source include/no_view_protocol.inc -- source include/no_view_protocol.inc
--disable_ps2_protocol
set @save_query_cache_size=@@query_cache_size; set @save_query_cache_size=@@query_cache_size;
# #
# Tests with query cache # Tests with query cache
@ -1805,3 +1806,4 @@ drop table t1;
--echo restore defaults --echo restore defaults
SET GLOBAL query_cache_type= default; SET GLOBAL query_cache_type= default;
SET GLOBAL query_cache_size=@save_query_cache_size; SET GLOBAL query_cache_size=@save_query_cache_size;
--enable_ps2_protocol

View File

@ -38,6 +38,7 @@ while ($1)
# prepare and execute, and we will get a constant validation # prepare and execute, and we will get a constant validation
# error. See WL#4165 for details. # error. See WL#4165 for details.
# #
--disable_ps2_protocol
--disable_view_protocol --disable_view_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;
@ -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_view_protocol --enable_view_protocol
--enable_ps2_protocol
# End of 4.1 tests # End of 4.1 tests

View File

@ -113,6 +113,7 @@ disconnect root2;
# query in QC from normal execution and SP (Bug#6897) # query in QC from normal execution and SP (Bug#6897)
# improved to also test Bug#3583 and Bug#12990 # improved to also test Bug#3583 and Bug#12990
# #
--disable_ps2_protocol
flush query cache; flush query cache;
reset query cache; reset query cache;
flush status; flush status;
@ -191,6 +192,7 @@ drop procedure f2;
drop procedure f3; drop procedure f3;
drop procedure f4; drop procedure f4;
drop table t1; drop table t1;
--enable_ps2_protocol
# #
# Bug#14767 INSERT in SF + concurrent SELECT with query cache # Bug#14767 INSERT in SF + concurrent SELECT with query cache

View File

@ -13,6 +13,8 @@ set @save_query_cache_type=@@global.query_cache_type;
set GLOBAL query_cache_type=ON; set GLOBAL query_cache_type=ON;
set LOCAL query_cache_type=ON; set LOCAL query_cache_type=ON;
set GLOBAL query_cache_size=1355776; set GLOBAL query_cache_size=1355776;
--disable_ps2_protocol
flush status; flush status;
create table t1 (a int, b int); create table t1 (a int, b int);
@ -32,11 +34,13 @@ select * from v2;
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
show status like "Qcache_inserts"; show status like "Qcache_inserts";
show status like "Qcache_hits"; show status like "Qcache_hits";
--enable_ps2_protocol
drop view v1,v2; drop view v1,v2;
# SQL_CACHE option # SQL_CACHE option
set query_cache_type=demand; set query_cache_type=demand;
--disable_ps2_protocol
flush status; flush status;
# query with view will be cached, but direct acess to table will not # query with view will be cached, but direct acess to table will not
create view v1 (c,d) as select sql_cache a,b from t1; create view v1 (c,d) as select sql_cache a,b from t1;
@ -61,6 +65,7 @@ show status like "Qcache_inserts";
show status like "Qcache_hits"; show status like "Qcache_hits";
drop view v1; drop view v1;
set query_cache_type=default; set query_cache_type=default;
--enable_ps2_protocol
drop table t1; drop table t1;
@ -105,6 +110,7 @@ drop table t1;
# #
# BUG#15119: returning temptable view from the query cache. # BUG#15119: returning temptable view from the query cache.
# #
--disable_ps2_protocol
flush status; flush status;
create table t1 (a int, b int); create table t1 (a int, b int);
create algorithm=temptable view v1 as select * from t1; create algorithm=temptable view v1 as select * from t1;
@ -130,6 +136,7 @@ show status like "Qcache_queries_in_cache";
show status like "Qcache_inserts"; show status like "Qcache_inserts";
show status like "Qcache_hits"; show status like "Qcache_hits";
drop table t1; drop table t1;
--enable_ps2_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

@ -10,7 +10,9 @@ insert into t2 select 2*(A.a + 10*(B.a + 10*C.a)) from t1 A, t1 B, t1 C;
set in_predicate_conversion_threshold= 2000; set in_predicate_conversion_threshold= 2000;
set @a="select * from t2 force index (a) where a NOT IN(0"; set @a="select * from t2 force index (a) where a NOT IN(0";
--disable_ps2_protocol
select count(*) from (select @a:=concat(@a, ',', a) from t2 ) Z; select count(*) from (select @a:=concat(@a, ',', a) from t2 ) Z;
--enable_ps2_protocol
set @a=concat(@a, ')'); set @a=concat(@a, ')');
insert into t2 values (11),(13),(15); insert into t2 values (11),(13),(15);

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_ps2_protocol
--disable_view_protocol --disable_view_protocol
--replace_column 9 # --replace_column 9 #
EXPLAIN EXPLAIN
@ -759,6 +760,7 @@ SELECT * FROM City
ORDER BY Population LIMIT 5; ORDER BY Population LIMIT 5;
SHOW STATUS LIKE 'Handler_read_%'; SHOW STATUS LIKE 'Handler_read_%';
--enable_view_protocol --enable_view_protocol
--enable_ps2_protocol
set optimizer_switch=@save_optimizer_switch; set optimizer_switch=@save_optimizer_switch;

View File

@ -6,6 +6,7 @@ FLUSH STATUS;
--disable_query_log --disable_query_log
--disable_service_connection --disable_service_connection
--disable_ps2_protocol
let $i = 10; let $i = 10;
begin; begin;
while ($i) while ($i)
@ -14,6 +15,7 @@ while ($i)
SELECT 1; SELECT 1;
} }
commit; commit;
--enable_ps2_protocol
--enable_query_log --enable_query_log
--enable_result_log --enable_result_log

View File

@ -2184,6 +2184,7 @@ drop table t2;
# #
# Bug #11745: SELECT ... FROM DUAL with WHERE condition # Bug #11745: SELECT ... FROM DUAL with WHERE condition
# #
--disable_ps2_protocol
--disable_view_protocol --disable_view_protocol
CREATE TABLE t1 (a int, b int, c int); CREATE TABLE t1 (a int, b int, c int);
INSERT INTO t1 INSERT INTO t1
@ -2203,8 +2204,9 @@ select count(*) from t1 limit 2,3;
select found_rows(); select found_rows();
select SQL_CALC_FOUND_ROWS count(*) from t1 limit 2,3; select SQL_CALC_FOUND_ROWS count(*) from t1 limit 2,3;
select found_rows(); select found_rows();
--enable_view_protocol
DROP TABLE t1; DROP TABLE t1;
--enable_view_protocol
--enable_ps2_protocol
# #
# Bug 7672 Unknown column error in order clause # Bug 7672 Unknown column error in order clause
@ -3731,6 +3733,7 @@ DROP TABLE t1;
# #
# Bug #32942 now() - interval '7200' second is NOT pre-calculated, causing "full table scan" # Bug #32942 now() - interval '7200' second is NOT pre-calculated, causing "full table scan"
# #
--disable_ps2_protocol
--disable_view_protocol --disable_view_protocol
CREATE TABLE t1 (a INT, b INT); CREATE TABLE t1 (a INT, b INT);
CREATE TABLE t2 (a INT, c INT, KEY(a)); CREATE TABLE t2 (a INT, c INT, KEY(a));
@ -3746,6 +3749,8 @@ SELECT DISTINCT b FROM t1 LEFT JOIN t2 USING(a) WHERE c <= 3;
SHOW STATUS LIKE 'Handler_read%'; SHOW STATUS LIKE 'Handler_read%';
DROP TABLE t1, t2; DROP TABLE t1, t2;
--enable_view_protocol --enable_view_protocol
--enable_ps2_protocol
# #
# Bug#40953 SELECT query throws "ERROR 1062 (23000): Duplicate entry..." error # Bug#40953 SELECT query throws "ERROR 1062 (23000): Duplicate entry..." error
# #
@ -4104,7 +4109,9 @@ END;|
delimiter ;| delimiter ;|
SET @cnt := 0; SET @cnt := 0;
--disable_ps2_protocol
SELECT * FROM t1 WHERE a = f1(); SELECT * FROM t1 WHERE a = f1();
--enable_ps2_protocol
SELECT @cnt; SELECT @cnt;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a = f1(); EXPLAIN EXTENDED SELECT * FROM t1 WHERE a = f1();
DROP TABLE t1, t2; DROP TABLE t1, t2;

View File

@ -10,6 +10,7 @@
drop table if exists t1,t2; drop table if exists t1,t2;
--enable_warnings --enable_warnings
--disable_ps2_protocol
create table t1 (a int not null auto_increment, b int not null, primary key(a)); create table t1 (a int not null auto_increment, b int not null, primary key(a));
insert into t1 (b) values (2),(3),(5),(5),(5),(6),(7),(9); insert into t1 (b) values (2),(3),(5),(5),(5),(6),(7),(9);
select SQL_CALC_FOUND_ROWS * from t1; select SQL_CALC_FOUND_ROWS * from t1;
@ -292,3 +293,4 @@ select found_rows();
select sql_calc_found_rows * from t1 order by c1 limit 2,1; select sql_calc_found_rows * from t1 order by c1 limit 2,1;
select found_rows(); select found_rows();
drop table t1; drop table t1;
--enable_ps2_protocol

View File

@ -1093,14 +1093,18 @@ set @save_use_stat_tables= @@use_stat_tables;
set @@use_stat_tables='complementary'; set @@use_stat_tables='complementary';
set @@optimizer_use_condition_selectivity=4; set @@optimizer_use_condition_selectivity=4;
SET @cnt= 0; SET @cnt= 0;
--disable_ps2_protocol
SELECT * FROM t1 WHERE a = f1(); SELECT * FROM t1 WHERE a = f1();
--enable_ps2_protocol
SELECT @cnt; SELECT @cnt;
set @@use_stat_tables='preferably'; set @@use_stat_tables='preferably';
analyze table t1 persistent for all; analyze table t1 persistent for all;
SET @cnt := 0; SET @cnt := 0;
set @@optimizer_use_condition_selectivity=4; set @@optimizer_use_condition_selectivity=4;
--disable_ps2_protocol
SELECT * FROM t1 WHERE a = f1(); SELECT * FROM t1 WHERE a = f1();
--enable_ps2_protocol
SELECT @cnt; SELECT @cnt;
alter table t1 force; alter table t1 force;
drop table t1; drop table t1;

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