SQL syntax error in cron_event_log_expire on key word SECONDS
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
Medium
|
Aaron Wells | ||
1.10 |
Fix Released
|
Medium
|
Aaron Wells | ||
1.8 |
Fix Released
|
Medium
|
Aaron Wells | ||
1.9 |
Fix Released
|
Medium
|
Aaron Wells | ||
15.04 |
Fix Released
|
Medium
|
Aaron Wells |
Bug Description
Mahara v1.10.0, Linux, MySQL.
We run Mahara on MySQL, and we get this error with our Cron :
{code}
[INF] b8 (lib/cron.php:137) Running core cron cron_event_
[WAR] b8 (lib/errors.
your MySQL server version for the right syntax to use near 'SECONDS' at line 1] in EXECUTE("DELETE FROM "mhr_event_log" WHERE time < CURRENT_DATE - INTERVAL 31536000 SECONDS")
[WAR] b8 (lib/errors.
Call stack (most recent first):
* log_message("Failed to get a recordset: mysqli error: [1064: Yo...", 8, true, true) at /app/apache2/
* log_warn("Failed to get a recordset: mysqli error: [1064: Yo...") at /app/apache2/
* SQLException-
* delete_
* delete_
* cron_event_
In the cron_event_
Changed in mahara: | |
status: | Fix Committed → Fix Released |
Hi David,
You are correct. It should be keyword SECOND not keyword SECONDS. http:// dev.mysql. com/doc/ refman/ 5.1/en/ date-and- time-functions. html#function_ date-add
Looks like this slipped through code review when masquerade logging was added, in Mahara 1.7. I'll upload a patch.
Cheers,
Aaron