Bug #76437 InnoDB: Failing assertion: !dict_index_is_spatial(index)
Submitted: 23 Mar 2015 0:32 Modified: 9 Apr 2015 20:08
Reporter: Roel Van de Paar Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: DDL Severity:S6 (Debug Builds)
Version:5.7.6, 5.7.8, 8.0.0 OS:Any
Assigned to: CPU Architecture:Any

[23 Mar 2015 0:32] Roel Van de Paar
Description:
InnoDB: Failing assertion: !dict_index_is_spatial(index)

+bt
#0  0x00007f672e92f771 in pthread_kill () from /lib64/libpthread.so.0
#1  0x00000000013a521c in my_write_core (sig=6) at /bzr/mysql-5.7.6-m16_dbg/mysys/stacktrace.c:247
#2  0x0000000000bb713c in handle_fatal_signal (sig=6) at /bzr/mysql-5.7.6-m16_dbg/sql/signal_handler.cc:220
#3  <signal handler called>
#4  0x00007f672d5335c9 in raise () from /lib64/libc.so.6
#5  0x00007f672d534cd8 in abort () from /lib64/libc.so.6
#6  0x00000000016c790b in ut_dbg_assertion_failed (expr=0x1c6d0d7 "!dict_index_is_spatial(index)", file=0x1c6c6b8 "/bzr/mysql-5.7.6-m16_dbg/storage/innobase/btr/btr0cur.cc", line=2573) at /bzr/mysql-5.7.6-m16_dbg/storage/innobase/ut/ut0dbg.cc:67
#7  0x00000000016f7393 in btr_cur_open_at_rnd_pos_func (index=0x7f67247faf98, latch_mode=1, cursor=0x7f672ef22690, file=0x1c6c6b8 "/bzr/mysql-5.7.6-m16_dbg/storage/innobase/btr/btr0cur.cc", line=5851, mtr=0x7f672ef22720) at /bzr/mysql-5.7.6-m16_dbg/storage/innobase/btr/btr0cur.cc:2573
#8  0x00000000016fecbc in btr_estimate_number_of_different_key_vals (index=0x7f67247faf98) at /bzr/mysql-5.7.6-m16_dbg/storage/innobase/btr/btr0cur.cc:5851
#9  0x000000000178d03e in dict_stats_update_transient_for_index (index=0x7f67247faf98) at /bzr/mysql-5.7.6-m16_dbg/storage/innobase/dict/dict0stats.cc:859
#10 0x000000000179115b in dict_stats_update_for_index (index=0x7f67247faf98) at /bzr/mysql-5.7.6-m16_dbg/storage/innobase/dict/dict0stats.cc:3032
#11 0x0000000001510e4d in alter_stats_norebuild (ha_alter_info=0x7f672ef24900, ctx=0x7f668a896020, altered_table=0x7f672c899a10, table_name=0x7f668a8af39d "tab", thd=0x7f668a81a000) at /bzr/mysql-5.7.6-m16_dbg/storage/innobase/handler/handler0alter.cc:6166
#12 0x0000000001512ded in ha_innobase::commit_inplace_alter_table (this=0x7f668a8af820, altered_table=0x7f672c899a10, ha_alter_info=0x7f672ef24900, commit=true) at /bzr/mysql-5.7.6-m16_dbg/storage/innobase/handler/handler0alter.cc:6855
#13 0x0000000000c1e2ef in handler::ha_commit_inplace_alter_table (this=0x7f668a8af820, altered_table=0x7f672c899a10, ha_alter_info=0x7f672ef24900, commit=true) at /bzr/mysql-5.7.6-m16_dbg/sql/handler.cc:4389
#14 0x0000000001132ce0 in mysql_inplace_alter_table (thd=0x7f668a81a000, table_list=0x7f668a82c9d0, table=0x7f668a860610, altered_table=0x7f672c899a10, ha_alter_info=0x7f672ef24900, inplace_supported=HA_ALTER_INPLACE_SHARED_LOCK_AFTER_PREPARE, target_mdl_request=0x7f672ef24340, alter_ctx=0x7f672ef24e80) at /bzr/mysql-5.7.6-m16_dbg/sql/sql_table.cc:6982
#15 0x0000000001137424 in mysql_alter_table (thd=0x7f668a81a000, new_db=0x7f668a82cf48 "test", new_name=0x7f668a82c998 "tab", create_info=0x7f672ef26280, table_list=0x7f668a82c9d0, alter_info=0x7f672ef25d00) at /bzr/mysql-5.7.6-m16_dbg/sql/sql_table.cc:8882
#16 0x00000000010a4d41 in mysql_execute_command (thd=0x7f668a81a000) at /bzr/mysql-5.7.6-m16_dbg/sql/sql_parse.cc:2950
#17 0x00000000010aae7a in mysql_parse (thd=0x7f668a81a000, parser_state=0x7f672ef26e00) at /bzr/mysql-5.7.6-m16_dbg/sql/sql_parse.cc:5129
#18 0x00000000010a0bd4 in dispatch_command (command=COM_QUERY, thd=0x7f668a81a000, packet=0x7f668a846011 "CREATE SPATIAL INDEX idx2 ON tab(c2 ASC)", packet_length=40) at /bzr/mysql-5.7.6-m16_dbg/sql/sql_parse.cc:1249
#19 0x000000000109f925 in do_command (thd=0x7f668a81a000) at /bzr/mysql-5.7.6-m16_dbg/sql/sql_parse.cc:835
#20 0x00000000011c2fd9 in handle_connection (arg=0x7f67257f78c0) at /bzr/mysql-5.7.6-m16_dbg/sql/conn_handler/connection_handler_per_thread.cc:298
#21 0x00000000013d2299 in pfs_spawn_thread (arg=0x7f67267b2d50) at /bzr/mysql-5.7.6-m16_dbg/storage/perfschema/pfs.cc:2147
#22 0x00007f672e92adf3 in start_thread () from /lib64/libpthread.so.0
#23 0x00007f672d5f41ad in clone () from /lib64/libc.so.6

