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