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

Assertion `next_insert_id >= auto_inc_interval_for_cur_row.minimum()' failed in handler::update_auto_increment

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Major
    • Resolution: Unresolved
    • 5.5(EOL), 10.0(EOL), 10.1(EOL), 10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL), 10.11, 11.0(EOL), 11.1(EOL), 11.2(EOL), 11.3(EOL), 11.4
    • 10.5, 10.6, 10.11
    • None

    Description

      --source include/have_innodb.inc
      create table t1 (
        id int not null auto_increment  primary key,
        s timestamp(6) not null
      ) engine=innodb auto_increment=2147483648;
       
      insert ignore into t1 (s) values ('2000-10-01'), ('1975-08-12') on duplicate key update s = '1';
      

      Fails with InnoDB/MyIsam min, not on non-debug build.

      Version: '10.5.7-MariaDB-debug-log' 
      mariadbd: /10.5/sql/handler.cc:3524: int handler::update_auto_increment(): Assertion `next_insert_id >= auto_inc_interval_for_cur_row.minimum()' failed.
      201027 15:55:41 [ERROR] mysqld got signal 6 ;
      Server version: 10.5.7-MariaDB-debug-log
       
      linux/raise.c:51(__GI_raise)[0x7f6083c6b18b]
      stdlib/abort.c:81(__GI_abort)[0x7f6083c4a859]
      sql/handler.cc:3526(handler::update_auto_increment())[0x5629f93bc3cb]
      handler/ha_innodb.cc:7535(ha_innobase::write_row(unsigned char const*))[0x5629f88bca19]
      sql/handler.cc:7146(handler::ha_write_row(unsigned char const*))[0x5629f7fcb110]
      sql/sql_insert.cc:1784(write_record(THD*, TABLE*, st_copy_info*, select_result*))[0x5629f7fc5b53]
      sql/sql_insert.cc:1099(mysql_insert(THD*, TABLE_LIST*, List<Item>&, List<List<Item> >&, List<Item>&, List<Item>&, enum_duplicates, bool, select_result*))[0x5629f808d7bc]
      sql/sql_parse.cc:4550(mysql_execute_command(THD*))[0x5629f80a59e0]
      sql/sql_parse.cc:8010(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x5629f807c35c]
      sql/sql_parse.cc:1874(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x5629f8078c85]
      sql/sql_parse.cc:1352(do_command(THD*))[0x5629f84b7f80]
      sql/sql_connect.cc:1410(do_handle_one_connection(CONNECT*, bool))[0x5629f84b78e4]
      sql/sql_connect.cc:1314(handle_one_connection)[0x5629f91bf6e5]
      nptl/pthread_create.c:478(start_thread)[0x7f6084173609]
      x86_64/clone.S:97(__GI___clone)[0x7f6083d47293]
       
      Query (0x62b0000932a8): insert ignore into t1 (s) values ('2000-10-01'), ('1975-08-12') on duplicate key update s = '1'
      

      with myisam:

      5.5 821a6939087d411f97256d

      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x00007f1addfd4535 in __GI_abort () at abort.c:79
      #6  0x00007f1addfd440f in __assert_fail_base (fmt=0x7f1ade136ee0 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x557681a355d0 "next_insert_id >= auto_inc_interval_for_cur_row.minimum()", file=0x557681a34b96 "/5.5/sql/handler.cc", line=2565, function=<optimized out>) at assert.c:92
      #7  0x00007f1addfe2102 in __GI___assert_fail (assertion=0x557681a355d0 "next_insert_id >= auto_inc_interval_for_cur_row.minimum()", file=0x557681a34b96 "/5.5/sql/handler.cc", line=2565, function=0x557681a36560 <handler::update_auto_increment()::__PRETTY_FUNCTION__> "int handler::update_auto_increment()") at assert.c:101
      #8  0x0000557681448c78 in handler::update_auto_increment (this=0x7f1ad759f878) at /5.5/sql/handler.cc:2565
      #9  0x000055768169dfa8 in ha_myisam::write_row (this=0x7f1ad759f878, buf=0x7f1ad798fe78 "\377") at /5.5/storage/myisam/ha_myisam.cc:849
      #10 0x000055768144df8d in handler::ha_write_row (this=0x7f1ad759f878, buf=0x7f1ad798fe78 "\377") at /5.5/sql/handler.cc:5205
      #11 0x0000557681277f01 in write_record (thd=0x7f1adb5f1c60, table=0x7f1ad7999460, info=0x7f1addf5c510) at /5.5/sql/sql_insert.cc:1596
      #12 0x00005576812767a3 in mysql_insert (thd=0x7f1adb5f1c60, table_list=0x7f1ad79871e0, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_UPDATE, ignore=true) at /5.5/sql/sql_insert.cc:986
      #13 0x000055768129528d in mysql_execute_command (thd=0x7f1adb5f1c60) at /5.5/sql/sql_parse.cc:2960
      #14 0x000055768129d38f in mysql_parse (thd=0x7f1adb5f1c60, rawbuf=0x7f1ad7987078 "insert ignore into t1 (s) values ('2000-10-01'), ('1975-08-12') on duplicate key update s ='1'", length=94, parser_state=0x7f1addf5ce50) at /5.5/sql/sql_parse.cc:5928
      #15 0x0000557681290cb2 in dispatch_command (command=COM_QUERY, thd=0x7f1adb5f1c60, packet=0x7f1adc139f61 "insert ignore into t1 (s) values ('2000-10-01'), ('1975-08-12') on duplicate key update s ='1'", packet_length=94) at /5.5/sql/sql_parse.cc:1067
      #16 0x000055768128fec7 in do_command (thd=0x7f1adb5f1c60) at /5.5/sql/sql_parse.cc:793
      #17 0x0000557681394b2b in do_handle_one_connection (thd_arg=0x7f1adb5f1c60) at /5.5/sql/sql_connect.cc:1268
      #18 0x00005576813948a4 in handle_one_connection (arg=0x7f1adb5f1c60) at /5.5/sql/sql_connect.cc:1184
      #19 0x0000557681715171 in pfs_spawn_thread (arg=0x7f1adb61c3c0) at /5.5/storage/perfschema/pfs.cc:1015
      #20 0x00007f1ade9befa3 in start_thread (arg=<optimized out>) at pthread_create.c:486
      #21 0x00007f1ade0ab4cf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      
      

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              alice Alice Sherepa
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.