Re: Re: MDB2 dropDatabase issue
| From: | Alessandro Pasotti | Date: | Wed, 18 Oct 2006 11:38:22 +0000 |
| Subject: | Re: Re: MDB2 dropDatabase issue | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-25503@lists.php.net to get a copy of this message | ||
Il 12:04, mercoledì 18 ottobre 2006, Lukas Kahwe Smith ha scritto:
> Alessandro Pasotti wrote:
> > Hello,
> >
> > I'm getting crazy debugging a script where a DB table is dropped.
> >
> > In the same script I repeteadly create and drop the same pgsql table
> > (it's a unit test script), this is the code:
> >
> >
> > $new_db_name = 'test_geodb';
> > $mdb2->loadModule('Manager');
> > // Pass
> > $this->assertFalse(PEAR::isError($mdb2));
> > // Pass
> > $this->assertTrue(in_array($new_db_name,
> > $mdb2->listDatabases())); // Pass
> > $this->assertTrue(MDB2_OK == $mdb2->dropDatabase($new_db_name));
> > // Fail
> > $this->assertFalse(in_array($new_db_name,
> > $mdb2->listDatabases()));
>
> Looks ok. Do you have any problems?
Yes, the database is not dropped:
the last call to $mdb2->dropDatabase($new_db_name) returns MDB2_OK but the
subsequent call to in_array($new_db_name, $mdb2->listDatabases()) returns
true.
--
Alessandro Pasotti
itOpen - "Open Solutions for the Net Age"
w3: www.itopen.it
Linux User# 167502