Req #9662 [Fbk->NoF]: odbc_connect() can't create new connection if same credentials are given again
| From: | php-bugs at lists dot php dot net | Date: | Sun, 29 Jan 2017 04:22:27 +0000 |
| Subject: | Req #9662 [Fbk->NoF]: odbc_connect() can't create new connection if same credentials are given again | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-206997@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=9662&edit=1
ID: 9662
Updated by: php-bugs@lists.php.net
Reported by: cpoirier at shelluser dot net
Summary: odbc_connect() can't create new connection if same
credentials are given again
-Status: Feedback
+Status: No Feedback
Type: Feature/Change Request
Package: ODBC related
Operating System: *
PHP Version: *
Private report: N
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2017-01-20 17:02:49] heiglandreas@php.net
Is still relevant?
------------------------------------------------------------------------
[2002-06-09 16:21:24] mfischer@php.net
Updated summery, version, OS, making a feature request, reopening.
Mysql is the only extension having this. It would be very nice if before 4.3 gets release we have
this for *every* db extension finally . . .
------------------------------------------------------------------------
[2002-06-09 16:12:06] kalowsky@php.net
Well this is true. The connection option should have an option to create/force a new connection
really, but it doesn't. Currently if you make two connections with the same information,
you'll only receive the handle back of the first connection (to save on the connection
pooling). Makes sense in 99% of cases... but you should also be using a "start
transaction" and "end transaction" statement in sql to ensure transaction management,
and that would be based upon a SQL statement, not a connection handle.
Not sure if I'd really classify this as a bug, but I'll leave it open because it would be
a nice to change the behavior of.
------------------------------------------------------------------------
[2001-03-09 13:44:37] cpoirier at shelluser dot net
I think this may be intentional -- there was a comment that could have been to that effect in the
code. However, it has the side effect of breaking transaction management. The code here is an
approximation of the results that I was seeing -- I don't guarantee it will run, but
you'll get the idea...
<?php
$connection1 = odbc_connect( "X", "", "" );
$connection2 = odbc_connect( "X", "", "" );
odbc_exec( $connection1, "insert into Table values (1) );
odbc_exec( $connection2, "insert into Table values (2) );
odbc_commit( $connection1 );
odbc_rollback( $connection2 );
odbc_close( $connection1 );
odbc_close( $connection2 );
?>
Table contains rows:
1
2
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=9662&edit=1