Bug #80840 "SHOW VARIABLES LIKE 'like_no_var'" gives warning "Incorrect string value"
Submitted: 23 Mar 2016 17:07 Modified: 1 Apr 2016 9:31
Reporter: Martin Labonté Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:MySql Server 5.7.11 OS:Windows
Assigned to: Chiranjeevi Battula CPU Architecture:Any

[23 Mar 2016 17:07] Martin Labonté
Description:
Since I'm using MySql Server 5.7.11 installed localy, one command is returning a warning:

Warning: Incorrect string value: '\x92\xE9t\xE9)' for column 'VARIABLE_VALUE' at row 478

Both the client and the MySql server are on MS Windows 7. It was not the case with MySql Server 5.5. I can reproduce it with MySQL-python, version 1.2.5 but not with MySQL Workbench.

All other commands seem fine. The default charset is set to utf-8.

How to repeat:
import MySQLdb

con = MySQLdb.connect('127.0.0.1', 'Test', 'tpwd', 'testdb30')
cur = con.cursor()

cur.execute("SHOW VARIABLES LIKE 'like_no_var'")

-> show warning:
Warning: Incorrect string value: '\x92\xE9t\xE9)' for column 'VARIABLE_VALUE' at row 478

cur.execute("SHOW VARIABLES;")

-> show same warning

Suggested fix:
I think there is no reason to show a warning since the variables' data is plain text. It works without warning on MySQL Workbench so it looks like a bug in the python connector.
[23 Mar 2016 17:22] Martin Labonté
The warning mentions the row 478... the is the content of the table:

477    sync_relay_log_info        10000
478    system_time_zone           "Est (heure d"
479    table_definition_cache     1400

"Est (heure d" is a truncated and in french, which is unusual in a database configuration. Maybe it comes from the french configuration of my computer? In this case, it could be a MySql server bug.
[28 Mar 2016 11:51] Chiranjeevi Battula
Hello Martin Labonté,

Thank you for the bug report and test case.
I tried to reproduce the issue at my end using Python 2.7.10 , MySQL 5.7.11 and Connector 2.1.3(using "import mysql.connector") but not seeing any issue with  "SHOW VARIABLES LIKE 'like_no_var'".
I have discussed this issue with Conn/Python developers and confirmed that this is reported for the MySQLdb project (not MySQL Connector/Python).

Thank you for your interest in MySQL.

Thanks,
Chiranjeevi.
[29 Mar 2016 14:37] Martin Labonté
I re-open my ticket as it has been closed saying that it was reported in the wrong category.
[1 Apr 2016 9:31] Chiranjeevi Battula
Hello Martin Labonté,

Thank you for your feedback.
It is not about wrong category, which you are complaining at wrong place and more over "MySQLdb" is not related to MySQL.

Thank you for your interest in MySQL.

Thanks,
Chiranjeevi.