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

Can't restore ARCHIVE tables

    XMLWordPrintable

    Details

      Description

      When creating backup from ARCHIVE table with mysqldump, it is not possible to restore this dump file, because error: Can't write; duplicate key in table 't1'
      Mysqldump creates dump with CREATE TABLE ... AUTO_INCREMENT=next_id value and after CREATE TABLE it is not possible to insert data with lower id-s.

      MariaDB [test]> CREATE TABLE t1(id INT AUTO_INCREMENT, PRIMARY KEY (`id`)) ENGINE=ARCHIVE;
      Query OK, 0 rows affected (0.001 sec)
       
      MariaDB [test]> INSERT INTO t1 VALUES (1);                                                
      Query OK, 1 row affected (0.003 sec)
       
      MariaDB [test]> Bye
      [root@uvn-234-24 ~]# mysqldump test t1|mysql test
      ERROR 1022 (23000) at line 37: Can't write; duplicate key in table 't1'
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            BB Silver Asu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: