Bug #88750 InnoDB: Failing assertion: cursor->old_stored == 908467085
Submitted: 5 Dec 2017 2:46 Modified: 5 Dec 2017 6:21
Reporter: Roel Van de Paar Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: DML Severity:S6 (Debug Builds)
Version:5.5.58 OS:Any
Assigned to: CPU Architecture:Any

[5 Dec 2017 2:46] Roel Van de Paar
Description:
171205 13:13:44 [Note] /sda/MS091117-mysql-5.5.58-linux-x86_64-debug/bin/mysqld: ready for connections.
Version: '5.5.58-debug'  socket: '/sda/MS091117-mysql-5.5.58-linux-x86_64-debug/socket.sock'  port: 18611  MySQL Community Server (GPL)
171205 13:13:46  InnoDB: Assertion failure in thread 139952460744448 in file btr0pcur.c line 237
InnoDB: Failing assertion: cursor->old_stored == 908467085

Core was generated by `/sda/MS091117-mysql-5.5.58-linux-x86_64-debug/bin/mysqld --no-defaults --core -'.
Program terminated with signal 6, Aborted.
#0  0x00007f493855f9b1 in __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
61	  val = INTERNAL_SYSCALL (tgkill, err, 3, THREAD_GETMEM (THREAD_SELF, pid),
(gdb) bt
#0  0x00007f493855f9b1 in __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
#1  0x00000000007dffb8 in my_write_core (sig=6) at /git/mysql-server_dbg/mysys/stacktrace.c:433
#2  0x00000000006a2f16 in handle_fatal_signal (sig=6) at /git/mysql-server_dbg/sql/signal_handler.cc:247
#3  <signal handler called>
#4  0x00007f4936c951f7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#5  0x00007f4936c968e8 in __GI_abort () at abort.c:90
#6  0x00000000008f5424 in btr_pcur_restore_position_func (latch_mode=latch_mode@entry=2, cursor=cursor@entry=0x7f4915c4e678, 
    file=file@entry=0xb0cac0 "/git/mysql-server_dbg/storage/innobase/row/row0upd.c", line=line@entry=2144, 
    mtr=mtr@entry=0x7f4938b51b60) at /git/mysql-server_dbg/storage/innobase/btr/btr0pcur.c:237
#7  0x0000000000897c84 in row_upd_clust_step (node=node@entry=0x7f4915c81220, thr=thr@entry=0x7f4915c814a8)
    at /git/mysql-server_dbg/storage/innobase/row/row0upd.c:2144
#8  0x000000000089916f in row_upd (thr=0x7f4915c814a8, node=0x7f4915c81220)
    at /git/mysql-server_dbg/storage/innobase/row/row0upd.c:2306
#9  row_upd_step (thr=thr@entry=0x7f4915c814a8) at /git/mysql-server_dbg/storage/innobase/row/row0upd.c:2446
#10 0x0000000000875c91 in row_update_for_mysql (mysql_rec=<optimized out>, prebuilt=0x7f4915c80878)
    at /git/mysql-server_dbg/storage/innobase/row/row0mysql.c:1487
#11 0x000000000084fa5c in ha_innobase::delete_row (this=0x7f4915ca9010, record=0x7f4915c28010 <incomplete sequence \375>)
    at /git/mysql-server_dbg/storage/innobase/handler/ha_innodb.cc:5644
#12 0x00000000006ab9cb in handler::ha_delete_row (this=0x7f4915ca9010, buf=0x7f4915c28010 <incomplete sequence \375>)
    at /git/mysql-server_dbg/sql/handler.cc:5252
#13 0x00000000007974ec in mysql_delete (thd=thd@entry=0x7f4929789000, table_list=0x7f4915c1f120, conds=0x7f4915c1f7f0, 
    order_list=order_list@entry=0x7f492978b220, limit=18446744073709551615, options=<optimized out>)
    at /git/mysql-server_dbg/sql/sql_delete.cc:313
#14 0x000000000058f58e in mysql_execute_command (thd=thd@entry=0x7f4929789000) at /git/mysql-server_dbg/sql/sql_parse.cc:3110
#15 0x00000000005940f6 in mysql_parse (thd=thd@entry=0x7f4929789000, rawbuf=<optimized out>, length=46, 
    parser_state=parser_state@entry=0x7f4938b53580) at /git/mysql-server_dbg/sql/sql_parse.cc:5831
#16 0x00000000005959f5 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f4929789000, 
    packet=packet@entry=0x7f4929780001 "DELETE FROM t1 WHERE c1>='9999-12-31 23:59:59'", packet_length=packet_length@entry=46)
    at /git/mysql-server_dbg/sql/sql_parse.cc:1075
#17 0x0000000000597836 in do_command (thd=0x7f4929789000) at /git/mysql-server_dbg/sql/sql_parse.cc:776
#18 0x000000000063fd82 in do_handle_one_connection (thd_arg=thd_arg@entry=0x7f4929789000)
    at /git/mysql-server_dbg/sql/sql_connect.cc:870
#19 0x000000000063fe3f in handle_one_connection (arg=0x7f4929789000) at /git/mysql-server_dbg/sql/sql_connect.cc:789
#20 0x00007f493855ae25 in start_thread (arg=0x7f4938b54700) at pthread_create.c:308
#21 0x00007f4936d5834d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

How to repeat:
USE test;
CREATE TEMPORARY TABLE t1(c1 DOUBLE PRECISION);
insert into t1 values(600),(NULL),(NULL),(610),(NULL);
ALTER TABLE t1 ADD CONSTRAINT UNIQUE i1(c1);
DELETE FROM t1 WHERE c1>=5;
lock TABLE t1 write;
insert into t1 values(0xA180);
SELECT COUNT(*)FROM t1 WHERE a=LEFT(@value,2);
DELETE FROM t1 WHERE c1>='9999-12-31 23:59:59';
[5 Dec 2017 6:21] MySQL Verification Team
Hello Roel,

Thank you for the report and test case.
Observed that 5.5.58 debug build is affected.

Thanks,
Umesh