[MDEV-22331] table discovery doesn't work when undoing a rename Created: 2020-04-21 Updated: 2023-12-05 |
|
| Status: | Stalled |
| Project: | MariaDB Server |
| Component/s: | Admin statements |
| Affects Version/s: | 10.1, 10.2, 10.3, 10.4, 10.5 |
| Fix Version/s: | 10.5 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Sidney August Cammeresi IV (Inactive) | Assignee: | Sergei Petrunia |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
||||||||||||
| Issue Links: |
|
||||||||||||
| Description |
|
when a multi-table rename fails, mariadb tries to roll back the rename by doing more renames. these renames trigger table discovery, which fails, leaving the rename in a partially undone state. see CLX-159 for the repro. discovery calls TABLE_SHARE::init_from_sql_statement_string, and at the bottom of that function, thd->is_error() is checked, but it was already true at the top of the function due to the fact that the rename failed. i confirmed with serg that it's a bug. he said to use a Turn_errors_to_warnings_handler and provided a patch (which works), but i don't know error handling well enough in mariadb to stand behind the patch myself. |
| Comments |
| Comment by Sergei Golubchik [ 2020-04-30 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
For the record, the patch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2020-06-16 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The patch looks good to me... | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2020-06-16 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
bb-10.5-mdev22331 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2023-10-03 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Not a priority | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Julien Fritsch [ 2023-12-05 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Automated message: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by JiraAutomate [ 2023-12-05 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Automated message: |