Details
-
Bug
-
Status: Open
-
Medium
-
Resolution: Unresolved
-
8.0.16-7
-
None
-
None
-
None
Description
On a table with an index, if you perform an ALTER TABLE PARTITION BY RANGE with expand_fast_index_creation=1, the server crashes with the following stack trace:
stack_bottom = 7f85ca44cc00 thread_stack 0x46000stack_bottom = 7f85ca44cc00 thread_stack 0x46000/opt/percona_server/8.0.16/bin/mysqld(my_print_stacktrace(unsigned char*, unsigned long)+0x2e) [0x1e0e78e]/opt/percona_server/8.0.16/bin/mysqld(handle_fatal_signal+0x323) [0x10bc673]/lib64/libpthread.so.0(+0xf5d0) [0x7f85cdc045d0]/opt/percona_server/8.0.16/bin/mysqld(ha_innopart::prepare_inplace_alter_table(TABLE*, Alter_inplace_info*, dd::Table const*, dd::Table*)+0x3e7) [0x1faa237]/opt/percona_server/8.0.16/bin/mysqld(mysql_alter_table(THD*, char const*, char const*, HA_CREATE_INFO*, TABLE_LIST*, Alter_info*)+0x85a4)\[0x1024834]/opt/percona_server/8.0.16/bin/mysqld(Sql_cmd_alter_table::execute(THD*)+0x473) [0xf03993]/opt/percona_server/8.0.16/bin/mysqld(mysql_execute_command(THD*, bool)+0x33cb) [0xf85e3b]/opt/percona_server/8.0.16/bin/mysqld(mysql_parse(THD*, Parser_state*, bool)+0x3f7) [0xf887e7]/opt/percona_server/8.0.16/bin/mysqld(dispatch_command(THD*, COM_DATA const*, enum_server_command)+0x2dbb) [0xf8ba7b]/opt/percona_server/8.0.16/bin/mysqld(do_command(THD*)+0x21c) [0xf8c5cc]/opt/percona_server/8.0.16/bin/mysqld() [0x10adc60]/opt/percona_server/8.0.16/bin/mysqld() [0x1eb2a72]/lib64/libpthread.so.0(+0x7dd5) [0x7f85cdbfcdd5]/lib64/libc.so.6(clone+0x6d) [0x7f85cbdcc02d] Trying to get some variables. Some pointers may be invalid and cause the dump to abort. Query (7f8595069028): alter table test_crash partition by range (id) (PARTITION p_START VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION p_10 VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION p_END VALUES LESS THAN MAXVALUE ENGINE = InnoDB) Connection ID (thread ID): 8 Status: NOT_KILLED
Steps to reproduce:
mysql> create database test ;
mysql> use test ;
mysql> create table test_crash ( id int(10), key id1 (id)) ENGINE=InnoDB;
mysql> SET expand_fast_index_creation=1;
mysql> alter table test_crash partition by range (id) (PARTITION p_START VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION p_10 VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION p_END VALUES LESS THAN MAXVALUE ENGINE = InnoDB);
-- Crash