Commit fec93e71 authored by Lena Startseva's avatar Lena Startseva

MDEV-31465: main.sum_distinct-big and main.merge-big fail with timeout with view-protocol

MDEV-31455: main.events_stress or events.events_stress fails with view-protocol
MDEV-31457: main.delete_use_source fails (hangs) with view-protocol

Fixed tests:
main.sum_distinct-big, main.delete_use_source - disabled view-protocol
for some cases because they use transactions without autocommit
main.events_stress, main.merge-big - disabled service connection
for some queries since it is necessary that the query SELECT pass
in the same session
parent 47f0135d
...@@ -16,6 +16,7 @@ analyze table t1; ...@@ -16,6 +16,7 @@ analyze table t1;
--echo # Delete with limit (quick select - range acces) --echo # Delete with limit (quick select - range acces)
--echo # --echo #
--disable_view_protocol
start transaction; start transaction;
--enable_info --enable_info
delete from t1 where (select count(*) from t1 b where b.c1=t1.c1) = 500 limit 1; delete from t1 where (select count(*) from t1 b where b.c1=t1.c1) = 500 limit 1;
...@@ -111,6 +112,7 @@ rollback; ...@@ -111,6 +112,7 @@ rollback;
start transaction; start transaction;
delete from t1 where (select count(*) from t1 b where b.c1=t1.c1) = 500 order by c2 desc limit 10 returning c1,c2; delete from t1 where (select count(*) from t1 b where b.c1=t1.c1) = 500 order by c2 desc limit 10 returning c1,c2;
rollback; rollback;
--enable_view_protocol
drop view v1; drop view v1;
drop table t1; drop table t1;
......
...@@ -45,10 +45,12 @@ CREATE EVENT ev_drop1 ON SCHEDULE EVERY 10 MINUTE DISABLE DO SELECT 1; ...@@ -45,10 +45,12 @@ CREATE EVENT ev_drop1 ON SCHEDULE EVERY 10 MINUTE DISABLE DO SELECT 1;
CREATE EVENT ev_drop2 ON SCHEDULE EVERY 10 MINUTE DISABLE DO SELECT 1; CREATE EVENT ev_drop2 ON SCHEDULE EVERY 10 MINUTE DISABLE DO SELECT 1;
CREATE EVENT ev_drop3 ON SCHEDULE EVERY 10 MINUTE DISABLE DO SELECT 1; CREATE EVENT ev_drop3 ON SCHEDULE EVERY 10 MINUTE DISABLE DO SELECT 1;
USE events_test; USE events_test;
--disable_service_connection
SELECT COUNT(*) FROM INFORMATION_SCHEMA.EVENTS; SELECT COUNT(*) FROM INFORMATION_SCHEMA.EVENTS;
SELECT COUNT(*) FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_SCHEMA='events_conn1_test2'; SELECT COUNT(*) FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_SCHEMA='events_conn1_test2';
DROP DATABASE events_conn1_test2; DROP DATABASE events_conn1_test2;
SELECT COUNT(*) FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_SCHEMA='events_conn1_test2'; SELECT COUNT(*) FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_SCHEMA='events_conn1_test2';
--enable_service_connection
--echo "Now testing stability - dropping db -> events while they are running" --echo "Now testing stability - dropping db -> events while they are running"
CREATE DATABASE events_conn1_test2; CREATE DATABASE events_conn1_test2;
......
...@@ -66,8 +66,10 @@ let $wait_condition= SELECT 1 FROM INFORMATION_SCHEMA.PROCESSLIST ...@@ -66,8 +66,10 @@ let $wait_condition= SELECT 1 FROM INFORMATION_SCHEMA.PROCESSLIST
--echo # Unlock and close table and wait for con1 to close too. --echo # Unlock and close table and wait for con1 to close too.
FLUSH TABLES; FLUSH TABLES;
#SELECT NOW(); #SELECT NOW();
--disable_service_connection
--echo # This should give no result. --echo # This should give no result.
SELECT * FROM t1; SELECT * FROM t1;
--enable_service_connection
#SELECT NOW(); #SELECT NOW();
UNLOCK TABLES; UNLOCK TABLES;
connection con1; connection con1;
......
...@@ -79,6 +79,7 @@ SET @@max_heap_table_size=@save_max_heap_table_size; ...@@ -79,6 +79,7 @@ SET @@max_heap_table_size=@save_max_heap_table_size;
--echo # --echo #
CREATE TABLE t2 (id INTEGER) ENGINE=InnoDB; CREATE TABLE t2 (id INTEGER) ENGINE=InnoDB;
--disable_view_protocol
BEGIN; BEGIN;
INSERT INTO t2 SELECT b.seq FROM seq_1_to_128 a, seq_1_to_16384 b INSERT INTO t2 SELECT b.seq FROM seq_1_to_128 a, seq_1_to_16384 b
ORDER BY b.seq*rand(); ORDER BY b.seq*rand();
...@@ -103,5 +104,6 @@ SET @@max_heap_table_size=@save_max_heap_table_size; ...@@ -103,5 +104,6 @@ SET @@max_heap_table_size=@save_max_heap_table_size;
--echo # Back to default tmp_table_size / max_heap_table_size --echo # Back to default tmp_table_size / max_heap_table_size
SELECT SQL_NO_CACHE count(DISTINCT id) sm FROM t2; SELECT SQL_NO_CACHE count(DISTINCT id) sm FROM t2;
COMMIT; COMMIT;
--enable_view_protocol
DROP TABLE t2; DROP TABLE t2;
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