How to repeat:
DROP DATABASE test;CREATE DATABASE test;USE test;
CREATE TABLE tab(c1 int KEY,c2 POINT NOT NULL,c3 LINESTRING NOT NULL,c4 POLYGON NOT NULL,c5 GEOMETRY NOT NULL);
DROP TABLE mysql.innodb_table_stats;
CREATE SPATIAL INDEX idx2 ON tab(c2 ASC);
[23 Mar 2015 8:47] MySQL Verification Team
Hello Roel,

Thank you for the report and test case.
Confirmed that 5.7.6, 5.7.8 and 5.8.0 debug builds are affected.

Thanks,
Umesh
[23 Mar 2015 8:47] MySQL Verification Team
// 5.7.6 - only debug build affected

bin/mysql_install_db --basedir=/export/umesh/mysql-5.7.6 --datadir=/export/umesh/mysql-5.7.6/76437 -v
bin/mysqld-debug --basedir=/export/umesh/mysql-5.7.6 --datadir=/export/umesh/mysql-5.7.6/76437 --sql_mode=ONLY_FULL_GROUP_BY --core-file --socket=/tmp/mysql_ushastry.sock  --port=15000 --log-error=/export/umesh/mysql-5.7.6/76437/log.err 2>&1 &

- build

commit: e1298eb6a8e2247361533811930a07fde7aff618
date: 2015-02-26 15:29:31 +0100
build-date: 2015-02-26 15:35:58 +0100
short: e1298eb
branch: mysql-5.7.6-m16-release

MySQL source 5.7.6

(gdb) bt
#0  0x00007faffd94b771 in pthread_kill () from /lib64/libpthread.so.0
#1  0x00000000013ee069 in my_write_core (sig=6) at /export/home/pb2/build/sb_0-14552753-1424962715.41/mysql-5.7.6-m16/mysys/stacktrace.c:247
#2  0x0000000000bdeba0 in handle_fatal_signal (sig=6) at /export/home/pb2/build/sb_0-14552753-1424962715.41/mysql-5.7.6-m16/sql/signal_handler.cc:220
#3  <signal handler called>
#4  0x00007faffc5515c9 in raise () from /lib64/libc.so.6
#5  0x00007faffc552cd8 in abort () from /lib64/libc.so.6
#6  0x000000000160d6bb in ut_dbg_assertion_failed (expr=0x1c9ce9f "!dict_index_is_spatial(index)",
    file=0x1c9c4f0 "/export/home/pb2/build/sb_0-14552753-1424962715.41/mysql-5.7.6-m16/storage/innobase/btr/btr0cur.cc", line=2573)
    at /export/home/pb2/build/sb_0-14552753-1424962715.41/mysql-5.7.6-m16/storage/innobase/ut/ut0dbg.cc:67
