Bug #68107 mysql client with --default-character-set=ujis crashes
Submitted: 17 Jan 2013 10:11 Modified: 19 Mar 2013 18:54
Reporter: Tsubasa Tanaka (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S2 (Serious)
Version:5.6.9 OS:Any
Assigned to: CPU Architecture:Any
Tags: my_wildcmp_mb_impl

[17 Jan 2013 10:11] Tsubasa Tanaka
Description:
mysql command-line client crashes when it writes to .my_history.

I have realized this issue appears with --default-character-set= ujis or sjis or  cp932, in Version 5.6.9 rpm(x86_64) and compiled from source-code.
It doesn't appear in 5.5.29's client.

How to repeat:
$ mysql --default-character-set=ujis
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 17
Server version: 5.6.9-rc-log MySQL Community Server (GPL)

Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>
mysql> select * from t1;
Segmentation fault

$ mysql --default-character-set=sjis
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 7
Server version: 5.6.9-rc-log Source distribution

Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>
mysql> use performanse_schema;
Segmentation fault (core dumped)
[17 Jan 2013 10:24] MySQL Verification Team
Verified, even on latest mysql-trunk.

#0  in ?? ()
#1  in my_wildcmp_mb_impl  at ./mysql-trunk/strings/ctype-mb.c:326
#2  in my_wildcmp_mb  at ./mysql-trunk/strings/ctype-mb.c:370
#3  in check_histignore  at ./mysql-trunk/client/mysql.cc:3065
#4  in add_filtered_history at ./mysql-trunk/client/mysql.cc:3036
#5  in add_line  at ./mysql-trunk/client/mysql.cc:2391
#6  in read_and_execute at ./mysql-trunk/client/mysql.cc:2223
#7  in main at ./mysql-trunk/client/mysql.cc:1395
[19 Mar 2013 18:54] Paul DuBois
Noted in 5.6.12, 5.7.2 changelogs.

The mysql client incorrectly used latin1 for certain comparisons even
if started with a multibyte default character set, resulting in a 
client crash.