Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.11, 11.4, 11.8, 12.3, 11.4.11
-
MariaDB version: 11.4.11-MariaDB-ubu2404
Docker image: mariadb:11.4
Host OS: Windows 11
Runtime environment: Docker Desktop with WSL2 backend
Description
A predicate involving an invalid DATETIME conversion and arithmetic with a BLOB value is evaluated inconsistently between WHERE filtering and SELECT expression evaluation.
The WHERE clause returns one row, while evaluating the same expression as a SELECT expression indicates that no row satisfies the condition.
CREATE TABLE t35 (c1 BLOB NULL); |
INSERT INTO t35 (c1) VALUES ('8'); |
SELECT t35.c1 FROM t35 LEFT JOIN t35 AS ta1 ON 1 WHERE (CONVERT('z', DATETIME) - t35.c1); |
--1 row
|
SELECT SUM(count) FROM (SELECT (CONVERT('z', DATETIME) - t35.c1) IS TRUE AS count FROM t35 LEFT JOIN t35 AS ta1 ON 1) AS ta_norec; |
--0 |
Attachments
Issue Links
- is duplicated by
-
MDEV-40093 Inconsistent evaluation of SOME predicate involving MOD() and BLOB implicit conversion
-
- Closed
-
-
MDEV-40094 Wrong result for bitwise AND predicate involving AES_ENCRYPT() and INTERVAL arithmetic
-
- Closed
-