| 1 |
--source include/have_log_bin.inc |
| 2 |
--source include/have_binlog_format_row.inc |
| 3 |
--source include/have_grep.inc |
| 4 |
|
| 5 |
--echo # Check that the hidden generated column is not included in the binlog |
| 6 |
--echo # regardless of binlog_row_image |
| 7 |
|
| 8 |
# Clear the binlog |
| 9 |
RESET MASTER; |
| 10 |
|
| 11 |
SET @start_row_image_value = @@session.binlog_row_image; |
| 12 |
|
| 13 |
CREATE TABLE t1 (col1 INT, col2 INT NOT NULL, col3 INT, col4 INT, UNIQUE INDEX ((ABS(col2)))); |
| 14 |
SET @@session.binlog_row_image = MINIMAL; |
| 15 |
INSERT INTO t1 VALUES (1, 2, 3, 4), (2, 3, 4, 5); |
| 16 |
UPDATE t1 SET col1 = 2 WHERE ABS(col2) = 2; |
| 17 |
SET @@session.binlog_row_image = FULL; |
| 18 |
INSERT INTO t1 VALUES (10, 20, 30, 40), (20, 30, 40, 50); |
| 19 |
UPDATE t1 SET col1 = 20 WHERE ABS(col2) = 20; |
| 20 |
SET @@session.binlog_row_image = NOBLOB; |
| 21 |
INSERT INTO t1 VALUES (100, 200, 300, 400), (200, 300, 400, 500); |
| 22 |
UPDATE t1 SET col1 = 200 WHERE ABS(col2) = 200; |
| 23 |
DROP TABLE t1; |
| 24 |
|
| 25 |
FLUSH LOGS; |
| 26 |
|
| 27 |
--let $datadir = `SELECT @@GLOBAL.DATADIR` |
| 28 |
--let $mysqlbinlog_only_decoded_rows = 1 |
| 29 |
--let $mysqlbinlog_parameters = $datadir/binlog.000001 |
| 30 |
--source include/mysqlbinlog.inc |
| 31 |
|
| 32 |
# Clear the binlog |
| 33 |
RESET MASTER; |
| 34 |
|
| 35 |
--echo # Check that when the only unique NOT NULL index is a functional index, |
| 36 |
--echo # the binary log contains a full before-image regardless of |
| 37 |
--echo # binlog_row_image. |
| 38 |
CREATE TABLE t1 ( |
| 39 |
col1 INT NOT NULL |
| 40 |
, col2 INT NOT NULL |
| 41 |
, col3 INT NOT NULL |
| 42 |
, UNIQUE INDEX idx1 ((ABS(col1)))); |
| 43 |
INSERT INTO t1 VALUES (1, 1, 1); |
| 44 |
|
| 45 |
SET binlog_row_image = MINIMAL; |
| 46 |
UPDATE t1 SET col2 = 2 WHERE ABS(col1) = 1; |
| 47 |
|
| 48 |
SET binlog_row_image = FULL; |
| 49 |
UPDATE t1 SET col2 = 3 WHERE ABS(col1) = 1; |
| 50 |
|
| 51 |
SET binlog_row_image = NOBLOB; |
| 52 |
UPDATE t1 SET col2 = 4 WHERE ABS(col1) = 1; |
| 53 |
|
| 54 |
DROP TABLE t1; |
| 55 |
FLUSH LOGS; |
| 56 |
|
| 57 |
SET @@session.binlog_row_image = @start_row_image_value; |
| 58 |
|
| 59 |
--let $datadir = `SELECT @@GLOBAL.DATADIR` |
| 60 |
--let $mysqlbinlog_only_decoded_rows = 1 |
| 61 |
--let $mysqlbinlog_parameters = $datadir/binlog.000001 |
| 62 |
--source include/mysqlbinlog.inc |