MariaDB 10.0 or 10.1 are not affected; they would report an error. But MariaDB 10.2 will crash if AUTO_INCREMENT is being set on a table whose data file has been discarded:
The FORCE variant did not crash MariaDB 10.2.
For now I will fix this in MariaDB 10.2 and later only.
Marko Mäkelä
added a comment - A variation of this test (with a server restart) does crash MariaDB 10.0, for both forms of ALGORITHM=INPLACE .
ALTER TABLE t1 AUTO_INCREMENT=1, ALGORITHM=INPLACE;
ALTER TABLE t1 AUTO_INCREMENT=1, FORCE , ALGORITHM=INPLACE;
The FORCE variant did not crash MariaDB 10.2.
For now I will fix this in MariaDB 10.2 and later only.
#7 0x00007f32bde09ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8 0x0000558b3534313f in buf_page_get_gen (page_id=..., page_size=..., rw_latch=1, guess=0x0, mode=10, file=0x558b357a6e48 "/data/src/10.2/storage/innobase/include/btr0pcur.ic", line=557, mtr=0x7f32b80e1170, err=0x7f32b80e0538) at /data/src/10.2/storage/innobase/buf/buf0buf.cc:4221
#9 0x0000558b3530e3f6 in btr_cur_open_at_index_side_func (from_left=false, index=0x7f326c14e2e8, latch_mode=1, cursor=0x7f32b80e1030, level=0, file=0x558b357a6e48 "/data/src/10.2/storage/innobase/include/btr0pcur.ic", line=557, mtr=0x7f32b80e1170) at /data/src/10.2/storage/innobase/btr/btr0cur.cc:2152
#10 0x0000558b3523cd8a in btr_pcur_open_at_index_side (from_left=false, index=0x7f326c14e2e8, latch_mode=1, pcur=0x7f32b80e1030, init_pcur=true, level=0, mtr=0x7f32b80e1170) at /data/src/10.2/storage/innobase/include/btr0pcur.ic:557
#11 0x0000558b3524a821 in row_search_get_max_rec (index=0x7f326c14e2e8, mtr=0x7f32b80e1170) at /data/src/10.2/storage/innobase/row/row0sel.cc:6022
#12 0x0000558b3524a944 in row_search_max_autoinc (index=0x7f326c14e2e8) at /data/src/10.2/storage/innobase/row/row0sel.cc:6057
#13 0x0000558b35112e00 in commit_set_autoinc (ha_alter_info=0x7f32b80e2610, ctx=0x7f326c0139b0, altered_table=0x7f326c1640b0, old_table=0x7f326c14f550) at /data/src/10.2/storage/innobase/handler/handler0alter.cc:7447
#14 0x0000558b351149e1 in ha_innobase::commit_inplace_alter_table (this=0x7f326c150158, altered_table=0x7f326c1640b0, ha_alter_info=0x7f32b80e2610, commit=true) at /data/src/10.2/storage/innobase/handler/handler0alter.cc:8618
#15 0x0000558b34dcbcd5 in handler::ha_commit_inplace_alter_table (this=0x7f326c150158, altered_table=0x7f326c1640b0, ha_alter_info=0x7f32b80e2610, commit=true) at /data/src/10.2/sql/handler.cc:4230
#16 0x0000558b34c1ee43 in mysql_inplace_alter_table (thd=0x7f326c000b00, table_list=0x7f326c012610, table=0x7f326c14f550, altered_table=0x7f326c1640b0, ha_alter_info=0x7f32b80e2610, inplace_supported=HA_ALTER_INPLACE_NO_LOCK_AFTER_PREPARE, target_mdl_request=0x7f32b80e2680, alter_ctx=0x7f32b80e3240) at /data/src/10.2/sql/sql_table.cc:7358
#17 0x0000558b34c24353 in mysql_alter_table (thd=0x7f326c000b00, new_db=0x7f326c012c20 "test", new_name=0x0, create_info=0x7f32b80e3e50, table_list=0x7f326c012610, alter_info=0x7f32b80e3da0, order_num=0, order=0x0, ignore=false) at /data/src/10.2/sql/sql_table.cc:9353
#18 0x0000558b34c9e0b2 in Sql_cmd_alter_table::execute (this=0x7f326c012c38, thd=0x7f326c000b00) at /data/src/10.2/sql/sql_alter.cc:324
#19 0x0000558b34b58e7e in mysql_execute_command (thd=0x7f326c000b00) at /data/src/10.2/sql/sql_parse.cc:6224
#20 0x0000558b34b5d846 in mysql_parse (thd=0x7f326c000b00, rawbuf=0x7f326c0124f8 "ALTER TABLE t1 AUTO_INCREMENT=1, ALGORITHM=INPLACE", length=50, parser_state=0x7f32b80e5200, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7924
#21 0x0000558b34b4b6db in dispatch_command (command=COM_QUERY, thd=0x7f326c000b00, packet=0x7f326c008951 "ALTER TABLE t1 AUTO_INCREMENT=1, ALGORITHM=INPLACE", packet_length=50, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1820
#22 0x0000558b34b4a03e in do_command (thd=0x7f326c000b00) at /data/src/10.2/sql/sql_parse.cc:1374
#23 0x0000558b34c98da4 in do_handle_one_connection (connect=0x558b371f2c50) at /data/src/10.2/sql/sql_connect.cc:1335
#24 0x0000558b34c98b31 in handle_one_connection (arg=0x558b371f2c50) at /data/src/10.2/sql/sql_connect.cc:1241
#25 0x0000558b350b96a8 in pfs_spawn_thread (arg=0x558b37156590) at /data/src/10.2/storage/perfschema/pfs.cc:1862
#26 0x00007f32bfae0494 in start_thread (arg=0x7f32b80e6700) at pthread_create.c:333
#27 0x00007f32bdec693f in clone () from /lib/x86_64-linux-gnu/libc.so.6
Elena Stepanova
added a comment - Adding stack trace to make it searchable.
The assertion is similar to MDEV-15752 , please check if they're related.
10.2 e44ca6cc9c3
mysqld: /data/src/10.2/storage/innobase/buf/buf0buf.cc:4221: buf_block_t* buf_page_get_gen(const page_id_t&, const page_size_t&, ulint, buf_block_t*, ulint, const char*, unsigned int, mtr_t*, dberr_t*): Assertion `found' failed.
180513 3:23:32 [ERROR] mysqld got signal 6 ;
#7 0x00007f32bde09ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8 0x0000558b3534313f in buf_page_get_gen (page_id=..., page_size=..., rw_latch=1, guess=0x0, mode=10, file=0x558b357a6e48 "/data/src/10.2/storage/innobase/include/btr0pcur.ic", line=557, mtr=0x7f32b80e1170, err=0x7f32b80e0538) at /data/src/10.2/storage/innobase/buf/buf0buf.cc:4221
#9 0x0000558b3530e3f6 in btr_cur_open_at_index_side_func (from_left=false, index=0x7f326c14e2e8, latch_mode=1, cursor=0x7f32b80e1030, level=0, file=0x558b357a6e48 "/data/src/10.2/storage/innobase/include/btr0pcur.ic", line=557, mtr=0x7f32b80e1170) at /data/src/10.2/storage/innobase/btr/btr0cur.cc:2152
#10 0x0000558b3523cd8a in btr_pcur_open_at_index_side (from_left=false, index=0x7f326c14e2e8, latch_mode=1, pcur=0x7f32b80e1030, init_pcur=true, level=0, mtr=0x7f32b80e1170) at /data/src/10.2/storage/innobase/include/btr0pcur.ic:557
#11 0x0000558b3524a821 in row_search_get_max_rec (index=0x7f326c14e2e8, mtr=0x7f32b80e1170) at /data/src/10.2/storage/innobase/row/row0sel.cc:6022
#12 0x0000558b3524a944 in row_search_max_autoinc (index=0x7f326c14e2e8) at /data/src/10.2/storage/innobase/row/row0sel.cc:6057
#13 0x0000558b35112e00 in commit_set_autoinc (ha_alter_info=0x7f32b80e2610, ctx=0x7f326c0139b0, altered_table=0x7f326c1640b0, old_table=0x7f326c14f550) at /data/src/10.2/storage/innobase/handler/handler0alter.cc:7447
#14 0x0000558b351149e1 in ha_innobase::commit_inplace_alter_table (this=0x7f326c150158, altered_table=0x7f326c1640b0, ha_alter_info=0x7f32b80e2610, commit=true) at /data/src/10.2/storage/innobase/handler/handler0alter.cc:8618
#15 0x0000558b34dcbcd5 in handler::ha_commit_inplace_alter_table (this=0x7f326c150158, altered_table=0x7f326c1640b0, ha_alter_info=0x7f32b80e2610, commit=true) at /data/src/10.2/sql/handler.cc:4230
#16 0x0000558b34c1ee43 in mysql_inplace_alter_table (thd=0x7f326c000b00, table_list=0x7f326c012610, table=0x7f326c14f550, altered_table=0x7f326c1640b0, ha_alter_info=0x7f32b80e2610, inplace_supported=HA_ALTER_INPLACE_NO_LOCK_AFTER_PREPARE, target_mdl_request=0x7f32b80e2680, alter_ctx=0x7f32b80e3240) at /data/src/10.2/sql/sql_table.cc:7358
#17 0x0000558b34c24353 in mysql_alter_table (thd=0x7f326c000b00, new_db=0x7f326c012c20 "test", new_name=0x0, create_info=0x7f32b80e3e50, table_list=0x7f326c012610, alter_info=0x7f32b80e3da0, order_num=0, order=0x0, ignore=false) at /data/src/10.2/sql/sql_table.cc:9353
#18 0x0000558b34c9e0b2 in Sql_cmd_alter_table::execute (this=0x7f326c012c38, thd=0x7f326c000b00) at /data/src/10.2/sql/sql_alter.cc:324
#19 0x0000558b34b58e7e in mysql_execute_command (thd=0x7f326c000b00) at /data/src/10.2/sql/sql_parse.cc:6224
#20 0x0000558b34b5d846 in mysql_parse (thd=0x7f326c000b00, rawbuf=0x7f326c0124f8 "ALTER TABLE t1 AUTO_INCREMENT=1, ALGORITHM=INPLACE", length=50, parser_state=0x7f32b80e5200, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7924
#21 0x0000558b34b4b6db in dispatch_command (command=COM_QUERY, thd=0x7f326c000b00, packet=0x7f326c008951 "ALTER TABLE t1 AUTO_INCREMENT=1, ALGORITHM=INPLACE", packet_length=50, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1820
#22 0x0000558b34b4a03e in do_command (thd=0x7f326c000b00) at /data/src/10.2/sql/sql_parse.cc:1374
#23 0x0000558b34c98da4 in do_handle_one_connection (connect=0x558b371f2c50) at /data/src/10.2/sql/sql_connect.cc:1335
#24 0x0000558b34c98b31 in handle_one_connection (arg=0x558b371f2c50) at /data/src/10.2/sql/sql_connect.cc:1241
#25 0x0000558b350b96a8 in pfs_spawn_thread (arg=0x558b37156590) at /data/src/10.2/storage/perfschema/pfs.cc:1862
#26 0x00007f32bfae0494 in start_thread (arg=0x7f32b80e6700) at pthread_create.c:333
#27 0x00007f32bdec693f in clone () from /lib/x86_64-linux-gnu/libc.so.6
Yes, MDEV-15752 is a similar assertion failure in buf_page_get_gen() but due to a completely different caller. The test case does not involve ALTER TABLE…AUTO_INCREMENT=….
Marko Mäkelä
added a comment - Yes, MDEV-15752 is a similar assertion failure in buf_page_get_gen() but due to a completely different caller. The test case does not involve ALTER TABLE…AUTO_INCREMENT=… .
People
Marko Mäkelä
Marko Mäkelä
Votes:
0Vote for this issue
Watchers:
2Start watching this issue
Dates
Created:
Updated:
Resolved:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
A variation of this test (with a server restart) does crash MariaDB 10.0, for both forms of ALGORITHM=INPLACE.
The FORCE variant did not crash MariaDB 10.2.
For now I will fix this in MariaDB 10.2 and later only.