| 1 |
--source include/have_transaction_write_set_extraction.inc |
| 2 |
--source include/have_binlog_format_row.inc |
| 3 |
--source include/master-slave.inc |
| 4 |
################################################################################ |
| 5 |
# WL10905 - Support for INVISIBLE columns. # |
| 6 |
# # |
| 7 |
# ==== Purpose ==== # |
| 8 |
# # |
| 9 |
# The test checks if source includes any unique indexes containing invisible # |
| 10 |
# columns in the writeset. # |
| 11 |
# # |
| 12 |
################################################################################ |
| 13 |
SET @saved_binlog_transaction_dependency_tracking = |
| 14 |
@@global.binlog_transaction_dependency_tracking; |
| 15 |
SET @@global.binlog_transaction_dependency_tracking = 'WRITESET'; |
| 16 |
|
| 17 |
# LC=0 SN=1 |
| 18 |
CREATE TABLE t (a INT NOT NULL, |
| 19 |
b INT NOT NULL INVISIBLE, |
| 20 |
UNIQUE KEY(b)); |
| 21 |
# LC=1 SN=2 |
| 22 |
INSERT INTO t SET a = 1, b = 1; |
| 23 |
# LC=2 SN=3 |
| 24 |
UPDATE t SET b = 2; |
| 25 |
# LC=1 SN=4 |
| 26 |
INSERT INTO t SET a = 3, b = 3; |
| 27 |
# LC=3 SN=5 |
| 28 |
INSERT INTO t SET a = 1, b = 1; |
| 29 |
--echo # Verify that the last INSERT depends on the UPDATE, which it |
| 30 |
--echo # depends on using only an INVISIBLE column. This proves that the index |
| 31 |
--echo # on the INVISIBLE column is accounted for in the writeset. |
| 32 |
--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1) |
| 33 |
FLUSH LOGS; |
| 34 |
--let $logical_timestamps =0 1;1 2;2 3;1 4;3 5 |
| 35 |
--source include/assert_logical_timestamps.inc |
| 36 |
|
| 37 |
DROP TABLE t; |
| 38 |
SET @@global.binlog_transaction_dependency_tracking = @saved_binlog_transaction_dependency_tracking; |
| 39 |
--source include/rpl_end.inc |