#47297 [Opn->Csd]: pdo_033.phpt fails on PgSQL
| From: | felipe@php.net | Date: | Wed, 04 Feb 2009 16:41:37 +0000 |
| Subject: | #47297 [Opn->Csd]: pdo_033.phpt fails on PgSQL | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-133489@lists.php.net to get a copy of this message | ||
ID: 47297
Updated by: felipe@php.net
Reported By: matteo at beccati dot com
-Status: Open
+Status: Closed
Bug Type: PDO related
Operating System: Any
PHP Version: 5.3.0beta1
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Thanks for the patch.
Previous Comments:
------------------------------------------------------------------------
[2009-02-04 07:26:10] matteo at beccati dot com
Here's a patch:
http://www.beccati.com/misc/pdo_pgsql_bug47297_php_5.3.patch
------------------------------------------------------------------------
[2009-02-04 07:24:58] matteo at beccati dot com
Description:
------------
The common test pdo_033.phpt fails on PgSQL because it's using a
char(100) field, which will be right padded with spaces once retrieved,
even though the actual output doesn't show that.
Using a char field with the correct size fixes the issue, while surely
remaining compatible with other database type.
Reproduce code:
---------------
php -n run-tests.php --show-diff ext/pdo_pgsql/tests/common.phpt
Expected result:
----------------
PASS Postgres PDO Common: PDO::quote()
[ext/pdo_pgsql/tests/pdo_033.phpt]
Actual result:
--------------
TEST 49/55 [ext/pdo/tests/pdo_033.phpt]
========DIFF========
005+ [t] =>
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
005- [t] =>
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
========DONE========
FAIL Postgres PDO Common: PDO::quote()
[ext/pdo_pgsql/tests/pdo_033.phpt]
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47297&edit=1