#7  0x000000000163dacc in btr_cur_open_at_rnd_pos_func (index=0x7faf88044fc8, latch_mode=1, cursor=0x7fafe5ad48b0,
    file=0x1c9c4f0 "/export/home/pb2/build/sb_0-14552753-1424962715.41/mysql-5.7.6-m16/storage/innobase/btr/btr0cur.cc", line=5851, mtr=0x7fafe5ad43a0)
    at /export/home/pb2/build/sb_0-14552753-1424962715.41/mysql-5.7.6-m16/storage/innobase/btr/btr0cur.cc:2573
#8  0x00000000016455d4 in btr_estimate_number_of_different_key_vals (index=0x7faf88044fc8)
    at /export/home/pb2/build/sb_0-14552753-1424962715.41/mysql-5.7.6-m16/storage/innobase/btr/btr0cur.cc:5851
#9  0x00000000016d4572 in dict_stats_update_transient_for_index (index=0x7faf88044fc8)
    at /export/home/pb2/build/sb_0-14552753-1424962715.41/mysql-5.7.6-m16/storage/innobase/dict/dict0stats.cc:859
#10 0x00000000016d8735 in dict_stats_update_for_index (index=0x7faf88044fc8) at /export/home/pb2/build/sb_0-14552753-1424962715.41/mysql-5.7.6-m16/storage/innobase/dict/dict0stats.cc:3032
#11 0x00000000014558ed in alter_stats_norebuild (ha_alter_info=0x7fafe5ad6f10, ctx=0x7faf88040950, altered_table=0x7faf8801a2c0, table_name=0x7faf8801d5cd "tab", thd=0x7faf88000bb0)
    at /export/home/pb2/build/sb_0-14552753-1424962715.41/mysql-5.7.6-m16/storage/innobase/handler/handler0alter.cc:6166
#12 0x00000000014579c0 in ha_innobase::commit_inplace_alter_table (this=0x7faf8801c470, altered_table=0x7faf8801a2c0, ha_alter_info=0x7fafe5ad6f10, commit=true)
    at /export/home/pb2/build/sb_0-14552753-1424962715.41/mysql-5.7.6-m16/storage/innobase/handler/handler0alter.cc:6855
#13 0x0000000000c465e8 in handler::ha_commit_inplace_alter_table (this=0x7faf8801c470, altered_table=0x7faf8801a2c0, ha_alter_info=0x7fafe5ad6f10, commit=true)
    at /export/home/pb2/build/sb_0-14552753-1424962715.41/mysql-5.7.6-m16/sql/handler.cc:4389
#14 0x0000000001173151 in mysql_inplace_alter_table (thd=0x7faf88000bb0, table_list=0x7faf88005bd0, table=0x7faf8803f8e0, altered_table=0x7faf8801a2c0, ha_alter_info=0x7fafe5ad6f10,
    inplace_supported=HA_ALTER_INPLACE_SHARED_LOCK_AFTER_PREPARE, target_mdl_request=0x7fafe5ad7890, alter_ctx=0x7fafe5ad6470)
    at /export/home/pb2/build/sb_0-14552753-1424962715.41/mysql-5.7.6-m16/sql/sql_table.cc:6982
#15 0x0000000001177ade in mysql_alter_table (thd=0x7faf88000bb0, new_db=0x7faf88006148 "test", new_name=0x7faf88005b98 "tab", create_info=0x7fafe5ad83c0, table_list=0x7faf88005bd0,
    alter_info=0x7fafe5ad7dd0) at /export/home/pb2/build/sb_0-14552753-1424962715.41/mysql-5.7.6-m16/sql/sql_table.cc:8882
#16 0x00000000010e3104 in mysql_execute_command (thd=0x7faf88000bb0) at /export/home/pb2/build/sb_0-14552753-1424962715.41/mysql-5.7.6-m16/sql/sql_parse.cc:2950
#17 0x00000000010e9a6f in mysql_parse (thd=0x7faf88000bb0, parser_state=0x7fafe5ad95d0) at /export/home/pb2/build/sb_0-14552753-1424962715.41/mysql-5.7.6-m16/sql/sql_parse.cc:5129
#18 0x00000000010debc8 in dispatch_command (command=COM_QUERY, thd=0x7faf88000bb0, packet=0x7faf88009ce1 "CREATE SPATIAL INDEX idx2 ON tab(c2 ASC)", packet_length=40)
    at /export/home/pb2/build/sb_0-14552753-1424962715.41/mysql-5.7.6-m16/sql/sql_parse.cc:1249
