From fec93e7155393f8807a8006934b774e4166a7290 Mon Sep 17 00:00:00 2001 From: Lena Startseva Date: Fri, 11 Aug 2023 11:25:36 +0700 Subject: [PATCH] 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 --- mysql-test/main/delete_use_source.test | 2 ++ mysql-test/main/events_stress.test | 2 ++ mysql-test/main/merge-big.test | 2 ++ mysql-test/main/sum_distinct-big.test | 2 ++ 4 files changed, 8 insertions(+) diff --git a/mysql-test/main/delete_use_source.test b/mysql-test/main/delete_use_source.test index 4aed00da375..2df1e009fac 100644 --- a/mysql-test/main/delete_use_source.test +++ b/mysql-test/main/delete_use_source.test @@ -16,6 +16,7 @@ analyze table t1; --echo # Delete with limit (quick select - range acces) --echo # +--disable_view_protocol start transaction; --enable_info delete from t1 where (select count(*) from t1 b where b.c1=t1.c1) = 500 limit 1; @@ -111,6 +112,7 @@ rollback; 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; rollback; +--enable_view_protocol drop view v1; drop table t1; diff --git a/mysql-test/main/events_stress.test b/mysql-test/main/events_stress.test index 080707f029f..92b084a35b4 100644 --- a/mysql-test/main/events_stress.test +++ b/mysql-test/main/events_stress.test @@ -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_drop3 ON SCHEDULE EVERY 10 MINUTE DISABLE DO SELECT 1; USE events_test; +--disable_service_connection SELECT COUNT(*) FROM INFORMATION_SCHEMA.EVENTS; SELECT COUNT(*) FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_SCHEMA='events_conn1_test2'; DROP DATABASE 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" CREATE DATABASE events_conn1_test2; diff --git a/mysql-test/main/merge-big.test b/mysql-test/main/merge-big.test index 5873d2eb233..873161a3e1d 100644 --- a/mysql-test/main/merge-big.test +++ b/mysql-test/main/merge-big.test @@ -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. FLUSH TABLES; #SELECT NOW(); +--disable_service_connection --echo # This should give no result. SELECT * FROM t1; +--enable_service_connection #SELECT NOW(); UNLOCK TABLES; connection con1; diff --git a/mysql-test/main/sum_distinct-big.test b/mysql-test/main/sum_distinct-big.test index d87569f8668..4af0fafd354 100644 --- a/mysql-test/main/sum_distinct-big.test +++ b/mysql-test/main/sum_distinct-big.test @@ -79,6 +79,7 @@ SET @@max_heap_table_size=@save_max_heap_table_size; --echo # CREATE TABLE t2 (id INTEGER) ENGINE=InnoDB; +--disable_view_protocol BEGIN; INSERT INTO t2 SELECT b.seq FROM seq_1_to_128 a, seq_1_to_16384 b ORDER BY b.seq*rand(); @@ -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 SELECT SQL_NO_CACHE count(DISTINCT id) sm FROM t2; COMMIT; +--enable_view_protocol DROP TABLE t2;