query returns 'Unexpected ExprType String and EvalType Enum'
- 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
CREATE TABLE `tb769f3d7` (
`col681c` enum('lsg9v','0yf','j6','7','fd','n','mgt1','u8ykj','cxp','wav6y','g9') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'n',
`col0c10` double NOT NULL DEFAULT '1.8627997728392405',
`col4fd5` smallint DEFAULT '3322',
PRIMARY KEY (`col0c10`,`col681c`) /*T![clustered_index] CLUSTERED */,
KEY `f50a3c89` (`col0c10`),
KEY `5acad05e` (`col0c10`),
KEY `b1ccfeeb` (`col0c10`),
KEY `a578a398` (`col0c10`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='fd6e9496';
INSERT INTO `tb769f3d7` VALUES ('0yf',1.8627997728392405,3322), ('fd',1.8627997728392405,3322), ('mgt1',251.52141273898243,3322), ('j6',738.4236215737066,3322), ('cxp',861.6176005970383,3322), ('j6',956.9120137000713,3322), ('fd',2364.5365153684365,3322), ('fd',4436.26103687845,3322), ('mgt1',5351.760687645575,3322), ('g9',6907.643252131364,3322), ('g9',8005.07176786551,3322), ('fd',8113.85048167993,3322), ('fd',9842.180752440603,3322);
CREATE TABLE `tea7d1470` (
`col9910` year(4) DEFAULT '2051',
`col2072` mediumint DEFAULT '3667630',
`colf543` double NOT NULL DEFAULT '1.9114447175008733',
`col9c3e` tinyint(1) NOT NULL DEFAULT '0',
`col288e` smallint DEFAULT '11416',
PRIMARY KEY (`colf543`,`col9c3e`) /*T![clustered_index] CLUSTERED */,
UNIQUE KEY `d5e46782` (`colf543`),
UNIQUE KEY `325f5489` (`col9c3e`,`colf543`,`col9910`),
KEY `27537594` (`col9910`),
KEY `2865206f` (`colf543`),
KEY `3135443b` (`col9910`),
UNIQUE KEY `52612dbf` (`col9910`),
KEY `3c33eaca` (`col9c3e`,`col288e`),
KEY `4ea34e8b` (`col288e`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='f05957cd';
INSERT INTO `tea7d1470` VALUES ('1972',6355804,6573.856531021223,0,26484), ('2026',5040522,9542.911779152131,0,13186);
CREATE TABLE `tf215c082` (
`col7aed` smallint DEFAULT '-11996',
`col47ed` enum('xapfv','ygpu','7uwa','dh00z','o4pj','c','2yf1','cb9d9','g','7x7p','jqpdl') DEFAULT 'cb9d9',
`col83c2` time DEFAULT '23:28:50',
KEY `65742cef` (`col7aed`),
UNIQUE KEY `e97070cd` (`col47ed`,`col7aed`),
KEY `aae696dd` (`col47ed`,`col83c2`,`col7aed`)
) ENGINE=InnoDB DEFAULT CHARSET=ascii COLLATE=ascii_bin /*T! SHARD_ROW_ID_BITS=4 */ COMMENT='81853d2f';
update `tb769f3d7` set `tb769f3d7`.`col681c` = 'j6' where `tb769f3d7`.`col0c10` between 'lsg9v' and 'lsg9v' and `tb769f3d7`.`col0c10` in ( select `col288e` from `tea7d1470` where `tb769f3d7`.`col681c` between 'lsg9v' and 'lsg9v' and `tb769f3d7`.`col0c10` in ( select `col288e` from `tea7d1470` where `tb769f3d7`.`col681c` between 'j6' and 'fd' or not( `tb769f3d7`.`col681c` in ( select `col7aed` from `tf215c082` where not( IsNull( `tb769f3d7`.`col681c` ) ) and `tb769f3d7`.`col0c10` in ( select `col2072` from `tea7d1470` where not( `tb769f3d7`.`col0c10` between 162.31951073017967 and 'u8ykj' ) or IsNull( `tb769f3d7`.`col681c` ) ) ) ) ) ) limit 57824268;
```
### 2. What did you expect to see? (Required)
No error
### 3. What did you see instead (Required)
``` SQL
mysql> update `tb769f3d7` set `tb769f3d7`.`col681c` = 'j6' where `tb769f3d7`.`col0c10` between 'lsg9v' and 'lsg9v' and `tb769f3d7`.`col0c10` in ( select `col288e` from `tea7d1470` where `tb769f3d7`.`col681c` between 'lsg9v' and 'lsg9v' and `tb769f3d7`.`col0c10` in ( select `col288e` from `tea7d1470` where `tb769f3d7`.`col681c` between 'j6' and 'fd' or not( `tb769f3d7`.`col681c` in ( select `col7aed` from `tf215c082` where not( IsNull( `tb769f3d7`.`col681c` ) ) and `tb769f3d7`.`col0c10` in ( select `col2072` from `tea7d1470` where not( `tb769f3d7`.`col0c10` between 162.31951073017967 and 'u8ykj' ) or IsNull( `tb769f3d7`.`col681c` ) ) ) ) ) ) limit 57824268;
ERROR 1105 (HY000): other error: [components/tidb_query_expr/src/types/expr_builder.rs:382]: Unexpected ExprType String and EvalType Enum
```
### 4. What is your TiDB version? (Required)
e7d7cdc600e3591539b4c9713ae6070b963e2d4f
Contributor guide
Assessment
This issue has not been assessed yet.