#19 0x00000000010dd693 in do_command (thd=0x7faf88000bb0) at /export/home/pb2/build/sb_0-14552753-1424962715.41/mysql-5.7.6-m16/sql/sql_parse.cc:835
#20 0x000000000120444f in handle_connection (arg=0x35d2720) at /export/home/pb2/build/sb_0-14552753-1424962715.41/mysql-5.7.6-m16/sql/conn_handler/connection_handler_per_thread.cc:298
#21 0x00000000017770f1 in pfs_spawn_thread (arg=0x35c5900) at /export/home/pb2/build/sb_0-14552753-1424962715.41/mysql-5.7.6-m16/storage/perfschema/pfs.cc:2147
#22 0x00007faffd946df3 in start_thread () from /lib64/libpthread.so.0
#23 0x00007faffc61247d in clone () from /lib64/libc.so.6
(gdb)
[23 Mar 2015 8:48] MySQL Verification Team
// 5.7.8 only debug build affected

bin/mysql_install_db --basedir=/export/umesh/mysql-5.7.8 --datadir=/export/umesh/mysql-5.7.8/76437 -v
bin/mysqld-debug --basedir=/export/umesh/mysql-5.7.8 --datadir=/export/umesh/mysql-5.7.8/76437 --sql_mode=ONLY_FULL_GROUP_BY --core-file --socket=/tmp/mysql_ushastry.sock  --port=15000 --log-error=/export/umesh/mysql-5.7.8/76437/log.err 2>&1 &

- build

commit: 91153f3385c4917a215aa4c7818b3f6265608286
date: 2015-03-20 14:48:27 +0100
build-date: 2015-03-20 18:03:24 +0100
short: 91153f3
branch: mysql-5.7

MySQL source 5.7.8

(gdb) bt
#0  0x00007fe43b9e6771 in pthread_kill () from /lib64/libpthread.so.0
#1  0x00000000018c6688 in my_write_core (sig=6) at /export/home3/pb2/build/sb_0-14765270-1426872165.51/mysqlcom-pro-5.7.8-rc/mysys/stacktrace.c:247
#2  0x0000000000f4b39e in handle_fatal_signal (sig=6) at /export/home3/pb2/build/sb_0-14765270-1426872165.51/mysqlcom-pro-5.7.8-rc/sql/signal_handler.cc:220
#3  <signal handler called>
#4  0x00007fe43a5ec5c9 in raise () from /lib64/libc.so.6
#5  0x00007fe43a5edcd8 in abort () from /lib64/libc.so.6
#6  0x0000000001ae4b43 in ut_dbg_assertion_failed (expr=0x229dbcf "!dict_index_is_spatial(index)",
    file=0x229d180 "/export/home3/pb2/build/sb_0-14765270-1426872165.51/mysqlcom-pro-5.7.8-rc/storage/innobase/btr/btr0cur.cc", line=2573)
    at /export/home3/pb2/build/sb_0-14765270-1426872165.51/mysqlcom-pro-5.7.8-rc/storage/innobase/ut/ut0dbg.cc:67
#7  0x0000000001b145eb in btr_cur_open_at_rnd_pos_func (index=0x7fe3b403b7b8, latch_mode=1, cursor=0x7fe43020a6b0,
    file=0x229d180 "/export/home3/pb2/build/sb_0-14765270-1426872165.51/mysqlcom-pro-5.7.8-rc/storage/innobase/btr/btr0cur.cc", line=6004, mtr=0x7fe43020a740)
    at /export/home3/pb2/build/sb_0-14765270-1426872165.51/mysqlcom-pro-5.7.8-rc/storage/innobase/btr/btr0cur.cc:2573
#8  0x0000000001b1c1da in btr_estimate_number_of_different_key_vals (index=0x7fe3b403b7b8)
    at /export/home3/pb2/build/sb_0-14765270-1426872165.51/mysqlcom-pro-5.7.8-rc/storage/innobase/btr/btr0cur.cc:6004
