Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
11.3.2, 11.4.1, 10.4(EOL), 10.5, 10.6, 10.11, 11.0(EOL), 11.1(EOL), 11.2(EOL), 11.3(EOL)
-
None
-
None
-
Run on Docker container mariadb:latest and mariadb:11.4-rc
Description
Consider the below queries, it is unexpected that the last query returns an empty results.
The predicate `t0.c1/4` should be evaluated to `0.25`, and `0.25!=0`. Thus, the WHERE predicate should be evaluated to true and the query should fetch the row from `t0`.
Besides, the query `SELECT t0.c1 FROM t0 WHERE 0.25;` and `SELECT t0.c1 FROM t0 WHERE 1/4;` both return `1`. If the result for the last query is expected, then these two queries should also return an empty set.
MySQL could return 1 as expected.
DROP DATABASE db0; |
CREATE DATABASE db0; |
USE db0; |
|
CREATE TABLE t0(c1 INTEGER); |
INSERT INTO t0 (c1) VALUES (1); |
|
SELECT t0.c1 FROM t0; |
SELECT t0.c1/4 FROM t0; -- 0.25 |
SELECT t0.c1 FROM t0 WHERE 0.25; -- 1 |
SELECT t0.c1 FROM t0 WHERE 1/4; -- 1 |
|
SELECT t0.c1 FROM t0 WHERE t0.c1/4; |
-- Expected: 1
|
-- Actual: Empty set |
Attachments
Issue Links
- relates to
-
MDEV-34123 CONCAT Function Returns Unexpected Empty Set in Query
- Closed
-
MDEV-34189 Unexpected error on `WHERE inet6col`
- Open