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

ER_KEY_NOT_FOUND upon DML on sequence

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 10.3(EOL), 10.6, 10.11, 11.4, 11.8, 12.3
    • 10.11, 11.4, 11.8, 12.3
    • Sequences
    • None

    Description

      --let $datadir=`select @@datadir`
      --write_file $datadir/test/f.data
      0 0 7
      0 0 4
      EOF
       
      SET sql_mode= '';
      CREATE SEQUENCE seq ENGINE=Aria ROW_FORMAT PAGE;
      LOAD DATA INFILE 'f.data' REPLACE INTO TABLE seq FIELDS TERMINATED BY ' ';
       
      # Cleanup
      DROP SEQUENCE seq;
      

      10.3 b50685af825

      mysqltest: At line 9: query 'LOAD DATA INFILE 'f.data' REPLACE INTO TABLE seq FIELDS TERMINATED BY ' '' failed: 1032: Can't find record in 'seq'
      

      Important: On some reason, the next variation is only reproducible on my plain debug builds (different versions/revisions), but not reproducible on my RelWithDebInfo builds or debug ASAN-UBSAN builds.

      cmake . -DCMAKE_BUILD_TYPE=Debug -DMYSQL_MAINTAINER_MODE=OFF

      CREATE TABLE t AS SELECT 1 AS a;
      CREATE SEQUENCE s;
      UPDATE s, t SET s.increment = 1 ORDER BY s.start_value;
       
      DROP TABLE t;
      DROP SEQUENCE s;
      

      main 9fc925d77163f1d63e21a65654b0f59678abf08d

      CREATE TABLE t AS SELECT 1 AS a;
      CREATE SEQUENCE s;
      UPDATE s, t SET s.increment = 1 ORDER BY s.start_value;
      bug.446-71a                              [ fail ]
              Test ended at 2026-04-03 15:42:10
       
      CURRENT_TEST: bug.446-71a
      mysqltest: At line 3: query 'UPDATE s, t SET s.increment = 1 ORDER BY s.start_value' failed: ER_KEY_NOT_FOUND (1032): Can't find record in 's'
      

      Attachments

        Issue Links

          Activity

            People

              monty Michael Widenius
              elenst Elena Stepanova
              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.