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

CREATE OR REPLACE not atomic for sequences (a.k.a tables with SEQUENCE=1)

    XMLWordPrintable

Details

    Description

      This may be an expected limitation, in this case specify it for further documentation and feel free to close as not-a-bug or wont-fix.

      create table t (a int);
      create sequence s;
      --error ER_SEQUENCE_INVALID_TABLE_STRUCTURE
      create or replace table s sequence=1 as select * from t;
       
      show create table s;
       
      # Cleanup
      drop table if exists t, s;
      

      bb-10.11-midenok 8e82c973eeb

      create or replace table s sequence=1 as select * from t;
      ERROR HY000: Sequence 'test.t' table structure is invalid (Wrong number of columns)
      show create table s;
       
      mysqltest: At line 6: query 'show create table s' failed: ER_NO_SUCH_TABLE (1146): Table 'test.s' doesn't exist
      

      Note: While reproducing/modifying the test case, be careful not to hit MDEV-29771.

      Attachments

        Issue Links

          Activity

            People

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