#8 0x0000558ecf8fcab8 in btr_set_instant (root=0x7f9b5dfe1e70, index=..., mtr=0x7f9b5dd17090) at storage/innobase/btr/btr0btr.cc:1936
#9 0x0000558ecf700013 in innobase_instant_try (ha_alter_info=0x7f9b5dd18a90, ctx=0x7f9b08016928, altered_table=0x7f9b08071b58, table=0x7f9b08043f68, trx=0x7f9b5e803268) at storage/innobase/handler/handler0alter.cc:5699
#10 0x0000558ecf71c2de in commit_try_norebuild (ha_alter_info=0x7f9b5dd18a90, ctx=0x7f9b08016928, altered_table=0x7f9b08071b58, old_table=0x7f9b08043f68, trx=0x7f9b5e803268, table_name=0x7f9b08071945 "t4") at storage/innobase/handler/handler0alter.cc:10129
#11 0x0000558ecf70e395 in ha_innobase::commit_inplace_alter_table (this=0x7f9b080e5e40, altered_table=0x7f9b08071b58, ha_alter_info=0x7f9b5dd18a90, commit=true) at storage/innobase/handler/handler0alter.cc:10794
#12 0x0000558ecf4a0c23 in handler::ha_commit_inplace_alter_table (this=0x7f9b080e5e40, altered_table=0x7f9b08071b58, ha_alter_info=0x7f9b5dd18a90, commit=true) at sql/handler.cc:4673
#13 0x0000558ecf23b8be in mysql_inplace_alter_table (thd=0x7f9b08000ce8, table_list=0x7f9b08014698, table=0x7f9b08043f68, altered_table=0x7f9b08071b58, ha_alter_info=0x7f9b5dd18a90, inplace_supported=HA_ALTER_INPLACE_INSTANT, target_mdl_request=0x7f9b5dd18cc0, alter_ctx=0x7f9b5dd19270) at sql/sql_table.cc:7602
#14 0x0000558ecf2416f1 in mysql_alter_table (thd=0x7f9b08000ce8, new_db=0x7f9b080053f8, new_name=0x7f9b080057f8, create_info=0x7f9b5dd19e60, table_list=0x7f9b08014698, alter_info=0x7f9b5dd19da0, order_num=0, order=0x0, ignore=false) at sql/sql_table.cc:9700
#15 0x0000558ecf2ccb9f in Sql_cmd_alter_table::execute (this=0x7f9b08014d00, thd=0x7f9b08000ce8) at sql/sql_alter.cc:493
#16 0x0000558ecf16329f in mysql_execute_command (thd=0x7f9b08000ce8) at sql/sql_parse.cc:6330
#17 0x0000558ecf1686f2 in mysql_parse (thd=0x7f9b08000ce8, rawbuf=0x7f9b080145a0 "ALTER TABLE t4 DROP COLUMN col_text_g", length=37, parser_state=0x7f9b5dd1b1e0, is_com_multi=false, is_next_command=false) at sql/sql_parse.cc:8141
#18 0x0000558ecf153b02 in dispatch_command (command=COM_QUERY, thd=0x7f9b08000ce8, packet=0x7f9b0800a009 "ALTER TABLE t4 DROP COLUMN col_text_g", packet_length=37, is_com_multi=false, is_next_command=false) at sql/sql_parse.cc:1819
#19 0x0000558ecf15234a in do_command (thd=0x7f9b08000ce8) at sql/sql_parse.cc:1357
#20 0x0000558ecf2c6add in do_handle_one_connection (connect=0x558ed1a73be8) at sql/sql_connect.cc:1399
#21 0x0000558ecf2c6841 in handle_one_connection (arg=0x558ed1a73be8) at sql/sql_connect.cc:1302
#22 0x0000558ecfbf8c54 in pfs_spawn_thread (arg=0x558ed1aba1d8) at storage/perfschema/pfs.cc:1862
#23 0x00007f9b658a57fc in start_thread (arg=0x7f9b5dd1c700) at pthread_create.c:465
#24 0x00007f9b64adbb5f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
This looks like a regression from the first part of MDEV-15563 that implemented instant NOT NULL removal for ROW_FORMAT=REDUNDANT. A similar bug was fixed in MDEV-18048.
The failing assertion is bogus for ROW_FORMAT=REDUNDANT tables. The dict_index_t::n_core_null_bytes and dict_index_t::n_nullable do not matter for ROW_FORMAT=REDUNDANT, because in this format there is no separate null flag bitmap in the record header, and the null flags are instead embedded in the end-of-field pointers.
Marko Mäkelä
added a comment - This looks like a regression from the first part of MDEV-15563 that implemented instant NOT NULL removal for ROW_FORMAT=REDUNDANT . A similar bug was fixed in MDEV-18048 .
The failing assertion is bogus for ROW_FORMAT=REDUNDANT tables. The dict_index_t::n_core_null_bytes and dict_index_t::n_nullable do not matter for ROW_FORMAT=REDUNDANT , because in this format there is no separate null flag bitmap in the record header, and the null flags are instead embedded in the end-of-field pointers.
CREATETABLE t1 (a INTNOTNULL, b INTNOTNULL) ENGINE=InnoDB;
INSERTINTO t1 VALUES (0,0);
ALTERTABLE t1 MODIFY a INTAFTER b;
# Exploit MDEV-17468 toforce the table definition to be reloaded
ALTERTABLE t1 ADDCOLUMN v INTAS (a) VIRTUAL;
ALTERTABLE t1 MODIFY b INTNOTNULLAFTER a;
DROPTABLE t1;
Marko Mäkelä
added a comment - Minimal test case:
--source include/innodb_row_format.inc
CREATE TABLE t1 (a INT NOT NULL , b INT NOT NULL ) ENGINE=InnoDB;
INSERT INTO t1 VALUES (0,0);
ALTER TABLE t1 MODIFY a INT AFTER b;
# Exploit MDEV-17468 to force the table definition to be reloaded
ALTER TABLE t1 ADD COLUMN v INT AS (a) VIRTUAL;
ALTER TABLE t1 MODIFY b INT NOT NULL AFTER a;
DROP TABLE t1;
This looks like a regression from the first part of
MDEV-15563that implemented instant NOT NULL removal for ROW_FORMAT=REDUNDANT. A similar bug was fixed inMDEV-18048.The failing assertion is bogus for ROW_FORMAT=REDUNDANT tables. The dict_index_t::n_core_null_bytes and dict_index_t::n_nullable do not matter for ROW_FORMAT=REDUNDANT, because in this format there is no separate null flag bitmap in the record header, and the null flags are instead embedded in the end-of-field pointers.