php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49429 odbc_autocommit doesn't work
Submitted: 2009-09-01 10:50 UTC Modified: 2010-03-20 19:19 UTC
Votes:7
Avg. Score:5.0 ± 0.0
Reproduced:7 of 7 (100.0%)
Same Version:7 (100.0%)
Same OS:4 (57.1%)
From: jvanderleij at desyderetail dot nl Assigned: felipe
Status: Closed Package: ODBC related
PHP Version: 5.3.0 OS: Windows XP professional
Private report: No CVE-ID:
 [2009-09-01 10:50 UTC] jvanderleij at desyderetail dot nl

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-11-24 12:45 UTC] kristoff dot picard at ingres dot com
Same problem with 5.3.1
Tested on Linux with unixODBC and Ingres

Simple testcase:
------
$dsn='mydsn';
$conn=odbc_connect($dsn,'','');

$rc=odbc_autocommit($conn,FALSE);
echo "return set odbc_autocommit false: ".$rc. "\n";

$rc=odbc_autocommit($conn);
echo "return get odbc_autocommit: ".$rc. "\n";
-----

Output is as follows:
return set odbc_autocommit false: 1
return get odbc_autocommit: 1

While with 5.2.11 it is:
return set odbc_autocommit false: 1
return get odbc_autocommit: 0


ODBC trace shows that in 5.3.x SQLSetConnectOption() isn't called when passing FALSE as second parameter, but SQLGetConnectOption. 

When passing TRUE SQLSetConnectOption() is called as expetced.
 [2010-03-20 19:19 UTC] felipe@php.net
Automatic comment from SVN on behalf of felipe
Revision: http://svn.php.net/viewvc/?view=revision&revision=296467
Log: - Fixed bug #49429, #51331 (odbc_autocommit doesn't work)
 [2010-03-20 19:19 UTC] felipe@php.net
-Summary: Problem with odbc_autocommit +Summary: odbc_autocommit doesn't work -Status: Open +Status: Closed -Assigned To: +Assigned To: felipe
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Fri Apr 18 05:03:21 2014 UTC