| Bug #117222 | Query results are unexpected with BIT data type comparisons. | ||
|---|---|---|---|
| Submitted: | 17 Jan 7:26 | Modified: | 17 Jan 9:15 |
| Reporter: | wang jack | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: Data Types | Severity: | S3 (Non-critical) |
| Version: | 8.4.1 9.1.0, 8.0.40 | OS: | Windows |
| Assigned to: | CPU Architecture: | x86 | |
[17 Jan 9:14]
MySQL Verification Team
Hello wang jack, Thank you for the report and test case. Verified as described. regards, Umesh

Description: From my understanding, the first query below should return two rows, but it is actually return 1 row. mysql> SELECT t0.c0 FROM t0 WHERE (",1C") <= (t0.c0); -- 1 row +--------------------+ | c0 | +--------------------+ | 0x0000010271371EAF | +--------------------+ 1 row in set, 2 warnings (0.00 sec) mysql> SELECT (",1C") <= (t0.c0) FROM t0; -- 2 rows: {1, 1} +--------------------+ | (",1C") <= (t0.c0) | +--------------------+ | 1 | | 1 | +--------------------+ 2 rows in set, 1 warning (0.00 sec) How to repeat: DROP TABLE IF EXISTS t0; CREATE TABLE t0(c0 BIT(59) UNIQUE) ; INSERT INTO t0(c0) VALUES(00001110001000111); INSERT INTO t0(c0) VALUES(0111100); SELECT t0.c0 FROM t0 WHERE (",1C") <= (t0.c0); -- 1 row SELECT (",1C") <= (t0.c0) FROM t0; -- 2 rows: {1, 1}