I can confirm that my previous MTR based replay test (in MDEV-14865.tgz) using a
|
ALTER TABLE t1 ADD INDEX idx1 ( col1 ) ; (quite similar to the ALTER TABLE t1 ADD UNIQUE KEY uidx ( col1 ) mentioned on top of report
|
CHECK TABLE t1 ;
|
DROP INDEX idx1 ON t1 ;
|
does no more replay the assert on MariaDB 10.2 32eeed21297f0e5a2836daca058e38dbe3a82bc4 2018-12-17.
|
But another sequence (three connections run the sequence concurrent)
|
ALTER TABLE t1 CHANGE COLUMN col1 col1_copy INT ;
|
ALTER TABLE t1 CHANGE COLUMN col1_copy col1 INT ;
|
CHECK TABLE t1 ;
|
shows the same assert (example from MariaDB 10.2 32eeed21297f0e5a2836daca058e38dbe3a82bc4)
|
Version: '10.2.20-MariaDB-debug-log' socket: ...
|
mysqld: storage/maria/ma_close.c:184: maria_close: Assertion `share->now_transactional == share->base.born_transactional' failed.
|
...
|
ALTER TABLE t1 CHANGE COLUMN col1 col1_copy INT;
|
Connection ID (thread ID): 7
|
Status: NOT_KILLED
|
...
|
#3 <signal handler called>
|
#4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
|
#5 0x00007f8d011d2f5d in __GI_abort () at abort.c:90
|
#6 0x00007f8d011c8f17 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x56103485e210 "share->now_transactional == share->base.born_transactional", file=file@entry=0x56103485e008 "storage/maria/ma_close.c", line=line@entry=184, function=function@entry=0x56103485e288 <__PRETTY_FUNCTION__.15976> "maria_close") at assert.c:92
|
#7 0x00007f8d011c8fc2 in __GI___assert_fail (assertion=0x56103485e210 "share->now_transactional == share->base.born_transactional", file=0x56103485e008 "storage/maria/ma_close.c", line=184, function=0x56103485e288 <__PRETTY_FUNCTION__.15976> "maria_close") at assert.c:101
|
#8 0x00005610343c42c6 in maria_close (info=0x7f8cdc01b158) at storage/maria/ma_close.c:184
|
#9 0x000056103433fd2c in ha_maria::close (this=0x7f8cdc01a3a0) at storage/maria/ha_maria.cc:1274
|
#10 0x0000561033d9b3f5 in handler::ha_close (this=0x7f8cdc01a3a0) at sql/handler.cc:2567
|
#11 0x0000561033c23a77 in closefrm (table=0x7f8cdc019808) at sql/table.cc:3448
|
#12 0x0000561033d0d860 in intern_close_table (table=0x7f8cdc019808) at sql/table_cache.cc:222
|
#13 0x0000561033d0da00 in tc_remove_table (table=0x7f8cdc019808) at sql/table_cache.cc:260
|
#14 0x0000561033d0e24c in tc_release_table (table=0x7f8cdc019808) at sql/table_cache.cc:461
|
#15 0x0000561033aaaa89 in close_thread_table (thd=0x7f8cdc000ce8, table_ptr=0x7f8cdc000dc8) at sql/sql_base.cc:903
|
#16 0x0000561033aaa3e0 in close_all_tables_for_name (thd=0x7f8cdc000ce8, share=0x7f8ce4017d40, extra=HA_EXTRA_NOT_USED, skip_table=0x0) at sql/sql_base.cc:677
|
#17 0x0000561033beee4b in mysql_inplace_alter_table (thd=0x7f8cdc000ce8, table_list=0x7f8cdc010888, table=0x7f8cdc019808, altered_table=0x7f8cdc021e98, ha_alter_info=0x7f8cfc3665e0, inplace_supported=HA_ALTER_INPLACE_NO_LOCK, target_mdl_request=0x7f8cfc366650, alter_ctx=0x7f8cfc367210) at sql/sql_table.cc:7398
|
#18 0x0000561033bf4305 in mysql_alter_table (thd=0x7f8cdc000ce8, new_db=0x7f8cdc010e98 "test", new_name=0x0, create_info=0x7f8cfc367e30, table_list=0x7f8cdc010888, alter_info=0x7f8cfc367d80, order_num=0, order=0x0, ignore=false) at sql/sql_table.cc:9390
|
#19 0x0000561033c6ec70 in Sql_cmd_alter_table::execute (this=0x7f8cdc010f98, thd=0x7f8cdc000ce8) at sql/sql_alter.cc:323
|
#20 0x0000561033b272e2 in mysql_execute_command (thd=0x7f8cdc000ce8) at sql/sql_parse.cc:6227
|
#21 0x0000561033b2c42e in mysql_parse (thd=0x7f8cdc000ce8, rawbuf=0x7f8cdc010780 "ALTER TABLE t1 CHANGE COLUMN col1 col1_copy INT", length=47, parser_state=0x7f8cfc3691f0, is_com_multi=false, is_next_command=false) at sql/sql_parse.cc:8014
|
#22 0x0000561033b19aaf in dispatch_command (command=COM_QUERY, thd=0x7f8cdc000ce8, packet=0x7f8cdc008469 "ALTER TABLE t1 CHANGE COLUMN col1 col1_copy INT ", packet_length=48, is_com_multi=false, is_next_command=false) at sql/sql_parse.cc:1824
|
#23 0x0000561033b1844d in do_command (thd=0x7f8cdc000ce8) at sql/sql_parse.cc:1378
|
#24 0x0000561033c69937 in do_handle_one_connection (connect=0x5610368f79c8) at sql/sql_connect.cc:1335
|
#25 0x0000561033c696b7 in handle_one_connection (arg=0x5610368f79c8) at sql/sql_connect.cc:1241
|
#26 0x000056103449b303 in pfs_spawn_thread (arg=0x561036940928) at storage/perfschema/pfs.cc:1862
|
#27 0x00007f8d01e747fc in start_thread (arg=0x7f8cfc36a700) at pthread_create.c:465
|
#28 0x00007f8d012aeb5f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
|
Sequences showing the same problem most probably from same reason
|
ALTER TABLE t1 ADD COLUMN col2 INT ;
|
ALTER TABLE t1 DROP COLUMN col2 ;
|
CHECK TABLE t1 ;
|
---
|
ALTER TABLE t1 MODIFY COLUMN col2 BIGINT;
|
ALTER TABLE t1 MODIFY COLUMN col2 INT;
|
CHECK TABLE t1 ;
|
----
|
ALTER TABLE t1 MODIFY COLUMN col2 INT FIRST;
|
ALTER TABLE t1 MODIFY COLUMN col2 INT AFTER col1;
|
CHECK TABLE t1 ;
|
----
|
ALTER TABLE t1 ALTER COLUMN col2 SET DEFAULT NULL;
|
ALTER TABLE t1 ALTER COLUMN col2 SET DEFAULT NOT NULL;
|
CHECK TABLE t1 ;
|