Skip to content

Commit

Permalink
Revert "BUG#26985561: BACKPORT BUG#26277771 TO 5.7"
Browse files Browse the repository at this point in the history
This reverts commit fce1c96b65005c78b3016e855a3e4790bd5c6449.

(cherry picked from commit a38611468f4b1c6fcb7ceace231bb097d89f0226)
  • Loading branch information
Hemant Dangi authored and ltangvald committed Jan 4, 2018
1 parent 06dd096 commit 62bec1e
Show file tree
Hide file tree
Showing 10 changed files with 148 additions and 688 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Note #### Storing MySQL user name or password information in the master info rep
[connection master]
include/assert.inc [The value for transaction_write_set_extraction shoudl be MURMUR32]
CREATE TABLE t1 (a INT PRIMARY KEY);
SET @debug_saved= @@GLOBAL.DEBUG;
SET @@GLOBAL.DEBUG= @debug_saved;
SET @@GLOBAL.DEBUG= '+d,PKE_assert_single_primary_key_generated_insert';
INSERT INTO t1 VALUES(1);
SET @@GLOBAL.DEBUG= @debug_saved;
Expand All @@ -15,17 +15,6 @@ SET @@GLOBAL.DEBUG= @debug_saved;
include/rpl_sync.inc
DROP TABLE t1;
include/rpl_sync.inc
CREATE TABLE t1 (a BINARY(1) PRIMARY KEY);
SET @@GLOBAL.DEBUG= @debug_saved;
SET @@GLOBAL.DEBUG= '+d,PKE_assert_single_primary_key_generated_insert_collation';
INSERT INTO t1 VALUES(1);
SET @@GLOBAL.DEBUG= @debug_saved;
SET @@GLOBAL.DEBUG= '+d,PKE_assert_single_primary_key_generated_update_collation';
UPDATE t1 SET a=3 WHERE a=1;
SET @@GLOBAL.DEBUG= @debug_saved;
include/rpl_sync.inc
DROP TABLE t1;
include/rpl_sync.inc
CREATE TABLE t1(a INT, b INT, PRIMARY KEY(a, b));
SET @@GLOBAL.DEBUG= @debug_saved;
SET @@GLOBAL.DEBUG= '+d,PKE_assert_multi_primary_key_generated_insert';
Expand All @@ -37,17 +26,6 @@ SET @@GLOBAL.DEBUG= @debug_saved;
include/rpl_sync.inc
DROP TABLE t1;
include/rpl_sync.inc
CREATE TABLE t1(a BINARY(1), b BINARY(1), PRIMARY KEY(a, b));
SET @@GLOBAL.DEBUG= @debug_saved;
SET @@GLOBAL.DEBUG= '+d,PKE_assert_multi_primary_key_generated_insert_collation';
INSERT INTO t1 VALUE(1, 2);
SET @@GLOBAL.DEBUG= @debug_saved;
SET @@GLOBAL.DEBUG= '+d,PKE_assert_multi_primary_key_generated_update_collation';
UPDATE t1 SET a=3 WHERE a=1;
SET @@GLOBAL.DEBUG= @debug_saved;
include/rpl_sync.inc
DROP TABLE t1;
include/rpl_sync.inc
CREATE TABLE t1 (c1 INT PRIMARY KEY, c2 INT NOT NULL UNIQUE, c3 INT NOT NULL UNIQUE);
SET @@GLOBAL.DEBUG= @debug_saved;
SET @@GLOBAL.DEBUG= '+d,PKE_assert_single_primary_unique_key_generated_insert';
Expand All @@ -58,16 +36,6 @@ UPDATE t1 SET c1=5 WHERE c1=1;
include/rpl_sync.inc
DROP TABLE t1;
include/rpl_sync.inc
CREATE TABLE t1 (c1 BINARY(1) PRIMARY KEY, c2 BINARY(1) NOT NULL UNIQUE, c3 BINARY(1) NOT NULL UNIQUE);
SET @@GLOBAL.DEBUG= @debug_saved;
SET @@GLOBAL.DEBUG= '+d,PKE_assert_single_primary_unique_key_generated_insert_collation';
INSERT INTO t1 VALUES (1, 2, 3);
SET @@GLOBAL.DEBUG= @debug_saved;
SET @@GLOBAL.DEBUG= '+d,PKE_assert_single_primary_unique_key_generated_update_collation';
UPDATE t1 SET c1=5 WHERE c1=1;
include/rpl_sync.inc
DROP TABLE t1;
include/rpl_sync.inc
CREATE TABLE t1 (a INT, d INT, b INT NOT NULL UNIQUE, c INT NOT NULL UNIQUE, PRIMARY KEY(a, d));
SET @@GLOBAL.DEBUG= @debug_saved;
SET @@GLOBAL.DEBUG= '+d,PKE_assert_multi_primary_unique_key_generated_insert';
Expand All @@ -79,17 +47,6 @@ SET @@GLOBAL.DEBUG= @debug_saved;
include/rpl_sync.inc
DROP TABLE t1;
include/rpl_sync.inc
CREATE TABLE t1 (a BINARY(1), d BINARY(1), b BINARY(1) NOT NULL UNIQUE, c BINARY(1) NOT NULL UNIQUE, PRIMARY KEY(a, d));
SET @@GLOBAL.DEBUG= @debug_saved;
SET @@GLOBAL.DEBUG= '+d,PKE_assert_multi_primary_unique_key_generated_insert_collation';
INSERT INTO t1 VALUES(1, 2, 3, 4);
SET @@GLOBAL.DEBUG= @debug_saved;
SET @@GLOBAL.DEBUG= '+d,PKE_assert_multi_primary_unique_key_generated_update_collation';
UPDATE t1 SET a=5 WHERE a=1;
SET @@GLOBAL.DEBUG= @debug_saved;
include/rpl_sync.inc
DROP TABLE t1;
include/rpl_sync.inc
CREATE TABLE t1 (a INT PRIMARY KEY);
CREATE TABLE t2 (b INT PRIMARY KEY);
CREATE TABLE t3 (c1 INT, c2 INT NOT NULL UNIQUE, PRIMARY KEY(c1, c2), FOREIGN KEY(c1) REFERENCES t1(a), FOREIGN KEY(c2) REFERENCES t2(b));
Expand All @@ -109,23 +66,4 @@ DROP TABLE t3;
DROP TABLE t2;
DROP TABLE t1;
include/rpl_sync.inc
CREATE TABLE t1 (a BINARY(1) PRIMARY KEY);
CREATE TABLE t2 (b BINARY(1) PRIMARY KEY);
CREATE TABLE t3 (c1 BINARY(1), c2 BINARY(1) NOT NULL UNIQUE, PRIMARY KEY(c1, c2), FOREIGN KEY(c1) REFERENCES t1(a), FOREIGN KEY(c2) REFERENCES t2(b));
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (5);
SET @@GLOBAL.DEBUG= @debug_saved;
SET @@GLOBAL.DEBUG= '+d,PKE_assert_multi_foreign_key_generated_insert_collation';
INSERT INTO t3 values(1,5);
SET @@GLOBAL.DEBUG= @debug_saved;
INSERT INTO t1 VALUES (3);
include/rpl_sync.inc
SET @@GLOBAL.DEBUG= '+d,PKE_assert_multi_foreign_key_generated_update_collation';
UPDATE t3 SET c1=3 WHERE c1=1;
include/rpl_sync.inc
SET @@GLOBAL.DEBUG= @debug_saved;
DROP TABLE t3;
DROP TABLE t2;
DROP TABLE t1;
include/rpl_sync.inc
include/rpl_end.inc
82 changes: 1 addition & 81 deletions mysql-test/suite/rpl/t/rpl_transaction_write_set_extraction.test
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

