Bug #73605 setting session lc_messages changes a server's error language in error log
Submitted: 15 Aug 2014 18:52 Modified: 11 Sep 2014 0:45
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Errors Severity:S4 (Feature request)
Version:5.6.20 OS:Any
Assigned to: CPU Architecture:Any

[15 Aug 2014 18:52] Shane Bester
Description:
I don't like the end user being able to control the language that the server  uses to write errors to the error log.  

How to know what to expect in the error log when a user is controlling the language ?

Testcase causes output to error log:

[Warning] Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. <cut>

[Warning] Unsichere Anweisung ins Binärlog geschrieben, weil Anweisungsformat BINLOG_FORMAT = STATEMENT. <cut>

How to repeat:
#start mysqld  --log-bin --binlog-format=statement --server-id=1

drop table if exists t1;
create table t1(a int)engine=innodb;
set session lc_messages='en_US';
delete from t1 limit 1;
set session lc_messages='de_DE';
delete from t1 limit 1;
[11 Sep 2014 0:45] MySQL Verification Team
Setting session error message language should only change the language of the error returned to the client IMHO.  The server should write to error log in the global setting.

https://dev.mysql.com/doc/refman/5.7/en/error-message-language.html