Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
postgresql database
Priority:
Critical
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
22 Nov 2008 at 17:07 UTC
Updated:
2 Jan 2014 at 23:45 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
grub3 commentedI running Drupal7 test suite and reporting SQL errors as seen by PostgreSQL 8.3 backend.
Will report later ...
Comment #2
grub3 commentedThe log files a huge, I am not sure this is the right approach. Running again on seperate tests, starting with database test.
Comment #3
grub3 commentedThe database test breaks during the last stage (95%):
An error occurred.
/drupal-head/batch?id=11&op=do
Fatal error: Call to undefined method DatabaseSchema_pgsql::_createFieldSql() in /home/jmpoure/drupal/drupal/includes/database/pgsql/schema.inc on line 250
schema.test line 75 is :
db_add_field($ret, 'test_table', 'test_serial', array('type' => 'int', 'not null' => TRUE, 'default' => 0));Comment #4
swentel commented@jmpoure, cf http://drupal.org/node/338586
Comment #5
grub3 commentedThanks, as I am new to the list, I stop posting. You seem to resolve everything using issues ... Sorry for filling the list.
Comment #6
grub3 commentedBy the way, clean simpletest does not drop the left-over table under PostgreSQL. There are now more than 600 tables in my database ...
Comment #7
dave reidDoes the "Clean Envoirnment" button work at clearing the tables? If the tests fail somehow, the tables are not cleaned.
Comment #8
grub3 commentedI could clean the table using this little pgsql script, which has nothing to do with Drupal:
As I am new to Drupal, I don't know to what extent Drupal is aware of the table names.
Maybe it would be usefull to store the names of tables in a seperate table
named for example "simpletest_tables" to be able to drop them cleanly.
Comment #9
grub3 commentedDatabase API goes like a charm after Damien patch.
Testing ... Here are the remaining problems:
Test running during the night.
Bye.
Comment #10
grub3 commentedTest still fails .
Please find attached a PDF with the resulting status.
There seems to be a problem on serial fields, as D7 displays this error several times:
currval of sequence "simpletest29323aggregator_category_cid_seq" is not yet defined in this sessionWill investigate later on.
Feel free to open an issue, I am just a newcomer to Drupal.
The error in Search Engine ranking (search.test 317) is very common (group by):
SELECT COUNT(*) FROM (SELECT i.type, i.sid, (? * COALESCE((n.sticky), 0)) AS calculated_score FROM {search_index} i INNER JOIN {search_total} t ON i.word = t.word INNER JOIN {node} n ON n.nid = i.sid WHERE n.status = 1 AND (i.word = ?) AND i.type = ? GROUP BY i.type, i.sid HAVING COUNT(*) >= ?) n1 - Array ( [0] => 10 [1] => rocks [2] => node [3] => 1 ) SQLSTATE[42803]: Grouping error: 7 ERROR: column "n.sticky" must appear in the GROUP BY clause or be used in an aggregate functionThis test suite rocks! I can only congratulate you for this work.
I will use debugging tools and execute PHP step-by-step to try to find errors.
Later on. Good night!
Comment #11
grub3 commentedI looked at Search module and found this issue:
line 952:
$select = "SELECT SUM(i.score * t.count) AS calculated_score FROM {search_index} i $join WHERE $conditions GROUP BY i.type, i.sid HAVING COUNT(*) >= %d ORDER BY calculated_score DESC";This query will always fail under PostgreSQL.
The correct query would be:
$select = "SELECT SUM(i.score * t.count) AS calculated_score, i.type, i.sid FROM {search_index} i $join WHERE $conditions GROUP BY i.type, i.sid HAVING COUNT(*) >= %d ORDER BY calculated_score DESC";My knowledge of D7 internals is not sufficient to provide a patch, because I don't understand (yet) how is used $select.
Can someone fix and submit a patch?
Comment #12
damien tournoud commented@jmpoure: please see #296624: do_search() fails hard on Postgres for those search errors.
Comment #13
grub3 commented@damien: I would be happy to extract all PostgreSQL surge issues. I tried advanced seach with "PostgreSQL surge*" parameter with no luck. Any idea?
Answer: look for "PostgreSQL surge%". Okay.
Comment #14
lilou commentedSee this list : http://drupal.org/project/issues?projects=3060&text=PostgreSQL%20surge&v...
Comment #15
josh waihi commentedhttp://drupal.org/node/342503 fixes 4 fails on the system test
http://drupal.org/node/342493 fixes 1 exception in the aggregator tests
both need code review
Comment #17
damien tournoud commentedComment #18
josh waihi commentedGreat news! PostgreSQL now only has one fail left in core! this particular fail is a bad test that also fails with MySQL on innodb and would have failed on MySQLite if not for a bug in the MySQLite driver that let it pass.
there is an outstanding issue with a patch to fix this #355225: Inconsistant Insert Queries Between Database Drivers
Comment #19
berdirCan anyone confirm that #291026: change E_NOTICE to warning and allow selection of error level introduced test failures on PostgreSQL ? See attached screenshot
I haven't looked at them in detail, but they run fine on MySQL.
Comment #20
dave reidI'll take a look at it.
Comment #21
dave reidJust tried latest HEAD on PostgreSQL 8.3 and the error handler tests ran fine w/ 23 passes, 0 fails. One interesting thing to note is that your assertion pass of "GET to http://d7p/system-test/trigger-pdo-exception, response is 74 bytes." has a big reponse byte difference from my assertions pass of "GET to http://pgsql.drupalhead.local/system-test/trigger-pdo-exception, response is 3597 bytes."
Comment #22
berdirHm... this is... interesting. This is either a "feature" or a bug of php 5.3
Response of /system-test/trigger-exception (or trigger-pdo-exception)
MySQL
PHP 5.2: Looks good
PHP 5.3: Looks good
PostgreSQL
PHP 5.2: Looks good
PHP 5.3: Fatal error: Exception thrown without a stack frame in Unknown on line 0
Any idea what could produce this?
Comment #23
dave reidYay for PHP 5.3. #360605: PHP 5.3 Compatibility
Comment #24
josh waihi commentedThis PHP 5.3 issue is a issue for #360605: PHP 5.3 Compatibility, not here as Drupal 7 requirements are PHP 5.1. issues with 5.3 should be carried on over there. Since Postgres 8.3 is passing 100% now, I can happliy mark this issue as fixed :)
Comment #25
Crell commentedActually D7 requires PHP 5.2, because date handling didn't stop sucking until then.
And WOOHOO! Rock on!