Bug #15232 [Asn->Bgs]: Multiple database handles seem to collide

From: Date: Wed, 24 Oct 2012 14:05:05 +0000
Subject: Bug #15232 [Asn->Bgs]: Multiple database handles seem to collide
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-9214@lists.php.net to get a copy of this message
Edit report at https://pear.php.net/bugs/bug.php?id=15232&edit=1 ID: 15232 Updated by: danielc@analysisandsolutions.com Reported By: dan at moo dot com Summary: Multiple database handles seem to collide -Status: Assigned +Status: Bogus Type: Bug Package: MDB2 Operating System: 5.0.32-Debian_7etch8-log Package Version: 2.4.1 PHP Version: 5.2.0 -Assigned To: quipo +Assigned To: danielc Roadmap Versions: New Comment: -Status: Assigned +Status: Bogus -Assigned To: quipo +Assigned To: danielc In SVN commit r328127, I added a testBug15232() method in tests/Standard/BugsTest.php. The test passes (I used mysql, mysqli, and pgsql) when running the against the beta release that came out yesterday (2.5.0b4). Not sure if the beta fixed the release the users are running or if there are overriding factors in the users' code or environment that are/were causing the problems. Marking this "bogus" so it doesn't show up as fixed when generating the next release. Previous Comments: ------------------------------------------------------------------------ [2011-09-04 20:16:08] ghada We're FINALLY migrating from DB to MDB2. We are now running into this same issue with the database connections. We have several database connections: 1. MSSQL - 2 connections to 2 different databases on the same box (DB1, DB2). 2. MySql - 1 connection to 1 database (DB3). 3. PgSql - 1 connection to 1 database (DB4). The MySql and the PgSql databases are on the same box. The MSSQL databases are on a different box to the MySql and PgSql databases. We've tried the 'new-link=true' on the DSN. We've tried using the: - factory() - connect() - singleton() None of them work when we switch between the databases. i.e. (this could be any query) 1. Run Query1 on MSSQL DB1 2. Run Query2 on MySql DB3 3. Run Query3 on MSSQL DB2 - this generates the error "MDB2 Error: no such table". We have the latest MDB2 (2.4.1) and php (5.3.1). Has this issue been resolved or is there some "trick" that we're missing? ------------------------------------------------------------------------ [2010-07-14 03:54:25] phreek_11 Still doesnt work for me. I have persistent and new_link set to true. I have the latest MDB2 packages (with mssql) and PHP 5.2.5. When switching between 2 connections on 2 different servers it works fine, but when switching between two different databases on the same server (and different username/passwords) it does not work. ------------------------------------------------------------------------ [2010-06-10 10:40:25] alec Works for me with "?new_link=true" added to $dsn2. Tested with pgsql driver and 2.4.1/2.5.0-svn versions. This ticket should be closed. ------------------------------------------------------------------------ [2010-03-02 10:42:51] doconnor I can't tell: is this because MDB2 uses a bunch of static methods and global state, or persistent connections causing global state behaviour ? ------------------------------------------------------------------------ [2008-12-05 08:18:55] c0ntax Sorry to reopen this, but have a try of the script below with persistent connections set to true. Even with new_link=true in the DSN it still exhibits the same erronious behaviour of running the first query against the second database handle. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://pear.php.net/bugs/bug.php?id=15232 -- Edit this bug report at https://pear.php.net/bugs/bug.php?id=15232&edit=1

« previous php.pear.bugs (#9214) next »