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

Bug #1582577 reported by Roel Van de Paar
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.5
Triaged
High
Unassigned
5.6
New
Undecided
Unassigned
5.7
New
Undecided
Unassigned

Bug Description

mysqld: /git/percona-server_dbg/sql/handler.cc:2615: int handler::update_auto_increment(): Assertion `next_insert_id >= auto_inc_interval_for_cur_row.minimum()' failed.
07:27:34 UTC - mysqld got signal 6 ;

+bt
#0 0x00007f171fc34741 in __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
#1 0x00000000007f9078 in my_write_core (sig=6) at /git/percona-server_dbg/mysys/stacktrace.c:433
#2 0x00000000006b9296 in handle_fatal_signal (sig=6) at /git/percona-server_dbg/sql/signal_handler.cc:250
#3 <signal handler called>
#4 0x00007f171e3eb5f7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#5 0x00007f171e3ecce8 in __GI_abort () at abort.c:90
#6 0x00007f171e3e4566 in __assert_fail_base (fmt=0x7f171e534228 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0xb17508 "next_insert_id >= auto_inc_interval_for_cur_row.minimum()", file=file@entry=0xb16e78 "/git/percona-server_dbg/sql/handler.cc", line=line@entry=2615, function=function@entry=0xb17de0 <handler::update_auto_increment()::__PRETTY_FUNCTION__> "int handler::update_auto_increment()") at assert.c:92
#7 0x00007f171e3e4612 in __GI___assert_fail (assertion=0xb17508 "next_insert_id >= auto_inc_interval_for_cur_row.minimum()", file=0xb16e78 "/git/percona-server_dbg/sql/handler.cc", line=2615, function=0xb17de0 <handler::update_auto_increment()::__PRETTY_FUNCTION__> "int handler::update_auto_increment()") at assert.c:101
#8 0x00000000006be649 in handler::update_auto_increment (this=this@entry=0x7f1682c5bc10) at /git/percona-server_dbg/sql/handler.cc:2615
#9 0x0000000000a50ea9 in ha_partition::write_row (this=0x7f1682c5bc10, buf=0x7f1682c54c28 <incomplete sequence \375>) at /git/percona-server_dbg/sql/ha_partition.cc:3353
#10 0x00000000006c24d2 in handler::ha_write_row (this=0x7f1682c5bc10, buf=0x7f1682c54c28 <incomplete sequence \375>) at /git/percona-server_dbg/sql/handler.cc:5459
#11 0x00000000005800f9 in write_record (thd=thd@entry=0x7f16889af000, table=table@entry=0x7f1682c94400, info=info@entry=0x7f172023e4a0) at /git/percona-server_dbg/sql/sql_insert.cc:1540
#12 0x00000000005840bc in mysql_insert (thd=thd@entry=0x7f16889af000, table_list=0x7f1682c25160, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_UPDATE, ignore=false) at /git/percona-server_dbg/sql/sql_insert.cc:955
#13 0x0000000000598b97 in mysql_execute_command (thd=thd@entry=0x7f16889af000) at /git/percona-server_dbg/sql/sql_parse.cc:3175
#14 0x000000000059dc13 in mysql_parse (thd=thd@entry=0x7f16889af000, rawbuf=<optimized out>, length=76, parser_state=parser_state@entry=0x7f172023f520) at /git/percona-server_dbg/sql/sql_parse.cc:6058
#15 0x000000000059f617 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f16889af000, packet=packet@entry=0x7f168899c341 "insert t1 values(null,2),(1,-1),(null,3) on duplicate key update b=values(b)", packet_length=packet_length@entry=76) at /git/percona-server_dbg/sql/sql_parse.cc:1075
#16 0x00000000005a142f in do_command (thd=0x7f16889af000) at /git/percona-server_dbg/sql/sql_parse.cc:789
#17 0x000000000064f906 in do_handle_one_connection (thd_arg=thd_arg@entry=0x7f16889af000) at /git/percona-server_dbg/sql/sql_connect.cc:1418
#18 0x000000000064f9fc in handle_one_connection (arg=0x7f16889af000) at /git/percona-server_dbg/sql/sql_connect.cc:1325
#19 0x00007f171fc2fdc5 in start_thread (arg=0x7f1720240700) at pthread_create.c:308
#20 0x00007f171e4ac21d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

DROP DATABASE test;CREATE DATABASE test;USE test;
CREATE TABLE t1(a INT AUTO_INCREMENT,b CHAR (1),PRIMARY KEY (a))ENGINE=InnoDB PARTITION BY HASH (a) PARTITIONS 2;
insert t1 values(null,2),(1,-1),(null,3) on duplicate key update b=values(b);

Tags: qa
Revision history for this message
Roel Van de Paar (roel11) wrote :

First thought it may be connected with bug 1204381, but this code only reproduces in 5.5.
Does not reproduce in upstream.

tags: added: qa
Revision history for this message
Roel Van de Paar (roel11) wrote :

5.7 gives this;

mysql> insert t1 values(null,2),(1,-1),(null,3) on duplicate key update b=values(b);
ERROR 1406 (22001): Data too long for column 'b' at row 2

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

Reduced

CREATE TABLE t1(a INT AUTO_INCREMENT, b CHAR (1), PRIMARY KEY (a)) ENGINE=InnoDB;
insert t1 values(0,'a'),(1,'b'),(0,'c') on duplicate key update b=values(b);

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

My guess is that is a regression of bug 1035225 fix.

Revision history for this message
Roel Van de Paar (roel11) wrote :

5.6/5.7 may be present but masked

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-3436

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.