|
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;
|
|