Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-20472

Document MDEV-18156 - sql_mode dependency in vcol expressions

    XMLWordPrintable

Details

    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

          Activity

            People

              KennethDyer Kenneth Dyer (Inactive)
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.