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

Error thrown when inserting data from sequence table

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 12.3
    • 12.3
    • Optimizer
    • None
    • Can result in unexpected behaviour
    • Q2/2026 Server Maintenance

    Description

      Bug found while testing MDEV-38701

      insert into t2 select seq from seq_1_to_10;
      ERROR 4254 (HY000): Failed to match the stats from replay context with the optimizer stats: m8.seq_1_to_10 doesn't exist in list of table contexts.

      Repro steps:

      create database if not exists m8;use m8;
      drop table t1;
      create table t1(a int);
      set optimizer_record_context=ON;
      explain select * from t1;
      SELECT context INTO DUMPFILE 'context1.txt' FROM INFORMATION_SCHEMA.OPTIMIZER_CONTEXT;
       
      source data2/m8/context1.txt;
      drop table if exists t2;
      create table t2( a int);
      insert into t2 select seq from seq_1_to_10;
      

      Attachments

        Activity

          People

            bsrikanth Srikanth Bondalapati
            mariadb-pavithrapandith Pavithra Pandith
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.