Commit b58872a8 authored by Lena Startseva's avatar Lena Startseva

MDEV-31003: Second execution for ps-protocol

Update tests for version 10.5
parent 89bddf72
......@@ -1012,8 +1012,11 @@ DROP TABLE t1;
set group_concat_max_len=64;
create table t1 (a varchar(254));
insert into t1 values (concat('x64-', repeat('a', 60)));
insert into t1 values (concat('x64-', repeat('b', 60))); insert into t1 values (concat('x64-', repeat('c', 60)));
select json_arrayagg(a) from t1;
insert into t1 values (concat('x64-', repeat('b', 60)));
insert into t1 values (concat('x64-', repeat('c', 60)));
--disable_ps2_protocol
select json_arrayagg(a) from t1;
--enable_ps2_protocol
drop table t1;
SET group_concat_max_len= default;
......
......@@ -1310,6 +1310,7 @@ DROP TABLE t1;
--echo # MDEV-10569 Add RELEASE_ALL_LOCKS SQL-function
--echo #
--disable_view_protocol
--disable_ps2_protocol
--echo # Test function without any locks
SELECT RELEASE_ALL_LOCKS();
......@@ -1364,4 +1365,5 @@ SELECT RELEASE_ALL_LOCKS();
SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA
FROM information_schema.metadata_lock_info WHERE thread_id>0 ORDER BY TABLE_SCHEMA;
--enable_ps2_protocol
--enable_view_protocol
......@@ -284,23 +284,27 @@ drop table t1;
CREATE TABLE t1 (a char(1));
INSERT INTO t1 VALUES ('A'),('B'),('A'),('B'),('A'),('B'),(NULL),('a'),('b'),(NULL),('A'),('B'),(NULL);
flush status;
--disable_ps2_protocol
SELECT a FROM t1 GROUP BY a;
SELECT a,count(*) FROM t1 GROUP BY a;
SELECT a FROM t1 GROUP BY binary a;
SELECT a,count(*) FROM t1 GROUP BY binary a;
SELECT binary a FROM t1 GROUP BY 1;
SELECT binary a,count(*) FROM t1 GROUP BY 1;
--enable_ps2_protocol
--disable_ps_protocol
show status like 'Created%tables';
--enable_ps_protocol
# Do the same tests with on-disk temporary tables
set tmp_memory_table_size=0;
--disable_ps2_protocol
SELECT a FROM t1 GROUP BY a;
SELECT a,count(*) FROM t1 GROUP BY a;
SELECT a FROM t1 GROUP BY binary a;
SELECT a,count(*) FROM t1 GROUP BY binary a;
SELECT binary a FROM t1 GROUP BY 1;
SELECT binary a,count(*) FROM t1 GROUP BY 1;
--enable_ps2_protocol
--disable_ps_protocol
show status like 'Created%tables';
--enable_ps_protocol
......
......@@ -478,7 +478,9 @@ drop table t2;
--echo #
create table t1 (pk int primary key, f blob, unique(f)) engine=innodb;
insert t1 values (1, null);
--disable_ps2_protocol
select * into outfile 't1.data' from t1;
--enable_ps2_protocol
load data infile 't1.data' replace into table t1;
select * from t1;
drop table t1;
......
......@@ -37,7 +37,9 @@ SELECT SUM(POLLS_BY_WORKER) FROM INFORMATION_SCHEMA.THREAD_POOL_STATS;
DESC INFORMATION_SCHEMA.THREAD_POOL_WAITS;
SELECT REASON FROM INFORMATION_SCHEMA.THREAD_POOL_WAITS;
SELECT COUNT FROM INFORMATION_SCHEMA.THREAD_POOL_WAITS WHERE REASON='Sleep';
--disable_ps2_protocol
SELECT SLEEP(0.01);
--enable_ps2_protocol
SELECT COUNT FROM INFORMATION_SCHEMA.THREAD_POOL_WAITS WHERE REASON='Sleep';
FLUSH THREAD_POOL_WAITS;
......
......@@ -68,7 +68,9 @@ INSERT INTO t1 VALUES (1);
CREATE SEQUENCE s ENGINE=InnoDB;
XA START '2';
--disable_ps2_protocol
SELECT NEXT VALUE FOR s;
--enable_ps2_protocol
REPLACE INTO t1 SELECT * FROM t1;
XA END '2';
XA PREPARE '2';
......
......@@ -103,10 +103,12 @@ call before_payload();
# Payload query to analyse: should do batch io on t3
--disable_ps2_protocol
--disable_result_log
select t1.*, t2.*, t3.*
from t1 join t2 using (id1) join t3 using (id2);
--enable_result_log
--enable_ps2_protocol
call after_payload();
......@@ -127,10 +129,12 @@ call before_payload();
# Payload query to analyse: should do batch io on t3
--disable_ps2_protocol
--disable_result_log
select t1.*, t2.*, t3.*
from t1 join t2 using (id1) join t3 using (id2);
--enable_result_log
--enable_ps2_protocol
call after_payload();
......
......@@ -379,7 +379,9 @@ TRUNCATE TABLE performance_schema.events_waits_current;
--connection con1
--disable_ps2_protocol
SELECT GET_LOCK('test', 0);
--enable_ps2_protocol
--connection default
......@@ -394,7 +396,9 @@ execute dump_waits_history_long;
--connection con2
--disable_ps2_protocol
--send SELECT GET_LOCK('test', 120);
--enable_ps2_protocol
--connection default
......@@ -414,8 +418,9 @@ execute dump_waits_history_long;
--horizontal_results
--connection con1
--disable_ps2_protocol
SELECT RELEASE_LOCK('test');
--enable_ps2_protocol
--connection con2
......@@ -433,8 +438,9 @@ execute dump_waits_history_long;
--horizontal_results
--connection con2
--disable_ps2_protocol
SELECT RELEASE_LOCK('test');
--enable_ps2_protocol
--connection default
......
......@@ -29,7 +29,9 @@ FLUSH STATUS;
let $initial= `SELECT VARIABLE_VALUE FROM performance_schema.global_status WHERE VARIABLE_NAME = 'Select_range'`;
# Causes Select_range to increment (+1)
--disable_ps2_protocol
SELECT * from test.t_range where (a >= 3) AND (a <= 5);
--enable_ps2_protocol
SELECT * from performance_schema.session_status
WHERE VARIABLE_NAME = 'Select_range';
......@@ -40,7 +42,9 @@ eval SELECT VARIABLE_NAME, (VARIABLE_VALUE - $initial) AS DELTA from performance
connect(con1, localhost, user1,,);
# Causes Select_range to increment (+1)
--disable_ps2_protocol
SELECT * from test.t_range where (a >= 3) AND (a <= 5);
--enable_ps2_protocol
SELECT * from performance_schema.session_status
WHERE VARIABLE_NAME = 'Select_range';
......@@ -51,8 +55,10 @@ eval SELECT VARIABLE_NAME, (VARIABLE_VALUE - $initial) AS DELTA from performance
connect(con2, localhost, user2,,);
# Causes Select_range to increment (+2)
--disable_ps2_protocol
SELECT * from test.t_range where (a >= 3) AND (a <= 5);
SELECT * from test.t_range where (a >= 4) AND (a <= 6);
--enable_ps2_protocol
SELECT * from performance_schema.session_status
WHERE VARIABLE_NAME = 'Select_range';
......@@ -63,9 +69,11 @@ eval SELECT VARIABLE_NAME, (VARIABLE_VALUE - $initial) AS DELTA from performance
connect(con3, localhost, user3,,);
# Causes Select_range to increment (+3)
--disable_ps2_protocol
SELECT * from test.t_range where (a >= 3) AND (a <= 5);
SELECT * from test.t_range where (a >= 4) AND (a <= 6);
SELECT * from test.t_range where (a >= 5) AND (a <= 7);
--enable_ps2_protocol
SELECT * from performance_schema.session_status
WHERE VARIABLE_NAME = 'Select_range';
......
......@@ -27,7 +27,9 @@ create table db1.t1 (a int, b char(10) default 'default',
#######################
insert into db1.t1 values('1', 'abc');
insert into db1.t1 values('2', 'abc');
--disable_ps2_protocol
select * from db1.t1 where a='1';
--enable_ps2_protocol
#####################################################
# Run few queries on Performance Schema stats tables.
......@@ -80,11 +82,15 @@ create table db1.t2 (a int, b char(10) default 'default',
#######################
insert into db1.t1 values('3', 'abc');
insert into db1.t1 values('4', 'abc');
--disable_ps2_protocol
select * from db1.t1 where a='1';
--enable_ps2_protocol
insert into db1.t2 values('1', 'abc');
insert into db1.t2 values('2', 'abc');
--disable_ps2_protocol
select * from db1.t2 where a='1';
--enable_ps2_protocol
#####################################################
# Run few queries on Performance Schema stats tables.
......
......@@ -20,7 +20,9 @@ create table db1.t1 (a int, b char(10) default 'default');
#######################
insert into db1.t1 values('1', 'abc');
insert into db1.t1 values('2', 'abc');
--disable_ps2_protocol
select * from db1.t1 where a='1';
--enable_ps2_protocol
#####################################################
# Run few queries on Performance Schema stats tables.
......@@ -52,11 +54,15 @@ create table db1.t2 (a int, b char(10) default 'default',
#######################
insert into db1.t1 values('3', 'abc');
insert into db1.t1 values('4', 'abc');
--disable_ps2_protocol
select * from db1.t1 where a='1';
--enable_ps2_protocol
insert into db1.t2 values('1', 'abc');
insert into db1.t2 values('2', 'abc');
--disable_ps2_protocol
select * from db1.t2 where a='1';
--enable_ps2_protocol
#####################################################
# Run few queries on Performance Schema stats tables.
......
......@@ -21,7 +21,9 @@ create table db1.t1 (a int, b char(10) default 'default',
#######################
insert into db1.t1 values('1', 'abc');
insert into db1.t1 values('2', 'abc');
--disable_ps2_protocol
select * from db1.t1 where a='1';
--enable_ps2_protocol
#####################################################
# Run few queries on Performance Schema stats tables.
......
......@@ -20,7 +20,9 @@ create table db1.t1 (a int, b char(10) default 'default');
#######################
insert into db1.t1 values('1', 'abc');
insert into db1.t1 values('2', 'abc');
--disable_ps2_protocol
select * from db1.t1 where a='1';
--enable_ps2_protocol
#####################################################
# Run few queries on Performance Schema stats tables.
......
......@@ -253,14 +253,18 @@ insert into t values (1, '2020-03-03', '2020-03-10')
on duplicate key update x = 2;
select * from t;
--disable_ps2_protocol
select * into outfile 'tmp_t.txt' from t;
--enable_ps2_protocol
load data infile 'tmp_t.txt' into table t;
--error ER_NOT_SUPPORTED_YET
load data infile 'tmp_t.txt' replace into table t;
remove_file $MYSQLD_DATADIR/test/tmp_t.txt;
insert into t values (1, '2020-03-01', '2020-03-05');
--disable_ps2_protocol
select * into outfile 'tmp_t.txt' from t;
--enable_ps2_protocol
--error ER_DUP_ENTRY
load data infile 'tmp_t.txt' into table t;
......
......@@ -79,7 +79,9 @@ INSERT IGNORE INTO tbl_b (SELECT skey, CAST(CONCAT(dt, ' ', tm) AS datetime) FRO
INSERT IGNORE INTO tbl_b (SELECT skey, CAST(CONCAT(dt, ' ', tm) AS datetime) FROM tbl_a WHERE skey = 5 AND dt > DATE_ADD('2012-12-01', INTERVAL -10 DAY));
--connection child2_1
--disable_ps2_protocol
eval $CHILD2_1_SELECT_ARGUMENT1;
--enable_ps2_protocol
eval $CHILD2_1_SELECT_TABLES;
--echo
......
......@@ -68,14 +68,20 @@ TRUNCATE TABLE mysql.general_log;
--connection master_1
FLUSH TABLES;
--disable_ps2_protocol
SELECT count(pkey) cnt, skey FROM tbl_a;
--enable_ps2_protocol
--connection child2_1
--disable_ps2_protocol
eval $CHILD2_1_SELECT_ARGUMENT1;
--enable_ps2_protocol
eval $CHILD2_1_SELECT_TABLES;
--connection child2_2
--disable_ps2_protocol
eval $CHILD2_2_SELECT_ARGUMENT1;
--enable_ps2_protocol
eval $CHILD2_2_SELECT_TABLES;
--echo
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment