diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2020-02-17 14:01:16 +0200 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2020-02-17 14:01:16 +0200 |
commit | 959fc0c0ccaac0c0946a9c07bceb9b82116c8b47 (patch) | |
tree | 970e8fda0f724fad7a5b60868f985d62aa2bbb23 | |
parent | 93dc3e2652634dc99bcd715ebf1e020614dfef9e (diff) | |
download | mariadb-git-959fc0c0ccaac0c0946a9c07bceb9b82116c8b47.tar.gz |
MDEV-21591 : galera.galera_rsu_add_pk MTR failed: Result content mismatch
Add missing wait condition before we check the end database state.
-rw-r--r-- | mysql-test/suite/galera/r/galera_rsu_add_pk.result | 24 | ||||
-rw-r--r-- | mysql-test/suite/galera/t/galera_rsu_add_pk.test | 14 |
2 files changed, 22 insertions, 16 deletions
diff --git a/mysql-test/suite/galera/r/galera_rsu_add_pk.result b/mysql-test/suite/galera/r/galera_rsu_add_pk.result index 4c79da154e2..2df08c3e4ff 100644 --- a/mysql-test/suite/galera/r/galera_rsu_add_pk.result +++ b/mysql-test/suite/galera/r/galera_rsu_add_pk.result @@ -9,19 +9,19 @@ SET SESSION wsrep_OSU_method = "RSU"; ALTER TABLE t1 ADD PRIMARY KEY (f1); SET SESSION wsrep_OSU_method = "TOI"; INSERT INTO t1 (f1) SELECT 200000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5; -SELECT COUNT(*) = 300000 FROM t1; -COUNT(*) = 300000 -1 -SELECT MAX(f1) = 299999 FROM t1; -MAX(f1) = 299999 -1 +SELECT COUNT(*) AS EXPECT_300000 FROM t1; +EXPECT_300000 +300000 +SELECT MAX(f1) AS EXPECT_299999 FROM t1; +EXPECT_299999 +299999 connection node_1; -SELECT COUNT(*) = 300000 FROM t1; -COUNT(*) = 300000 -1 -SELECT MAX(f1) = 299999 FROM t1; -MAX(f1) = 299999 -1 +SELECT COUNT(*) AS EXPECT_300000 FROM t1; +EXPECT_300000 +300000 +SELECT MAX(f1) AS EXPECT_299999 FROM t1; +EXPECT_299999 +299999 SET SESSION wsrep_OSU_method = "RSU"; ALTER TABLE t1 ADD PRIMARY KEY (f1); SET SESSION wsrep_OSU_method = "TOI"; diff --git a/mysql-test/suite/galera/t/galera_rsu_add_pk.test b/mysql-test/suite/galera/t/galera_rsu_add_pk.test index 7db990d7be1..094048f6caa 100644 --- a/mysql-test/suite/galera/t/galera_rsu_add_pk.test +++ b/mysql-test/suite/galera/t/galera_rsu_add_pk.test @@ -26,14 +26,20 @@ SET SESSION wsrep_OSU_method = "TOI"; # Insert values after the ALTER INSERT INTO t1 (f1) SELECT 200000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5; +--let $wait_condition = SELECT COUNT(*) = 300000 FROM t1; +--source include/wait_condition.inc -SELECT COUNT(*) = 300000 FROM t1; -SELECT MAX(f1) = 299999 FROM t1; +SELECT COUNT(*) AS EXPECT_300000 FROM t1; +SELECT MAX(f1) AS EXPECT_299999 FROM t1; --connection node_1 --reap -SELECT COUNT(*) = 300000 FROM t1; -SELECT MAX(f1) = 299999 FROM t1; + +--let $wait_condition = SELECT COUNT(*) = 300000 FROM t1; +--source include/wait_condition.inc + +SELECT COUNT(*) AS EXPECT_300000 FROM t1; +SELECT MAX(f1) AS EXPECT_299999 FROM t1; SET SESSION wsrep_OSU_method = "RSU"; ALTER TABLE t1 ADD PRIMARY KEY (f1); |