php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70866 pdo_pgsql problems during Drupal 8 test suite
Submitted: 2015-11-05 21:52 UTC Modified: 2017-10-24 06:05 UTC
Votes:4
Avg. Score:4.0 ± 1.0
Reproduced:3 of 3 (100.0%)
Same Version:3 (100.0%)
Same OS:3 (100.0%)
From: fabian at tag1consulting dot com Assigned:
Status: Open Package: PostgreSQL related
PHP Version: 7.0Git-2015-11-05 (Git) OS: Linux / Ubuntu
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2015-11-05 21:52 UTC] fabian at tag1consulting dot com
Description:
------------
Several tests fail with pdo_pgsql on PHP7. Cause is unclear, but exceptions seen only on PHP7 are:

- 'Object not in prerequisite state: 7 ERROR:  currval of sequence 
                 "simpletest386267queue_item_id_seq" is not yet defined in this session:'

- 'SQLSTATE[42P01]: Undefined
    table: 7 ERROR:  relation "simpletest203206menu_tree_mlid_seq" does not
    exist: INSERT INTO simpletest257820config (collection, name, data) VALUES
    (:db_insert_placeholder_0, :db_insert_placeholder_1,
    :db_insert_placeholder_2);'

Test script:
---------------
Reproducible with Drupal 8 and --with-pdo-pgsql (with Apache):

1. php ./core/scripts/run-tests.sh --sqlite /tmp/coretest.sqlite --dburl pgsql://postgres:12345@localhost/drupal8  --color --non-html --url http://127.0.0.1/ --verbose --class 'Drupal\menu_ui\Tests\MenuCacheTagsTest'

2. php ./core/scripts/run-tests.sh --sqlite /tmp/coretest.sqlite --dburl pgsql://postgres:12345@localhost/drupal8  --color --non-html --url http://127.0.0.1/ --verbose --class 'Drupal\system\Tests\Menu\MenuLinkTreeTest'

Expected result:
----------------
Tests do pass (they do with using --php /usr/bin/php5)

Actual result:
--------------
Tests fail with DB exceptions

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-11-07 16:27 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2015-11-07 16:27 UTC] ab@php.net
Hi,

from debugging yet, i see the following messages 

errmsg = 0x00000049c6030d40 "ERROR:  relation \"simpletest651326config\" does not exist\nLINE 1: SELECT data FROM simpletest651326config WHERE collection = '...\n                         ^\n"

Not sure why they don't popup when the suite ends (as it ends with the 55000, not with the one the suite finishes). So the first issue seems that the test table doesn't got created.

Fabian, could you please check the table creation part? It could be either something in PHP or still an issue with PDO. Just as you know the DP8 codebase better, you'll come to the place for sure faster :) Then we can debug further depending on your research.

Thanks.
 [2015-11-08 11:30 UTC] ab@php.net
Actually, I've just checked and the table seems to exist. Probably no way around digging in the DB codes anyway.

Thanks.
 [2015-11-22 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 [2015-11-23 18:00 UTC] fabian at tag1consulting dot com
-Status: No Feedback +Status: Closed
 [2015-11-23 18:00 UTC] fabian at tag1consulting dot com
It still happens on my test machine with current PHP 7 version.

It does not happen on Drupal CI Testbot.

I am not sure why.

It works with PHP5.
 [2015-11-23 18:00 UTC] fabian at tag1consulting dot com
-Status: Closed +Status: Assigned
 [2015-11-23 18:00 UTC] fabian at tag1consulting dot com
Re-opening
 [2017-10-24 06:05 UTC] kalle@php.net
-Status: Assigned +Status: Open
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Mon Sep 16 14:01:28 2019 UTC