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

optimize table not erroring correctly

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Incomplete
    • 5.5.50
    • N/A
    • Admin statements
    • we are running MariaDB 5.5.50 on CentOS 7.2

    Description

      If you run optimize table on a table that does not exist you get the following message:

      optimize table traders_test;

      Table Op Msg_type Msg_text
      tradegraph_db.traders_test optimize Error Table 'tradegraph_db.traders_test' doesn't exist
      tradegraph_db.traders_test optimize status Operation failed

      If you are running the sql_error_log plugin, you can see an error is generated:
      ERROR 1146: Table 'tradegraph_db.traders_test' doesn't exist : optimize table traders_test

      However, the optimize table command is written to the binary log which is counter intuitive. In the case of a replication slave, if the object doesn't exist on the slave, it does not pass the error back to the replication thread. So the replication thread thinks it was fine, when in fact the object did not exist. My assumption would be the thread should crash like other sql error would break replication no ignore the error and continue.

      Attachments

        Activity

          People

            Unassigned Unassigned
            lpatrick Lori Patrick
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

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