The subscription_subscriptions table has a column `condition`, which is now a reserved word in MySQL 5.0. This patch adds the necessary backticks.

Otherwise you will have an error when loading the schema, or if it is already loaded, errors like:
user error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'condition' at line 1
query: SELECT s.*,c.name,c.id FROM subscription_subscriptions s LEFT JOIN subscription_channels c ON s.cid=c.cid WHERE c.daily=0 ORDER BY uid, cid, object, condition in /civicspace/includes/database.mysql.inc on line 66.

CommentFileSizeAuthor
subscription_1.patch3.95 KBmfb
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

deekayen’s picture

Status: Reviewed & tested by the community » Needs review

I think someone needs to confirm the backticks don't mess up pgsql before this gets committed.

jamesJonas’s picture

The CVC module for 4.7 as of 4/4/06 still contains this error. When running under sql 5.0.x we get the error:

ERROR 1064 (42000) at line 28: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'condition text NOT NULL,

Do you have an updated patch for the 4.7 - 4/4/06 version of the module?

deekayen’s picture

Try the latest CVS. It might take 12 hours or so for the tarball package to update, though. I don't know if this module is still maintained or not to know if I should tag it for the DRUPAL-4-7 branch or not.

jamesJonas’s picture

Updated CVS works. Module running on MySQL 5.0.18. Drupal 4.7 RC2. Thx - James

greggles’s picture

Status: Needs review » Fixed

this has been committed to head - marking fixed.

Anonymous’s picture

Status: Fixed » Closed (fixed)