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

Auto-increment no longer works for explicit FTS_DOC_ID

    XMLWordPrintable

Details

    Description

      Note: I've seen intermediate test cases occasionally pass, even though there is no obvious non-determinism there. Please try --repeat=N if it happens.

      --source include/have_innodb.inc
       
      CREATE TABLE t (
        FTS_DOC_ID BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
        f1 char(255),
        f2 char(255),
        f3 char(255),
        fulltext key (f3)
      ) ENGINE=InnoDB;
      INSERT INTO t (f1,f2,f3) VALUES ('foo','bar','baz');
      ALTER TABLE t ADD FULLTEXT INDEX ft1(f1);
      ALTER TABLE t ADD FULLTEXT INDEX ft2(f2);
      INSERT INTO t (f1,f2,f3) VALUES ('bar','baz','qux');
       
      # Cleanup
      DROP TABLE t;
      

      10.4 900c4d69

      mysqltest: At line 13: query 'INSERT INTO t (f1,f2,f3) VALUES ('bar','baz','qux')' failed: 182: Invalid InnoDB FTS Doc ID
      

      2023-08-26  1:42:14 9 [ERROR] InnoDB: FTS_DOC_ID must be larger than 2 for table `test`.`t`
      

      The failure started happening on 10.4 after this merge

      commit 7b97020d402ae96b1da84396c172bdfdc1bccb37
      Merge: 5172f132bfc 02da00a98ce
      Author: Marko Mäkelä
      Date:   Mon Mar 7 09:05:36 2022 +0200
       
          Merge 10.3 into 10.4
      

      I didn't bisect 10.3, but it's a small merge with only one clear suspect

      commit 1248fe727784bb6be73f70163353cf8457cfde69
      Author: Thirunarayanan Balathandayuthapani
      Date:   Thu Feb 3 12:57:32 2022 +0530
       
          MDEV-27582 Fulltext DDL decrements the FTS_DOC_ID value
      

      Attachments

        Activity

          People

            thiru Thirunarayanan Balathandayuthapani
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.