Commit d34ae8c7 authored by Andrei Elkin's avatar Andrei Elkin

Bug #41732 rpl_ndb_circular_2ch needs an updated configuration file

There are two issues: 
      1. 6.0 uses the obsolate master-*** server options;
      2. the test is not deterministic in that although master vs slave consistency is
         fine, two runs of the test can have different results. The reason of the
         non-determinism is the combination of 
         a chosen way to demo results and the ndb_autoincrement_prefetch_sz feature.

The current patch fixes the 2nd issue by putting out results via diff_table macro
instead of the former run-sensitive method.
The 1st issue is going to be fixed by a separate patch to 6.0.

mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_2ch.result:
  results changed
mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.test:
  Test is refined to put out results via diff_table macro instead of the former run-sensitive
  method.
parent 9186df24
......@@ -45,58 +45,20 @@ CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL,
*** Basic testing ***
Insert rows via all hosts
Check data on both clusters
* Cluster A *
SELECT COUNT(*), SUM(a), b FROM t1 WHERE c = 1 GROUP BY b ORDER BY b;
COUNT(*) SUM(a) b
10 190 master
10 210 master1
10 200 slave
10 220 slave1
* Cluster B *
SELECT COUNT(*), SUM(a), b FROM t1 WHERE c = 1 GROUP BY b ORDER BY b;
COUNT(*) SUM(a) b
10 190 master
10 210 master1
10 200 slave
10 220 slave1
Comparing tables master:test.t1 and slave:test.t1
*** Transaction testing ***
BEGIN;
BEGIN;
COMMIT;
COMMIT;
Check data on both clusters
* Cluster A *
SELECT COUNT(*), SUM(a), b FROM t1 WHERE c = 2 GROUP BY b ORDER BY b;
COUNT(*) SUM(a) b
100 23900 master
100 24100 master1
100 24000 slave
100 24200 slave1
* Cluster B *
SELECT COUNT(*), SUM(a), b FROM t1 WHERE c = 2 GROUP BY b ORDER BY b;
COUNT(*) SUM(a) b
100 23900 master
100 24100 master1
100 24000 slave
100 24200 slave1
Comparing tables master:test.t1 and slave:test.t1
BEGIN;
BEGIN;
ROLLBACK;
ROLLBACK;
Check data on both clusters
* Cluster A *
SELECT COUNT(*), SUM(a), b FROM t1 WHERE c = 3 GROUP BY b ORDER BY b;
COUNT(*) SUM(a) b
100 64100 master1
100 64000 slave
* Cluster B *
SELECT COUNT(*), SUM(a), b FROM t1 WHERE c = 3 GROUP BY b ORDER BY b;
COUNT(*) SUM(a) b
100 64100 master1
100 64000 slave
Comparing tables master:test.t1 and slave:test.t1
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
......@@ -75,13 +75,10 @@ let $wait_condition= SELECT COUNT(*)=40 FROM t1 WHERE c = 1;
# Check data
--echo Check data on both clusters
--connection master
--echo * Cluster A *
SELECT COUNT(*), SUM(a), b FROM t1 WHERE c = 1 GROUP BY b ORDER BY b;
--connection slave
--echo * Cluster B *
SELECT COUNT(*), SUM(a), b FROM t1 WHERE c = 1 GROUP BY b ORDER BY b;
--echo
let $diff_table_1=master:test.t1;
let $diff_table_2=slave:test.t1;
source include/diff_tables.inc;
--echo *** Transaction testing ***
# Start transaction for one mysqld and do mass of inserts for other.
......@@ -119,13 +116,10 @@ let $wait_condition= SELECT COUNT(*)=400 FROM t1 WHERE c = 2;
--source include/wait_condition.inc
--echo Check data on both clusters
--connection master
--echo * Cluster A *
SELECT COUNT(*), SUM(a), b FROM t1 WHERE c = 2 GROUP BY b ORDER BY b;
--connection slave
--echo * Cluster B *
SELECT COUNT(*), SUM(a), b FROM t1 WHERE c = 2 GROUP BY b ORDER BY b;
--echo
let $diff_table_1=master:test.t1;
let $diff_table_2=slave:test.t1;
source include/diff_tables.inc;
# Start transaction and then roll back
......@@ -161,13 +155,10 @@ let $wait_condition= SELECT COUNT(*)=200 FROM t1 WHERE c = 3;
--source include/wait_condition.inc
--echo Check data on both clusters
--connection master
--echo * Cluster A *
SELECT COUNT(*), SUM(a), b FROM t1 WHERE c = 3 GROUP BY b ORDER BY b;
--connection slave
--echo * Cluster B *
SELECT COUNT(*), SUM(a), b FROM t1 WHERE c = 3 GROUP BY b ORDER BY b;
--echo
let $diff_table_1=master:test.t1;
let $diff_table_2=slave:test.t1;
source include/diff_tables.inc;
# Clean up
--connection master
......
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