|
This bug is possibly related to MDEV-18322. Reduced testcase and versions update:
SET system_versioning_alter_history=KEEP;
|
CREATE TABLE t (c INT AS (d),d INT) WITH SYSTEM VERSIONING ENGINE=InnoDB;
|
ALTER TABLE t ADD COLUMN (e INT,f SERIAL);
|
ALTER TABLE t ADD COLUMN (g INT);
|
Leads to:
|
11.1.0 2b61ff8f2221745f0a96855a0feb0825c426f993 (Debug)
|
mariadbd: /test/11.1_dbg/storage/innobase/handler/handler0alter.cc:529: bool dict_table_t::instant_column(const dict_table_t&, const ulint*): Assertion `o->ind == vers_start' failed.
|
|
11.1.0 2b61ff8f2221745f0a96855a0feb0825c426f993 (Debug)
|
Core was generated by `/test/MD070423-mariadb-11.1.0-linux-x86_64-dbg/bin/mariadbd --no-defaults --cor'.
|
Program terminated with signal SIGABRT, Aborted.
|
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=22927949948480)
|
at ./nptl/pthread_kill.c:44
|
[Current thread is 1 (Thread 0x14da544fe640 (LWP 1368333))]
|
(gdb) bt
|
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=22927949948480) at ./nptl/pthread_kill.c:44
|
#1 __pthread_kill_internal (signo=6, threadid=22927949948480) at ./nptl/pthread_kill.c:78
|
#2 __GI___pthread_kill (threadid=22927949948480, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
|
#3 0x000014da72063476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
|
#4 0x000014da720497f3 in __GI_abort () at ./stdlib/abort.c:79
|
#5 0x000014da7204971b in __assert_fail_base (fmt=0x14da721fe150 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x564b5d6885a2 "o->ind == vers_start", file=0x564b5d680e90 "/test/11.1_dbg/storage/innobase/handler/handler0alter.cc", line=529, function=<optimized out>) at ./assert/assert.c:92
|
#6 0x000014da7205ae96 in __GI___assert_fail (assertion=0x564b5d6885a2 "o->ind == vers_start", file=0x564b5d680e90 "/test/11.1_dbg/storage/innobase/handler/handler0alter.cc", line=529, function=0x564b5d6886a8 "bool dict_table_t::instant_column(const dict_table_t&, const ulint*)") at ./assert/assert.c:101
|
#7 0x0000564b5cf5710e in dict_table_t::instant_column (this=0x14da08035c00, table=<optimized out>, col_map=<optimized out>) at /test/11.1_dbg/storage/innobase/handler/handler0alter.cc:529
|
#8 0x0000564b5cf586e4 in ha_innobase_inplace_ctx::instant_column (this=0x14da080154e8) at /test/11.1_dbg/storage/innobase/handler/handler0alter.cc:1217
|
#9 innobase_instant_try (ha_alter_info=ha_alter_info@entry=0x14da544f9d90, ctx=ctx@entry=0x14da080154e8, altered_table=altered_table@entry=0x14da544f9e50, table=table@entry=0x14da080268d8, trx=trx@entry=0x14da6931c680) at /test/11.1_dbg/storage/innobase/handler/handler0alter.cc:5895
|
#10 0x0000564b5cf5cf12 in commit_try_norebuild (ha_alter_info=ha_alter_info@entry=0x14da544f9d90, ctx=ctx@entry=0x14da080154e8, altered_table=altered_table@entry=0x14da544f9e50, old_table=0x14da080268d8, trx=trx@entry=0x14da6931c680, table_name=<optimized out>) at /test/11.1_dbg/storage/innobase/handler/handler0alter.cc:10621
|
#11 0x0000564b5cf484a3 in ha_innobase::commit_inplace_alter_table (this=<optimized out>, altered_table=<optimized out>, ha_alter_info=<optimized out>, commit=<optimized out>) at /test/11.1_dbg/storage/innobase/handler/handler0alter.cc:11384
|
#12 0x0000564b5cc36617 in handler::ha_commit_inplace_alter_table (this=0x14da08028fa0, altered_table=altered_table@entry=0x14da544f9e50, ha_alter_info=ha_alter_info@entry=0x14da544f9d90, commit=commit@entry=true) at /test/11.1_dbg/sql/handler.cc:5428
|
#13 0x0000564b5ca2e9fa in mysql_inplace_alter_table (thd=thd@entry=0x14da08000d58, table_list=0x14da08013268, table=table@entry=0x14da080268d8, altered_table=altered_table@entry=0x14da544f9e50, ha_alter_info=ha_alter_info@entry=0x14da544f9d90, target_mdl_request=target_mdl_request@entry=0x14da544fa630, ddl_log_state=0x14da544f9d20, trigger_param=0x14da544fa210, alter_ctx=0x14da544fb510, partial_alter=@0x14da544f9c8f: false, start_alter_id=@0x14da544f9c98: 0, if_exists=false) at /test/11.1_dbg/sql/sql_table.cc:7810
|
#14 0x0000564b5ca40b6d in mysql_alter_table (thd=thd@entry=0x14da08000d58, new_db=new_db@entry=0x14da08005878, new_name=new_name@entry=0x14da08005cc8, create_info=create_info@entry=0x14da544fc320, table_list=<optimized out>, table_list@entry=0x14da08013268, recreate_info=recreate_info@entry=0x14da544fc210, alter_info=<optimized out>, order_num=<optimized out>, order=<optimized out>, ignore=<optimized out>, if_exists=<optimized out>) at /test/11.1_dbg/sql/sql_table.cc:10846
|
#15 0x0000564b5cac0d2c in Sql_cmd_alter_table::execute (this=<optimized out>, thd=0x14da08000d58) at /test/11.1_dbg/sql/sql_alter.cc:558
|
#16 0x0000564b5c962604 in mysql_execute_command (thd=thd@entry=0x14da08000d58, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/11.1_dbg/sql/sql_parse.cc:5760
|
#17 0x0000564b5c963f05 in mysql_parse (thd=thd@entry=0x14da08000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14da544fd230) at /test/11.1_dbg/sql/sql_parse.cc:7760
|
#18 0x0000564b5c966099 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14da08000d58, packet=packet@entry=0x14da0800ae49 "ALTER TABLE t ADD COLUMN (g INT)", packet_length=packet_length@entry=32, blocking=blocking@entry=true) at /test/11.1_dbg/sql/sql_class.h:242
|
#19 0x0000564b5c967ef5 in do_command (thd=0x14da08000d58, blocking=blocking@entry=true) at /test/11.1_dbg/sql/sql_parse.cc:1405
|
#20 0x0000564b5cab9cfc in do_handle_one_connection (connect=<optimized out>, connect@entry=0x564b5f7050e8, put_in_cache=put_in_cache@entry=true) at /test/11.1_dbg/sql/sql_connect.cc:1416
|
#21 0x0000564b5cab9f5b in handle_one_connection (arg=0x564b5f7050e8) at /test/11.1_dbg/sql/sql_connect.cc:1318
|
#22 0x000014da720b5b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
|
#23 0x000014da72147a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
|
Bug confirmed present in:
MariaDB: 10.4.29 (dbg), 10.5.20 (dbg), 10.6.13 (dbg), 10.7.8 (dbg), 10.8.8 (dbg), 10.9.6 (dbg), 10.10.4 (dbg), 10.11.3 (dbg), 11.0.2 (dbg), 11.1.0 (dbg)
Bug (or feature/syntax) confirmed not present in:
MariaDB: 10.4.29 (opt), 10.5.20 (opt), 10.6.13 (opt), 10.7.8 (opt), 10.8.8 (opt), 10.9.6 (opt), 10.10.4 (opt), 10.11.3 (opt), 11.0.2 (opt), 11.1.0 (opt)
MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.40 (dbg), 5.7.40 (opt), 8.0.31 (dbg), 8.0.31 (opt)
|