Bug #70626 select * from t where exists (select * from t limit 0); returns rows

Submitted: 15 Oct 2013 22:08 Modified: 16 Oct 2013 15:10
Reporter: chase a Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S3 (Non-critical)
Version:5.1+ OS:Linux (Ubuntu 12.04)
Assigned to: CPU Architecture:Any

[15 Oct 2013 22:08] chase a
Description:
See repro.

How to repeat:
> create table t (i int);
> insert into t values (1);
> select * from t where exists (select * from t limit 0);
+------+
| i    |
+------+
|    1 |
+------+

Suggested fix:
exists .. limit 0 should evaluate to FALSE.
[16 Oct 2013 15:10] MySQL Verification Team
This is truly a bug. A bug present from at least 5.1.

However, I do not deem it a critical bug.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.051 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.