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

Fulltext search DDL decrements FTS_DOC_ID

Details

    Description

      --source include/have_innodb.inc
       
      CREATE TABLE t1 (id INT, f VARCHAR(64), PRIMARY KEY (id DESC), FULLTEXT ft(f)) ENGINE=InnoDB;
      INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
      DELETE FROM t1 WHERE id = 2;
      ALTER TABLE t1 DROP INDEX ft;
      ALTER TABLE t1 ADD FULLTEXT INDEX ft (f);
      INSERT INTO t1 values (3,'innodb ft search');
      ANALYZE TABLE t1;
      SELECT * FROM t1 WHERE MATCH(f) AGAINST("+innodb +search" IN BOOLEAN MODE);
       
      DROP TABLE t1;
      

      SELECT returns an empty result set

      preview-10.8-MDEV-13756-desc-indexes c10e10c6

      SELECT * FROM t1 WHERE MATCH(f) AGAINST("+innodb +search" IN BOOLEAN MODE);
      id	f
      

      Normally it should return a row:

      SELECT * FROM t1 WHERE MATCH(f) AGAINST("+innodb +search" IN BOOLEAN MODE);
      id	f
      3	innodb ft search
      

      Not reproducible with an ascending PK.
      Not reproducible with otherwise the same test case without re-creating the key.
      Not reproducible on MySQL 8.0.

      Attachments

        Issue Links

          Activity

            Transition Time In Source Status Execution Times
            Thirunarayanan Balathandayuthapani made transition -
            Open In Progress
            2d 10h 53m 1
            Thirunarayanan Balathandayuthapani made transition -
            In Progress Closed
            1h 5m 1
            Marko Mäkelä made transition -
            Closed Stalled
            20h 27m 1
            Thirunarayanan Balathandayuthapani made transition -
            Stalled In Review
            7d 19h 23m 2
            Marko Mäkelä made transition -
            In Review Stalled
            4d 4h 36m 2
            Thirunarayanan Balathandayuthapani made transition -
            Stalled Closed
            24d 22h 52m 1

            People

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