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

cannot insert into write locked tables with sequences

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Critical
    • Resolution: Unresolved
    • 10.3(EOL), 10.4(EOL)
    • 10.5, 10.6, 10.11, 11.4
    • Locking, 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

              shulga Dmitry Shulga
              miracee miracee
              Votes:
              2 Vote for this issue
              Watchers:
              11 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.