"Duplicate entry" error and time datatype cause slave provisioning to fail
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
In Progress
|
Undecided
|
Philip Stoev |
Bug Description
When executing a RQG test that does non-concurrent INSERT into various tables and then uses mysqldump to clone a new slave, the new slave diverges from the master. The slave starts properly and does apply all binlog events from the master, however when the master and the slave are dumped and diffed, they are no longer identical.
Some observations:
* It appears that the situation only happens when duplicate key errors are seen on the master due to the randomness of the workload.
* The duplicate key error is reported against the table that has a non-auto-increment PK, however the diff reports that the table that contains no PK at all is the one that has diverged
* In some instances, the test reports that the slave thread has failed with an error "Slave SQL: Error 'Table 'test.table1_
* Maybe the issue is related to the different rules regarding InnoDB rollback depending on the type of error -- statement v.s. transaction rollback
This issue is not specific to using binlog_ snapshot_ position, it is observed when using old-style mysqldump as well. It affects both MariaDB and MySQL, and requires the use of the time datatype. Maybe it is caused by different time zones on the master and on the slave, however MTR operates in GMT so it is not easy to provision a slave having the exact same timezone configuration.