Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.8.2
-
None
-
Ubuntu 20.04LTS
Description
I try the following statements on MariaDB-10.8.2:
DROP TABLE IF EXISTS t0;
|
CREATE TABLE t0 (c0 varchar(5));
|
INSERT INTO t0 VALUES('a'), ('1');
|
DELETE FROM t0 WHERE NOT c0;
|
The DELETE statement deleted the first row, and a warning was generated.
I try a UPDATE statement, which share the same where clause with the above DELETE statement, as follows:
DROP TABLE IF EXISTS t0;
|
CREATE TABLE t0 (c0 varchar(5));
|
INSERT INTO t0 VALUES('a'), ('1');
|
UPDATE t0 SET c0 = 'b' WHERE NOT c0;
|
The UPDATE statement failed and generated an error.
I think the data truncation of value 'a' should also cause this DELETE statement errors instead of a warning. Because UPDATE and DELETE are both data-change statements.