php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59291 SQL comments are not being handled correctly
Submitted: 2010-07-02 10:49 UTC Modified: 2010-07-12 12:44 UTC
From: grant dot croker at ingres dot com Assigned: grantc@php.net (profile)
Status: Closed Package: ingres (PECL)
PHP Version: 5.3.2 OS: Ubuntu
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: grant dot croker at ingres dot com
New email:
PHP Version: OS:

 

 [2010-07-02 10:49 UTC] grant dot croker at ingres dot com
Description:
------------
SQL comments (/* */) that contain ? markers are not being 
correctly parsed, With the following query:

SELECT /* Are all cols needed? */ * from table where col1 = ?

the driver expects 2 parameters to be passed even though only 
one is needed.


Reproduce code:
---------------
http://pastebin.com/jXt8d7nz

Expected result:
----------------
No errors

Actual result:
--------------
connected<br>
Warning: DROP : 2753-DROP: 'sometable' does not exist or is 
not owned by you. in 
/home/grant/public_html/php/pecl/2.0/ingres/comments.php on 
line 40
Execute SELECT without any parameters

Warning: ingres_query(): Expecting a parameter array but did 
not get one in 
/home/grant/public_html/php/pecl/2.0/ingres/comments.php on 
line 48
Execute SELECT with parameters

Warning: ingres_query(): Incorrect number of parameters 
passed, expected 4 got 2 in 
/home/grant/public_html/php/pecl/2.0/ingres/comments.php on 
line 54

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-07-12 12:44 UTC] grant dot croker at ingres dot com
This bug has been fixed in SVN.

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-2024 The PHP Group
All rights reserved.
Last updated: Fri May 03 09:01:31 2024 UTC