Closed Bug 161305 Opened 19 years ago Closed 19 years ago
SQL-error in userprefs
.cgi with allowemailchange
If I enable allowemailchange I get the following SQL error when trying to access userprefs.cgi: SELECT tokentype, issuedate + INTERVAL 3 DAY, eventdata FROM tokens WHERE userid = 1 AND tokentype LIKE 'email%' ORDER BY tokentype ASC LIMIT 1: You have an error in your SQL syntax near '3 DAY, eventdata FROM tokens WHERE user' at line 1 at globals.pl line 276. The offending bit seems to be the '+ INTERVAL 3 DAY' string. The Mysql server is version 3.22.32 (Debian Potato). This clearly meets the requirement of 3.22.5. I checked it on a Debian Woody system (Mysql version 3.23.49) and it works fine there.
Bleh. We require 3.23 on the trunk now, but not for 2.16, and mysql 3.22 doesn't support that. Can you change the |issuedate + INTERVAL 3 DAY| to |DATE_ADD(issuedate,INTERVAL 3 day)|, and see if that fixes it?
Whiteboard: [BRANCH ONLY] Wanted for 2.16.1
Target Milestone: --- → Bugzilla 2.18
Yes, it works fine with the changed SQL-statement. Thanks for the quick response.
Assignee: myk → bbaetz
Severity: normal → major
Target Milestone: Bugzilla 2.18 → Bugzilla 2.16
Comment on attachment 94313 [details] [diff] [review] v1 r= justdave Don't have a 3.22.x to test on, but I'll take the reporter's word on it. No syntax errors in the SQL and tests pass, and it still works on 3.23.49
Attachment #94313 - Flags: review+
Checked in to the 2.16 branch only - we don't need this for the trunk, since we require mysql 3.23 there. This will appear in 2.16.1 if and when such a release happens. Checking in userprefs.cgi; /cvsroot/mozilla/webtools/bugzilla/userprefs.cgi,v <-- userprefs.cgi new revision: 18.104.22.168; previous revision: 22.214.171.124 done
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Whiteboard: [BRANCH ONLY] Wanted for 2.16.1 → [BRANCH ONLY] Fixed in 2.16.1
Whiteboard: [BRANCH ONLY] Fixed in 2.16.1 → [BRANCH ONLY] [Fixed in 2.16.1]
*** Bug 169166 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.