]> granicus.if.org Git - php/commitdiff
MFH: Mixing OCIPlogon and OCINLogon no longer leak Oracle-Sessions. (thies)
authorThies C. Arntzen <thies@php.net>
Sat, 13 Apr 2002 12:14:02 +0000 (12:14 +0000)
committerThies C. Arntzen <thies@php.net>
Sat, 13 Apr 2002 12:14:02 +0000 (12:14 +0000)
to RM: this is a real fix that _should_ be in 4.2!

ext/oci8/oci8.c

index 988b4bc5d5e9ff52706cba9731061694d5134663..c0eedc83938ad12b17aa808fdc46e53c3baf3bd7 100644 (file)
@@ -2578,7 +2578,13 @@ static void oci_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent,int exclu
                goto CLEANUP;
        }
 
-       persistent = server->persistent; /* if our server-context is not persistent we can't */
+       if (exclusive) {
+               /* exlusive session can never be persistent!*/
+               persistent = 0;
+       } else {
+               /* if our server-context is not persistent we can't */
+               persistent = server->persistent; 
+       }
 
        session = _oci_open_session(server,username,password,persistent,exclusive);