PostgreSQL error (MySQL specific statements used)

wa2nlinux - February 18, 2009 - 12:35
Project:Facebook Connect
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:budda
Status:closed
Description

* warning: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at or near "ON" at character 88 in /home/forum/drupal-6.9/includes/database.pgsql.inc on line 139.
* user warning: query: INSERT INTO fbconnect_users (uid, fbuid, timestamp) VALUES (3, 1205229234, 1234960723) ON DUPLICATE KEY UPDATE uid = 3 in /home/forum/drupal-6.9/sites/all/modules/fbconnect/fbconnect.module on line 375.
* Association failed

#1

LaNets - February 21, 2009 - 12:20
Status:active» patch (to be ported)

The lastest Dev version include à fix for this bug.
Thanks for reporting.

#2

wa2nlinux - February 21, 2009 - 14:08

Same error is still show up

#3

jaydub - March 17, 2009 - 08:53
Title:postgres error» PostgreSQL error (MySQL specific statements used)
Status:patch (to be ported)» needs review

The example reported above failed on PostgreSQL because the SQL used is MySQL specific (ON DUPLICATE UPDATE). However it's been replaced in the current -dev with another MYSQL specific statement REPLACE (and in another place REPLACE INTO). The attached patch addresses these two queries by simply using a DELETE and INSERT statement pair.

AttachmentSize
fbconnect.376239.patch 1.9 KB

#4

jaydub - March 17, 2009 - 19:48

Re-rolled with another query modified for compatibility

AttachmentSize
fbconnect.376239.patch 2.41 KB

#5

wa2nlinux - March 20, 2009 - 14:36

Patch aplied ...seem working well

#6

budda - May 4, 2009 - 21:36
Assigned to:Anonymous» budda
Status:needs review» reviewed & tested by the community

Tested against MySQL to ensure nothing has been broken.
Seems fine.

Ready for commit.

#7

budda - May 5, 2009 - 09:23
Status:reviewed & tested by the community» fixed

Committed to CVS.

#8

System Message - May 19, 2009 - 09:30
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.