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

Bug #13811 _skipDelimitedStrings bug
Submitted: 2008-04-30 14:46 UTC Modified: 2008-05-03 07:14 UTC
From: alec Assigned: quipo
Status: Closed Package: MDB2
PHP Version: 5.2.5 OS:
Roadmaps: (Not assigned)    
Subscription  


 [2008-04-30 14:46 UTC] alec (Aleksander Machniak)
Description: ------------ When use query e.g. UPDATE table SET col='' WHERE ... with postgresql driver function returns error: MDB2 Error: syntax error (-2): _skipDelimitedStrings: [Error message: query with an unterminated text string specified] I'm not sure if problem is in $string_quoting definition in postgres driver or in _skipDelimitedString(), but all works fine when I replace: } while ($ignore['escape'] && $query[($end_quote - 1)] == $ignore['escape']) with: } while ($ignore['escape'] && $query[($end_quote - 1)] == $ignore['escape'] && $end_quote-1 != $start_quote)

Comments

 [2008-05-01 01:49 UTC] alec (Aleksander Machniak)
Of course $string_quoting is defined properly, so problem is in _skipDelimitedStrings()
 [2008-05-02 23:40 UTC] doconnor (Daniel O'Connor)
Aleksander, can you provide a short script to reproduce this properly?
 [2008-05-03 03:17 UTC] alec (Aleksander Machniak)
$options = array(); $dsn = 'pgsql://dbuser:pass@192.168.0.100/dbname'; $query = "UPDATE identities SET signature='' WHERE identity_id=?"; $mdb2 =& MDB2::factory($dsn, $options); if (PEAR::isError($mdb2)) { die($mdb2->getMessage()); } $q = $mdb2->prepare($query); if (PEAR::isError($q)) { die($q->getMessage()); } $mdb2->disconnect();
 [2008-05-03 07:14 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.