Bug #62123 Unhandled exception in log viewer
Submitted: 9 Aug 2011 7:26 Modified: 17 Nov 2011 7:36
Reporter: Joost de Heer Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Administration Severity:S3 (Non-critical)
Version:5.2.34 CE OS:Windows (XP SP3)
Assigned to: CPU Architecture:Any
Tags: general_log, log-output, table

[9 Aug 2011 7:26] Joost de Heer
Description:
I enabled table-based logging in MySQL 5.1.56 (log-output = TABLE). When using Workbench 5.2.33 and earlier the log display worked without problems, but since I upgraded to 5.2.34, I get an unhandled exception when opening the logs in Workbench:

Unhandled exception: Error fetching log contents: Error executing '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 '-50, 50' at line 1'
SELECT * FROM mysql.general_log ORDER BY event_time DESC LIMIT -50,50.
SQL Error: 1064

This is probably caused because the general log is empty.

After clicking on OK, the slow query log can be accessed normally, so this isn't a big problem, but it looks ugly.

How to repeat:
- enable table-based logging
- Make sure the general_log table is empty
- Open workbench, go to Management - Server logs, and the error pops up.
[9 Aug 2011 7:53] Valeriy Kravchuk
Thank you for the bug report. Verified just as described.
[17 Nov 2011 7:36] Philip Olson
Fixed as of 5.2.36:

+        Opening <guimenu>Management</guimenu>, <guimenu>Server
+        Logs</guimenu> would generate an unhandled exception when using
+        table-based logging, while the general log was empty.