PostgreSQL surge #4: fix undefined function call

Damien Tournoud - November 24, 2008 - 19:23
Project:Drupal
Version:7.x-dev
Component:postgresql database
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

DatabaseSchema_pgsql::addField() calls $this->_createFieldSql() while that function is in fact called $this->createFieldSql().

#1

Damien Tournoud - November 24, 2008 - 19:27
Status:active» needs review
AttachmentSizeStatusTest resultOperations
338586-add-field-undefined-function.patch895 bytesIdlePassed: 7014 passes, 0 fails, 0 exceptionsView details | Re-test

#2

swentel - November 24, 2008 - 20:48

Seems like there's another one: Call to undefined method DatabaseSchema_pgsql::_processField()

#3

Damien Tournoud - November 24, 2008 - 20:57
AttachmentSizeStatusTest resultOperations
338586-add-field-undefined-function.patch894 bytesIdlePassed: 7059 passes, 0 fails, 0 exceptionsView details | Re-test

#4

swentel - November 24, 2008 - 21:40

All succeed except 7 fails on schema api
Insert with a default succeeded. Other schema.test 50 SchemaTestCase->testSchema()
Insert into the new table succeeded. Other schema.test 62 SchemaTestCase->testSchema()
Two fields were successfully inserted. Other schema.test 66 SchemaTestCase->testSchema()
Insert with a serial succeeded. Other schema.test 80 SchemaTestCase->testSchema()
Insert with a serial succeeded. Other schema.test 82 SchemaTestCase->testSchema()
The serial is monotone. Other schema.test 84 SchemaTestCase->testSchema()
There were two rows. Other schema.test 87 SchemaTestCase->testSchema()

#5

swentel - November 24, 2008 - 23:02

Ok, patch contains 3 other very small fixes in schema.test which makes all database tests pass,
HOWEVER, someone with more postgres skills should find out why those small fixes make them pass and why a default value of 0 makes it fail ..

AttachmentSizeStatusTest resultOperations
338586-add-field-undefined-function.patch3.1 KBIdleUnable to apply patch 338586-add-field-undefined-function_1.patchView details | Re-test

#6

Damien Tournoud - November 25, 2008 - 11:38
Status:needs review» needs work

Well, no, you will not modify the test case to satisfy the PostgreSQL driver!

#7

swentel - November 25, 2008 - 11:39

I know, I should have marked it CNW also, just wanted to point out with the patch where the failures were :)

#8

Damien Tournoud - November 25, 2008 - 11:52
Status:needs work» needs review

This should be better.

AttachmentSizeStatusTest resultOperations
338586-add-field-undefined-function.patch1.18 KBIdleUnable to apply patch 338586-add-field-undefined-function_2.patchView details | Re-test

#9

swentel - November 25, 2008 - 14:23
Status:needs review» reviewed & tested by the community

Last patch makes all Databases tests pass, so marking rtbc

#10

jmpoure - November 25, 2008 - 21:10

Yes it works like a charm.

#11

jmpoure - November 25, 2008 - 22:39

What is the impact of this bug on database creation under PostgreSQL?
Should I delete the Drupal7 database and create a new one from scratch?

#12

Dries - November 26, 2008 - 13:42

Committed to CVS HEAD. Thanks! :)

#13

Damien Tournoud - November 26, 2008 - 13:49
Status:reviewed & tested by the community» fixed

#14

serenecloud - November 27, 2008 - 03:17

Agreed with the above. After applying http://drupal.org/node/337794 and this patch I am able to run all simpletests on php5, apache2, postgres 8.1 without this error:

Call to undefined method DatabaseSchema_pgsql::_createFieldSql()

Final Simpletest output:

Testing
The tests have finished running.
6689 passes, 146 fails, and 47 exceptions

#15

System Message - December 11, 2008 - 03:22
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.