Bug #24726 mode for controling comparison record against recordset

Submitted: 30 Nov 2006 16:46 Modified: 7 Dec 2006 10:20
Reporter: Maciej Pilichowski Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Parser Severity:S4 (Feature request)
Version:5.0.26 OS:Linux (opensuse 10.0)
Assigned to: CPU Architecture:Any

[30 Nov 2006 16:46] Maciej Pilichowski
Description:
Even perfect developer could have a bad day. Consider

SELECT * FROM t WHERE f=(SELECT a FROM b);

Now -- maybe there is just one row in b. Or maybe the programmer forget "all" or "any", who knows? Such query can even work and nobody notice there is a flaw here.

Please, add for sql_mode, for example, NO_RECORD_SET_CMP to force programmer to stricly express the true meaning of such queries. In other words, with this sql_mode turned off, nothing is changed, with turned _on_ MySQL should show an error right away, no matter what is there a recordset with one or more records.

How to repeat:
It is a wish, not a bug report.

Suggested fix:
It is a wish, not a bug report.
[7 Dec 2006 10:20] Valeriy Kravchuk
Thank you for a reasonable feature request.

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

Page generated in 0.048 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.