Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-22331

table discovery doesn't work when undoing a rename

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: In Progress (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.1, 10.2, 10.3, 10.4, 10.5
    • Fix Version/s: 10.5
    • Component/s: Admin statements
    • Labels:
      None

      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 Sergei Golubchik 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.

        Attachments

          Activity

            People

            Assignee:
            psergey Sergei Petrunia
            Reporter:
            sac Sidney August Cammeresi IV
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated: