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

CREATE TEMPORARY TABLE .. LIKE (system versioned table) returns error if unique index is defined in the table

    XMLWordPrintable

    Details

      Description

      CREATE TABLE t1 (id int) with system versioning;
      CREATE TEMPORARY TABLE tmp1 LIKE t1;
       
      CREATE TABLE t2 (id int primary key) with system versioning;
      CREATE TEMPORARY TABLE tmp2 LIKE t2;
       
      drop table t1,t2;
      

      MariaDB [test]> CREATE TABLE t1 (id int) with system versioning;
      Query OK, 0 rows affected (0.059 sec)
       
      MariaDB [test]> CREATE TEMPORARY TABLE tmp1 LIKE t1;
      Query OK, 0 rows affected, 1 warning (0.014 sec)
      Warning (Code 1105): System versioning is stripped from temporary `test.tmp1`
       
      MariaDB [test]> CREATE TABLE t2 (id int,unique key (id)) with system versioning;
      Query OK, 0 rows affected (0.046 sec)
       
      MariaDB [test]> CREATE TEMPORARY TABLE tmp2 LIKE t2;
      ERROR 1072 (42000): Key column 'row_end' doesn't exist in table
      Warning (Code 1105): System versioning is stripped from temporary `test.tmp2`
      Error (Code 1072): Key column 'row_end' doesn't exist in table
      

        Attachments

          Activity

            People

            Assignee:
            midenok Aleksey Midenkov
            Reporter:
            alice Alice Sherepa
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration