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

table discovery doesn't work when undoing a rename

    XMLWordPrintable

Details

    • Bug
    • Status: Stalled (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 10.1, 10.2, 10.3, 10.4, 10.5
    • 10.5
    • Admin statements
    • 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 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.

      Attachments

        1. out
          8 kB
          Sidney August Cammeresi IV

        Activity

          People

            psergei Sergei Petrunia
            sac Sidney August Cammeresi IV (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.