Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.0b4

Bug #10895 setLimit() does not work properly when a subquery uses LIMIT
Submitted: 2007-04-30 18:18 UTC
From: aldo Assigned: aldo
Status: Closed Package: MDB2_Driver_mysqli (version 1.4.0)
PHP Version: 5.2.1 OS: Any
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 43 + 18 = ?

 
 [2007-04-30 18:18 UTC] aldo (Aldo Gonzalez)
Description: ------------ Queries with a subselect that use a LIMIT statement will not be modified correctly when using setLimit(). In a SQL statment like: SELECT a, (SELECT dateOther FROM T1 ORDER BY date DESC LIMIT 1) FROM T2; The preg_match in _modifyQuery matches the first LIMIT and will not append another one.

Comments

 [2007-05-02 22:01 UTC] quipo (Lorenzo Alberton)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. -- Can you test the current CVS version and send me some feedback, please? TIA
 [2007-05-03 00:37 UTC] aldo (Aldo Gonzalez)
I have tested CVS and the check for the closing parenthesis is effective. It is correctly working for subqueries and statements that end in a LIMIT. Thank you.