php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3520 Fetch PB with select ... for update
Submitted: 2000-02-17 16:32 UTC Modified: 2006-07-17 08:58 UTC
From: eric dot poisse at cermex dot fr Assigned:
Status: Not a bug Package: OCI8 related
PHP Version: 3.0.12 OS: Linux 2.2.5
Private report: No CVE-ID: None
 [2000-02-17 16:32 UTC] eric dot poisse at cermex dot fr
When I use the Select <xxx> from <table> FOR UPDATE, There is a Fetch PB during the execution of the OCIfetch function
This PB don't appears without the FOR UPDATE clause.

 $stmt = @OCIParse($connection, "select * from services for update");
		     // Calcul du nombre de lignes total de la requete
		     if (@OCIExecute($stmt)) {
				while (OCIFetch($stmt)) {
                                                        ....  
                                                         }



PHP Compiled with --oracle lib

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-02-17 16:48 UTC] thies at cvs dot php dot net
please do:

....
OCIExecute($stmt,OCI_DEFAULT);
....
OCICOmmit($connection);


the problem is that the default mode for OCIExecute is OCI_COMMIT_ON_SUCCESS - which ends the current transaction.
that way "select ... for update" cannot work.

BTW: theres an ocierror function that would have given you some insights!


 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Jan 29 08:01:25 2020 UTC