[MDEV-32442] Tables empty after mysqldump restore when binlog_do_db is set for a different db Created: 2023-10-10 Updated: 2023-10-12 Resolved: 2023-10-12 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Server |
| Affects Version/s: | 10.11.4 |
| Fix Version/s: | 10.4.32, 10.5.23, 10.6.16, 10.10.7, 10.11.6, 11.0.4, 11.1.3 |
| Type: | Bug | Priority: | Major |
| Reporter: | Arno Schäfer | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Debian 12 |
||
| Issue Links: |
|
||||||||
| Description |
|
I found that when restoring a mysqldump backup to a different database when binlog_do_db is enabled, that the tables are created, but the INSERTs are not executed. Here is the configuration I narrowed it down to:
Backup file:
So when I try to load this backup file (narrowed down from the original mysqldump) into database "temp" (i.e. a different db from the database "tax" specified for binlog_do_db), the table "benutzer" is created, but the row is not inserted. If I remove the binlog_do_db line in the config, the problem goes away. If I remove either of the FOREIGN_KEY_CHECKS or UNIQUE_CHECKS lines, the problem goes away. If I am not mistaken, binlog_do_db should prevent the INSERT from being logged in the binlog, but not from being executed in the first place. |
| Comments |
| Comment by Marko Mäkelä [ 2023-10-11 ] |
|
This looks like a possible duplicate of |
| Comment by Arno Schäfer [ 2023-10-11 ] |
|
Yes, looks like it, thanks. Ticket can be closed. |