diff options
author | Alexander Barkov <bar@mariadb.com> | 2019-08-29 12:35:19 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2019-09-03 09:51:35 +0400 |
commit | ef00ac4c86daf3294c46a45358da636763fb0049 (patch) | |
tree | 833c4c4696dfe423eea4531b436b5080a0cb6077 /sql/sql_insert.cc | |
parent | dc719597ee0b11da722e9813639e8b48018a8c10 (diff) | |
download | mariadb-git-ef00ac4c86daf3294c46a45358da636763fb0049.tar.gz |
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.
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r-- | sql/sql_insert.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 3169efbefe6..78564f28c31 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -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; } |