Details
-
Task
-
Status: Closed (View Workflow)
-
Blocker
-
Resolution: Fixed
-
None
Description
I have pushed two patches for MDEV-18156:
Part 1:
https://github.com/MariaDB/server/commit/dc719597ee0b11da722e9813639e8b48018a8c10
Part 2:
https://github.com/MariaDB/server/commit/ef00ac4c86daf3294c46a45358da636763fb0049
Please add documentation for MDEV-18156.
Short description:
The fix disallows generated column expressions that depend on:
- sql_mode flag PAD_CHAR_TO_FULL_LENGTH
- sql_mode flag NO_UNSIGNED_SUBTRACTION
if a generated columns is:
- a virtual column used in an index
- a stored column (indexes do not matter)
Note, virtual columns that depend on the mentioned flags,
but are not used in any indexes, are still allowed.
These table modification statements:
- CREATE TABLE
- ALTER TABLE
- CREATE INDEX
introducing a new "bad" generated column are not allowed
any more and return an error.
The server can still open old tables (created by older server versions)
with "bad" generated columns. A warning about bad expression is issued.
Such columns can be used in most SQL statements without any limitations,
but in case of the mentioned modification statements, the result table
must not have "bad" generated columns.
This patch fixes the problem for two sql_mode flags only.
Other affected sql_mode flags will be addressed separately later.
Thanks.
Attachments
Issue Links
- relates to
-
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
- Closed