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

Auto-increment no longer works for explicit FTS_DOC_ID

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

          elenst Elena Stepanova created issue -
          thiru Thirunarayanan Balathandayuthapani made changes -
          Field Original Value New Value
          Status Open [ 1 ] In Progress [ 3 ]

          Patch is in bb-10.4-thiru

          thiru Thirunarayanan Balathandayuthapani added a comment - Patch is in bb-10.4-thiru
          thiru Thirunarayanan Balathandayuthapani made changes -
          Assignee Thirunarayanan Balathandayuthapani [ thiru ] Marko Mäkelä [ marko ]
          Status In Progress [ 3 ] In Review [ 10002 ]

          Looks OK to me.

          marko Marko Mäkelä added a comment - Looks OK to me.
          marko Marko Mäkelä made changes -
          Assignee Marko Mäkelä [ marko ] Thirunarayanan Balathandayuthapani [ thiru ]
          Status In Review [ 10002 ] Stalled [ 10000 ]
          thiru Thirunarayanan Balathandayuthapani made changes -
          Fix Version/s 10.4.32 [ 29300 ]
          Fix Version/s 10.4 [ 22408 ]
          Fix Version/s 10.5 [ 23123 ]
          Fix Version/s 10.6 [ 24028 ]
          Fix Version/s 10.10 [ 27530 ]
          Fix Version/s 10.11 [ 27614 ]
          Fix Version/s 11.0 [ 28320 ]
          Fix Version/s 11.1 [ 28549 ]
          Resolution Fixed [ 1 ]
          Status Stalled [ 10000 ] Closed [ 6 ]
          thiru Thirunarayanan Balathandayuthapani made changes -
          Resolution Fixed [ 1 ]
          Status Closed [ 6 ] Stalled [ 10000 ]
          thiru Thirunarayanan Balathandayuthapani made changes -
          Fix Version/s 10.4.32 [ 29300 ]
          thiru Thirunarayanan Balathandayuthapani made changes -
          Fix Version/s 10.4.32 [ 29300 ]
          Resolution Fixed [ 1 ]
          Status Stalled [ 10000 ] Closed [ 6 ]
          julien.fritsch Julien Fritsch made changes -
          Fix Version/s 10.5.23 [ 29012 ]
          Fix Version/s 10.6.16 [ 29014 ]
          Fix Version/s 10.10.7 [ 29018 ]
          Fix Version/s 10.11.6 [ 29020 ]
          Fix Version/s 11.0.4 [ 29021 ]
          Fix Version/s 11.1.3 [ 29023 ]

          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.