MDEV-23672: Partly revert an incorrect fix
In commit 7eda5561 we removed a valid debug assertion. AddressSanitizer would trip when writing undo log for an INSERT operation that follows the problematic ALTER TABLE because the v_indexes would refer to an index object that was freed during the execution of ALTER TABLE. The operation to remove NOT NULL attribute from a column should lead into any affected indexes to be dropped and re-created. But, the SQL layer set the ha_alter_info->handler_flags to HA_INPLACE_ADD_UNIQUE_INDEX_NO_WRITE|ALTER_COLUMN_NULLABLE (that is, InnoDB was asked to add an index and change the column, but not to drop the index that depended on the column). Let us restore the debug assertion that catches this problem outside AddressSanitizer, and 'defuse' the offending ALTER TABLE statement in the test until something has been fixed in the SQL layer.
Showing
Please register or sign in to comment