| Bug #115138 | Select return value when non exist column name is set in field | ||
|---|---|---|---|
| Submitted: | 27 May 2024 11:35 | Modified: | 27 May 2024 13:32 |
| Reporter: | genze wu (OCA) | Email Updates: | |
| Status: | Duplicate | Impact on me: | |
| Category: | MySQL Server: Optimizer | Severity: | S3 (Non-critical) |
| Version: | 8.0.36, 5.7 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
[27 May 2024 11:37]
genze wu
Repeat on 8.0.36.
[27 May 2024 13:32]
MySQL Verification Team
Hello genze wu, Thank you for the report and feedback. IMHO this is duplicate of Bug #100599, please see Bug #100599 regards, Umesh

Description: Select return value when non exist column name is set in field. How to repeat: CREATE TABLE t1(m int); CREATE TABLE t2(n int); SELECT count(*) FROM t1 WHERE m IN (SELECT m FROM t2); This select should return: Unknown column 'm' in 'field list' But it returns : +----------+ | count(*) | +----------+ | 0 | +----------+ 1 row in set (0.00 sec)