[MDEV-25595] DROP part of failed CREATE OR REPLACE is not written into binary log Created: 2021-05-04 Updated: 2021-07-05 Resolved: 2021-07-05 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Create Table, Replication |
| Affects Version/s: | 10.2, 10.3, 10.4, 10.5, 10.6 |
| Fix Version/s: | 10.2.40, 10.3.31, 10.4.21, 10.5.12, 10.6.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Aleksey Midenkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
In some cases when CREATE OR REPLACE TABLE fails half-way, having dropped the previous table but unable to create a new one, DROP TABLE is still written in the binary log to preserve consistency. However, it doesn't always happen:
In a replication setup test case 1 still works (doesn't fail) due to special logic performed by the slave, added by this commit in 10.0:
However, since it's only a hack for fixing the next CREATE, test case 2 fails with replication, too.
If MDEV-25292 makes it to 10.6, the source of the problem should be eliminated. But previous releases still have a long life to live. |
| Comments |
| Comment by Aleksey Midenkov [ 2021-05-05 ] |
|
MDEV-25292 deprecates logging of DROP. |
| Comment by Andrei Elkin [ 2021-05-17 ] |
|
Left a question on github. |
| Comment by Andrei Elkin [ 2021-05-19 ] |
|
Clarified about a proposed improvement to the test part . |
| Comment by Andrei Elkin [ 2021-05-25 ] |
|
The patch is good to push. |