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

ER_CRASHED_ON_USAGE (Table is marked as crashed and should be repaired) upon insert with unique blobs

    XMLWordPrintable

Details

    Description

      CREATE TABLE t1 (b TEXT, UNIQUE(b)) ENGINE=MyISAM;
      INSERT IGNORE INTO t1 VALUES ('a'),('a'),('c'),('d'),('e'),('f'),('g'),('h'),('i'),('j'),('k');
       
      # Cleanup
      DROP TABLE t1;
      

      Reproducible on 10.4.
      Not applicable to 10.3.
      On 10.5+ it was fixed by this commit:

      Author: Sergei Golubchik <serg@mariadb.org>
      Date:   Sun Apr 12 18:09:09 2020 +0200
       
          MDEV-22218 InnoDB: Failing assertion: node->pcur->rel_pos == BTR_PCUR_ON upon LOAD DATA with NO_BACKSLASH_ESCAPES in SQL_MODE and unique blob in table
          
          `inited == NONE` at the initialization time does not always mean
          that it'll be `NONE` later, at the execution time. Use a more complex
          caller-specific logic to decide whether to create a cloned lookup handler.
          
          Besides LOAD (as in the original bug report) make sure that all
          prepare_for_insert() invocations are covered by tests. Add tests for
          CREATE ... SELECT, multi-UPDATE, and multi-DELETE.
          
          Don't enable write cache with long uniques.
      

      The problem could be considered minor, as it only affects not-the-latest-major 10.4, but it causes lots of unavoidable test failures and can easily mask real corruption issues.

      Attachments

        Activity

          People

            serg Sergei Golubchik
            elenst Elena Stepanova
            Votes:
            1 Vote for this issue
            Watchers:
            4 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.