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

New STRICT flags for sql_mode

    XMLWordPrintable

Details

    • Task
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • OTHER
    • None

    Description

      Currently we have two flags:

      • STRICT_TRANS_TABLES
      • STRICT_ALL_TABLES

      These flags were originally added to control how to treat warnings that happen on updating table fields for transactional and non-transactional tables.

      Gradually these flags spread all around the code to change the server behavior in contexts not directly related to tables, such as:

      • SP variables, SP routine parameters, function return values
      • Built-in SQL functions (e.g. badly formed strings)
      • Too long comments
      • Too long messages in SIGNAL
      • Duplicate values in ENUM/SET
      • Automatic VARCHAR -> BLOB conversion

      During recent discussions we agreed (bar, elenst, serg) that STRICT_XXX_TABLES should not affect anything when no tables are involved.

      To address that we restore the original meaning of these flags:

      • STRICT_TRANS_TABLES applies to all cases where a statement can be cleanly aborted, restoring the data as it was before the statement started executing
      • STRICT_ALL_TABLES applies to all cases, even when it'll leave tables partially updated

      We might rename flags to better match the intended semantics.

      original proposal:

      To address this, we'll introduce a new STRICT_XXX flag that will control server behavior when no tables are involved.

      The exact flags name is a subject to discussion.

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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