[MDEV-19182] mysqldump not always handling SHOW CREATE TRIGGER failures correctly Created: 2019-04-05 Updated: 2020-08-25 Resolved: 2019-04-25 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Scripts & Clients |
| Affects Version/s: | 10.1, 10.2.14, 10.2, 10.3, 10.4 |
| Fix Version/s: | 10.2.24, 10.1.39, 10.3.15, 10.4.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | Hartmut Holzgraefe | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
When a "SHOW CREATE TRIGGER" stamement issued by mysqldump fails, mysqldump automatically assumes that this can only happen due to the server version being too old, and so the SHOW CREATE TRIGGER syntax not being available yet, as it was the case for pre-5.5 MySQL. I'm handling a case right now where the server clearly supports the syntax, so that SHOW CREATE TRIGGER must have failed for some other reason (which is not known yet). mysqldump simply applies a catch-all method to all query failures here, falling back to trying to extract trigger information from SHOW CREATE TRIGGERS (note the plural form), and in my case crashes at this attempt. mysqldump should be more clever here, and only fall back to the backward compatibility mode on actual query syntax errors, but should show the actual server error message and terminate on any other error codes. |
| Comments |
| Comment by Elena Stepanova [ 2019-04-05 ] | ||||||||||||||||||||||
|
An attempt to run dump_trigger_old and subsequent crash on it are reproducible.
(non-ASAN builds of 10.3 and 10.4 don't crash on my machine, but they produce garbage in the trigger dump). |