--connection master
CREATE TABLE t1 (a INT PRIMARY KEY);
SET @debug_saved= @@GLOBAL.DEBUG;
SET @@GLOBAL.DEBUG= @debug_saved;
SET @@GLOBAL.DEBUG= '+d,PKE_assert_single_primary_key_generated_insert';
INSERT INTO t1 VALUES(1);
SET @@GLOBAL.DEBUG= @debug_saved;
Expand All @@ -28,23 +28,8 @@ SET @@GLOBAL.DEBUG= @debug_saved;
DROP TABLE t1;
--source include/rpl_sync.inc

# tests both writeset algorithm (with and without collation)
--connection master
CREATE TABLE t1 (a BINARY(1) PRIMARY KEY);
SET @@GLOBAL.DEBUG= @debug_saved;
SET @@GLOBAL.DEBUG= '+d,PKE_assert_single_primary_key_generated_insert_collation';
INSERT INTO t1 VALUES(1);
SET @@GLOBAL.DEBUG= @debug_saved;
SET @@GLOBAL.DEBUG= '+d,PKE_assert_single_primary_key_generated_update_collation';
UPDATE t1 SET a=3 WHERE a=1;
SET @@GLOBAL.DEBUG= @debug_saved;
--source include/rpl_sync.inc
DROP TABLE t1;
--source include/rpl_sync.inc

