dble icon indicating copy to clipboard operation
dble copied to clipboard

The messages is misunderstood when the columns in the subquery can not be found

Open FlyingMao opened this issue 7 years ago • 0 comments

steps

mysql> select * from test_shard where 'A'  in (select NAME from test_shard where id =18);
ERROR 1105 (HY000): Correlated Sub Queries is not supported 
mysql> explain select * from test_shard where 'A'  in (select NAME from test_shard where id =18);
ERROR 1105 (HY000): column NAME not found
mysql> desc test_shard;
+-------------+-------------+------+-----+---------+-------+
| Field       | Type        | Null | Key | Default | Extra |
+-------------+-------------+------+-----+---------+-------+
| id          | int(11)     | NO   | PRI | NULL    |       |
| R_REGIONKEY | float       | YES  |     | NULL    |       |
| R_NAME      | varchar(50) | YES  |     | NULL    |       |
| R_COMMENT   | varchar(50) | YES  |     | NULL    |       |
+-------------+-------------+------+-----+---------+-------+
4 rows in set (0.01 sec)

FlyingMao avatar Jan 08 '18 07:01 FlyingMao