Bug #81452 InnoDB: Failing assertion: index->id == btr_page_get_index_id(page)
Submitted: 17 May 2016 6:06 Modified: 17 May 2016 7:39
Reporter: Roel Van de Paar Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Information schema Severity:S6 (Debug Builds)
Version:5.5.49 OS:Any
Assigned to: CPU Architecture:Any

[17 May 2016 6:06] Roel Van de Paar
Description:
160517 15:51:08  InnoDB: Assertion failure in thread 140128899716864 in file btr0cur.c line 991
InnoDB: Failing assertion: index->id == btr_page_get_index_id(page)

+bt
#0  0x00007f724ce93741 in __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
#1  0x00000000007de0c8 in my_write_core (sig=6) at /git/mysql-server/mysys/stacktrace.c:433
#2  0x00000000006a1088 in handle_fatal_signal (sig=6) at /git/mysql-server/sql/signal_handler.cc:247
#3  <signal handler called>
#4  0x00007f724beb45f7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#5  0x00007f724beb5ce8 in __GI_abort () at abort.c:90
#6  0x00000000008e9d68 in btr_cur_open_at_rnd_pos_func (index=index@entry=0x7f71b3137078, latch_mode=latch_mode@entry=1, cursor=cursor@entry=0x7f724d49fef0, file=file@entry=0xb518e8 "/git/mysql-server/storage/innobase/btr/btr0cur.c", line=line@entry=3715, mtr=mtr@entry=0x7f724d49fa00) at /git/mysql-server/storage/innobase/btr/btr0cur.c:991
#7  0x00000000008ee236 in btr_estimate_number_of_different_key_vals (index=index@entry=0x7f71b3137078) at /git/mysql-server/storage/innobase/btr/btr0cur.c:3715
#8  0x00000000009384c7 in dict_update_statistics (table=0x7f71b324e2f8, only_calc_if_missing_stats=<optimized out>, only_calc_if_changed_too_much=<optimized out>) at /git/mysql-server/storage/innobase/dict/dict0dict.c:4664
#9  0x000000000085a2c9 in ha_innobase::info_low (this=0x7f71b3363410, flag=212, called_from_analyze=called_from_analyze@entry=false) at /git/mysql-server/storage/innobase/handler/ha_innodb.cc:8180
#10 0x000000000085aa52 in ha_innobase::info (this=<optimized out>, flag=<optimized out>) at /git/mysql-server/storage/innobase/handler/ha_innodb.cc:8437
#11 0x00000000005de4ab in get_schema_tables_record (thd=0x7f71b7fa8000, tables=0x7f71b32fa448, table=0x7f71b3168010, res=<optimized out>, db_name=<optimized out>, table_name=<optimized out>) at /git/mysql-server/sql/sql_show.cc:4268
#12 0x00000000005d63fa in fill_schema_table_by_open (thd=thd@entry=0x7f71b7fa8000, is_show_fields_or_keys=is_show_fields_or_keys@entry=false, table=table@entry=0x7f71b3168010, schema_table=schema_table@entry=0x10ba8a0 <schema_tables+1600>, orig_db_name=orig_db_name@entry=0x7f71b3254c70, orig_table_name=orig_table_name@entry=0x7f71b33b6588, open_tables_state_backup=open_tables_state_backup@entry=0x7f724d4a2de0, can_deadlock=can_deadlock@entry=false) at /git/mysql-server/sql/sql_show.cc:3325
#13 0x00000000005e7287 in get_all_tables (thd=0x7f71b7fa8000, tables=0x7f71b3225220, cond=<optimized out>) at /git/mysql-server/sql/sql_show.cc:3994
#14 0x00000000005e79eb in do_fill_table (join_table=0x7f71b3267720, table_list=0x7f71b3225220, thd=0x7f71b7fa8000) at /git/mysql-server/sql/sql_show.cc:7097
#15 get_schema_tables_result (join=join@entry=0x7f71b3264010, executed_place=executed_place@entry=PROCESSED_BY_JOIN_EXEC) at /git/mysql-server/sql/sql_show.cc:7203
#16 0x00000000005d092e in JOIN::exec (this=this@entry=0x7f71b3264010) at /git/mysql-server/sql/sql_select.cc:1934
#17 0x00000000005cc82d in mysql_select (thd=thd@entry=0x7f71b7fa8000, rref_pointer_array=rref_pointer_array@entry=0x7f71b7faa260, tables=0x7f71b3225220, wild_num=1, fields=..., conds=<optimized out>, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=select_options@entry=2684619520, result=result@entry=0x7f71b3226f20, unit=unit@entry=0x7f71b7fa9a58, select_lex=select_lex@entry=0x7f71b7faa078) at /git/mysql-server/sql/sql_select.cc:2619
#18 0x00000000005cca25 in handle_select (thd=thd@entry=0x7f71b7fa8000, lex=lex@entry=0x7f71b7fa99a8, result=result@entry=0x7f71b3226f20, setup_tables_done_option=setup_tables_done_option@entry=0) at /git/mysql-server/sql/sql_select.cc:297
#19 0x0000000000583b27 in execute_sqlcom_select (thd=thd@entry=0x7f71b7fa8000, all_tables=<optimized out>) at /git/mysql-server/sql/sql_parse.cc:4625
#20 0x00000000005899c6 in mysql_execute_command (thd=thd@entry=0x7f71b7fa8000) at /git/mysql-server/sql/sql_parse.cc:2176
#21 0x0000000000590ff6 in mysql_parse (thd=thd@entry=0x7f71b7fa8000, rawbuf=<optimized out>, length=39, parser_state=parser_state@entry=0x7f724d4a4680) at /git/mysql-server/sql/sql_parse.cc:5780
#22 0x0000000000592843 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f71b7fa8000, packet=packet@entry=0x7f71b7f9ae41 "SELECT * FROM INFORMATION_SCHEMA.TABLES", packet_length=packet_length@entry=39) at /git/mysql-server/sql/sql_parse.cc:1038
#23 0x00000000005946cc in do_command (thd=0x7f71b7fa8000) at /git/mysql-server/sql/sql_parse.cc:773
#24 0x000000000063c978 in do_handle_one_connection (thd_arg=thd_arg@entry=0x7f71b7fa8000) at /git/mysql-server/sql/sql_connect.cc:862
#25 0x000000000063ca35 in handle_one_connection (arg=0x7f71b7fa8000) at /git/mysql-server/sql/sql_connect.cc:781
#26 0x00007f724ce8edc5 in start_thread (arg=0x7f724d4a5700) at pthread_create.c:308
#27 0x00007f724bf7521d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

How to repeat:
DROP DATABASE test;CREATE DATABASE test;USE test;
create TABLE t1(a int,b int)partition by LIST(a) subpartition by HASH(b) subpartitions 40 (partition p_0_long_partition_name values in(1),partition p_1_long_partition_name values in(2));
set global innodb_trx_rseg_n_slots_debug=1;
DROP TABLE t1;
CREATE TABLE t6(c1 INT UNSIGNED,c2 INT,c3 INT,c4 INT,c5 INT,c6 INT,c7 INT);
DROP TABLE t1,t2,t3,t4,t5,t6,t7,t8;
CREATE TABLE t2(c1 BINARY(50));
SELECT * FROM INFORMATION_SCHEMA.TABLES;
[17 May 2016 6:07] Roel Van de Paar
See bug 75913
[17 May 2016 6:08] Roel Van de Paar
See bug 74682
[17 May 2016 7:39] MySQL Verification Team
Hello Roel,

Thank you for the report and test case.
Observed that 5.5.49(also, 5.5.51 daily build) debug build is
affected.

Thanks,
Umesh
[17 May 2016 7:40] MySQL Verification Team
I'm not able to repeat this issue on 5.6.30/5.7.12 release/debug builds
with the provided test case.