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

Bug #13404 NOW() causes infinite loop
Submitted: 2008-03-16 08:51 UTC
From: bakert Assigned: cybot
Status: Closed Package: SQL_Parser (version CVS)
PHP Version: 5.2.1 OS: Mac OS X 10.4
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 : 27 + 15 = ?

 
 [2008-03-16 08:51 UTC] bakert (Thomas Baker)
Description: ------------ Call to NOW() causes an infinite loop due to the two calls to getToken() in getParams(). Example SQL: SELECT x FROM y WHERE z > NOW() I tried messing about with pushBack() if token === ')' or just returning true from the function if the first token in getParams is ')' but I ened up with "*end of input*" in the parsed query and no mention of "now". Test script: --------------- $p = new SQL_Parser(null, "MySQL"); print_r($p->parse("SELECT x FROM y WHERE z > NOW()")); if (isset($p->error)) { print "\n\n" . $p->error_message; } Expected result: ---------------- Parsed query. Actual result: -------------- Infinite loop ($open_braces is never 0).

Comments

 [2008-07-24 10:08 UTC] cybot (Sebastian Mendel)
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.