php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57323 db2_procedures & db2_ procedure_columns doesn't work on persistent connections
Submitted: 2006-10-26 16:34 UTC Modified: 2006-11-01 18:30 UTC
From: rhodesa at us dot ibm dot com Assigned: tessus (profile)
Status: Closed Package: ibm_db2 (PECL)
PHP Version: 5.1.4 OS: SUSE LINUX Enterprise Server 9
Private report: No CVE-ID: None
View Add Comment Developer Edit
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:
42 + 30 = ?
Subscribe to this entry?

 
 [2006-10-26 16:34 UTC] rhodesa at us dot ibm dot com
Description:
------------
db2_procedures & db2_ procedure_columns does not work when connected with a persistent connection. When looking at the CVS I noticed that these two functions were retrieving the DB2 connection with the ZEND_FETCH_RESOURCE function while all the other functions used ZEND_FETCH_RESOURCE2 to get the DB connection. I updated the source to mimic the other functions and it works great now.

P.S. - The functions work fine when db2_connect is used instead

Reproduce code:
---------------
$cnx = db2_pconnect('db', 'user', 'pass', $options);
$r = db2_procedures($cnx,NULL,'SCHEMA','%%');
print_r(db2_fetch_assoc($r));

Expected result:
----------------
Array
(
    [procedure_cat] => 
    [procedure_schem] => SCHEMA
    [procedure_name] => PROCNAME
    [num_input_params] => 2
    [num_output_params] => 1
    [num_result_sets] => 0
    [remarks] => 
    [procedure_type] => 1
)

Actual result:
--------------
Warning: db2_procedures(): supplied resource is not a valid Connection Resource resource

Warning: db2_fetch_assoc() expects parameter 1 to be resource, boolean given

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-10-27 12:58 UTC] helmut_tessarek at evermeet dot cx
I will look into it.
 [2006-11-01 18:30 UTC] kfbombar at us dot ibm 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.

This bug has been fixed in CVS Head
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 21:01:29 2024 UTC