#9  0x0000000001baa6be in dict_stats_update_transient_for_index (index=0x7fe3b403b7b8)
    at /export/home3/pb2/build/sb_0-14765270-1426872165.51/mysqlcom-pro-5.7.8-rc/storage/innobase/dict/dict0stats.cc:859
#10 0x0000000001bae7db in dict_stats_update_for_index (index=0x7fe3b403b7b8)
    at /export/home3/pb2/build/sb_0-14765270-1426872165.51/mysqlcom-pro-5.7.8-rc/storage/innobase/dict/dict0stats.cc:3032
#11 0x000000000192d33d in alter_stats_norebuild (ha_alter_info=0x7fe43020c920, ctx=0x7fe3b4037060, altered_table=0x7fe3b402aae0, table_name=0x7fe3b403291d "tab", thd=0x7fe3b4000bb0)
    at /export/home3/pb2/build/sb_0-14765270-1426872165.51/mysqlcom-pro-5.7.8-rc/storage/innobase/handler/handler0alter.cc:6170
#12 0x000000000192f2dd in ha_innobase::commit_inplace_alter_table (this=0x7fe3b400ff70, altered_table=0x7fe3b402aae0, ha_alter_info=0x7fe43020c920, commit=true)
    at /export/home3/pb2/build/sb_0-14765270-1426872165.51/mysqlcom-pro-5.7.8-rc/storage/innobase/handler/handler0alter.cc:6859
#13 0x0000000000fb74ed in handler::ha_commit_inplace_alter_table (this=0x7fe3b400ff70, altered_table=0x7fe3b402aae0, ha_alter_info=0x7fe43020c920, commit=true)
    at /export/home3/pb2/build/sb_0-14765270-1426872165.51/mysqlcom-pro-5.7.8-rc/sql/handler.cc:4457
#14 0x000000000164f66c in mysql_inplace_alter_table (thd=0x7fe3b4000bb0, table_list=0x7fe3b4005cb8, table=0x7fe3b402a170, altered_table=0x7fe3b402aae0, ha_alter_info=0x7fe43020c920,
    inplace_supported=HA_ALTER_INPLACE_SHARED_LOCK_AFTER_PREPARE, target_mdl_request=0x7fe43020c360, alter_ctx=0x7fe43020ceb0)
    at /export/home3/pb2/build/sb_0-14765270-1426872165.51/mysqlcom-pro-5.7.8-rc/sql/sql_table.cc:6998
#15 0x0000000001653db5 in mysql_alter_table (thd=0x7fe3b4000bb0, new_db=0x7fe3b4006240 "test", new_name=0x7fe3b4005c80 "tab", create_info=0x7fe43020e2c0, table_list=0x7fe3b4005cb8,
    alter_info=0x7fe43020dd30) at /export/home3/pb2/build/sb_0-14765270-1426872165.51/mysqlcom-pro-5.7.8-rc/sql/sql_table.cc:8899
#16 0x00000000015c154c in mysql_execute_command (thd=0x7fe3b4000bb0) at /export/home3/pb2/build/sb_0-14765270-1426872165.51/mysqlcom-pro-5.7.8-rc/sql/sql_parse.cc:2968
#17 0x00000000015c78b1 in mysql_parse (thd=0x7fe3b4000bb0, parser_state=0x7fe43020ee50) at /export/home3/pb2/build/sb_0-14765270-1426872165.51/mysqlcom-pro-5.7.8-rc/sql/sql_parse.cc:5201
#18 0x00000000015bd46c in dispatch_command (thd=0x7fe3b4000bb0, com_data=0x7fe43020fe00, command=COM_QUERY)
    at /export/home3/pb2/build/sb_0-14765270-1426872165.51/mysqlcom-pro-5.7.8-rc/sql/sql_parse.cc:1280
#19 0x00000000015bc0bf in do_command (thd=0x7fe3b4000bb0) at /export/home3/pb2/build/sb_0-14765270-1426872165.51/mysqlcom-pro-5.7.8-rc/sql/sql_parse.cc:851
#20 0x00000000016e052e in handle_connection (arg=0x4d97130) at /export/home3/pb2/build/sb_0-14765270-1426872165.51/mysqlcom-pro-5.7.8-rc/sql/conn_handler/connection_handler_per_thread.cc:299
#21 0x0000000001ce1375 in pfs_spawn_thread (arg=0x4cb95d0) at /export/home3/pb2/build/sb_0-14765270-1426872165.51/mysqlcom-pro-5.7.8-rc/storage/perfschema/pfs.cc:2147
#22 0x00007fe43b9e1df3 in start_thread () from /lib64/libpthread.so.0
#23 0x00007fe43a6ad47d in clone () from /lib64/libc.so.6
(gdb)
[23 Mar 2015 8:48] MySQL Verification Team
// 5.8.0 only debug build affected

