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

mysqldump won't work correct on sequences

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 10.4
    • N/A
    • Backup, Sequences
    • None
    • Debian buster and Ubuntu 19.04 and 18.04

    Description

      TEST:
      DROP DATABASE IF EXISTS test1;
      DROP DATABASE IF EXISTS test2;
      CREATE DATABASE test1;
      CREATE DATABASE test2;
      USE test1;
      CREATE SEQUENCE seq_t_i INCREMENT 1 START WITH 1;
      CREATE TABLE t(
      i integer DEFAULT nextval(seq_t_i),
      j integer
      );
      INSERT INTO t VALUES (1,1),(2,2),(3,3),(4,4);
      SELECT SETVAL(seq_t_i, 4);
      INSERT INTO t(j) VALUES (5),(6),(7);
      SELECT SETVAL(seq_t_i,200);
      INSERT INTO t(j) VALUES (201),(202),(203);

      $ mysqldump test1 > foo.sql
      $ mysql test2 < foo.sql

      ERROR 1100 (HY000) at line 66: Table 'seq_t_id' was not locked with LOCK TABLES

      Looks like mysqldump not working correct on sequences.

      Best regards,

      Susanne

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              miracee miracee
              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.