From 72ba96a48eb3e99a967e0489cc79f378e865e3fd Mon Sep 17 00:00:00 2001 From: Lena Startseva Date: Thu, 9 Jun 2022 10:32:51 +0700 Subject: MDEV-27691: make working view-protocol Tests with checking metadata or that cannot be run with the view-protocol are excluded from --view-protocol. For tests that do not allow the use of an additional connection, the util connection is disabled with "--disable_service_connection". Also cases with bugs for --view-protocol are disabled. --- mysql-test/main/func_debug.test | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'mysql-test/main/func_debug.test') diff --git a/mysql-test/main/func_debug.test b/mysql-test/main/func_debug.test index 8dd01650ed3..0e45b05d1e6 100644 --- a/mysql-test/main/func_debug.test +++ b/mysql-test/main/func_debug.test @@ -24,11 +24,16 @@ SELECT 'a' IN ('a','b',NULL); SELECT 'a' NOT IN ('a','b'); SELECT 'a' NOT IN ('a','b',NULL); +#enable after fix MDEV-27871 +--disable_view_protocol + SELECT TIMESTAMP'2001-01-01 10:20:30' IN ('2001-01-01 10:20:30','2001-02-02 10:20:30'); SELECT TIMESTAMP'2001-01-01 10:20:30' IN ('2001-01-01 10:20:30','2001-02-02 10:20:30',NULL); SELECT TIMESTAMP'2001-01-01 10:20:30' NOT IN ('2001-01-01 10:20:30','2001-02-02 10:20:30'); SELECT TIMESTAMP'2001-01-01 10:20:30' NOT IN ('2001-01-01 10:20:30','2001-02-02 10:20:30',NULL); +--enable_view_protocol + SELECT TIME'10:20:30' IN ('10:20:30','10:20:30'); SELECT TIME'10:20:30' IN ('10:20:30','10:20:30',NULL); SELECT TIME'10:20:30' NOT IN ('10:20:30','10:20:30'); @@ -81,6 +86,9 @@ SELECT a NOT IN ('a','b','c') FROM t1; SELECT a NOT IN ('a','b','c',NULL) FROM t1; DROP TABLE t1; +#enable after fix MDEV-27871 +--disable_view_protocol + CREATE TABLE t1 (a DATE); SELECT a IN ('2001-01-01',DATE'2001-01-02',20010102,20010102.0,20010102e0) FROM t1; SELECT a IN ('2001-01-01',DATE'2001-01-02',20010102,20010102.0,20010102e0,NULL) FROM t1; @@ -102,6 +110,8 @@ SELECT a NOT IN ('2001-01-01',TIMESTAMP'2001-01-01 10:20:30',DATE'2001-01-01',TI SELECT a NOT IN ('2001-01-01',TIMESTAMP'2001-01-01 10:20:30',DATE'2001-01-01',TIME'10:20:30',20010101102030,20010101102030.0,20010101102030e0,NULL) FROM t1; DROP TABLE t1; +--enable_view_protocol + --echo # Constant predicant, compatible types, no bisect --echo # Bisect is not used because of non-constant expressions in the list CREATE TABLE t1 (a INT); @@ -146,6 +156,9 @@ SELECT TIME'10:20:30' NOT IN (a,'10:20:30') FROM t1; SELECT TIME'10:20:30' NOT IN (a,'10:20:30',NULL) FROM t1; DROP TABLE t1; +#enable after fix MDEV-27871 +--disable_view_protocol + CREATE TABLE t1 (a DATETIME); SELECT TIMESTAMP'2001-01-01 10:20:30' IN (a,TIMESTAMP'2001-01-01 10:20:30') FROM t1; SELECT TIMESTAMP'2001-01-01 10:20:30' IN (a,TIMESTAMP'2001-01-01 10:20:30',NULL) FROM t1; @@ -153,6 +166,7 @@ SELECT TIMESTAMP'2001-01-01 10:20:30' NOT IN (a,TIMESTAMP'2001-01-01 10:20:30') SELECT TIMESTAMP'2001-01-01 10:20:30' NOT IN (a,TIMESTAMP'2001-01-01 10:20:30',NULL) FROM t1; DROP TABLE t1; +--enable_view_protocol --echo # Constant predicant, incompatible types, no bisect SELECT 1 IN (1,2e0); @@ -175,6 +189,9 @@ SELECT 'a' IN ('a',2,NULL); SELECT 'a' NOT IN ('a',2); SELECT 'a' NOT IN ('a',2,NULL); +#enable after fix MDEV-27871 +--disable_view_protocol + SELECT TIME'10:20:30' IN (1,TIME'10:20:30'); SELECT TIME'10:20:30' IN (1,TIME'10:20:30',NULL); SELECT TIME'10:20:30' IN (102030, TIME'10:20:30',TIMESTAMP'2001-01-01 10:20:32'); @@ -203,6 +220,8 @@ SELECT a NOT IN (CAST(1 AS SIGNED), CAST(1 AS UNSIGNED),NULL) FROM t1; SELECT a NOT IN (CAST(1 AS DECIMAL),CAST(1 AS SIGNED), CAST(1 AS UNSIGNED)) FROM t1; SELECT a NOT IN (CAST(1 AS DECIMAL),CAST(1 AS SIGNED), CAST(1 AS UNSIGNED),NULL) FROM t1; +--enable_view_protocol + SELECT a IN (1,1.0) FROM t1; SELECT a IN (1,1.0,NULL) FROM t1; SELECT a NOT IN (1,1.0) FROM t1; @@ -260,6 +279,9 @@ SELECT a NOT IN ('a',1) FROM t1; SELECT a NOT IN ('a',TIME'10:20:30') FROM t1; DROP TABLE t1; +#enable after fix MDEV-27871 +--disable_view_protocol + CREATE TABLE t1 (a TIME); SELECT a IN (102030, TIME'10:20:30',TIMESTAMP'2001-01-01 10:20:32') FROM t1; SELECT a IN (102030, TIME'10:20:30',TIMESTAMP'2001-01-01 10:20:32',NULL) FROM t1; @@ -271,6 +293,8 @@ SELECT a NOT IN (102030, 102030, TIME'10:20:30',TIMESTAMP'2001-01-01 10:20:32') SELECT a NOT IN (102030, 102030, TIME'10:20:30',TIMESTAMP'2001-01-01 10:20:32',NULL) FROM t1; DROP TABLE t1; +--enable_view_protocol + # # ROW tests # @@ -413,9 +437,13 @@ DROP TABLE t1; --echo # --echo # MDEV-11514 IN with a mixture of TIME and DATETIME returns a wrong result --echo # +#enable after fix MDEV-27871 +--disable_view_protocol SELECT TIME'10:20:30' IN (102030,TIME'10:20:31',TIMESTAMP'2001-01-01 10:20:32'); +--enable_view_protocol + PREPARE stmt FROM "SELECT TIME'10:20:30' IN (102030,TIME'10:20:31',TIMESTAMP'2001-01-01 10:20:32')"; EXECUTE stmt; -- cgit v1.2.1 From 184e65954b88266bd426de1c82973bf54a88afb1 Mon Sep 17 00:00:00 2001 From: Lena Startseva Date: Thu, 15 Sep 2022 18:30:13 +0700 Subject: MDEV-27691: make working view-protocol Update tests for version 10.4 --- mysql-test/main/func_debug.test | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mysql-test/main/func_debug.test') diff --git a/mysql-test/main/func_debug.test b/mysql-test/main/func_debug.test index f6d6fa4c4e7..1fbc652bb48 100644 --- a/mysql-test/main/func_debug.test +++ b/mysql-test/main/func_debug.test @@ -530,7 +530,10 @@ SELECT * FROM t1 WHERE a BETWEEN 1 AND 1; SELECT * FROM t1 WHERE a BETWEEN 0 AND 1; SELECT * FROM t1 WHERE a BETWEEN 0 AND -1; SELECT * FROM t1 WHERE a BETWEEN -1 AND -1; +#enable after fix MDEV-29524 +--disable_view_protocol SELECT * FROM t1 WHERE a BETWEEN -0000000000000001 AND -1; +--enable_view_protocol SELECT * FROM t1 WHERE a BETWEEN -1 AND 18446744073709551615; SELECT * FROM t1 WHERE a BETWEEN -1 AND 18446744073709551616; SELECT * FROM t1 WHERE a BETWEEN 1e2 AND 100e0; -- cgit v1.2.1