Wedge

Public area => Bug reports => The Pub => Archived fixes => Topic started by: Alanthar on November 7th, 2012, 09:03 AM

Title: Problem with pruning logs
Post by: Alanthar on November 7th, 2012, 09:03 AM
Running the task "Empty out unimportant logs" will throw me reproduceably the following error:
Quote
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 ' wedge_log_floodcontrol' at line 1
File: [~]/Sources/ManageMaintenance.php
Line: 329
Title: Re: Problem with pruning logs
Post by: Anthony` on November 7th, 2012, 10:01 PM
I can confirm this. The issue,
Code: [Select]
wesql::query('
TRUNCATE {db_prefix}log_online, {db_prefix}log_floodcontrol');
Should be seperated for the two tables like so,
Code: [Select]
wesql::query('
TRUNCATE {db_prefix}log_online');

wesql::query('
TRUNCATE {db_prefix}log_floodcontrol');
Title: Re: Problem with pruning logs
Post by: Arantor on November 7th, 2012, 10:17 PM
Odd, I could have sworn MySQL supported multi-table truncates.
Title: Re: Problem with pruning logs
Post by: Nao on November 7th, 2012, 11:45 PM
Fixed locally, thanks.
Couldn't find any other TRUNCATE calls with multiple tables, so it should be fine from now on.