Bug #64172 [Opn->Ver]: errorInfo is not properly cleaned up

From: Date: Wed, 04 Jun 2014 09:01:47 +0000
Subject: Bug #64172 [Opn->Ver]: errorInfo is not properly cleaned up
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-186048@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=64172&edit=1 ID: 64172 Updated by: mbeccati@php.net Reported by: dmitry dot vasilev at gmail dot com -Summary: errorInfo doesn't cleans up properly +Summary: errorInfo is not properly cleaned up -Status: Open +Status: Verified Type: Bug -Package: PDO PgSQL +Package: PDO Core -Operating System: FreeBSD 8.2 +Operating System: Irrelevant PHP Version: 5.4.11 Block user comment: N Private report: N New Comment: I started writing a new common phpt file in order to check the behaviour of drivers other then pgsql and it seems that pdo_sqlite and pdo_mysql are affected too, so I'm changing the bug type to PDO Core. Previous Comments: ------------------------------------------------------------------------ [2013-02-08 07:55:43] dmitry dot vasilev at gmail dot com Description: ------------ Affects at least PgSQL driver (MySQL works fine). Workflow: 1. Make invalid query - errorInfo()[2] contains error info. Error code is not zero. 2. Make valid query - errorInfo()[2] still contains an error from the first step (but error code is 0). pdo_pgsql: libpq version 9.0.8 Module version: 1.0.2 Test script: --------------- $pdo->exec("SELECT * FROM bad_table;"); echo $pdo->errorInfo()[2]; // "relation bad_table doesn't exist" $pdo->exec("SELECT * FROM good_table;"); echo $pdo->errorInfo()[2]; // "relation bad_table doesn't exist". Expected "". Expected result: ---------------- "" Actual result: -------------- "relation bad_table doesn't exist" ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=64172&edit=1

« previous php.bugs (#186048) next »