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

mysqldump of all databases cannot be loaded if a table uses a sequence from another schema

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 10.4(EOL), 10.5, 10.6, 10.11, 11.0(EOL), 11.1(EOL), 11.2(EOL), 11.4, 11.5(EOL)
    • 10.5, 10.6, 10.11, 11.4
    • Scripts & Clients
    • None

    Description

      --source include/have_innodb.inc
       
      create sequence s;
      create database db;
      create table db.t (a int default nextval(test.s));
       
      --exec $MYSQL_DUMP --databases --all-databases > $MYSQL_TMP_DIR/dump.sql
      drop sequence s;
      drop database db;
      --exec $MYSQL < $MYSQL_TMP_DIR/dump.sql
       
      # Cleanup
      drop sequence s;
      drop database db;
      

      10.4 59e7289b6ce93e52b251466e18a2e0eab8b47c36

      ERROR 1146 (42S02) at line 33: Table 'test.s' doesn't exist
      mysqltest: At line 10: exec of '/mnt8t/bld/10.4-rel/client//mysql --defaults-file=/mnt8t/bld/10.4-rel/mysql-test/var/my.cnf < /mnt8t/bld/10.4-rel/mysql-test/var/tmp/dump.sql' failed, error: 256, status: 1, errno: 11
      

      Obviously, the problem is that the dump contains databases in such an order that the sequence doesn't exist yet by the time the table is created.

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.