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

CREATE OR REPLACE does not work with custom DATA/INDEX DIRECTORY

    XMLWordPrintable

Details

    Description

      eval create table t (a int) engine=MyISAM data directory '$MYSQL_TMP_DIR';
      eval create or replace table t (b int) engine=MyISAM data directory '$MYSQL_TMP_DIR';
       
      # Cleanup
      drop table t;
      

      bb-10.11-midenok 9b1a14aa2e

      query 'create or replace table t (b int) engine=MyISAM data directory '$MYSQL_TMP_DIR'' failed: <Unknown> (1): Can't create/write to file '<basedir>/mysql-test/var/tmp/t.MYD' (Errcode: 17 "File exists")
      

      eval create table t (a int) engine=MyISAM data directory '$MYSQL_TMP_DIR' index directory '$MYSQL_TMP_DIR';
      eval create or replace table t (b int) engine=MyISAM data directory '$MYSQL_TMP_DIR' index directory '$MYSQL_TMP_DIR';
       
      # Cleanup
      drop table t;
      

      query 'create or replace table t (b int) engine=MyISAM data directory '$MYSQL_TMP_DIR' index directory '$MYSQL_TMP_DIR'' failed: HA_ERR_TABLE_EXIST (156): MyISAM table '#sql-create-3c931d-4-t' is in use (most likely by a MERGE table). Try FLUSH TABLES.
      

      Before MDEV-25292 both variations succeed.

      Reproducible with MyISAM and Aria, not with InnoDB.

      Attachments

        Issue Links

          Activity

            People

              midenok Aleksey Midenkov
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.