Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.8.2
-
None
-
None
Description
I try the following statements in MariaDB 10.8.2 with strict SQL mode.
DROP TABLE IF EXISTS t0;
|
CREATE TABLE t0(c0 INT);
|
INSERT INTO t0 VALUES (1);
|
DELETE FROM t0 WHERE IFNULL((-1) | (-1), 0);
|
SHOW WARNINGS;
|
The DELETE statement succeeded, but a warning message is generated as following:
mysql> SHOW WARNINGS;
|
+---------+------+-----------------------------------------------------------------------------+
|
| Level | Code | Message |
|
+---------+------+-----------------------------------------------------------------------------+
|
| Warning | 1916 | Got overflow when converting '18446744073709551615' to INT. Value truncated |
|
+---------+------+-----------------------------------------------------------------------------+
|
1 row in set (0.00 sec)
|
I think there should be no warnings. Otherwise, this truncate warning should make the DELETE statement fail in strict SQL mode. Moreover, I try the same WHERE clause in the UPDATE statement, where the UPDATE statement succeeded without warnings.
DROP TABLE IF EXISTS t0;
|
CREATE TABLE t0(c0 INT);
|
INSERT INTO t0 VALUES (1);
|
UPDATE t0 SET c0 = 2 WHERE IFNULL((-1) | (-1), 0);
|
SHOW WARNINGS;
|
Attachments
Issue Links
- relates to
-
MDEV-19362 New STRICT flags for sql_mode
- Open
-
MDEV-28140 Unexpected error when UPDATE a NULL
- Confirmed
-
MDEV-28142 Unexpected UPDATE behavior under strict sql_mode
- Open