forked from MariaDB/server
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDEV-35233: RBR does not work with CSV tables
Handle null bits for record comparison in row events the same way as in handler::calculate_checksum(), forcing bits that can be undefined to 1. These bits are the trailing unused bits, as well as the first bit for tables not using HA_OPTION_PACK_RECORD. The csv storage engine leaves these bits at 0, while the row-based replication has them set to 1, which otherwise cause can't find record error. Reviewed-by: Monty <[email protected]> Signed-off-by: Kristian Nielsen <[email protected]>
- Loading branch information
Showing
3 changed files
with
72 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
include/master-slave.inc | ||
[connection master] | ||
*** MDEV-35233: RBR does not work with CSV tables | ||
CREATE TABLE t (a INT NOT NULL) ENGINE=CSV; | ||
INSERT INTO t VALUES (1),(2); | ||
DELETE FROM t where a=1; | ||
connection slave; | ||
SELECT * FROM t ORDER BY a; | ||
a | ||
2 | ||
connection master; | ||
DROP TABLE t; | ||
include/rpl_end.inc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--source include/have_csv.inc | ||
--source include/have_binlog_format_row.inc | ||
--source include/master-slave.inc | ||
|
||
--echo *** MDEV-35233: RBR does not work with CSV tables | ||
CREATE TABLE t (a INT NOT NULL) ENGINE=CSV; | ||
INSERT INTO t VALUES (1),(2); | ||
DELETE FROM t where a=1; | ||
|
||
--sync_slave_with_master | ||
SELECT * FROM t ORDER BY a; | ||
|
||
# Cleanup | ||
--connection master | ||
DROP TABLE t; | ||
--source include/rpl_end.inc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters