[PATCH] add appname argument to sybase_connect
| From: | Christophe Sollet | Date: | Mon, 04 Mar 2002 16:28:55 +0000 |
| Subject: | [PATCH] add appname argument to sybase_connect | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-80699@lists.php.net to get a copy of this message | ||
Attached patch add an optional 'appname' argument to sybase_connect
(both ct and db interface).
The first goal of this patch is, obviously, to be able to set the
appname to something more informative that just 'PHP 4.0' if your db
server is php dedicaced.
Futhermore, it's allow to make separate connections in the same script
to the same db since the appname become part of the hashed details :
It's needed when, for example, you have a connection inside a
transaction and you have to make a query that can't be done inside this
transaction.
Without this patch, this sort of things is impossible in PHP (or you
have to play with the case of the username to fool the
hashed_details...).
The patch is well tested with the ct interface (applied on our systems
from several weeks) and poorly tested with the db interface (simple
connect test).
Could someone review it and commit it (it's against current CVS) ?
Christophe.
--
--------------------------
Christophe Sollet
csollet@coleebris.com
http://www.coleebris.com
Tél: 01.40.50.60.47
Fax: 01.40.50.67.66
--------------------------