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

Server fails to drop .ibd file when vector table creation fails

    XMLWordPrintable

Details

    • Can result in unexpected behaviour

    Description

      When creating tables with vector indexes, if the secondary table
      creation fails after the main table is successfully created,
      the server was not properly cleaning up the main table's .ibd file.

      This occurred because create_table_impl() always called
      ddl_log_complete() on any error, which disables DDL log entries
      instead of executing them for cleanup. The main table would be
      left behind even though the overall CREATE TABLE operation failed.

      --source include/have_innodb.inc
      let $MYSQLD_DATADIR= `select @@datadir`;
      CREATE DATABASE test_1;
      --error ER_SQL_DISCOVER_ERROR
      SET STATEMENT max_session_mem_used=8192 FOR
      CREATE TABLE test_1.t (a INT,b VECTOR (5) NOT NULL,
                             VECTOR INDEX (b)) ENGINE=INNODB;
      --list_files $MYSQLD_DATADIR/test_1
      DROP DATABASE test_1;
       
      Result:
      =====
      CREATE DATABASE test_1;
      SET STATEMENT max_session_mem_used=8192 FOR
      CREATE TABLE test_1.t (a INT,b VECTOR (5) NOT NULL,
      VECTOR INDEX (b)) ENGINE=INNODB;
      ERROR HY000: Engine InnoDB failed to discover table `test_1`.`t` with 'CREATE TABLE i (                     layer tinyint not null,            tref varbinary(6),                vec blob not null,                 neighbors blob not null,           unique (tref),                     key (layer))                     '
       
      db.opt
      t.ibd
      
      

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              thiru Thirunarayanan Balathandayuthapani
              Thirunarayanan Balathandayuthapani Thirunarayanan Balathandayuthapani
              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.