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

CREATE OR REPLACE can drop a table

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 10.1(EOL)
    • 10.2(EOL)
    • None
    • None

    Description

      create table t1 (a int);
      create or replace table t1 (a blob, index (a));
      

      after the above the table t1 does not exist. But after

      create table t1 (a int);
      create or replace table t1 (a decimal(200,100));
      

      old table t1 is preserved.

      The latter behavior is correct, after create or replace the table must always exist. This can be fixed either the alter table way (create temporary table, rename it over the old one) or by deleting the old table only after all validity checks for a new table have passed.

      Attachments

        Activity

          People

            Unassigned Unassigned
            serg Sergei Golubchik
            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.