mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Part2: MDEV-18156 Assertion 0' failed or
btr_validate_index(index, 0, false)' in row_upd_sec_index_entry or error code 126: Index is corrupted upon DELETE with PAD_CHAR_TO_FULL_LENGTH
This patch allows the server to open old tables that have "bad" generated columns (i.e. indexed virtual generated columns, persistent generated columns) that depend on sql_mode, for general things like SELECT, INSERT, DROP, etc. Warning are issued in such cases. Only these commands are now disallowed and return an error: - CREATE TABLE introducing a "bad" generated column - ALTER TABLE introducing a "bad" generated column - CREATE INDEX introdicing a "bad" generated column (i.e. adding an index on a virtual generated column that depends on sql_mode). Note, these commands are allowed: - ALTER TABLE removing a "bad" generate column - ALTER TABLE removing an index from a "bad" virtual generated column - DROP INDEX removing an index from a "bad" virtual generated column but only if the table does not have any "bad" columns as a result.
This commit is contained in:
@ -2529,7 +2529,8 @@ TABLE *Delayed_insert::get_local_table(THD* client_thd)
|
||||
sizeof(MY_BITMAP))))
|
||||
goto error;
|
||||
|
||||
if (parse_vcol_defs(client_thd, client_thd->mem_root, copy, &error_reported))
|
||||
if (parse_vcol_defs(client_thd, client_thd->mem_root, copy, &error_reported,
|
||||
VCOL_INIT_DEPENDENCY_FAILURE_IS_WARNING))
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user