Skip to content

Commit e95736e

Browse files
author
Dhruthi K V
committed
Bug#25643748 ASSERT.INC IS MISSING IN FEW GR TESTS
include/assert.inc is missing in following test files added as part of wl9837 1. gr_savepoint.test 2. gr_savepoint_crash.test 3. gr_savepoint_crash_on_release.test 4. gr_savepoint_crash_on_rollback.test fix: added assert.inc in those files.
1 parent 36da284 commit e95736e

8 files changed

+16
-0
lines changed

rapid/plugin/group_replication/tests/mtr/r/gr_savepoint.result

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ SET SESSION sql_log_bin= 1;
8383
############################################################
8484
# 11. Cleanup (restore the connection back to original)
8585
[connection server1]
86+
include/assert.inc ['Table t1 has values 1 and 2']
8687
#
8788
# Don't cause conflict due the rollback and the release don't interfere
8889
#
@@ -161,6 +162,7 @@ SET SESSION sql_log_bin= 1;
161162
############################################################
162163
# 11. Cleanup (restore the connection back to original)
163164
[connection server1]
165+
include/assert.inc ['Table t1 has values 3 and 4']
164166
#
165167
# Using SAVEPOINT don't modify the conflict detection
166168
#
@@ -240,5 +242,8 @@ SET SESSION sql_log_bin= 1;
240242
############################################################
241243
# 11. Cleanup (restore the connection back to original)
242244
[connection server1]
245+
include/assert.inc ['There are six values in table t1']
246+
include/assert.inc ['Table t1 has values 6 and 7']
247+
include/assert.inc ['Table t1 do not have value 5']
243248
DROP TABLE t1;
244249
include/group_replication_end.inc

rapid/plugin/group_replication/tests/mtr/r/gr_savepoint_crash.result

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ include/rpl_reconnect.inc
2323
SET GLOBAL group_replication_force_members= "GROUP_REPLICATION_LOCAL_ADDRESS1";
2424
[connection server1]
2525
include/start_group_replication.inc
26+
include/assert.inc ['There should be two values in table1']
2627
3. Clean-up
2728
DROP TABLE table1;
2829
include/group_replication_end.inc

rapid/plugin/group_replication/tests/mtr/r/gr_savepoint_crash_on_release.result

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ SET GLOBAL group_replication_force_members= "GROUP_REPLICATION_LOCAL_ADDRESS1";
2929
[connection server1]
3030
include/start_group_replication.inc
3131
#3. check that incomplete transaction t1 is rolled back, table1 should have only 2 tuples.
32+
include/assert.inc ['There should be two values in table1']
3233
#4. Clean-up
3334
DROP TABLE table1;
3435
SET @@GLOBAL.DEBUG=@debug_save;

rapid/plugin/group_replication/tests/mtr/r/gr_savepoint_crash_on_rollback.result

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ SET GLOBAL group_replication_force_members= "GROUP_REPLICATION_LOCAL_ADDRESS1";
2929
[connection server1]
3030
include/start_group_replication.inc
3131
#3. check that incomplete transaction t1 is rolled back, table1 should have only 2 tuples.
32+
include/assert.inc ['There should be two values in table1']
3233
#4. Clean-up
3334
DROP TABLE table1;
3435
SET @@GLOBAL.DEBUG=@debug_save;

rapid/plugin/group_replication/tests/mtr/t/gr_savepoint.test

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ CREATE TABLE t1(a int primary key);
3838

3939
--let $assert_text= 'Table t1 has values 1 and 2'
4040
--let $assert_cond= [SELECT COUNT(*) AS count FROM t1 WHERE t1.a = 1 OR t1.a = 2 , count, 1] = 2
41+
--source include/assert.inc
4142

4243
--echo #
4344
--echo # Don't cause conflict due the rollback and the release don't interfere
@@ -54,6 +55,7 @@ CREATE TABLE t1(a int primary key);
5455

5556
--let $assert_text= 'Table t1 has values 3 and 4'
5657
--let $assert_cond= [SELECT COUNT(*) AS count FROM t1 WHERE t1.a = 3 OR t1.a = 4 , count, 1] = 2
58+
--source include/assert.inc
5759

5860
--echo #
5961
--echo # Using SAVEPOINT don't modify the conflict detection
@@ -69,12 +71,15 @@ CREATE TABLE t1(a int primary key);
6971

7072
--let $assert_text= 'There are six values in table t1'
7173
--let $assert_cond= [SELECT COUNT(*) AS count FROM t1, count, 1] = 6
74+
--source include/assert.inc
7275

7376
--let $assert_text= 'Table t1 has values 6 and 7'
7477
--let $assert_cond= [SELECT COUNT(*) AS count FROM t1 WHERE t1.a = 6 OR t1.a = 7 , count, 1] = 2
78+
--source include/assert.inc
7579

7680
--let $assert_text= 'Table t1 do not have value 5'
7781
--let $assert_cond= [SELECT COUNT(*) AS count FROM t1 WHERE t1.a = 5, count, 1] = 0
82+
--source include/assert.inc
7883

7984
DROP TABLE t1;
8085
--source ../inc/group_replication_end.inc

rapid/plugin/group_replication/tests/mtr/t/gr_savepoint_crash.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ let $wait_condition= SELECT COUNT(*)=2 FROM performance_schema.replication_group
7676
# check that incomplete transaction t1 is rolled back, table1 should have only 2 tuples.
7777
--let $assert_text= 'There should be two values in table1'
7878
--let $assert_cond= [SELECT COUNT(*) AS count FROM table1, count, 1] = 2
79+
--source include/assert.inc
7980

8081
--echo 3. Clean-up
8182
DROP TABLE table1;

rapid/plugin/group_replication/tests/mtr/t/gr_savepoint_crash_on_release.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ let $wait_condition= SELECT COUNT(*)=2 FROM performance_schema.replication_group
9595
--echo #3. check that incomplete transaction t1 is rolled back, table1 should have only 2 tuples.
9696
--let $assert_text= 'There should be two values in table1'
9797
--let $assert_cond= [SELECT COUNT(*) AS count FROM table1, count, 1] = 2
98+
--source include/assert.inc
9899

99100
--echo #4. Clean-up
100101
DROP TABLE table1;

rapid/plugin/group_replication/tests/mtr/t/gr_savepoint_crash_on_rollback.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ let $wait_condition= SELECT COUNT(*)=2 FROM performance_schema.replication_group
9595
--echo #3. check that incomplete transaction t1 is rolled back, table1 should have only 2 tuples.
9696
--let $assert_text= 'There should be two values in table1'
9797
--let $assert_cond= [SELECT COUNT(*) AS count FROM table1, count, 1] = 2
98+
--source include/assert.inc
9899

99100
--echo #4. Clean-up
100101
DROP TABLE table1;

0 commit comments

Comments
 (0)