diff options
Diffstat (limited to 'mysql-test')
47 files changed, 891 insertions, 543 deletions
diff --git a/mysql-test/include/binlog_parallel_replication_marks.test b/mysql-test/include/binlog_parallel_replication_marks.test index 82fa997822d..3976088ca43 100644 --- a/mysql-test/include/binlog_parallel_replication_marks.test +++ b/mysql-test/include/binlog_parallel_replication_marks.test @@ -80,7 +80,7 @@ while (<F>) { s/table id \d+/table id #/; s/mapped to number \d+/mapped to number #/; s/CRC32 0x[0-9a-f]+/CRC32 0x########/; - print if /GTID|BEGIN|COMMIT|Table_map|Write_rows|Update_rows|Delete_rows|generated by server|40005 TEMPORARY/; + print if /\b(GTID|BEGIN|COMMIT|Table_map|Write_rows|Update_rows|Delete_rows|generated by server|40005 TEMPORARY)\b/; } close F; EOF diff --git a/mysql-test/main/derived_cond_pushdown.result b/mysql-test/main/derived_cond_pushdown.result index c044b79d953..9203a3ddf1b 100644 --- a/mysql-test/main/derived_cond_pushdown.result +++ b/mysql-test/main/derived_cond_pushdown.result @@ -10548,6 +10548,36 @@ EXPLAIN } DROP TABLE t1; DROP VIEW v1; +# +# MDEV-21388 Wrong result of DAYNAME()=xxx in combination with condition_pushdown_for_derived=on +# +CREATE TABLE t1 (a INT, b DATE, c INT); +INSERT INTO t1 VALUES +(1,'2001-01-21',345), +(6,'2001-01-20',315), +(6,'2001-01-20',214); +CREATE TABLE t2 (a INT, b INT); +INSERT INTO t2 VALUES (2,19), (7,20); +CREATE VIEW v1 AS SELECT a, b, max(c) AS max_c FROM t1 +GROUP BY a,b HAVING max_c < 707; +SELECT *, dayname(v1.b) FROM v1,t2 WHERE (v1.max_c>214) AND (t2.a>v1.a); +a b max_c a b dayname(v1.b) +1 2001-01-21 345 2 19 Sunday +1 2001-01-21 345 7 20 Sunday +6 2001-01-20 315 7 20 Saturday +SET optimizer_switch='condition_pushdown_for_derived=off'; +SELECT *, dayname(v1.b) FROM v1,t2 WHERE (v1.max_c>214) AND (t2.a>v1.a) AND dayname(v1.b)='Sunday'; +a b max_c a b dayname(v1.b) +1 2001-01-21 345 2 19 Sunday +1 2001-01-21 345 7 20 Sunday +SET optimizer_switch='condition_pushdown_for_derived=on'; +SELECT *, dayname(v1.b) FROM v1,t2 WHERE (v1.max_c>214) AND (t2.a>v1.a) AND dayname(v1.b)='Sunday'; +a b max_c a b dayname(v1.b) +1 2001-01-21 345 2 19 Sunday +1 2001-01-21 345 7 20 Sunday +DROP VIEW v1; +DROP TABLE t1, t2; +SET optimizer_switch=DEFAULT; # End of 10.2 tests # # MDEV-14579: pushdown conditions into materialized views/derived tables diff --git a/mysql-test/main/derived_cond_pushdown.test b/mysql-test/main/derived_cond_pushdown.test index 6d81d2ad80b..1441989e2cc 100644 --- a/mysql-test/main/derived_cond_pushdown.test +++ b/mysql-test/main/derived_cond_pushdown.test @@ -2140,6 +2140,34 @@ SELECT * FROM (SELECT 1 FROM v1 UNION (SELECT 1 FROM v1 WHERE @a := uuid())) dt; DROP TABLE t1; DROP VIEW v1; +--echo # +--echo # MDEV-21388 Wrong result of DAYNAME()=xxx in combination with condition_pushdown_for_derived=on +--echo # + +CREATE TABLE t1 (a INT, b DATE, c INT); +INSERT INTO t1 VALUES + (1,'2001-01-21',345), + (6,'2001-01-20',315), + (6,'2001-01-20',214); + +CREATE TABLE t2 (a INT, b INT); +INSERT INTO t2 VALUES (2,19), (7,20); +CREATE VIEW v1 AS SELECT a, b, max(c) AS max_c FROM t1 + GROUP BY a,b HAVING max_c < 707; + +SELECT *, dayname(v1.b) FROM v1,t2 WHERE (v1.max_c>214) AND (t2.a>v1.a); + +SET optimizer_switch='condition_pushdown_for_derived=off'; +SELECT *, dayname(v1.b) FROM v1,t2 WHERE (v1.max_c>214) AND (t2.a>v1.a) AND dayname(v1.b)='Sunday'; + +SET optimizer_switch='condition_pushdown_for_derived=on'; +SELECT *, dayname(v1.b) FROM v1,t2 WHERE (v1.max_c>214) AND (t2.a>v1.a) AND dayname(v1.b)='Sunday'; + +DROP VIEW v1; +DROP TABLE t1, t2; + +SET optimizer_switch=DEFAULT; + --echo # End of 10.2 tests --echo # diff --git a/mysql-test/main/func_time.result b/mysql-test/main/func_time.result index 4faf9731a29..59ad815b0e0 100644 --- a/mysql-test/main/func_time.result +++ b/mysql-test/main/func_time.result @@ -159,7 +159,9 @@ date_format('1999-12-31','%x-%v') date_format('2000-01-01','%x-%v') 1999-52 1999-52 select dayname("1962-03-03"),dayname("1962-03-03")+0; dayname("1962-03-03") dayname("1962-03-03")+0 -Saturday 5 +Saturday 0 +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: 'Saturday' select monthname("1972-03-04"),monthname("1972-03-04")+0; monthname("1972-03-04") monthname("1972-03-04")+0 March 0 @@ -3512,6 +3514,19 @@ v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI DROP VIEW v1,v2,v3; DROP TABLE t1,t2; # +# MDEV-21388 Wrong result of DAYNAME()=xxx in combination with condition_pushdown_for_derived=on +# +SELECT DAYNAME('2019-01-05')+0; +DAYNAME('2019-01-05')+0 +0 +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: 'Saturday' +SELECT CAST(DAYNAME('2019-01-05') AS SIGNED); +CAST(DAYNAME('2019-01-05') AS SIGNED) +0 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: 'Saturday' +# # End of 10.2 tests # # diff --git a/mysql-test/main/func_time.test b/mysql-test/main/func_time.test index 2e44df5a0d0..71f82ddba7b 100644 --- a/mysql-test/main/func_time.test +++ b/mysql-test/main/func_time.test @@ -1973,6 +1973,14 @@ DROP VIEW v1,v2,v3; DROP TABLE t1,t2; --echo # +--echo # MDEV-21388 Wrong result of DAYNAME()=xxx in combination with condition_pushdown_for_derived=on +--echo # + +SELECT DAYNAME('2019-01-05')+0; +SELECT CAST(DAYNAME('2019-01-05') AS SIGNED); + + +--echo # --echo # End of 10.2 tests --echo # diff --git a/mysql-test/main/mysql_tzinfo_to_sql_symlink.result b/mysql-test/main/mysql_tzinfo_to_sql_symlink.result index 966cc1d123a..8997c404079 100644 --- a/mysql-test/main/mysql_tzinfo_to_sql_symlink.result +++ b/mysql-test/main/mysql_tzinfo_to_sql_symlink.result @@ -4,7 +4,7 @@ # Verbose run \d | IF (select count(*) from information_schema.global_variables where -variable_name='wsrep_on') = 1 THEN +variable_name='wsrep_on' and variable_value='ON') = 1 THEN ALTER TABLE time_zone ENGINE=InnoDB; ALTER TABLE time_zone_name ENGINE=InnoDB; ALTER TABLE time_zone_transition ENGINE=InnoDB; @@ -36,7 +36,7 @@ ALTER TABLE time_zone_transition ORDER BY Time_zone_id, Transition_time; ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id; \d | IF (select count(*) from information_schema.global_variables where -variable_name='wsrep_on') = 1 THEN +variable_name='wsrep_on' and variable_value='ON') = 1 THEN ALTER TABLE time_zone ENGINE=Aria; ALTER TABLE time_zone_name ENGINE=Aria; ALTER TABLE time_zone_transition ENGINE=Aria; @@ -46,7 +46,7 @@ END IF| # Silent run \d | IF (select count(*) from information_schema.global_variables where -variable_name='wsrep_on') = 1 THEN +variable_name='wsrep_on' and variable_value='ON') = 1 THEN ALTER TABLE time_zone ENGINE=InnoDB; ALTER TABLE time_zone_name ENGINE=InnoDB; ALTER TABLE time_zone_transition ENGINE=InnoDB; @@ -75,7 +75,7 @@ ALTER TABLE time_zone_transition ORDER BY Time_zone_id, Transition_time; ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id; \d | IF (select count(*) from information_schema.global_variables where -variable_name='wsrep_on') = 1 THEN +variable_name='wsrep_on' and variable_value='ON') = 1 THEN ALTER TABLE time_zone ENGINE=Aria; ALTER TABLE time_zone_name ENGINE=Aria; ALTER TABLE time_zone_transition ENGINE=Aria; @@ -93,7 +93,7 @@ INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset, ; \d | IF (select count(*) from information_schema.global_variables where -variable_name='wsrep_on') = 1 THEN +variable_name='wsrep_on' and variable_value='ON') = 1 THEN ALTER TABLE time_zone ENGINE=Aria; ALTER TABLE time_zone_name ENGINE=Aria; ALTER TABLE time_zone_transition ENGINE=Aria; @@ -105,21 +105,21 @@ END IF| # \d | IF (select count(*) from information_schema.global_variables where -variable_name='wsrep_on') = 1 THEN +variable_name='wsrep_on' and variable_value='ON') = 1 THEN ALTER TABLE time_zone_leap_second ENGINE=InnoDB; END IF| \d ; TRUNCATE TABLE time_zone_leap_second; \d | IF (select count(*) from information_schema.global_variables where -variable_name='wsrep_on') = 1 THEN +variable_name='wsrep_on' and variable_value='ON') = 1 THEN ALTER TABLE time_zone_leap_second ENGINE=Aria; END IF| \d ; ALTER TABLE time_zone_leap_second ORDER BY Transition_time; \d | IF (select count(*) from information_schema.global_variables where -variable_name='wsrep_on') = 1 THEN +variable_name='wsrep_on' and variable_value='ON') = 1 THEN ALTER TABLE time_zone ENGINE=Aria; ALTER TABLE time_zone_name ENGINE=Aria; ALTER TABLE time_zone_transition ENGINE=Aria; @@ -131,7 +131,7 @@ END IF| # \d | IF (select count(*) from information_schema.global_variables where -variable_name='wsrep_on') = 1 THEN +variable_name='wsrep_on' and variable_value='ON') = 1 THEN ALTER TABLE time_zone ENGINE=InnoDB; ALTER TABLE time_zone_name ENGINE=InnoDB; ALTER TABLE time_zone_transition ENGINE=InnoDB; @@ -146,7 +146,7 @@ ALTER TABLE time_zone_transition ORDER BY Time_zone_id, Transition_time; ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id; \d | IF (select count(*) from information_schema.global_variables where -variable_name='wsrep_on') = 1 THEN +variable_name='wsrep_on' and variable_value='ON') = 1 THEN ALTER TABLE time_zone ENGINE=Aria; ALTER TABLE time_zone_name ENGINE=Aria; ALTER TABLE time_zone_transition ENGINE=Aria; diff --git a/mysql-test/main/timezone2.result b/mysql-test/main/timezone2.result index b858e761a81..f943e285951 100644 --- a/mysql-test/main/timezone2.result +++ b/mysql-test/main/timezone2.result @@ -574,6 +574,22 @@ a b SELECT * FROM t1 WHERE a IN ((SELECT MAX(b) FROM t1), (SELECT MIN(b) FROM t1)); a b DROP TABLE t1; +SET time_zone='Europe/Moscow'; +CREATE TABLE t1 (a TIMESTAMP); +CREATE TABLE t2 (a TIMESTAMP); +SET timestamp=1288479599 /*summer time in Mowcow*/; +INSERT INTO t1 VALUES (CURRENT_TIMESTAMP); +SET timestamp=1288479599+3600 /*winter time in Mowcow*/; +INSERT INTO t2 VALUES (CURRENT_TIMESTAMP); +SELECT t1.a, UNIX_TIMESTAMP(t1.a), t2.a, UNIX_TIMESTAMP(t2.a) FROM t1, t2; +a UNIX_TIMESTAMP(t1.a) a UNIX_TIMESTAMP(t2.a) +2010-10-31 02:59:59 1288479599 2010-10-31 02:59:59 1288483199 +SELECT NULLIF(t1.a, t2.a) FROM t1,t2; +NULLIF(t1.a, t2.a) +2010-10-31 02:59:59 +DROP TABLE t1, t2; +SET time_zone=DEFAULT; +SET timestamp=DEFAULT; # # MDEV-17979 Assertion `0' failed in Item::val_native upon SELECT with timestamp, NULLIF, GROUP BY # diff --git a/mysql-test/main/timezone2.test b/mysql-test/main/timezone2.test index 9d364224311..6a8c9f258e4 100644 --- a/mysql-test/main/timezone2.test +++ b/mysql-test/main/timezone2.test @@ -521,6 +521,23 @@ SELECT * FROM t1 WHERE a = (SELECT MIN(b) FROM t1); SELECT * FROM t1 WHERE a IN ((SELECT MAX(b) FROM t1), (SELECT MIN(b) FROM t1)); DROP TABLE t1; +# NULLIF + +SET time_zone='Europe/Moscow'; + +CREATE TABLE t1 (a TIMESTAMP); +CREATE TABLE t2 (a TIMESTAMP); +SET timestamp=1288479599 /*summer time in Mowcow*/; +INSERT INTO t1 VALUES (CURRENT_TIMESTAMP); +SET timestamp=1288479599+3600 /*winter time in Mowcow*/; +INSERT INTO t2 VALUES (CURRENT_TIMESTAMP); +SELECT t1.a, UNIX_TIMESTAMP(t1.a), t2.a, UNIX_TIMESTAMP(t2.a) FROM t1, t2; +SELECT NULLIF(t1.a, t2.a) FROM t1,t2; +DROP TABLE t1, t2; +SET time_zone=DEFAULT; +SET timestamp=DEFAULT; + + --echo # --echo # MDEV-17979 Assertion `0' failed in Item::val_native upon SELECT with timestamp, NULLIF, GROUP BY --echo # diff --git a/mysql-test/main/type_datetime.result b/mysql-test/main/type_datetime.result index 5afb0257757..b23fa762c73 100644 --- a/mysql-test/main/type_datetime.result +++ b/mysql-test/main/type_datetime.result @@ -1198,6 +1198,87 @@ Warning 1292 Incorrect datetime value: '2' for column `test`.`t1`.`pk` at row 2 DROP VIEW v1; DROP TABLE t1; # +# MDEV-21319 COUNT(*) returns 1, actual SELECT returns no result in 10.3.21, but 1 result in 10.1.41 +# +CREATE TABLE t1 +( +id INT NOT NULL PRIMARY KEY, +id2 INT, +k TINYINT, +j INT, +t DATETIME, +KEY k1 (id2,k,j,t) +); +INSERT INTO t1 VALUES +(53,54,1,0,'2019-12-13 10:09:59'), +(54,54,1,0,'2019-12-13 16:28:41'), +(55,54,1,0,'2019-12-13 16:29:10'), +(56,54,1,0,'2019-12-13 16:29:43'), +(57,54,1,0,'2019-12-13 16:30:16'), +(58,54,1,0,'2019-12-13 16:30:49'), +(59,54,1,0,'2019-12-13 16:31:23'), +(60,54,1,0,'2019-12-13 16:31:55'), +(61,54,1,0,'2019-12-13 16:32:28'), +(62,54,1,0,'2019-12-13 16:33:01'), +(63,54,1,0,'2019-12-13 16:33:34'), +(64,54,1,0,'2019-12-13 16:34:07'), +(65,54,1,0,'2019-12-13 16:34:40'), +(66,54,1,0,'2019-12-13 16:35:13'), +(67,54,1,0,'2019-12-13 16:35:46'), +(68,54,1,0,'2019-12-13 16:36:19'); +SELECT t FROM t1 GROUP BY t HAVING t=max(t); +t +2019-12-13 10:09:59 +2019-12-13 16:28:41 +2019-12-13 16:29:10 +2019-12-13 16:29:43 +2019-12-13 16:30:16 +2019-12-13 16:30:49 +2019-12-13 16:31:23 +2019-12-13 16:31:55 +2019-12-13 16:32:28 +2019-12-13 16:33:01 +2019-12-13 16:33:34 +2019-12-13 16:34:07 +2019-12-13 16:34:40 +2019-12-13 16:35:13 +2019-12-13 16:35:46 +2019-12-13 16:36:19 +SELECT t FROM t1 WHERE id2=54 and j=0 and k=1 GROUP BY t HAVING t=max(t); +t +2019-12-13 10:09:59 +2019-12-13 16:28:41 +2019-12-13 16:29:10 +2019-12-13 16:29:43 +2019-12-13 16:30:16 +2019-12-13 16:30:49 +2019-12-13 16:31:23 +2019-12-13 16:31:55 +2019-12-13 16:32:28 +2019-12-13 16:33:01 +2019-12-13 16:33:34 +2019-12-13 16:34:07 +2019-12-13 16:34:40 +2019-12-13 16:35:13 +2019-12-13 16:35:46 +2019-12-13 16:36:19 +DROP TABLE t1; +CREATE TABLE t1 (pk INT); +CREATE VIEW v1 AS SELECT * FROM t1; +INSERT INTO t1 VALUES (1); +SELECT pk<DATE'2001-01-01' FROM t1 GROUP BY pk; +pk<DATE'2001-01-01' +1 +Warnings: +Warning 1292 Incorrect datetime value: '1' for column `test`.`t1`.`pk` at row 1 +SELECT pk<DATE'2001-01-01' FROM v1 GROUP BY pk; +pk<DATE'2001-01-01' +1 +Warnings: +Warning 1292 Incorrect datetime value: '1' for column `test`.`t1`.`pk` at row 1 +DROP VIEW v1; +DROP TABLE t1; +# # End of 10.1 tests # # diff --git a/mysql-test/main/type_datetime.test b/mysql-test/main/type_datetime.test index b4b5fe95bbf..e4b18a245f0 100644 --- a/mysql-test/main/type_datetime.test +++ b/mysql-test/main/type_datetime.test @@ -748,6 +748,49 @@ DROP TABLE t1; --echo # +--echo # MDEV-21319 COUNT(*) returns 1, actual SELECT returns no result in 10.3.21, but 1 result in 10.1.41 +--echo # + +CREATE TABLE t1 +( + id INT NOT NULL PRIMARY KEY, + id2 INT, + k TINYINT, + j INT, + t DATETIME, + KEY k1 (id2,k,j,t) +); +INSERT INTO t1 VALUES +(53,54,1,0,'2019-12-13 10:09:59'), +(54,54,1,0,'2019-12-13 16:28:41'), +(55,54,1,0,'2019-12-13 16:29:10'), +(56,54,1,0,'2019-12-13 16:29:43'), +(57,54,1,0,'2019-12-13 16:30:16'), +(58,54,1,0,'2019-12-13 16:30:49'), +(59,54,1,0,'2019-12-13 16:31:23'), +(60,54,1,0,'2019-12-13 16:31:55'), +(61,54,1,0,'2019-12-13 16:32:28'), +(62,54,1,0,'2019-12-13 16:33:01'), +(63,54,1,0,'2019-12-13 16:33:34'), +(64,54,1,0,'2019-12-13 16:34:07'), +(65,54,1,0,'2019-12-13 16:34:40'), +(66,54,1,0,'2019-12-13 16:35:13'), +(67,54,1,0,'2019-12-13 16:35:46'), +(68,54,1,0,'2019-12-13 16:36:19'); +SELECT t FROM t1 GROUP BY t HAVING t=max(t); +SELECT t FROM t1 WHERE id2=54 and j=0 and k=1 GROUP BY t HAVING t=max(t); +DROP TABLE t1; + +CREATE TABLE t1 (pk INT); +CREATE VIEW v1 AS SELECT * FROM t1; +INSERT INTO t1 VALUES (1); +SELECT pk<DATE'2001-01-01' FROM t1 GROUP BY pk; +SELECT pk<DATE'2001-01-01' FROM v1 GROUP BY pk; +DROP VIEW v1; +DROP TABLE t1; + + +--echo # --echo # End of 10.1 tests --echo # diff --git a/mysql-test/main/type_int.result b/mysql-test/main/type_int.result index 3b1321d9a60..855341a2b59 100644 --- a/mysql-test/main/type_int.result +++ b/mysql-test/main/type_int.result @@ -20,6 +20,19 @@ COALESCE(@a) 1 DROP TABLE t1; # +# MDEV-21065 UNIQUE constraint causes a query with string comparison to omit a row in the result set +# +CREATE TABLE t1 (c0 INT UNIQUE); +INSERT INTO t1 VALUES (NULL), (NULL), (NULL), (NULL), (1), (0); +SELECT * FROM t1 WHERE c0 < '\n2'; +c0 +0 +1 +DROP TABLE t1; +SELECT CAST('\n2' AS INT); +CAST('\n2' AS INT) +2 +# # End of 5.5 tests # # diff --git a/mysql-test/main/type_int.test b/mysql-test/main/type_int.test index 77c532ff4ac..5d961724e59 100644 --- a/mysql-test/main/type_int.test +++ b/mysql-test/main/type_int.test @@ -15,6 +15,18 @@ SELECT COALESCE(@a) FROM t1 ORDER BY STRCMP(STDDEV_SAMP(a), 'bar'); DROP TABLE t1; --echo # +--echo # MDEV-21065 UNIQUE constraint causes a query with string comparison to omit a row in the result set +--echo # + +CREATE TABLE t1 (c0 INT UNIQUE); +INSERT INTO t1 VALUES (NULL), (NULL), (NULL), (NULL), (1), (0); +SELECT * FROM t1 WHERE c0 < '\n2'; +DROP TABLE t1; + +SELECT CAST('\n2' AS INT); + + +--echo # --echo # End of 5.5 tests --echo # diff --git a/mysql-test/main/type_time.result b/mysql-test/main/type_time.result index 673bed990a1..360746bb856 100644 --- a/mysql-test/main/type_time.result +++ b/mysql-test/main/type_time.result @@ -1258,6 +1258,72 @@ drop table t1; SET @@optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity; set @@old_mode= @save_old_mode; # +# MDEV-21319 COUNT(*) returns 1, actual SELECT returns no result in 10.3.21, but 1 result in 10.1.41 +# +CREATE OR REPLACE TABLE t1 +( +id INT NOT NULL PRIMARY KEY, +id2 INT, +k TINYINT, +j INT, +t TIME, +KEY k1 (id2,k,j,t) +); +INSERT INTO t1 VALUES +(53,54,1,0,'10:09:59'), +(54,54,1,0,'16:28:41'), +(55,54,1,0,'16:29:10'), +(56,54,1,0,'16:29:43'), +(57,54,1,0,'16:30:16'), +(58,54,1,0,'16:30:49'), +(59,54,1,0,'16:31:23'), +(60,54,1,0,'16:31:55'), +(61,54,1,0,'16:32:28'), +(62,54,1,0,'16:33:01'), +(63,54,1,0,'16:33:34'), +(64,54,1,0,'16:34:07'), +(65,54,1,0,'16:34:40'), +(66,54,1,0,'16:35:13'), +(67,54,1,0,'16:35:46'), +(68,54,1,0,'16:36:19'); +SELECT t FROM t1 GROUP BY t HAVING t=MAX(t); +t +10:09:59 +16:28:41 +16:29:10 +16:29:43 +16:30:16 +16:30:49 +16:31:23 +16:31:55 +16:32:28 +16:33:01 +16:33:34 +16:34:07 +16:34:40 +16:35:13 +16:35:46 +16:36:19 +SELECT t FROM t1 WHERE id2=54 AND j=0 AND k=1 GROUP BY t HAVING t=MAX(t); +t +10:09:59 +16:28:41 +16:29:10 +16:29:43 +16:30:16 +16:30:49 +16:31:23 +16:31:55 +16:32:28 +16:33:01 +16:33:34 +16:34:07 +16:34:40 +16:35:13 +16:35:46 +16:36:19 +DROP TABLE t1; +# # End of 10.1 tests # # diff --git a/mysql-test/main/type_time.test b/mysql-test/main/type_time.test index 08e43041c76..13101f0e29d 100644 --- a/mysql-test/main/type_time.test +++ b/mysql-test/main/type_time.test @@ -752,6 +752,40 @@ SET @@optimizer_use_condition_selectivity= @save_optimizer_use_condition_selecti set @@old_mode= @save_old_mode; --echo # +--echo # MDEV-21319 COUNT(*) returns 1, actual SELECT returns no result in 10.3.21, but 1 result in 10.1.41 +--echo # + +CREATE OR REPLACE TABLE t1 +( + id INT NOT NULL PRIMARY KEY, + id2 INT, + k TINYINT, + j INT, + t TIME, + KEY k1 (id2,k,j,t) +); +INSERT INTO t1 VALUES +(53,54,1,0,'10:09:59'), +(54,54,1,0,'16:28:41'), +(55,54,1,0,'16:29:10'), +(56,54,1,0,'16:29:43'), +(57,54,1,0,'16:30:16'), +(58,54,1,0,'16:30:49'), +(59,54,1,0,'16:31:23'), +(60,54,1,0,'16:31:55'), +(61,54,1,0,'16:32:28'), +(62,54,1,0,'16:33:01'), +(63,54,1,0,'16:33:34'), +(64,54,1,0,'16:34:07'), +(65,54,1,0,'16:34:40'), +(66,54,1,0,'16:35:13'), +(67,54,1,0,'16:35:46'), +(68,54,1,0,'16:36:19'); +SELECT t FROM t1 GROUP BY t HAVING t=MAX(t); +SELECT t FROM t1 WHERE id2=54 AND j=0 AND k=1 GROUP BY t HAVING t=MAX(t); +DROP TABLE t1; + +--echo # --echo # End of 10.1 tests --echo # diff --git a/mysql-test/main/win.result b/mysql-test/main/win.result index 79c7669f861..fd0efd917e6 100644 --- a/mysql-test/main/win.result +++ b/mysql-test/main/win.result @@ -3642,6 +3642,87 @@ x foo drop table t1; # +# MDEV-16579: Wrong result of query using DISTINCT COUNT(*) OVER (*) +# +CREATE TABLE t1 (i int) ; +INSERT INTO t1 VALUES (1),(0),(1),(2),(0),(1),(2),(1),(2); +SELECT DISTINCT COUNT(*) OVER (), MOD(MIN(i),2) FROM t1 GROUP BY i ; +COUNT(*) OVER () MOD(MIN(i),2) +3 0 +3 1 +drop table t1; +# +# MDEV-21318: Wrong results with window functions and implicit grouping +# +CREATE TABLE t1 (a INT); +# +# With empty const table +# The expected result here is 1, NULL +# +explain +SELECT row_number() over(), sum(1) FROM t1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 system NULL NULL NULL NULL 0 Const row not found; Using temporary +SELECT row_number() over(), sum(1) FROM t1; +row_number() over() sum(1) +1 NULL +insert into t1 values (2); +# +# Const table has 1 row, but still impossible where +# The expected result here is 1, NULL +# +EXPLAIN SELECT row_number() over(), sum(1) FROM t1 where a=1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +SELECT row_number() over(), sum(1) FROM t1 where a=1; +row_number() over() sum(1) +1 NULL +# +# Impossible HAVING +# Empty result is expected +# +EXPLAIN SELECT row_number() over(), sum(1) FROM t1 where a=1 having 1=0; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible HAVING +SELECT row_number() over(), sum(1) FROM t1 where a=1 having 1=0; +row_number() over() sum(1) +# +# const table has 1 row, no impossible where +# The expected result here is 1, 2 +# +EXPLAIN SELECT row_number() over(), sum(a) FROM t1 where a=2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 system NULL NULL NULL NULL 1 Using temporary +SELECT row_number() over(), sum(a) FROM t1 where a=2; +row_number() over() sum(a) +1 2 +drop table t1; +# +# Impossible Where +# +create table t1(a int); +insert into t1 values (1); +# +# Expected result is NULL, 0, NULL +# +EXPLAIN SELECT MAX(a) OVER (), COUNT(a), abs(a) FROM t1 WHERE FALSE; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +SELECT MAX(a) OVER (), COUNT(a), abs(a) FROM t1 WHERE FALSE; +MAX(a) OVER () COUNT(a) abs(a) +NULL 0 NULL +# +# Expected result is 1, 0, NULL +# +EXPLAIN +SELECT MAX(1) OVER (), COUNT(a), abs(a) FROM t1 WHERE FALSE; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +SELECT MAX(1) OVER (), COUNT(a), abs(a) FROM t1 WHERE FALSE; +MAX(1) OVER () COUNT(a) abs(a) +1 0 NULL +drop table t1; +# # End of 10.2 tests # # diff --git a/mysql-test/main/win.test b/mysql-test/main/win.test index f6fdb479054..89a018ea374 100644 --- a/mysql-test/main/win.test +++ b/mysql-test/main/win.test @@ -2351,6 +2351,81 @@ SELECT (SELECT MIN('foo') OVER() FROM t1 LIMIT 1) as x; drop table t1; --echo # +--echo # MDEV-16579: Wrong result of query using DISTINCT COUNT(*) OVER (*) +--echo # + +CREATE TABLE t1 (i int) ; +INSERT INTO t1 VALUES (1),(0),(1),(2),(0),(1),(2),(1),(2); + +SELECT DISTINCT COUNT(*) OVER (), MOD(MIN(i),2) FROM t1 GROUP BY i ; +drop table t1; + +--echo # +--echo # MDEV-21318: Wrong results with window functions and implicit grouping +--echo # + +CREATE TABLE t1 (a INT); + +--echo # +--echo # With empty const table +--echo # The expected result here is 1, NULL +--echo # + +explain +SELECT row_number() over(), sum(1) FROM t1; +SELECT row_number() over(), sum(1) FROM t1; + +insert into t1 values (2); + +--echo # +--echo # Const table has 1 row, but still impossible where +--echo # The expected result here is 1, NULL +--echo # + +EXPLAIN SELECT row_number() over(), sum(1) FROM t1 where a=1; +SELECT row_number() over(), sum(1) FROM t1 where a=1; + +--echo # +--echo # Impossible HAVING +--echo # Empty result is expected +--echo # + +EXPLAIN SELECT row_number() over(), sum(1) FROM t1 where a=1 having 1=0; +SELECT row_number() over(), sum(1) FROM t1 where a=1 having 1=0; + +--echo # +--echo # const table has 1 row, no impossible where +--echo # The expected result here is 1, 2 +--echo # + +EXPLAIN SELECT row_number() over(), sum(a) FROM t1 where a=2; +SELECT row_number() over(), sum(a) FROM t1 where a=2; +drop table t1; + +--echo # +--echo # Impossible Where +--echo # + +create table t1(a int); +insert into t1 values (1); + +--echo # +--echo # Expected result is NULL, 0, NULL +--echo # +EXPLAIN SELECT MAX(a) OVER (), COUNT(a), abs(a) FROM t1 WHERE FALSE; +SELECT MAX(a) OVER (), COUNT(a), abs(a) FROM t1 WHERE FALSE; + +--echo # +--echo # Expected result is 1, 0, NULL +--echo # + +EXPLAIN +SELECT MAX(1) OVER (), COUNT(a), abs(a) FROM t1 WHERE FALSE; +SELECT MAX(1) OVER (), COUNT(a), abs(a) FROM t1 WHERE FALSE; + +drop table t1; + +--echo # --echo # End of 10.2 tests --echo # diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index f405d026e78..3c4c6f80940 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -4675,6 +4675,8 @@ sub extract_warning_lines ($$) { qr/missing DBUG_RETURN/, qr/Attempting backtrace/, qr/Assertion .* failed/, + qr/Sanitizer/, + qr/runtime error:/, ); # These are taken from the include/mtr_warnings.sql global suppression # list. They occur delayed, so they can be parsed during shutdown rather diff --git a/mysql-test/suite/funcs_1/r/is_check_constraint.result b/mysql-test/suite/funcs_1/r/is_check_constraint.result deleted file mode 100644 index be44a8867e8..00000000000 --- a/mysql-test/suite/funcs_1/r/is_check_constraint.result +++ /dev/null @@ -1,121 +0,0 @@ -# -# MDEV-17323: Backport INFORMATION_SCHEMA.CHECK_CONSTRAINTS to 10.2 -# -CREATE user boo1; -GRANT select,create,alter,drop on foo.* to boo1; -SHOW GRANTS for boo1; -Grants for boo1@% -GRANT USAGE ON *.* TO 'boo1'@'%' -GRANT SELECT, CREATE, DROP, ALTER ON `foo`.* TO 'boo1'@'%' -CREATE user boo2; -create database foo; -CONNECT con1,localhost, boo1,, foo; -SET check_constraint_checks=1; -CREATE TABLE t0 -( -t int, check (t>32) # table constraint -) ENGINE=myisam; -SELECT * from information_schema.check_constraints; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_NAME CHECK_CLAUSE -def foo CONSTRAINT_1 t0 `t` > 32 -ALTER TABLE t0 -ADD CONSTRAINT CHK_t0_t CHECK(t<100); -SELECT * from information_schema.check_constraints; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_NAME CHECK_CLAUSE -def foo CHK_t0_t t0 `t` < 100 -def foo CONSTRAINT_1 t0 `t` > 32 -ALTER TABLE t0 -DROP CONSTRAINT CHK_t0_t; -SELECT * from information_schema.check_constraints; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_NAME CHECK_CLAUSE -def foo CONSTRAINT_1 t0 `t` > 32 -ALTER TABLE t0 -ADD CONSTRAINT CHECK(t<50); -SELECT * from information_schema.check_constraints; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_NAME CHECK_CLAUSE -def foo CONSTRAINT_1 t0 `t` > 32 -def foo CONSTRAINT_2 t0 `t` < 50 -CREATE TABLE t1 -( t int CHECK(t>2), # field constraint -tt int, -CONSTRAINT CHECK (tt > 32), CONSTRAINT CHECK (tt <50),# autogenerated names table constraints -CONSTRAINT CHK_tt CHECK(tt<100) # named table constraint -) ENGINE=InnoDB; -SELECT * from information_schema.check_constraints; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_NAME CHECK_CLAUSE -def foo CHK_tt t1 `tt` < 100 -def foo CONSTRAINT_1 t0 `t` > 32 -def foo CONSTRAINT_1 t1 `tt` > 32 -def foo CONSTRAINT_2 t0 `t` < 50 -def foo CONSTRAINT_2 t1 `tt` < 50 -def foo t t1 `t` > 2 -ALTER TABLE t1 -DROP CONSTRAINT CHK_tt; -SELECT * from information_schema.check_constraints; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_NAME CHECK_CLAUSE -def foo CONSTRAINT_1 t0 `t` > 32 -def foo CONSTRAINT_1 t1 `tt` > 32 -def foo CONSTRAINT_2 t0 `t` < 50 -def foo CONSTRAINT_2 t1 `tt` < 50 -def foo t t1 `t` > 2 -CREATE TABLE t2 -( -name VARCHAR(30) CHECK(CHAR_LENGTH(name)>2), #field constraint -start_date DATE, -end_date DATE, -CONSTRAINT CHK_dates CHECK(start_date IS NULL) #table constraint -)ENGINE=Innodb; -SELECT * from information_schema.check_constraints; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_NAME CHECK_CLAUSE -def foo CHK_dates t2 `start_date` is null -def foo CONSTRAINT_1 t0 `t` > 32 -def foo CONSTRAINT_1 t1 `tt` > 32 -def foo CONSTRAINT_2 t0 `t` < 50 -def foo CONSTRAINT_2 t1 `tt` < 50 -def foo name t2 char_length(`name`) > 2 -def foo t t1 `t` > 2 -ALTER TABLE t1 -ADD CONSTRAINT CHK_new_ CHECK(t>tt); -SELECT * from information_schema.check_constraints; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_NAME CHECK_CLAUSE -def foo CHK_dates t2 `start_date` is null -def foo CHK_new_ t1 `t` > `tt` -def foo CONSTRAINT_1 t0 `t` > 32 -def foo CONSTRAINT_1 t1 `tt` > 32 -def foo CONSTRAINT_2 t0 `t` < 50 -def foo CONSTRAINT_2 t1 `tt` < 50 -def foo name t2 char_length(`name`) > 2 -def foo t t1 `t` > 2 -CREATE TABLE t3 -( -a int, -b int check (b>0), # field constraint named 'b' -CONSTRAINT b check (b>10) # table constraint -) ENGINE=InnoDB; -SELECT * from information_schema.check_constraints; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_NAME CHECK_CLAUSE -def foo CHK_dates t2 `start_date` is null -def foo CHK_new_ t1 `t` > `tt` -def foo CONSTRAINT_1 t0 `t` > 32 -def foo CONSTRAINT_1 t1 `tt` > 32 -def foo CONSTRAINT_2 t0 `t` < 50 -def foo CONSTRAINT_2 t1 `tt` < 50 -def foo b t3 `b` > 0 -def foo b t3 `b` > 10 -def foo name t2 char_length(`name`) > 2 -def foo t t1 `t` > 2 -disconnect con1; -CONNECT con2, localhost, boo2,, test; -SELECT * from information_schema.check_constraints; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_NAME CHECK_CLAUSE -disconnect con2; -CONNECT con1, localhost, boo1,,foo; -DROP TABLE t0; -DROP TABLE t1; -DROP TABLE t2; -DROP TABLE t3; -DROP DATABASE foo; -disconnect con1; -connection default; -DROP USER boo1; -DROP USER boo2; diff --git a/mysql-test/suite/funcs_1/r/is_check_constraints.result b/mysql-test/suite/funcs_1/r/is_check_constraints.result index eaf90f44544..307c14792a9 100644 --- a/mysql-test/suite/funcs_1/r/is_check_constraints.result +++ b/mysql-test/suite/funcs_1/r/is_check_constraints.result @@ -1,180 +1,148 @@ # # MDEV-14474: Create INFORMATION_SCHEMA.CHECK_CONSTRAINTS # -set check_constraint_checks=1; -use test; -create table t0 +CREATE user boo1; +GRANT select,create,alter,drop on foo.* to boo1; +SHOW GRANTS for boo1; +Grants for boo1@% +GRANT USAGE ON *.* TO 'boo1'@'%' +GRANT SELECT, CREATE, DROP, ALTER ON `foo`.* TO 'boo1'@'%' +CREATE user boo2; +create database foo; +CONNECT con1,localhost, boo1,, foo; +SET check_constraint_checks=1; +CREATE TABLE t0 ( t int, check (t>32) # table constraint ) ENGINE=myisam; -SELECT * from information_schema.check_constraints order by check_clause; -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA mysql -CONSTRAINT_NAME Priv -TABLE_NAME global_priv -CHECK_CLAUSE json_valid(`Priv`) -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA test -CONSTRAINT_NAME CONSTRAINT_1 -TABLE_NAME t0 -CHECK_CLAUSE `t` > 32 +SELECT * from information_schema.check_constraints; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE +def foo t0 CONSTRAINT_1 `t` > 32 ALTER TABLE t0 ADD CONSTRAINT CHK_t0_t CHECK(t<100); -SELECT * from information_schema.check_constraints order by check_clause; -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA mysql -CONSTRAINT_NAME Priv -TABLE_NAME global_priv -CHECK_CLAUSE json_valid(`Priv`) -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA test -CONSTRAINT_NAME CHK_t0_t -TABLE_NAME t0 -CHECK_CLAUSE `t` < 100 -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA test -CONSTRAINT_NAME CONSTRAINT_1 -TABLE_NAME t0 -CHECK_CLAUSE `t` > 32 +SELECT * from information_schema.check_constraints; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE +def foo t0 CHK_t0_t `t` < 100 +def foo t0 CONSTRAINT_1 `t` > 32 ALTER TABLE t0 DROP CONSTRAINT CHK_t0_t; -SELECT * from information_schema.check_constraints order by check_clause; -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA mysql -CONSTRAINT_NAME Priv -TABLE_NAME global_priv -CHECK_CLAUSE json_valid(`Priv`) -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA test -CONSTRAINT_NAME CONSTRAINT_1 -TABLE_NAME t0 -CHECK_CLAUSE `t` > 32 +SELECT * from information_schema.check_constraints; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE +def foo t0 CONSTRAINT_1 `t` > 32 +ALTER TABLE t0 +ADD CONSTRAINT CHECK(t<50); +SELECT * from information_schema.check_constraints; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE +def foo t0 CONSTRAINT_1 `t` > 32 +def foo t0 CONSTRAINT_2 `t` < 50 CREATE TABLE t1 ( t int CHECK(t>2), # field constraint -tt int, CONSTRAINT CHK_tt CHECK(tt<100) # table constraint +tt int, +CONSTRAINT CHECK (tt > 32), CONSTRAINT CHECK (tt <50),# autogenerated names table constraints +CONSTRAINT CHK_tt CHECK(tt<100) # named table constraint ) ENGINE=InnoDB; -SELECT * from information_schema.check_constraints order by check_clause; -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA mysql -CONSTRAINT_NAME Priv -TABLE_NAME global_priv -CHECK_CLAUSE json_valid(`Priv`) -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA test -CONSTRAINT_NAME CHK_tt -TABLE_NAME t1 -CHECK_CLAUSE `tt` < 100 -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA test -CONSTRAINT_NAME t -TABLE_NAME t1 -CHECK_CLAUSE `t` > 2 -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA test -CONSTRAINT_NAME CONSTRAINT_1 -TABLE_NAME t0 -CHECK_CLAUSE `t` > 32 +SELECT * from information_schema.check_constraints; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE +def foo t0 CONSTRAINT_1 `t` > 32 +def foo t0 CONSTRAINT_2 `t` < 50 +def foo t1 CHK_tt `tt` < 100 +def foo t1 CONSTRAINT_1 `tt` > 32 +def foo t1 CONSTRAINT_2 `tt` < 50 +def foo t1 t `t` > 2 ALTER TABLE t1 DROP CONSTRAINT CHK_tt; -SELECT * from information_schema.check_constraints order by check_clause; -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA mysql -CONSTRAINT_NAME Priv -TABLE_NAME global_priv -CHECK_CLAUSE json_valid(`Priv`) -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA test -CONSTRAINT_NAME t -TABLE_NAME t1 -CHECK_CLAUSE `t` > 2 -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA test -CONSTRAINT_NAME CONSTRAINT_1 -TABLE_NAME t0 -CHECK_CLAUSE `t` > 32 -create table t2 +SELECT * from information_schema.check_constraints; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE +def foo t0 CONSTRAINT_1 `t` > 32 +def foo t0 CONSTRAINT_2 `t` < 50 +def foo t1 CONSTRAINT_1 `tt` > 32 +def foo t1 CONSTRAINT_2 `tt` < 50 +def foo t1 t `t` > 2 +CREATE TABLE t2 ( name VARCHAR(30) CHECK(CHAR_LENGTH(name)>2), #field constraint start_date DATE, end_date DATE, CONSTRAINT CHK_dates CHECK(start_date IS NULL) #table constraint )ENGINE=Innodb; -SELECT * from information_schema.check_constraints order by check_clause; -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA test -CONSTRAINT_NAME name -TABLE_NAME t2 -CHECK_CLAUSE char_length(`name`) > 2 -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA mysql -CONSTRAINT_NAME Priv -TABLE_NAME global_priv -CHECK_CLAUSE json_valid(`Priv`) -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA test -CONSTRAINT_NAME CHK_dates -TABLE_NAME t2 -CHECK_CLAUSE `start_date` is null -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA test -CONSTRAINT_NAME t -TABLE_NAME t1 -CHECK_CLAUSE `t` > 2 -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA test -CONSTRAINT_NAME CONSTRAINT_1 -TABLE_NAME t0 -CHECK_CLAUSE `t` > 32 +SELECT * from information_schema.check_constraints; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE +def foo t0 CONSTRAINT_1 `t` > 32 +def foo t0 CONSTRAINT_2 `t` < 50 +def foo t1 CONSTRAINT_1 `tt` > 32 +def foo t1 CONSTRAINT_2 `tt` < 50 +def foo t1 t `t` > 2 +def foo t2 CHK_dates `start_date` is null +def foo t2 name char_length(`name`) > 2 ALTER TABLE t1 ADD CONSTRAINT CHK_new_ CHECK(t>tt); -SELECT * from information_schema.check_constraints order by check_clause; -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA test -CONSTRAINT_NAME name -TABLE_NAME t2 -CHECK_CLAUSE char_length(`name`) > 2 -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA mysql -CONSTRAINT_NAME Priv -TABLE_NAME global_priv -CHECK_CLAUSE json_valid(`Priv`) -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA test -CONSTRAINT_NAME CHK_dates -TABLE_NAME t2 -CHECK_CLAUSE `start_date` is null -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA test -CONSTRAINT_NAME t -TABLE_NAME t1 -CHECK_CLAUSE `t` > 2 -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA test -CONSTRAINT_NAME CONSTRAINT_1 -TABLE_NAME t0 -CHECK_CLAUSE `t` > 32 -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA test -CONSTRAINT_NAME CHK_new_ -TABLE_NAME t1 -CHECK_CLAUSE `t` > `tt` -create table t3 +SELECT * from information_schema.check_constraints; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE +def foo t0 CONSTRAINT_1 `t` > 32 +def foo t0 CONSTRAINT_2 `t` < 50 +def foo t1 CHK_new_ `t` > `tt` +def foo t1 CONSTRAINT_1 `tt` > 32 +def foo t1 CONSTRAINT_2 `tt` < 50 +def foo t1 t `t` > 2 +def foo t2 CHK_dates `start_date` is null +def foo t2 name char_length(`name`) > 2 +CREATE TABLE t3 ( a int, b int check (b>0), # field constraint named 'b' CONSTRAINT b check (b>10) # table constraint ) ENGINE=InnoDB; -select * from information_schema.check_constraints order by check_clause; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_NAME CHECK_CLAUSE -def test name t2 char_length(`name`) > 2 -def mysql Priv global_priv json_valid(`Priv`) -def test b t3 `b` > 0 -def test b t3 `b` > 10 -def test CHK_dates t2 `start_date` is null -def test t t1 `t` > 2 -def test CONSTRAINT_1 t0 `t` > 32 -def test CHK_new_ t1 `t` > `tt` -drop table t0; -drop table t1; -drop table t2; -drop table t3; +SELECT * from information_schema.check_constraints; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE +def foo t0 CONSTRAINT_1 `t` > 32 +def foo t0 CONSTRAINT_2 `t` < 50 +def foo t1 CHK_new_ `t` > `tt` +def foo t1 CONSTRAINT_1 `tt` > 32 +def foo t1 CONSTRAINT_2 `tt` < 50 +def foo t1 t `t` > 2 +def foo t2 CHK_dates `start_date` is null +def foo t2 name char_length(`name`) > 2 +def foo t3 b `b` > 0 +def foo t3 b `b` > 10 +disconnect con1; +CONNECT con2, localhost, boo2,, test; +SELECT * from information_schema.check_constraints; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE +disconnect con2; +CONNECT con1, localhost, boo1,,foo; +DROP TABLE t0; +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; +DROP DATABASE foo; +disconnect con1; +connection default; +DROP USER boo1; +DROP USER boo2; +# +# MDEV-18440: Information_schema.check_constraints possible data leak +# +CREATE USER foo; +CREATE DATABASE db; +USE db; +CREATE TABLE t1 (a int, b int, CONSTRAINT CHECK (b > 0)); +INSERT INTO t1 VALUES (1, 2), (2, 3); +GRANT SELECT (a) ON t1 TO foo; +SHOW GRANTS FOR foo; +Grants for foo@% +GRANT USAGE ON *.* TO 'foo'@'%' +GRANT SELECT (a) ON `db`.`t1` TO 'foo'@'%' +SELECT * FROM information_schema.check_constraints; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE +def db t1 CONSTRAINT_1 `b` > 0 +def mysql global_priv Priv json_valid(`Priv`) +CONNECT con1,localhost, foo,, db; +SELECT a FROM t1; +a +1 +2 +SELECT * FROM information_schema.check_constraints; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE +connection default; +DROP USER foo; +DROP DATABASE db; diff --git a/mysql-test/suite/funcs_1/r/is_columns_is.result b/mysql-test/suite/funcs_1/r/is_columns_is.result index 27441bb4ebb..cd548f426e1 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_is.result +++ b/mysql-test/suite/funcs_1/r/is_columns_is.result @@ -26,9 +26,9 @@ def information_schema CHARACTER_SETS DESCRIPTION 3 '' NO varchar 60 180 NULL NU def information_schema CHARACTER_SETS MAXLEN 4 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(3) select NEVER NULL def information_schema CHECK_CONSTRAINTS CHECK_CLAUSE 5 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema CHECK_CONSTRAINTS CONSTRAINT_CATALOG 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL -def information_schema CHECK_CONSTRAINTS CONSTRAINT_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema CHECK_CONSTRAINTS CONSTRAINT_NAME 4 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema CHECK_CONSTRAINTS CONSTRAINT_SCHEMA 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema CHECK_CONSTRAINTS TABLE_NAME 4 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema CHECK_CONSTRAINTS TABLE_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema CLIENT_STATISTICS ACCESS_DENIED 22 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL def information_schema CLIENT_STATISTICS BINLOG_BYTES_WRITTEN 9 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL def information_schema CLIENT_STATISTICS BUSY_TIME 5 0 NO double NULL NULL 21 NULL NULL NULL NULL double select NEVER NULL @@ -570,8 +570,8 @@ COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH C NULL information_schema CHARACTER_SETS MAXLEN bigint NULL NULL NULL NULL bigint(3) 3.0000 information_schema CHECK_CONSTRAINTS CONSTRAINT_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) 3.0000 information_schema CHECK_CONSTRAINTS CONSTRAINT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema CHECK_CONSTRAINTS CONSTRAINT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema CHECK_CONSTRAINTS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema CHECK_CONSTRAINTS CONSTRAINT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema CHECK_CONSTRAINTS CHECK_CLAUSE varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema CLIENT_STATISTICS CLIENT varchar 64 192 utf8 utf8_general_ci varchar(64) NULL information_schema CLIENT_STATISTICS TOTAL_CONNECTIONS bigint NULL NULL NULL NULL bigint(21) diff --git a/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result b/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result index 907bcb01cab..b86897af8a4 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result +++ b/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result @@ -26,9 +26,9 @@ def information_schema CHARACTER_SETS DESCRIPTION 3 '' NO varchar 60 180 NULL NU def information_schema CHARACTER_SETS MAXLEN 4 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(3) NEVER NULL def information_schema CHECK_CONSTRAINTS CHECK_CLAUSE 5 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema CHECK_CONSTRAINTS CONSTRAINT_CATALOG 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL -def information_schema CHECK_CONSTRAINTS CONSTRAINT_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema CHECK_CONSTRAINTS CONSTRAINT_NAME 4 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema CHECK_CONSTRAINTS CONSTRAINT_SCHEMA 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema CHECK_CONSTRAINTS TABLE_NAME 4 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema CHECK_CONSTRAINTS TABLE_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema CLIENT_STATISTICS ACCESS_DENIED 22 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL def information_schema CLIENT_STATISTICS BINLOG_BYTES_WRITTEN 9 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL def information_schema CLIENT_STATISTICS BUSY_TIME 5 0 NO double NULL NULL 21 NULL NULL NULL NULL double NEVER NULL @@ -570,8 +570,8 @@ COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH C NULL information_schema CHARACTER_SETS MAXLEN bigint NULL NULL NULL NULL bigint(3) 3.0000 information_schema CHECK_CONSTRAINTS CONSTRAINT_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) 3.0000 information_schema CHECK_CONSTRAINTS CONSTRAINT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema CHECK_CONSTRAINTS CONSTRAINT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema CHECK_CONSTRAINTS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema CHECK_CONSTRAINTS CONSTRAINT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema CHECK_CONSTRAINTS CHECK_CLAUSE varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema CLIENT_STATISTICS CLIENT varchar 64 192 utf8 utf8_general_ci varchar(64) NULL information_schema CLIENT_STATISTICS TOTAL_CONNECTIONS bigint NULL NULL NULL NULL bigint(21) diff --git a/mysql-test/suite/funcs_1/t/is_check_constraint.test b/mysql-test/suite/funcs_1/t/is_check_constraint.test deleted file mode 100644 index 30a72d02b34..00000000000 --- a/mysql-test/suite/funcs_1/t/is_check_constraint.test +++ /dev/null @@ -1,92 +0,0 @@ ---source include/have_innodb.inc ---source include/not_embedded.inc ---echo # ---echo # MDEV-17323: Backport INFORMATION_SCHEMA.CHECK_CONSTRAINTS to 10.2 ---echo # -CREATE user boo1; -GRANT select,create,alter,drop on foo.* to boo1; -SHOW GRANTS for boo1; -CREATE user boo2; -create database foo; -# Connect with user boo1 -CONNECT(con1,localhost, boo1,, foo); - -SET check_constraint_checks=1; -CREATE TABLE t0 -( - t int, check (t>32) # table constraint -) ENGINE=myisam; ---sorted_result -SELECT * from information_schema.check_constraints; - -ALTER TABLE t0 -ADD CONSTRAINT CHK_t0_t CHECK(t<100); ---sorted_result -SELECT * from information_schema.check_constraints; - -ALTER TABLE t0 -DROP CONSTRAINT CHK_t0_t; ---sorted_result -SELECT * from information_schema.check_constraints; - -ALTER TABLE t0 -ADD CONSTRAINT CHECK(t<50); ---sorted_result -SELECT * from information_schema.check_constraints; - -CREATE TABLE t1 -( t int CHECK(t>2), # field constraint - tt int, - CONSTRAINT CHECK (tt > 32), CONSTRAINT CHECK (tt <50),# autogenerated names table constraints - CONSTRAINT CHK_tt CHECK(tt<100) # named table constraint -) ENGINE=InnoDB; - --sorted_result -SELECT * from information_schema.check_constraints; - -ALTER TABLE t1 -DROP CONSTRAINT CHK_tt; ---sorted_result -SELECT * from information_schema.check_constraints; - -CREATE TABLE t2 -( -name VARCHAR(30) CHECK(CHAR_LENGTH(name)>2), #field constraint -start_date DATE, -end_date DATE, -CONSTRAINT CHK_dates CHECK(start_date IS NULL) #table constraint -)ENGINE=Innodb; - --sorted_result -SELECT * from information_schema.check_constraints; - -ALTER TABLE t1 -ADD CONSTRAINT CHK_new_ CHECK(t>tt); ---sorted_result -SELECT * from information_schema.check_constraints; - -# Create table with same field and table check constraint name -CREATE TABLE t3 -( -a int, -b int check (b>0), # field constraint named 'b' -CONSTRAINT b check (b>10) # table constraint -) ENGINE=InnoDB; - --sorted_result -SELECT * from information_schema.check_constraints; - -DISCONNECT con1; -CONNECT(con2, localhost, boo2,, test); - --sorted_result -SELECT * from information_schema.check_constraints; - -DISCONNECT con2; -CONNECT(con1, localhost, boo1,,foo); -DROP TABLE t0; -DROP TABLE t1; -DROP TABLE t2; -DROP TABLE t3; -DROP DATABASE foo; - -DISCONNECT con1; ---CONNECTION default -DROP USER boo1; -DROP USER boo2; diff --git a/mysql-test/suite/funcs_1/t/is_check_constraints.test b/mysql-test/suite/funcs_1/t/is_check_constraints.test index b39abdc1b24..b539de67f73 100644 --- a/mysql-test/suite/funcs_1/t/is_check_constraints.test +++ b/mysql-test/suite/funcs_1/t/is_check_constraints.test @@ -1,69 +1,118 @@ --source include/have_innodb.inc +--source include/not_embedded.inc --echo # --echo # MDEV-14474: Create INFORMATION_SCHEMA.CHECK_CONSTRAINTS --echo # -set check_constraint_checks=1; +CREATE user boo1; +GRANT select,create,alter,drop on foo.* to boo1; +SHOW GRANTS for boo1; +CREATE user boo2; +create database foo; +# Connect with user boo1 +CONNECT(con1,localhost, boo1,, foo); -use test; -create table t0 +SET check_constraint_checks=1; +CREATE TABLE t0 ( t int, check (t>32) # table constraint ) ENGINE=myisam; - ---vertical_results -SELECT * from information_schema.check_constraints order by check_clause; +--sorted_result +SELECT * from information_schema.check_constraints; ALTER TABLE t0 ADD CONSTRAINT CHK_t0_t CHECK(t<100); - -SELECT * from information_schema.check_constraints order by check_clause; +--sorted_result +SELECT * from information_schema.check_constraints; ALTER TABLE t0 DROP CONSTRAINT CHK_t0_t; +--sorted_result +SELECT * from information_schema.check_constraints; -SELECT * from information_schema.check_constraints order by check_clause; +ALTER TABLE t0 +ADD CONSTRAINT CHECK(t<50); +--sorted_result +SELECT * from information_schema.check_constraints; CREATE TABLE t1 ( t int CHECK(t>2), # field constraint - tt int, CONSTRAINT CHK_tt CHECK(tt<100) # table constraint + tt int, + CONSTRAINT CHECK (tt > 32), CONSTRAINT CHECK (tt <50),# autogenerated names table constraints + CONSTRAINT CHK_tt CHECK(tt<100) # named table constraint ) ENGINE=InnoDB; - -SELECT * from information_schema.check_constraints order by check_clause; +--sorted_result +SELECT * from information_schema.check_constraints; ALTER TABLE t1 DROP CONSTRAINT CHK_tt; +--sorted_result +SELECT * from information_schema.check_constraints; -SELECT * from information_schema.check_constraints order by check_clause; - -create table t2 +CREATE TABLE t2 ( name VARCHAR(30) CHECK(CHAR_LENGTH(name)>2), #field constraint start_date DATE, end_date DATE, CONSTRAINT CHK_dates CHECK(start_date IS NULL) #table constraint )ENGINE=Innodb; - -SELECT * from information_schema.check_constraints order by check_clause; +--sorted_result +SELECT * from information_schema.check_constraints; ALTER TABLE t1 ADD CONSTRAINT CHK_new_ CHECK(t>tt); - -SELECT * from information_schema.check_constraints order by check_clause; - +--sorted_result +SELECT * from information_schema.check_constraints; # Create table with same field and table check constraint name -create table t3 +CREATE TABLE t3 ( a int, b int check (b>0), # field constraint named 'b' CONSTRAINT b check (b>10) # table constraint ) ENGINE=InnoDB; +--sorted_result +SELECT * from information_schema.check_constraints; + +DISCONNECT con1; +CONNECT(con2, localhost, boo2,, test); +--sorted_result +SELECT * from information_schema.check_constraints; + +DISCONNECT con2; +CONNECT(con1, localhost, boo1,,foo); +DROP TABLE t0; +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; +DROP DATABASE foo; + +DISCONNECT con1; +--CONNECTION default +DROP USER boo1; +DROP USER boo2; + +--echo # +--echo # MDEV-18440: Information_schema.check_constraints possible data leak +--echo # + +CREATE USER foo; +CREATE DATABASE db; +USE db; +CREATE TABLE t1 (a int, b int, CONSTRAINT CHECK (b > 0)); +INSERT INTO t1 VALUES (1, 2), (2, 3); +GRANT SELECT (a) ON t1 TO foo; + +SHOW GRANTS FOR foo; +--sorted_result +SELECT * FROM information_schema.check_constraints; + +CONNECT(con1,localhost, foo,, db); +SELECT a FROM t1; +--sorted_result +SELECT * FROM information_schema.check_constraints; ---horizontal_results -select * from information_schema.check_constraints order by check_clause; +--CONNECTION default -drop table t0; -drop table t1; -drop table t2; -drop table t3; +DROP USER foo; +DROP DATABASE db; diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def index 40243ad556f..061697a7fd8 100644 --- a/mysql-test/suite/galera/disabled.def +++ b/mysql-test/suite/galera/disabled.def @@ -43,6 +43,5 @@ galera_var_reject_queries : assertion in inline_mysql_socket_send galera_var_retry_autocommit: MDEV-18181 Galera test failure on galera.galera_var_retry_autocommit galera_wan : MDEV-17259 Test failure on galera.galera_wan mysql-wsrep#198 : MDEV-18935 Galera test mysql-wsrep#198 sporaric assertion transaction.cpp:362: int wsrep::transaction::before_commit(): Assertion `state() == s_executing || state() == s_committing || state() == s_must_abort || state() == s_replaying' failed. -galera_partition : MDEV-21189 test timeout partition : MDEV-19958 Galera test failure on galera.partition query_cache: MDEV-15805 Test failure on galera.query_cache diff --git a/mysql-test/suite/galera/r/galera_gcs_fc_limit.result b/mysql-test/suite/galera/r/galera_gcs_fc_limit.result index e96e512b61b..432cf87f66f 100644 --- a/mysql-test/suite/galera/r/galera_gcs_fc_limit.result +++ b/mysql-test/suite/galera/r/galera_gcs_fc_limit.result @@ -3,7 +3,6 @@ connection node_1; CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,B INTEGER) ENGINE=InnoDB; INSERT INTO t1 VALUES (1,1); connection node_2; -SET SESSION wsrep_sync_wait=15; SELECT COUNT(*) FROM t1; COUNT(*) 1 diff --git a/mysql-test/suite/galera/r/galera_partition.result b/mysql-test/suite/galera/r/galera_partition.result index d845de12c45..f09a0272eda 100644 --- a/mysql-test/suite/galera/r/galera_partition.result +++ b/mysql-test/suite/galera/r/galera_partition.result @@ -1,9 +1,10 @@ +connection node_2; +connection node_1; connection node_1; call mtr.add_suppression("WSREP: RSU failed due to pending transactions, schema: test, query ALTER.*"); call mtr.add_suppression("WSREP: ALTER TABLE isolation failure"); connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4; -connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1; connection node_1; CREATE TABLE t1( id bigint unsigned NOT NULL AUTO_INCREMENT, @@ -396,13 +397,14 @@ SELECT COUNT(*) FROM t1; COUNT(*) 350 connection node_2; -call p1(100);; -connection node_1a; -call p1(100);; +call mtr.add_suppression("WSREP: Sending JOIN failed:"); +call p1(10); connection node_3; -call p1(100);; +call mtr.add_suppression("WSREP: Sending JOIN failed:"); +call p1(10); connection node_4; -call p1(100);; +call mtr.add_suppression("WSREP: Sending JOIN failed:"); +call p1(10); connection node_1; SET SESSION wsrep_OSU_method='RSU'; SELECT @@wsrep_OSU_method; @@ -419,6 +421,6 @@ TOI connection node_2; connection node_3; connection node_4; -connection node_1a; +connection node_1; DROP TABLE t1; DROP PROCEDURE p1; diff --git a/mysql-test/suite/galera/t/galera_gcs_fc_limit.test b/mysql-test/suite/galera/t/galera_gcs_fc_limit.test index e0626bd8946..d73286dcba2 100644 --- a/mysql-test/suite/galera/t/galera_gcs_fc_limit.test +++ b/mysql-test/suite/galera/t/galera_gcs_fc_limit.test @@ -3,13 +3,16 @@ # --source include/galera_cluster.inc ---source include/have_innodb.inc +--source include/big_test.inc +--source include/force_restart.inc CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,B INTEGER) ENGINE=InnoDB; INSERT INTO t1 VALUES (1,1); --connection node_2 -SET SESSION wsrep_sync_wait=15; +--let $wait_condition = SELECT COUNT(*)=1 FROM t1; +--source include/wait_condition.inc + SELECT COUNT(*) FROM t1; --let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options` @@ -53,5 +56,6 @@ SELECT COUNT(*) FROM t1; --disable_query_log --eval SET GLOBAL wsrep_provider_options = '$wsrep_provider_options_orig'; --enable_query_log +--source include/wait_until_connected_again.inc DROP TABLE t1; diff --git a/mysql-test/suite/galera/t/galera_partition.test b/mysql-test/suite/galera/t/galera_partition.test index a2044936cd1..bf3f02eaa92 100644 --- a/mysql-test/suite/galera/t/galera_partition.test +++ b/mysql-test/suite/galera/t/galera_partition.test @@ -1,5 +1,6 @@ --source include/galera_cluster.inc --source include/have_partition.inc +--source include/big_test.inc --connection node_1 @@ -8,7 +9,6 @@ call mtr.add_suppression("WSREP: ALTER TABLE isolation failure"); --connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3 --connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4 ---connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 --connection node_1 @@ -407,16 +407,16 @@ insert into t1 (id, dt) values (350, '2010-12-17 00:00:00'); SELECT COUNT(*) FROM t1; --connection node_2 ---send call p1(100); - ---connection node_1a ---send call p1(100); +call mtr.add_suppression("WSREP: Sending JOIN failed:"); +send call p1(10); --connection node_3 ---send call p1(100); +call mtr.add_suppression("WSREP: Sending JOIN failed:"); +send call p1(10); --connection node_4 ---send call p1(100); +call mtr.add_suppression("WSREP: Sending JOIN failed:"); +send call p1(10); --connection node_1 SET SESSION wsrep_OSU_method='RSU'; @@ -445,9 +445,7 @@ reap; --error 0,ER_LOCK_DEADLOCK reap; ---connection node_1a ---error 0,ER_LOCK_DEADLOCK -reap; +--connection node_1 DROP TABLE t1; DROP PROCEDURE p1; diff --git a/mysql-test/suite/wsrep/disabled.def b/mysql-test/suite/wsrep/disabled.def index 466a6d1a081..bd8d4ecf33b 100644 --- a/mysql-test/suite/wsrep/disabled.def +++ b/mysql-test/suite/wsrep/disabled.def @@ -10,7 +10,4 @@ # ############################################################################## -foreign_key : MENT-535 Galera test failures on wsrep suite -wsrep.pool_of_threads : Sporadic failure "WSREP has not yet prepared node for application use" variables : MDEV-20581 Crash on wsrep.variables test case -pool_of_threads : MENT-535 Galera test failures on wsrep suite diff --git a/mysql-test/suite/wsrep/my.cnf b/mysql-test/suite/wsrep/my.cnf index e90686850a9..e35f73f46c1 100644 --- a/mysql-test/suite/wsrep/my.cnf +++ b/mysql-test/suite/wsrep/my.cnf @@ -2,7 +2,7 @@ !include include/default_mysqld.cnf [mysqld.1] -wsrep-on=OFF +wsrep-on=ON #galera_port=@OPT.port #ist_port=@OPT.port #sst_port=@OPT.port diff --git a/mysql-test/suite/wsrep/r/mysql_tzinfo_to_sql_symlink.result b/mysql-test/suite/wsrep/r/mysql_tzinfo_to_sql_symlink.result index 28fc332bb0a..ffd6c3cab1f 100644 --- a/mysql-test/suite/wsrep/r/mysql_tzinfo_to_sql_symlink.result +++ b/mysql-test/suite/wsrep/r/mysql_tzinfo_to_sql_symlink.result @@ -4,7 +4,7 @@ # Verbose run \d | IF (select count(*) from information_schema.global_variables where -variable_name='wsrep_on') = 1 THEN +variable_name='wsrep_on' and variable_value='ON') = 1 THEN ALTER TABLE time_zone ENGINE=InnoDB; ALTER TABLE time_zone_name ENGINE=InnoDB; ALTER TABLE time_zone_transition ENGINE=InnoDB; @@ -36,7 +36,7 @@ ALTER TABLE time_zone_transition ORDER BY Time_zone_id, Transition_time; ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id; \d | IF (select count(*) from information_schema.global_variables where -variable_name='wsrep_on') = 1 THEN +variable_name='wsrep_on' and variable_value='ON') = 1 THEN ALTER TABLE time_zone ENGINE=Aria; ALTER TABLE time_zone_name ENGINE=Aria; ALTER TABLE time_zone_transition ENGINE=Aria; @@ -46,7 +46,7 @@ END IF| # Silent run \d | IF (select count(*) from information_schema.global_variables where -variable_name='wsrep_on') = 1 THEN +variable_name='wsrep_on' and variable_value='ON') = 1 THEN ALTER TABLE time_zone ENGINE=InnoDB; ALTER TABLE time_zone_name ENGINE=InnoDB; ALTER TABLE time_zone_transition ENGINE=InnoDB; @@ -75,7 +75,7 @@ ALTER TABLE time_zone_transition ORDER BY Time_zone_id, Transition_time; ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id; \d | IF (select count(*) from information_schema.global_variables where -variable_name='wsrep_on') = 1 THEN +variable_name='wsrep_on' and variable_value='ON') = 1 THEN ALTER TABLE time_zone ENGINE=Aria; ALTER TABLE time_zone_name ENGINE=Aria; ALTER TABLE time_zone_transition ENGINE=Aria; @@ -93,7 +93,7 @@ INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset, ; \d | IF (select count(*) from information_schema.global_variables where -variable_name='wsrep_on') = 1 THEN +variable_name='wsrep_on' and variable_value='ON') = 1 THEN ALTER TABLE time_zone ENGINE=Aria; ALTER TABLE time_zone_name ENGINE=Aria; ALTER TABLE time_zone_transition ENGINE=Aria; @@ -105,21 +105,21 @@ END IF| # \d | IF (select count(*) from information_schema.global_variables where -variable_name='wsrep_on') = 1 THEN +variable_name='wsrep_on' and variable_value='ON') = 1 THEN ALTER TABLE time_zone_leap_second ENGINE=InnoDB; END IF| \d ; TRUNCATE TABLE time_zone_leap_second; \d | IF (select count(*) from information_schema.global_variables where -variable_name='wsrep_on') = 1 THEN +variable_name='wsrep_on' and variable_value='ON') = 1 THEN ALTER TABLE time_zone_leap_second ENGINE=Aria; END IF| \d ; ALTER TABLE time_zone_leap_second ORDER BY Transition_time; \d | IF (select count(*) from information_schema.global_variables where -variable_name='wsrep_on') = 1 THEN +variable_name='wsrep_on' and variable_value='ON') = 1 THEN ALTER TABLE time_zone ENGINE=Aria; ALTER TABLE time_zone_name ENGINE=Aria; ALTER TABLE time_zone_transition ENGINE=Aria; diff --git a/mysql-test/suite/wsrep/r/mysql_tzinfo_to_sql_symlink_skip.result b/mysql-test/suite/wsrep/r/mysql_tzinfo_to_sql_symlink_skip.result index 4ce57c641b3..85c4d858be2 100644 --- a/mysql-test/suite/wsrep/r/mysql_tzinfo_to_sql_symlink_skip.result +++ b/mysql-test/suite/wsrep/r/mysql_tzinfo_to_sql_symlink_skip.result @@ -2,7 +2,7 @@ # MDEV-5226 mysql_tzinfo_to_sql errors with tzdata 2013f and above # # Verbose run -set @prep1=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on'), 'SET SESSION SQL_LOG_BIN=?, WSREP_ON=OFF;', 'do ?'); +set @prep1=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on' and variable_value='ON'), 'SET SESSION SQL_LOG_BIN=?, WSREP_ON=OFF;', 'do ?'); prepare set_wsrep_write_binlog from @prep1; set @toggle=0; execute set_wsrep_write_binlog using @toggle; TRUNCATE TABLE time_zone; @@ -29,7 +29,7 @@ Warning: Skipping directory 'MYSQLTEST_VARDIR/zoneinfo/posix/posix': to avoid in ALTER TABLE time_zone_transition ORDER BY Time_zone_id, Transition_time; ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id; # Silent run -set @prep1=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on'), 'SET SESSION SQL_LOG_BIN=?, WSREP_ON=OFF;', 'do ?'); +set @prep1=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on' and variable_value='ON'), 'SET SESSION SQL_LOG_BIN=?, WSREP_ON=OFF;', 'do ?'); prepare set_wsrep_write_binlog from @prep1; set @toggle=0; execute set_wsrep_write_binlog using @toggle; TRUNCATE TABLE time_zone; @@ -55,7 +55,7 @@ ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id; # # Testing with explicit timezonefile # -set @prep1=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on'), 'SET SESSION SQL_LOG_BIN=?, WSREP_ON=OFF;', 'do ?'); +set @prep1=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on' and variable_value='ON'), 'SET SESSION SQL_LOG_BIN=?, WSREP_ON=OFF;', 'do ?'); prepare set_wsrep_write_binlog from @prep1; set @toggle=0; execute set_wsrep_write_binlog using @toggle; INSERT INTO time_zone (Use_leap_seconds) VALUES ('N'); @@ -67,7 +67,7 @@ INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset, # # Testing --leap # -set @prep1=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on'), 'SET SESSION SQL_LOG_BIN=?, WSREP_ON=OFF;', 'do ?'); +set @prep1=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on' and variable_value='ON'), 'SET SESSION SQL_LOG_BIN=?, WSREP_ON=OFF;', 'do ?'); prepare set_wsrep_write_binlog from @prep1; set @toggle=0; execute set_wsrep_write_binlog using @toggle; TRUNCATE TABLE time_zone_leap_second; diff --git a/mysql-test/suite/wsrep/r/variables.result b/mysql-test/suite/wsrep/r/variables.result index ebd6c41d9bc..4cd8595177f 100644 --- a/mysql-test/suite/wsrep/r/variables.result +++ b/mysql-test/suite/wsrep/r/variables.result @@ -21,119 +21,123 @@ SET GLOBAL wsrep_provider=none; CALL mtr.add_suppression("WSREP: Could not open saved state file for reading.*"); SHOW GLOBAL STATUS LIKE 'wsrep%'; Variable_name Value -wsrep_applier_thread_count # +wsrep_local_state_uuid # +wsrep_protocol_version # +wsrep_last_committed # +wsrep_replicated # +wsrep_replicated_bytes # +wsrep_repl_keys # +wsrep_repl_keys_bytes # +wsrep_repl_data_bytes # +wsrep_repl_other_bytes # +wsrep_received # +wsrep_received_bytes # +wsrep_local_commits # +wsrep_local_cert_failures # +wsrep_local_replays # +wsrep_local_send_queue # +wsrep_local_send_queue_max # +wsrep_local_send_queue_min # +wsrep_local_send_queue_avg # +wsrep_local_recv_queue # +wsrep_local_recv_queue_max # +wsrep_local_recv_queue_min # +wsrep_local_recv_queue_avg # +wsrep_local_cached_downto # +wsrep_flow_control_paused_ns # +wsrep_flow_control_paused # +wsrep_flow_control_sent # +wsrep_flow_control_recv # +wsrep_cert_deps_distance # wsrep_apply_oooe # wsrep_apply_oool # wsrep_apply_window # -wsrep_causal_reads # -wsrep_cert_deps_distance # +wsrep_commit_oooe # +wsrep_commit_oool # +wsrep_commit_window # +wsrep_local_state # +wsrep_local_state_comment # wsrep_cert_index_size # +wsrep_causal_reads # wsrep_cert_interval # +wsrep_open_transactions # +wsrep_open_connections # +wsrep_incoming_addresses # +wsrep_applier_thread_count # +wsrep_cluster_capabilities # wsrep_cluster_conf_id # wsrep_cluster_size # wsrep_cluster_state_uuid # wsrep_cluster_status # -wsrep_commit_oooe # -wsrep_commit_oool # -wsrep_commit_window # wsrep_connected # -wsrep_flow_control_paused # -wsrep_flow_control_paused_ns # -wsrep_flow_control_recv # -wsrep_flow_control_sent # -wsrep_incoming_addresses # -wsrep_last_committed # wsrep_local_bf_aborts # -wsrep_local_cached_downto # -wsrep_local_cert_failures # -wsrep_local_commits # wsrep_local_index # -wsrep_local_recv_queue # -wsrep_local_recv_queue_avg # -wsrep_local_recv_queue_max # -wsrep_local_recv_queue_min # -wsrep_local_replays # -wsrep_local_send_queue # -wsrep_local_send_queue_avg # -wsrep_local_send_queue_max # -wsrep_local_send_queue_min # -wsrep_local_state # -wsrep_local_state_comment # -wsrep_local_state_uuid # -wsrep_open_connections # -wsrep_open_transactions # -wsrep_protocol_version # +wsrep_provider_capabilities # wsrep_provider_name # wsrep_provider_vendor # wsrep_provider_version # wsrep_ready # -wsrep_received # -wsrep_received_bytes # -wsrep_repl_data_bytes # -wsrep_repl_keys # -wsrep_repl_keys_bytes # -wsrep_repl_other_bytes # -wsrep_replicated # -wsrep_replicated_bytes # wsrep_rollbacker_thread_count # wsrep_thread_count # SHOW GLOBAL STATUS LIKE 'wsrep_%'; Variable_name Value -wsrep_applier_thread_count # +wsrep_local_state_uuid # +wsrep_protocol_version # +wsrep_last_committed # +wsrep_replicated # +wsrep_replicated_bytes # +wsrep_repl_keys # +wsrep_repl_keys_bytes # +wsrep_repl_data_bytes # +wsrep_repl_other_bytes # +wsrep_received # +wsrep_received_bytes # +wsrep_local_commits # +wsrep_local_cert_failures # +wsrep_local_replays # +wsrep_local_send_queue # +wsrep_local_send_queue_max # +wsrep_local_send_queue_min # +wsrep_local_send_queue_avg # +wsrep_local_recv_queue # +wsrep_local_recv_queue_max # +wsrep_local_recv_queue_min # +wsrep_local_recv_queue_avg # +wsrep_local_cached_downto # +wsrep_flow_control_paused_ns # +wsrep_flow_control_paused # +wsrep_flow_control_sent # +wsrep_flow_control_recv # +wsrep_cert_deps_distance # wsrep_apply_oooe # wsrep_apply_oool # wsrep_apply_window # -wsrep_causal_reads # -wsrep_cert_deps_distance # +wsrep_commit_oooe # +wsrep_commit_oool # +wsrep_commit_window # +wsrep_local_state # +wsrep_local_state_comment # wsrep_cert_index_size # +wsrep_causal_reads # wsrep_cert_interval # +wsrep_open_transactions # +wsrep_open_connections # +wsrep_incoming_addresses # +wsrep_applier_thread_count # +wsrep_cluster_capabilities # wsrep_cluster_conf_id # wsrep_cluster_size # wsrep_cluster_state_uuid # wsrep_cluster_status # -wsrep_commit_oooe # -wsrep_commit_oool # -wsrep_commit_window # wsrep_connected # -wsrep_flow_control_paused # -wsrep_flow_control_paused_ns # -wsrep_flow_control_recv # -wsrep_flow_control_sent # -wsrep_incoming_addresses # -wsrep_last_committed # wsrep_local_bf_aborts # -wsrep_local_cached_downto # -wsrep_local_cert_failures # -wsrep_local_commits # wsrep_local_index # -wsrep_local_recv_queue # -wsrep_local_recv_queue_avg # -wsrep_local_recv_queue_max # -wsrep_local_recv_queue_min # -wsrep_local_replays # -wsrep_local_send_queue # -wsrep_local_send_queue_avg # -wsrep_local_send_queue_max # -wsrep_local_send_queue_min # -wsrep_local_state # -wsrep_local_state_comment # -wsrep_local_state_uuid # -wsrep_open_connections # -wsrep_open_transactions # -wsrep_protocol_version # +wsrep_provider_capabilities # wsrep_provider_name # wsrep_provider_vendor # wsrep_provider_version # wsrep_ready # -wsrep_received # -wsrep_received_bytes # -wsrep_repl_data_bytes # -wsrep_repl_keys # -wsrep_repl_keys_bytes # -wsrep_repl_other_bytes # -wsrep_replicated # -wsrep_replicated_bytes # wsrep_rollbacker_thread_count # wsrep_thread_count # SHOW GLOBAL STATUS LIKE 'wsrep_local_state_comment'; @@ -159,7 +163,7 @@ SET GLOBAL wsrep_provider=none; call mtr.add_suppression("WSREP: Failed to get provider options"); SELECT @@global.wsrep_provider; @@global.wsrep_provider -libgalera_smm.so +/usr/lib/libgalera_4_smm.so SELECT @@global.wsrep_slave_threads; @@global.wsrep_slave_threads 1 @@ -175,7 +179,7 @@ wsrep_thread_count 0 SELECT @@global.wsrep_provider; @@global.wsrep_provider -libgalera_smm.so +/usr/lib/libgalera_4_smm.so SELECT @@global.wsrep_cluster_address; @@global.wsrep_cluster_address @@ -202,7 +206,7 @@ EXPECT_2 2 SELECT @@global.wsrep_provider; @@global.wsrep_provider -libgalera_smm.so +/usr/lib/libgalera_4_smm.so SELECT @@global.wsrep_cluster_address; @@global.wsrep_cluster_address gcomm:// @@ -256,7 +260,6 @@ SELECT @@global.wsrep_sst_auth; NULL SET @@global.wsrep_sst_auth= @wsrep_sst_auth_saved; SET GLOBAL wsrep_slave_threads= @wsrep_slave_threads_saved; -SET GLOBAL wsrep_provider= none; SET GLOBAL wsrep_cluster_address= @wsrep_cluster_address_saved; SET GLOBAL wsrep_provider_options= @wsrep_provider_options_saved; # End of test. diff --git a/mysql-test/suite/wsrep/t/alter_table_innodb.cnf b/mysql-test/suite/wsrep/t/alter_table_innodb.cnf new file mode 100644 index 00000000000..d8e27463cc1 --- /dev/null +++ b/mysql-test/suite/wsrep/t/alter_table_innodb.cnf @@ -0,0 +1,12 @@ +!include include/default_mysqld.cnf + +[mysqld] +wsrep-on=0 + +[mysqld.1] +wsrep-on=0 +#galera_port=@OPT.port +#ist_port=@OPT.port +#sst_port=@OPT.port +wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M' +wsrep_cluster_address='not empty but invalid' diff --git a/mysql-test/suite/wsrep/t/alter_table_innodb.opt b/mysql-test/suite/wsrep/t/alter_table_innodb.opt deleted file mode 100644 index 1e84570d7f6..00000000000 --- a/mysql-test/suite/wsrep/t/alter_table_innodb.opt +++ /dev/null @@ -1 +0,0 @@ ---wsrep-on=0 diff --git a/mysql-test/suite/wsrep/t/mdev_10186.cnf b/mysql-test/suite/wsrep/t/mdev_10186.cnf index 3c4ca003f76..284c887648e 100644 --- a/mysql-test/suite/wsrep/t/mdev_10186.cnf +++ b/mysql-test/suite/wsrep/t/mdev_10186.cnf @@ -1,6 +1,15 @@ -!include ../my.cnf +!include include/default_mysqld.cnf + +[mysqld] +wsrep-on=0 [mysqld.1] -wsrep-on=OFF -wsrep-provider=@ENV.WSREP_PROVIDER +wsrep-on=0 +#galera_port=@OPT.port +#ist_port=@OPT.port +#sst_port=@OPT.port +wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M' +wsrep_cluster_address='not empty but invalid' +innodb_autoinc_lock_mode=2 +wsrep-provider=$WSREP_PROVIDER wsrep-cluster-address=gcomm:// diff --git a/mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink.opt b/mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink.opt new file mode 100644 index 00000000000..a8b72174076 --- /dev/null +++ b/mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink.opt @@ -0,0 +1 @@ +--wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --wsrep_on=1 --binlog_format=ROW diff --git a/mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink.test b/mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink.test index 100e09d3afb..87554635666 100644 --- a/mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink.test +++ b/mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink.test @@ -1,6 +1,7 @@ --source include/have_wsrep.inc --source include/have_symlink.inc --source include/not_windows.inc +--source include/have_innodb.inc --echo # --echo # MDEV-5226 mysql_tzinfo_to_sql errors with tzdata 2013f and above diff --git a/mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink_skip.opt b/mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink_skip.opt new file mode 100644 index 00000000000..a8b72174076 --- /dev/null +++ b/mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink_skip.opt @@ -0,0 +1 @@ +--wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --wsrep_on=1 --binlog_format=ROW diff --git a/mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink_skip.test b/mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink_skip.test index bb3009bd432..ab1f94cc1cf 100644 --- a/mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink_skip.test +++ b/mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink_skip.test @@ -1,6 +1,7 @@ --source include/have_wsrep.inc --source include/have_symlink.inc --source include/not_windows.inc +--source include/have_innodb.inc --echo # --echo # MDEV-5226 mysql_tzinfo_to_sql errors with tzdata 2013f and above diff --git a/mysql-test/suite/wsrep/t/plugin.opt b/mysql-test/suite/wsrep/t/plugin.opt new file mode 100644 index 00000000000..f043a4a21cf --- /dev/null +++ b/mysql-test/suite/wsrep/t/plugin.opt @@ -0,0 +1 @@ +--binlog_format=ROW --log-bin --wsrep-on=1 --innodb_autoinc_lock_mode=2 --wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// diff --git a/mysql-test/suite/wsrep/t/plugin.test b/mysql-test/suite/wsrep/t/plugin.test index 60738440a55..73d605b0918 100644 --- a/mysql-test/suite/wsrep/t/plugin.test +++ b/mysql-test/suite/wsrep/t/plugin.test @@ -1,4 +1,5 @@ --source include/have_wsrep.inc +--source include/have_innodb.inc # # MDEV-7604: wsrep plugin lists its status as Unknown diff --git a/mysql-test/suite/wsrep/t/pool_of_threads.cnf b/mysql-test/suite/wsrep/t/pool_of_threads.cnf deleted file mode 100644 index b63e3324796..00000000000 --- a/mysql-test/suite/wsrep/t/pool_of_threads.cnf +++ /dev/null @@ -1,8 +0,0 @@ -!include ../my.cnf - -[mysqld.1] -wsrep-on=ON -wsrep-provider=@ENV.WSREP_PROVIDER -wsrep-cluster-address=gcomm:// -thread_handling=pool-of-threads - diff --git a/mysql-test/suite/wsrep/t/pool_of_threads.opt b/mysql-test/suite/wsrep/t/pool_of_threads.opt index 6948011b21b..e75bba669e8 100644 --- a/mysql-test/suite/wsrep/t/pool_of_threads.opt +++ b/mysql-test/suite/wsrep/t/pool_of_threads.opt @@ -1 +1 @@ ---innodb_autoinc_lock_mode=2 --wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --thread_handling=pool-of-threads wsrep-on=1 +--innodb_autoinc_lock_mode=2 --wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --thread_handling=pool-of-threads --wsrep-on=1 diff --git a/mysql-test/suite/wsrep/t/trans.opt b/mysql-test/suite/wsrep/t/trans.opt new file mode 100644 index 00000000000..a8b72174076 --- /dev/null +++ b/mysql-test/suite/wsrep/t/trans.opt @@ -0,0 +1 @@ +--wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --wsrep_on=1 --binlog_format=ROW diff --git a/mysql-test/suite/wsrep/t/variables.opt b/mysql-test/suite/wsrep/t/variables.opt new file mode 100644 index 00000000000..a8b72174076 --- /dev/null +++ b/mysql-test/suite/wsrep/t/variables.opt @@ -0,0 +1 @@ +--wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --wsrep_on=1 --binlog_format=ROW diff --git a/mysql-test/suite/wsrep/t/variables.test b/mysql-test/suite/wsrep/t/variables.test index 6caa5cff500..9209079871c 100644 --- a/mysql-test/suite/wsrep/t/variables.test +++ b/mysql-test/suite/wsrep/t/variables.test @@ -1,5 +1,6 @@ --source include/have_wsrep.inc --source include/force_restart.inc +--source include/have_innodb.inc SET @wsrep_provider_options_saved= @@global.wsrep_provider_options; SET @wsrep_cluster_address_saved= @@global.wsrep_cluster_address; @@ -30,8 +31,6 @@ CALL mtr.add_suppression("WSREP: Could not open saved state file for reading.*") --disable_query_log eval SET GLOBAL wsrep_provider= '$WSREP_PROVIDER'; ---let $galera_version=25.3.24 -source include/check_galera_version.inc; --enable_query_log --replace_column 2 # @@ -158,9 +157,11 @@ SET @@global.wsrep_sst_auth= @wsrep_sst_auth_saved; # Reset (for mtr internal checks) SET GLOBAL wsrep_slave_threads= @wsrep_slave_threads_saved; -SET GLOBAL wsrep_provider= none; SET GLOBAL wsrep_cluster_address= @wsrep_cluster_address_saved; SET GLOBAL wsrep_provider_options= @wsrep_provider_options_saved; +--disable_query_log +eval SET GLOBAL wsrep_provider= '$WSREP_PROVIDER'; +--enable_query_log --echo # End of test. |