# Table with multi values pimary key field with insert and update

--connection master
CREATE TABLE t1(a INT, b INT, PRIMARY KEY(a, b));
SET @@GLOBAL.DEBUG= @debug_saved;
SET @@GLOBAL.DEBUG= '+d,PKE_assert_multi_primary_key_generated_insert';
Expand All @@ -57,20 +42,6 @@ SET @@GLOBAL.DEBUG= @debug_saved;
DROP TABLE t1;
--source include/rpl_sync.inc

# tests both writeset algorithm (with and without collation)
--connection master
CREATE TABLE t1(a BINARY(1), b BINARY(1), PRIMARY KEY(a, b));
SET @@GLOBAL.DEBUG= @debug_saved;
SET @@GLOBAL.DEBUG= '+d,PKE_assert_multi_primary_key_generated_insert_collation';
INSERT INTO t1 VALUE(1, 2);
SET @@GLOBAL.DEBUG= @debug_saved;
SET @@GLOBAL.DEBUG= '+d,PKE_assert_multi_primary_key_generated_update_collation';
UPDATE t1 SET a=3 WHERE a=1;
SET @@GLOBAL.DEBUG= @debug_saved;
--source include/rpl_sync.inc
DROP TABLE t1;
--source include/rpl_sync.inc

# Table with single primary key and multiple unique key with insert and
# updates.

Expand All @@ -86,23 +57,9 @@ UPDATE t1 SET c1=5 WHERE c1=1;
DROP TABLE t1;
--source include/rpl_sync.inc

# tests both writeset algorithm (with and without collation)
--connection master
CREATE TABLE t1 (c1 BINARY(1) PRIMARY KEY, c2 BINARY(1) NOT NULL UNIQUE, c3 BINARY(1) NOT NULL UNIQUE);
SET @@GLOBAL.DEBUG= @debug_saved;
SET @@GLOBAL.DEBUG= '+d,PKE_assert_single_primary_unique_key_generated_insert_collation';
INSERT INTO t1 VALUES (1, 2, 3);
SET @@GLOBAL.DEBUG= @debug_saved;
SET @@GLOBAL.DEBUG= '+d,PKE_assert_single_primary_unique_key_generated_update_collation';
UPDATE t1 SET c1=5 WHERE c1=1;
--source include/rpl_sync.inc
DROP TABLE t1;
--source include/rpl_sync.inc

# Table with multi valued primary key and multiple unique key with insert and
# updates.

--connection master
CREATE TABLE t1 (a INT, d INT, b INT NOT NULL UNIQUE, c INT NOT NULL UNIQUE, PRIMARY KEY(a, d));
SET @@GLOBAL.DEBUG= @debug_saved;
SET @@GLOBAL.DEBUG= '+d,PKE_assert_multi_primary_unique_key_generated_insert';
Expand All @@ -115,20 +72,6 @@ SET @@GLOBAL.DEBUG= @debug_saved;
DROP TABLE t1;
--source include/rpl_sync.inc

# tests both writeset algorithm (with and without collation)
--connection master
CREATE TABLE t1 (a BINARY(1), d BINARY(1), b BINARY(1) NOT NULL UNIQUE, c BINARY(1) NOT NULL UNIQUE, PRIMARY KEY(a, d));
SET @@GLOBAL.DEBUG= @debug_saved;
SET @@GLOBAL.DEBUG= '+d,PKE_assert_multi_primary_unique_key_generated_insert_collation';
INSERT INTO t1 VALUES(1, 2, 3, 4);
SET @@GLOBAL.DEBUG= @debug_saved;
SET @@GLOBAL.DEBUG= '+d,PKE_assert_multi_primary_unique_key_generated_update_collation';
UPDATE t1 SET a=5 WHERE a=1;
SET @@GLOBAL.DEBUG= @debug_saved;
--source include/rpl_sync.inc
DROP TABLE t1;
--source include/rpl_sync.inc

# Table with Primary Key + Unique Key and Foreign Key

--connection master
Expand All @@ -154,27 +97,4 @@ DROP TABLE t2;
DROP TABLE t1;
--source include/rpl_sync.inc

