Download & Extend

PostgreSQL error (MySQL specific statements used)

Project:Facebook Connect
Component:Code
Category:bug report
Priority:normal
Assigned:budda
Status:closed (fixed)

Issue Summary

* 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

Comments

#1

Status:active» patch (to be ported)

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

#2

Same error is still show up

#3

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

Re-rolled with another query modified for compatibility

AttachmentSize
fbconnect.376239.patch 2.41 KB

#5

Patch aplied ...seem working well

#6

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

Status:reviewed & tested by the community» fixed

Committed to CVS.

#8

Status:fixed» closed (fixed)

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

nobody click here