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

InnoDB: Duplicate FTS_DOC_ID value on table during LOAD DATA INFILE

    XMLWordPrintable

Details

    Description

      InnoDB encountered

      2025-11-20 23:14:38 8 [ERROR] InnoDB: Duplicate FTS_DOC_ID value on table `test`.`t2`
      

      Test case to repeat the scenario:

      --source include/have_innodb.inc
      --source include/maybe_versioning.inc
      create table t1(f1 int not null, f2 int not null, f3 char(255),
                      fulltext(f3), primary key(f1))engine=innodb;
      INSERT INTO t1 VALUES(2, 2, "NDB"), (1, 2, "MariaDB");
      eval SELECT * INTO OUTFILE "$MYSQLTEST_VARDIR/tmp/t1.outfile" FROM t1;
       
      create table t2(f1 int not null, f2 int not null, f3 char(255),
                      fulltext(f3), primary key(f1))engine=innodb;
      show create table t2;
      insert into t2 values(1, 1, "MySQL"), (2, 3, "Server");
      eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/t1.outfile' REPLACE INTO table t2;
      select * from t2;
      --remove_file $MYSQLTEST_VARDIR/tmp/t1.outfile
      drop table t1, t2;
       
      innodb.fts_1 'vers_trx'                  [ fail ]
              Test ended at 2025-11-20 23:14:38
       
      CURRENT_TEST: innodb.fts_1
      mysqltest: At line 12: query 'LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/t1.outfile' REPLACE INTO table t2' failed: ER_DUP_KEY (1022): Can't write; duplicate key in table 't2'
      
      

      Attachments

        Activity

          People

            midenok Aleksey Midenkov
            thiru Thirunarayanan Balathandayuthapani
            Aleksey Midenkov Aleksey Midenkov
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.