[MDEV-587] LP:713561 - "Duplicate entry" error and time datatype cause slave provisioning to fail Created: 2011-02-05 Updated: 2013-03-08 Resolved: 2013-03-08 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Philip Stoev (Inactive) | Assignee: | Unassigned |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| 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:
|
| Comments |
| Comment by Philip Stoev (Inactive) [ 2011-02-05 ] |
|
Re: "Duplicate entry" error causes slave provisioning using binlog_snapshot_position to fail |
| Comment by Rasmus Johansson (Inactive) [ 2011-02-10 ] |
|
Launchpad bug id: 713561 |
| Comment by Elena Stepanova [ 2013-03-08 ] |
|
While there is not enough information to fully confirm it, the bug MDEV-4255 provides a good story which might explain discrepancy of the data reported here. The origin of the problem in MDEV-4255 is that when the dump is restored on slave, the rows are written into tables in a different order comparing to master. There are some cases when the order of rows becomes important for further replication, even on 5.5 and even with MBR which is supposed to be reasonably safe. One of such cases is described in MDEV-4255, there were other, more subtle ones, observed during replication tests. In regard to the note that the problem was specific to time types, I can only guess that it was caused by the nature of RQG flow. Date/time fields most often use wrong literals (like datetime_field = 'a'), so they end up with zero values ('0000-00-00 00:00:00'), and hence duplicate key errors. I also initially observed the problem described in MDEV-4255 on datetime values, although it turned out to be unrelated to the type as such. Possibly there were other reasons as well, and the theory above doesn't explain "table doesn't exist" errors mentioned here, but it's impossible to analyze further based on the description alone. |