|  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
Avg. Score:4.2 ± 1.0
Reproduced:4 of 4 (100.0%)
Same Version:3 (75.0%)
Same OS:3 (75.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
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,

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

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

2. php ./core/scripts/ --sqlite /tmp/coretest.sqlite --dburl pgsql://postgres:12345@localhost/drupal8  --color --non-html --url --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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-11-07 16:27 UTC]
-Status: Open +Status: Feedback
 [2015-11-07 16:27 UTC]

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.

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

 [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
 [2017-10-24 06:05 UTC]
-Status: Assigned +Status: Open
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Apr 17 00:01:24 2021 UTC