Commit 3c3c4ae2 authored by Jan Lindström's avatar Jan Lindström

MDEV-17403: Test failure on galera.galera_enum

Add wait on second node.
parent 5b0b6660
...@@ -4,23 +4,23 @@ INSERT INTO t1 VALUES ('one'), ('two'); ...@@ -4,23 +4,23 @@ INSERT INTO t1 VALUES ('one'), ('two');
INSERT INTO t1 VALUES (0), (1), (2); INSERT INTO t1 VALUES (0), (1), (2);
Warnings: Warnings:
Warning 1265 Data truncated for column 'f1' at row 1 Warning 1265 Data truncated for column 'f1' at row 1
SELECT COUNT(*) = 6 FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) = 6 COUNT(*)
1 6
SELECT COUNT(*) = 2 FROM t1 where f1 = ''; SELECT COUNT(*) FROM t1 where f1 = '';
COUNT(*) = 2 COUNT(*)
1 2
SELECT COUNT(*) = 2 FROM t1 where f1 = 'one'; SELECT COUNT(*) FROM t1 where f1 = 'one';
COUNT(*) = 2 COUNT(*)
1 2
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (f1 ENUM('', 'one', 'two', 'three', 'four') PRIMARY KEY) ENGINE=InnoDB; CREATE TABLE t1 (f1 ENUM('', 'one', 'two', 'three', 'four') PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (''), ('one'), ('two'); INSERT INTO t1 VALUES (''), ('one'), ('two');
SELECT COUNT(*) = 3 FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) = 3 COUNT(*)
1 3
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = ''; SELECT COUNT(*) FROM t1 WHERE f1 = '';
COUNT(*) = 1 COUNT(*)
1 1
SET AUTOCOMMIT=OFF; SET AUTOCOMMIT=OFF;
START TRANSACTION; START TRANSACTION;
...@@ -31,7 +31,12 @@ UPDATE t1 SET f1 = 'four' where f1 = ''; ...@@ -31,7 +31,12 @@ UPDATE t1 SET f1 = 'four' where f1 = '';
COMMIT; COMMIT;
COMMIT; COMMIT;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 'three'; SELECT COUNT(*) FROM t1 WHERE f1 = 'three';
COUNT(*) = 1 COUNT(*)
1 1
SELECT * FROM t1;
f1
one
two
three
DROP TABLE t1; DROP TABLE t1;
...@@ -17,9 +17,12 @@ INSERT INTO t1 VALUES ('one'), ('two'); ...@@ -17,9 +17,12 @@ INSERT INTO t1 VALUES ('one'), ('two');
INSERT INTO t1 VALUES (0), (1), (2); INSERT INTO t1 VALUES (0), (1), (2);
--connection node_2 --connection node_2
SELECT COUNT(*) = 6 FROM t1; --let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t1';
SELECT COUNT(*) = 2 FROM t1 where f1 = ''; --source include/wait_condition.inc
SELECT COUNT(*) = 2 FROM t1 where f1 = 'one';
SELECT COUNT(*) FROM t1;
SELECT COUNT(*) FROM t1 where f1 = '';
SELECT COUNT(*) FROM t1 where f1 = 'one';
DROP TABLE t1; DROP TABLE t1;
...@@ -33,8 +36,10 @@ CREATE TABLE t1 (f1 ENUM('', 'one', 'two', 'three', 'four') PRIMARY KEY) ENGINE= ...@@ -33,8 +36,10 @@ CREATE TABLE t1 (f1 ENUM('', 'one', 'two', 'three', 'four') PRIMARY KEY) ENGINE=
INSERT INTO t1 VALUES (''), ('one'), ('two'); INSERT INTO t1 VALUES (''), ('one'), ('two');
--connection node_2 --connection node_2
SELECT COUNT(*) = 3 FROM t1; --let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t1';
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = ''; --source include/wait_condition.inc
SELECT COUNT(*) FROM t1;
SELECT COUNT(*) FROM t1 WHERE f1 = '';
# Conflict # Conflict
...@@ -57,6 +62,7 @@ COMMIT; ...@@ -57,6 +62,7 @@ COMMIT;
--connection node_1 --connection node_1
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 'three'; SELECT COUNT(*) FROM t1 WHERE f1 = 'three';
SELECT * FROM t1;
DROP TABLE t1; DROP TABLE t1;
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