bin/mysql_install_db --basedir=/export/umesh/mysql-5.8.0 --datadir=/export/umesh/mysql-5.8.0/76437 -v
bin/mysqld-debug --basedir=/export/umesh/mysql-5.8.0 --datadir=/export/umesh/mysql-5.8.0/76437 --core-file --socket=/tmp/mysql_ushastry.sock  --port=15000 --log-error=/export/umesh/mysql-5.8.0/76437/log.err 2>&1 &

- build

commit: b48798db34fbcaf5dbb5c8ae7ef738afeb60eccc
date: 2015-03-20 14:52:33 +0100
build-date: 2015-03-20 17:03:10 +0100
short: b48798d
branch: mysql-trunk

MySQL source 5.8.0
(gdb) bt
#0  0x00007fce8c75e771 in pthread_kill () from /lib64/libpthread.so.0
#1  0x00000000018b3108 in my_write_core (sig=6) at /export/home3/pb2/build/sb_0-14764689-1426868485.86/mysqlcom-pro-5.8.0-m17/mysys/stacktrace.c:247
#2  0x0000000000f3d9fb in handle_fatal_signal (sig=6) at /export/home3/pb2/build/sb_0-14764689-1426868485.86/mysqlcom-pro-5.8.0-m17/sql/signal_handler.cc:221
#3  <signal handler called>
#4  0x00007fce8b3645c9 in raise () from /lib64/libc.so.6
#5  0x00007fce8b365cd8 in abort () from /lib64/libc.so.6
#6  0x0000000001af2303 in ut_dbg_assertion_failed (expr=0x228b31f "!dict_index_is_spatial(index)",
    file=0x228a8d0 "/export/home3/pb2/build/sb_0-14764689-1426868485.86/mysqlcom-pro-5.8.0-m17/storage/innobase/btr/btr0cur.cc", line=2573)
    at /export/home3/pb2/build/sb_0-14764689-1426868485.86/mysqlcom-pro-5.8.0-m17/storage/innobase/ut/ut0dbg.cc:67
#7  0x0000000001b21e07 in btr_cur_open_at_rnd_pos_func (index=0x7fce0803ab48, latch_mode=1, cursor=0x7fce80f826b0,
    file=0x228a8d0 "/export/home3/pb2/build/sb_0-14764689-1426868485.86/mysqlcom-pro-5.8.0-m17/storage/innobase/btr/btr0cur.cc", line=6004, mtr=0x7fce80f82740)
    at /export/home3/pb2/build/sb_0-14764689-1426868485.86/mysqlcom-pro-5.8.0-m17/storage/innobase/btr/btr0cur.cc:2573
#8  0x0000000001b299f6 in btr_estimate_number_of_different_key_vals (index=0x7fce0803ab48)
    at /export/home3/pb2/build/sb_0-14764689-1426868485.86/mysqlcom-pro-5.8.0-m17/storage/innobase/btr/btr0cur.cc:6004
#9  0x0000000001bb7da6 in dict_stats_update_transient_for_index (index=0x7fce0803ab48)
    at /export/home3/pb2/build/sb_0-14764689-1426868485.86/mysqlcom-pro-5.8.0-m17/storage/innobase/dict/dict0stats.cc:859
#10 0x0000000001bbbec3 in dict_stats_update_for_index (index=0x7fce0803ab48)
    at /export/home3/pb2/build/sb_0-14764689-1426868485.86/mysqlcom-pro-5.8.0-m17/storage/innobase/dict/dict0stats.cc:3032
#11 0x000000000193b8c1 in alter_stats_norebuild (ha_alter_info=0x7fce80f84920, ctx=0x7fce08036a70, altered_table=0x7fce0802b210, table_name=0x7fce0804f0dd "tab", thd=0x7fce08000bb0)
    at /export/home3/pb2/build/sb_0-14764689-1426868485.86/mysqlcom-pro-5.8.0-m17/storage/innobase/handler/handler0alter.cc:6170
