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 using the IN predicate to compare a BINARY column with a BIT column returned from a subquery , the server returns incorrect results.
How to repeat:
CREATE TABLE t1(c1 BIT); |
CREATE TABLE t2(c1 BINARY(1)); |
|
|
INSERT INTO t1(c1) VALUES(b'0'); |
INSERT INTO t2(c1) VALUES('o'); |
INSERT INTO t2(c1) VALUES('E'); |
|
|
SELECT c1 FROM t2 WHERE t2.c1 IN (SELECT c1 FROM t1); |
|
|
/*
|
ACTUAL RESULT (Incorrect):
|
+------------+
|
| c1 |
|
+------------+
|
| 0x6F |
|
| 0x45 |
|
+------------+
|
2 rows in set
|
|
|
EXPECTED RESULT (Correct):
|
Empty set (0 rows)
|
*/ |
Attachments
Issue Links
- relates to
-
MDEV-38446 Incorrect result in JOIN with IN subquery
-
- Closed
-