• Alexander Barkov's avatar
    Part2: MDEV-18156 Assertion `0' failed or `btr_validate_index(index, 0,... · ef00ac4c
    Alexander Barkov authored
    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.
    ef00ac4c
sql_insert.cc 153 KB