I've come across this in some other modules too. In this query:

INSERT INTO {subscriptions_queue} (uid, name, mail, language, module, field, value, author_uid, send_interval, digest, last_sent, load_function, load_args, is_new)
SELECT u.uid, u.name, u.mail, u.language, s.module, s.field, s.value, s.author_uid, s.send_interval, su.digest, su.last_sent, '%s', '%s', '%d'
FROM {subscriptions} s
INNER JOIN {subscriptions_user} su ON s.recipient_uid = su.uid
INNER JOIN {users} u USING(uid) $join
WHERE
s.module = '%s' AND
s.field = '%s' AND
s.author_uid IN (%d, -1) AND $conditions

MySQL 5.0.32 complains that "Column uid in from clause is ambiguous". Even though it works fine in MySQL 5.0.26. Furthermore I think USING() is a MySQL specific function. But my latest google searches can't confirm that. The simple fix is just to use the ole ON:

ON su.uid = u.uid

CommentFileSizeAuthor
subscriptions_no_using.diff931 bytesdalin

Comments

salvis’s picture

Status: Needs review » Fixed

Committed to D5 and D6, thanks!

Anonymous’s picture

Status: Fixed » Closed (fixed)

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