Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
12.1.2
-
None
-
12.1.2-MariaDB-ubu2404
-
Not for Release Notes
Description
When a CHAR column containing a non-numeric string (e.g., 'Kx') is compared against a BIT column via an IN subquery, the server returns rows unexpectedly.
How to repeat:
CREATE TABLE t1(c1 BIT);
CREATE TABLE t2(c1 CHAR(20));
INSERT INTO t2 (c1) VALUES ('Kx');
INSERT INTO t1 (c1) VALUES (b'0');
INSERT INTO t1 (c1) VALUES (b'1');
SELECT t1.c1 FROM t1 JOIN t2 ON (t2.c1 IN (SELECT t1.c1 FROM t1));
/* Expected: Empty setActual:+------------+| c1 |+------------+| 0x00 || 0x01 |+------------+*/
Attachments
Issue Links
- relates to
-
MDEV-38447 WHERE ... IN ... incorrectly returns rows
-
- Closed
-