Bug #68937 GQL behavior differs in 5.6 for statements which cannot be parsed
Submitted: 11 Apr 2013 21:25 Modified: 26 Sep 2013 16:56
Reporter: Todd Farmer (OCA) Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Logging Severity:S3 (Non-critical)
Version:5.6.10 OS:Any
Assigned to: Paul Dubois CPU Architecture:Any

[11 Apr 2013 21:25] Todd Farmer
Assuming this is a docs bug, but it seems that the behavior introduced in 5.6 with --log-raw affects more than just statements with passwords.  It also prevents statements which fail parsing to be logged in the general query log.  For example:

mysql> blah;
ERROR 1064 (42000): 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 'blah' at line 1

With 5.5, this is dutifully recorded in the GQL:

130411 14:07:20	    1 Query	blah

In 5.6, nothing is written to GQL.

Presumably this is an intentionally behavior change, which goes hand-in-hand with the new ability to mask passwords (logging after parsing).

How to repeat:
* Enable GQL on 5.6 and 5.5 servers
* Send invalid syntax command to servers
* Observe that nothing was written to 5.6 server, but was for 5.5
[26 Sep 2013 16:56] Paul Dubois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.

Added to http://dev.mysql.com/doc/refman/5.6/en/query-log.html:

One implication of the introduction of password rewriting in MySQL
5.6.3 is that statements that cannot be parsed (due, for example, to
syntax errors) are no longer written to the general query log because
they cannot be known to be password free. Use cases that require
logging of all statements including those with errors should use the
--log-raw option, bearing in mind that this also bypasses password