Bug #72759 [Fbk]: Regression
| From: | yunosh@php.net | Date: | Tue, 09 Aug 2016 12:59:22 +0000 |
| Subject: | Bug #72759 [Fbk]: Regression | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-203116@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=72759&edit=1
ID: 72759
Updated by: yunosh@php.net
Reported by: yunosh@php.net
Summary: Regression
Status: Feedback
Type: Bug
Package: PDO PgSQL
PHP Version: master-Git-2016-08-05 (Git)
Block user comment: N
Private report: N
New Comment:
Yes, I was able to trim this down today. It's about transactions. Commenting out the
transaction statements in the following example makes the script work again:
<?php
$pdo = new PDO('pgsql:dbname=test', 'vagrant', '');
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, true);
$pdo->query('DROP TABLE IF EXISTS "horde_sessionhandler"');
$pdo->query('CREATE TABLE "horde_sessionhandler" ( "session_id"
character varying(32) NOT NULL, "session_lastmodified" integer NOT NULL,
"session_data" bytea, PRIMARY KEY("session_id") )');
$pdo->query('CREATE INDEX "index_horde_sessionhandler_on_session_lastmodified" ON
"horde_sessionhandler" ("session_lastmodified")');
$pdo->beginTransaction();
$pdo->query('INSERT INTO "horde_sessionhandler" ("session_id",
"session_data", "session_lastmodified") VALUES (\'sessionid\',
E\'\\\\x73657373696f6e64617461\', 1470745222)');
var_dump($pdo->lastInsertId(null));
$pdo->commit();
$stmt = $pdo->query('SELECT * FROM "horde_sessionhandler"');
var_dump($stmt);
var_dump($stmt->fetchAll(PDO::FETCH_ASSOC));
Previous Comments:
------------------------------------------------------------------------
[2016-08-05 13:40:42] ab@php.net
Thanks for the report. Were you already able to come up with a reproduce code?
Thanks.
------------------------------------------------------------------------
[2016-08-05 09:25:04] yunosh@php.net
Looking at the history, this seems to be the only candidate that falls into the timespan: https://github.com/php/php-src/commit/12628e9a46b91a0aa92fd0619cdd545c409d25a6
------------------------------------------------------------------------
[2016-08-05 09:20:06] yunosh@php.net
Description:
------------
Around ten days ago some change was implemented in the PDO_pgsql code that made some of our unit
test starting to fail: https://travis-ci.org/horde/horde/jobs/148029445#L2160
Tests from July 26 succeeded, while they failed from July 28 on. Not sure how quick Travis is with
updating the nightlies.
Interestingly, the Horde_SessionHandler tests are the only test with PDO_pgsql support that fail.
Yes, I know, you now want a small reproduceable test. But maybe we can further narrow down the
possible changes in php-src so that I know where to start looking.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=72759&edit=1