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

Assertion `!auto_increment_lock && !auto_increment_safe_stmt_log_lock' failed in ha_partition::external_lock

    XMLWordPrintable

Details

    Description

      --source include/have_partition.inc
      --source include/have_log_bin.inc
       
      CREATE TABLE t1 (pk INT AUTO_INCREMENT PRIMARY KEY) PARTITION BY KEY (pk) PARTITIONS 2;
      INSERT INTO t1 VALUES (NULL),(NULL);
       
      --error ER_DUP_ENTRY
      UPDATE t1 SET pk = 2147483647;
      REPLACE INTO t1 VALUES (NULL);
      

      10.1 75dfd4acb

      mysqld: /data/src/10.1/sql/ha_partition.cc:3769: virtual int ha_partition::external_lock(THD*, int): Assertion `!auto_increment_lock && !auto_increment_safe_stmt_log_lock' failed.
      180818 20:17:27 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fb66cb0dee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x000055653c7796fa in ha_partition::external_lock (this=0x7fb6640b0088, thd=0x7fb6658da070, lock_type=2) at /data/src/10.1/sql/ha_partition.cc:3769
      #9  0x000055653c15cb0e in handler::ha_external_lock (this=0x7fb6640b0088, thd=0x7fb6658da070, lock_type=2) at /data/src/10.1/sql/handler.cc:5889
      #10 0x000055653c240840 in unlock_external (thd=0x7fb6658da070, table=0x7fb6640439d8, count=1) at /data/src/10.1/sql/lock.cc:689
      #11 0x000055653c23fdbe in mysql_unlock_tables (thd=0x7fb6658da070, sql_lock=0x7fb6640439a0, free_lock=false) at /data/src/10.1/sql/lock.cc:399
      #12 0x000055653c23fd2a in mysql_unlock_tables (thd=0x7fb6658da070, sql_lock=0x7fb6640439a0) at /data/src/10.1/sql/lock.cc:388
      #13 0x000055653bea4e5a in close_thread_tables (thd=0x7fb6658da070) at /data/src/10.1/sql/sql_base.cc:1028
      #14 0x000055653bf19d8e in mysql_execute_command (thd=0x7fb6658da070) at /data/src/10.1/sql/sql_parse.cc:5777
      #15 0x000055653bf1e2e8 in mysql_parse (thd=0x7fb6658da070, rawbuf=0x7fb664043088 "REPLACE INTO t1 VALUES (NULL)", length=29, parser_state=0x7fb66eb475e0) at /data/src/10.1/sql/sql_parse.cc:7463
      #16 0x000055653bf0cc7d in dispatch_command (command=COM_QUERY, thd=0x7fb6658da070, packet=0x7fb667554071 "REPLACE INTO t1 VALUES (NULL)", packet_length=29) at /data/src/10.1/sql/sql_parse.cc:1495
      #17 0x000055653bf0ba02 in do_command (thd=0x7fb6658da070) at /data/src/10.1/sql/sql_parse.cc:1124
      #18 0x000055653c045e1b in do_handle_one_connection (thd_arg=0x7fb6658da070) at /data/src/10.1/sql/sql_connect.cc:1330
      #19 0x000055653c045b7f in handle_one_connection (arg=0x7fb6658da070) at /data/src/10.1/sql/sql_connect.cc:1242
      #20 0x000055653c403b0a in pfs_spawn_thread (arg=0x7fb66c03a3f0) at /data/src/10.1/storage/perfschema/pfs.cc:1861
      #21 0x00007fb66e811494 in start_thread (arg=0x7fb66eb48b00) at pthread_create.c:333
      #22 0x00007fb66cbca93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      The problem was introduced by the latest commit:

      commit 75dfd4acb995789ca5f86ccbd361fff9d2797e79
      Author: Julius Goryavsky
      Date:   Thu Jul 26 15:04:11 2018 +0200
       
          This is patch for the https://jira.mariadb.org/browse/MDEV-9519 issue:
      ...
      

      Attachments

        Issue Links

          Activity

            People

              sysprg Julius Goryavsky
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.