Unexpected ExprType MysqlBit and EvalType Int
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
Please answer these questions before submitting your issue. Thanks!
### 1. Minimal reproduce step (Required)
```sql
drop table if exists UK_PRECISION19239;
CREATE TABLE `UK_PRECISION19239` (
`COL1` bit(16) DEFAULT NULL COMMENT 'NUMERIC WITH PRECISION',
`COL2` varchar(20) DEFAULT NULL,
`COL4` datetime DEFAULT NULL,
`COL3` bigint(20) DEFAULT NULL,
`COL5` float DEFAULT NULL,
UNIQUE KEY `UK_COL1` (`COL1`) /*!80000 INVISIBLE */
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
insert into `UK_PRECISION19239` (`COL1`) values ( 0x0000);
select col1, col2 from UK_PRECISION19239 t1 where (select count(*) from UK_PRECISION19239 t2 where t2.col1 in (t1.col1, 30327)) > 1;
```
### 2. What did you expect to see? (Required)
```sql
[16:25:04]MySQL root:test> select col1, col2 from UK_PRECISION19239 t1 where (select count(*) from UK_PRECISION19239 t2 where t2.col1 in (t1.col1, 30327)) > 1;
+------+------+
| col1 | col2 |
+------+------+
+------+------+
0 rows in set
```
### 3. What did you see instead (Required)
```sql
[16:25:24]TiDB root:test> select col1, col2 from UK_PRECISION19239 t1 where (select count(*) from UK_PRECISION19239 t2 where t2.col1 in (t1.col1, 30327)) > 1;
(1105, 'other error: [components/tidb_query_expr/src/impl_compare_in.rs:68]: Unexpected ExprType MysqlBit and EvalType Int')
```
### 4. What is your TiDB version? (Required)
v8.1.0
Contributor guide
Assessment
This issue has not been assessed yet.