Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
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.
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
- blocks
-
MDEV-11875 Inconsistent behavior of CREATE TABLE AS ... <string function> depending on strict mode
- Open
-
MDEV-28140 Unexpected error when UPDATE a NULL
- Confirmed
- is duplicated by
-
MDEV-31810 Sec feature request: New strict SQL mode for SELECT statement
- Closed
- relates to
-
MDEV-8300 CAST('' AS DECIMAL) is too strict on INSERT in strict mode
- Stalled
-
MDEV-11876 CONVERT produces a warning and result depends on strict mode
- Open
-
MDEV-11888 SELECT produces more warnings in non-strict mode than in strict mode
- Open
-
MDEV-28069 A misleading warning message from the DELETE statement
- Open
-
MDEV-28142 Unexpected UPDATE behavior under strict sql_mode
- Open
-
MDEV-35400 CREATE TABLE AS SELECT produces warnings, not errors
- Open