Error in SQL Syntax
| Project: | FriendFeed |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Right after install, module is not working (no updates to FF, no FF to Drupal), the following error shows up (and on http://mysite.com/user/1/friendfeed):
* user warning: 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 'WRITE' at line 1 query: LOCK TABLES WRITE in /home/www/doc/11111/mysite.com/www/drupal/includes/database.mysql.inc on line 172.
* user warning: 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 'SET data = 'cache', created = 1213934120, expire = 1213934420, query: UPDATE SET data = 'cache', created = 1213934120, expire = 1213934420, headers = '' WHERE cid = 'friendfeed_|||0|30' in /home/www/doc/11111/mysite.com/www/drupal/includes/database.mysql.inc on line 172.
Fresh Drupal 5.7, PHP 4.4.8, MySQL 4.0.27, Apache/1.3.34

#1
I expected errors in the 5.x release of this because I honestly didn't really test it that much. Anyone want to have a hack at it? It's something wrong with the caching.
#2
The SQL error is because in line 189 of friendfeed.module it is calling cache_set with the 6.0 syntax - in 5.x the arguments are in a different order --
cache_set('friendfeed_'. $key, $feeds[$key], 'cache', time() + 300);
Should be
cache_set('friendfeed_'. $key, 'cache', $feeds[$key], time() + 300);
That makes the error go away - but it still won't retrieve the feed - I didn't get a chance to go any further than that.
#3
Ahhh, I remember. Will also need the call to serialize too. Haven't used ugly Drupal 5 in a while.... Stuck the small untested fix into the DRUPAL-5 branch. Mind testing? http://drupal.org/cvs?commit=124592
#4
Seems to work. I don't get this error in 5.7 with the latest (2008-07-01) dev build.
#5
Great! Phew.... Thanks a lot. It's not that good to commit code without testing it :-P .
#6
Automatically closed -- issue fixed for two weeks with no activity.