php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58770 Driver does not handle empty strings properly (in prepared statements)
Submitted: 2009-07-22 10:27 UTC Modified: 2009-10-29 05:31 UTC
From: dejan dot lekic at gmail dot com Assigned: grantc (profile)
Status: Closed Package: ingres (PECL)
PHP Version: 2.2.1 OS: GNU/Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: dejan dot lekic at gmail dot com
New email:
PHP Version: OS:

 

 [2009-07-22 10:27 UTC] dejan dot lekic at gmail dot com
Description:
------------
It seems that Ingres PHP extension does not handle empty strings correctly in prepare staments.

Reproduce code:
---------------
http://ingres.pastebin.com/d1ebcc134

Expected result:
----------------
No errors, it should successfully execute the insert statement.

SQL session (begin) -----------------------
continue
* insert into simple_table(val1,val2) values('','');\g
Executing . . .

(1 row)
continue
SQL session (end) -----------------------

As you can see it is a perfectly valid statement.

Actual result:
--------------
Connection succeeded.PHP Warning:  ingres_query(): ii_success : Server or API error - no error message available, status 8 in /home/dejan/tingres.php on line 23
PHP Stack trace:
PHP   1. {main}() /home/dejan/tingres.php:0
PHP   2. ingres_query() /home/dejan/tingres.php:23
PHP Warning:  ingres_query(): Error binding parameters in /home/dejan/tingres.php on line 23
PHP Stack trace:
PHP   1. {main}() /home/dejan/tingres.php:0
PHP   2. ingres_query() /home/dejan/tingres.php:23
PHP Fatal error:   in /home/dejan/tingres.php on line 25
PHP Stack trace:
PHP   1. {main}() /home/dejan/tingres.php:0
PHP   2. trigger_error() /home/dejan/tingres.php:25

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-07-23 04:43 UTC] dejan dot lekic at gmail dot com
Correct pastebin URI is: http://ingres.pastebin.com/d27547dc7
 [2009-07-23 06:45 UTC] grant dot croker at ingres dot com
Can you try the patch at http://ingres.pastebin.com/f6fd0d64f. It needs to be applied to SVN headrevs.
 [2009-10-29 05:31 UTC] grant dot croker at ingres dot com
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jan 05 06:01:27 2025 UTC