# tests both writeset algorithm (with and without collation)
--connection master
CREATE TABLE t1 (a BINARY(1) PRIMARY KEY);
CREATE TABLE t2 (b BINARY(1) PRIMARY KEY);
CREATE TABLE t3 (c1 BINARY(1), c2 BINARY(1) NOT NULL UNIQUE, PRIMARY KEY(c1, c2), FOREIGN KEY(c1) REFERENCES t1(a), FOREIGN KEY(c2) REFERENCES t2(b));

INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (5);
SET @@GLOBAL.DEBUG= @debug_saved;
SET @@GLOBAL.DEBUG= '+d,PKE_assert_multi_foreign_key_generated_insert_collation';
INSERT INTO t3 values(1,5);
SET @@GLOBAL.DEBUG= @debug_saved;
INSERT INTO t1 VALUES (3);
--source include/rpl_sync.inc
SET @@GLOBAL.DEBUG= '+d,PKE_assert_multi_foreign_key_generated_update_collation';
UPDATE t3 SET c1=3 WHERE c1=1;
--source include/rpl_sync.inc
SET @@GLOBAL.DEBUG= @debug_saved;
DROP TABLE t3;
DROP TABLE t2;
DROP TABLE t1;
--source include/rpl_sync.inc

--source include/rpl_end.inc
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ UPDATE t1 SET c1=2 WHERE c1=1;
# After garbage collection certification info will contain:
# WS: t1.c1=1 -> 8a94f357-aab4-11df-86ab-c80aa9422222:1-4
# WS: t1.c1=2 -> 8a94f357-aab4-11df-86ab-c80aa9422222:1-4
include/assert.inc ['Count_transactions_rows_validating must be 4']
include/assert.inc ['Count_transactions_rows_validating must be 2']
include/assert.inc ['Transactions_committed_all_members must be equal to 8a94f357-aab4-11df-86ab-c80aa9422222:1-4']
include/assert.inc ['Count_transactions_rows_validating must be 4']
include/assert.inc ['Count_transactions_rows_validating must be 2']
include/assert.inc ['Transactions_committed_all_members must be equal to 8a94f357-aab4-11df-86ab-c80aa9422222:1-4']

############################################################
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ server1
include/assert.inc [The value of member_id should be equal to server UUID after starting group replication]
include/assert.inc [The value of Count_Transactions_checked should be 6 after starting group replication]
include/assert.inc [The value of Count_conflicts_detected should be 0 after starting group replication]
include/assert.inc [The value of Count_Transactions_rows_validating should be 4 after starting group replication]
include/assert.inc [The value of Count_Transactions_rows_validating should be 2 after starting group replication]
include/assert.inc [The value of Transactions_committed_all_members should have server 1 GTIDs before server2 start]
include/assert.inc [The value of Last_Conflict_free_transaction should be the gtid of the last applied transaction.]
SET SESSION sql_log_bin= 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ UPDATE t1 SET c1=2 WHERE c1=1;

--connection server1
--let $count_transactions_validating= query_get_value(SELECT Count_transactions_rows_validating from performance_schema.replication_group_member_stats, Count_transactions_rows_validating, 1)
--let $assert_text= 'Count_transactions_rows_validating must be 4'
--let $assert_cond= $count_transactions_validating = 4
--let $assert_text= 'Count_transactions_rows_validating must be 2'
--let $assert_cond= $count_transactions_validating = 2
--source include/assert.inc

--let $transactions_committed_all_members= query_get_value(SELECT Transactions_committed_all_members from performance_schema.replication_group_member_stats, Transactions_committed_all_members, 1)
Expand All @@ -115,8 +115,8 @@ UPDATE t1 SET c1=2 WHERE c1=1;

--connection server2
--let $count_transactions_validating= query_get_value(SELECT Count_transactions_rows_validating from performance_schema.replication_group_member_stats, Count_transactions_rows_validating, 1)
--let $assert_text= 'Count_transactions_rows_validating must be 4'
--let $assert_cond= $count_transactions_validating = 4
--let $assert_text= 'Count_transactions_rows_validating must be 2'
--let $assert_cond= $count_transactions_validating = 2
--source include/assert.inc

--let $transactions_committed_all_members= query_get_value(SELECT Transactions_committed_all_members from performance_schema.replication_group_member_stats, Transactions_committed_all_members, 1)
Expand Down
Loading

0 comments on commit 62bec1e

Please sign in to comment.