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

LP:1006164 - Multi-table DELETE that uses innodb + index_merge/intersect may fail to delete rows

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      Based on customer case, csc#250:

      CREATE TABLE tbl (
      id PRIMARY KEY,
      key1 INT,
      key2 INT,
      KEY (key1),
      KEY (key2) ) engine=innodb;
      ...

      DELETE tbl FROM tbl WHERE key1=const1 AND key2=const2;

      ^^ this will delete fewer rows than it actually matches.

      • Problem happens only with InnoDB (not with MyISAM)
      • Setting "index_merge=off" fixes the problem.
      • Using a non-multi-table-table DELETE statement fixes the problem.

      Attachments

        Activity

          People

            psergei Sergei Petrunia
            psergei Sergei Petrunia
            Votes:
            0 Vote for this issue
            Watchers:
            0 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.