I have pushed two patches for
Please add documentation for
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.