#12 0x000000000193d861 in ha_innobase::commit_inplace_alter_table (this=0x7fce08010b10, altered_table=0x7fce0802b210, ha_alter_info=0x7fce80f84920, commit=true)
    at /export/home3/pb2/build/sb_0-14764689-1426868485.86/mysqlcom-pro-5.8.0-m17/storage/innobase/handler/handler0alter.cc:6859
#13 0x0000000000fac54b in handler::ha_commit_inplace_alter_table (this=0x7fce08010b10, altered_table=0x7fce0802b210, ha_alter_info=0x7fce80f84920, commit=true)
    at /export/home3/pb2/build/sb_0-14764689-1426868485.86/mysqlcom-pro-5.8.0-m17/sql/handler.cc:4467
#14 0x0000000001638574 in mysql_inplace_alter_table (thd=0x7fce08000bb0, table_list=0x7fce08005cb8, table=0x7fce0800ddd0, altered_table=0x7fce0802b210, ha_alter_info=0x7fce80f84920,
    inplace_supported=HA_ALTER_INPLACE_SHARED_LOCK_AFTER_PREPARE, target_mdl_request=0x7fce80f84360, alter_ctx=0x7fce80f84eb0)
    at /export/home3/pb2/build/sb_0-14764689-1426868485.86/mysqlcom-pro-5.8.0-m17/sql/sql_table.cc:7002
#15 0x000000000163ccb6 in mysql_alter_table (thd=0x7fce08000bb0, new_db=0x7fce08006240 "test", new_name=0x7fce08005c80 "tab", create_info=0x7fce80f862c0, table_list=0x7fce08005cb8,
    alter_info=0x7fce80f85d30) at /export/home3/pb2/build/sb_0-14764689-1426868485.86/mysqlcom-pro-5.8.0-m17/sql/sql_table.cc:8903
#16 0x00000000015aa78f in mysql_execute_command (thd=0x7fce08000bb0) at /export/home3/pb2/build/sb_0-14764689-1426868485.86/mysqlcom-pro-5.8.0-m17/sql/sql_parse.cc:2938
#17 0x00000000015b0a1d in mysql_parse (thd=0x7fce08000bb0, parser_state=0x7fce80f86e50) at /export/home3/pb2/build/sb_0-14764689-1426868485.86/mysqlcom-pro-5.8.0-m17/sql/sql_parse.cc:5158
#18 0x00000000015a66e6 in dispatch_command (thd=0x7fce08000bb0, com_data=0x7fce80f87e00, command=COM_QUERY)
    at /export/home3/pb2/build/sb_0-14764689-1426868485.86/mysqlcom-pro-5.8.0-m17/sql/sql_parse.cc:1245
#19 0x00000000015a5335 in do_command (thd=0x7fce08000bb0) at /export/home3/pb2/build/sb_0-14764689-1426868485.86/mysqlcom-pro-5.8.0-m17/sql/sql_parse.cc:814
#20 0x00000000016ca436 in handle_connection (arg=0x47732d0) at /export/home3/pb2/build/sb_0-14764689-1426868485.86/mysqlcom-pro-5.8.0-m17/sql/conn_handler/connection_handler_per_thread.cc:300
#21 0x0000000001c59c8d in pfs_spawn_thread (arg=0x4695770) at /export/home3/pb2/build/sb_0-14764689-1426868485.86/mysqlcom-pro-5.8.0-m17/storage/perfschema/pfs.cc:2147
#22 0x00007fce8c759df3 in start_thread () from /lib64/libpthread.so.0
#23 0x00007fce8b42547d in clone () from /lib64/libc.so.6
(gdb)
[9 Apr 2015 6:07] Allen Lai
Posted by developer:
 
The assertion is in function btr_cur_open_at_rnd_pos_func.
Since mysql.innodb_table_stats is dropped, so, server call this function to get transint stats instead.
We should return false when index is spatial index.
[9 Apr 2015 20:08] Daniel Price
Posted by developer:
 
Fixed as of the upcoming 5.7.8, 5.8.0 releases, and here's the changelog entry:

In debug builds, attempting to create a spatial index after dropping the
"mysql.innodb_table_stats" table raised an assertion in the
"btr_cur_open_at_rnd_pos_func" function. 

Thank you for the bug report.
[18 Jun 2016 21:25] Omer Barnir
Posted by developer:
 
Reported version value updated to reflect release name change from 5.8 to 8.0