Bug #45263 | utf32_general_ci, bad effects around CREATE TABLE AS SELECT | ||
---|---|---|---|
Submitted: | 2 Jun 2009 12:00 | Modified: | 2 Sep 2010 16:01 |
Reporter: | Matthias Leich | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Charsets | Severity: | S3 (Non-critical) |
Version: | 5.5, 6.0 | OS: | Any |
Assigned to: | Alexander Barkov | CPU Architecture: | Any |
[2 Jun 2009 12:00]
Matthias Leich
[2 Jun 2009 12:21]
Matthias Leich
I get the same bad effects for "utf32_unicode_ci".
[2 Jun 2009 12:37]
MySQL Verification Team
Thank you for the bug report. Verified as described: c:\mysql>bin\mysql -uroot test Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.4.4-alpha-debug Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> SET COLLATION_CONNECTION=utf32_general_ci; Query OK, 0 rows affected (0.00 sec) mysql> CREATE TEMPORARY TABLE t1 AS -> SELECT HEX(WEIGHT_STRING('abc', 1, 2, 0xC0)) AS my_col; ERROR 2013 (HY000): Lost connection to MySQL server during query mysql>
[12 Aug 2010 9:05]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/115550 3197 Alexander Barkov 2010-08-12 Bug#45263 utf32_general_ci, bad effects around CREATE TABLE AS SELECT Problem: Item_func_hex::val_str() returned data in ASCII format, which did not match collation.collation pointing to my_charset_utf32_general_ci. Fix: changing parent class of Item_func_hex to Item_str_ascii_func, as val_str() implementation is heavily ASCII-oriented. mysql-test/r/ctype_utf32.result mysql-test/t/ctype_utf32.test Adding test case sql/item_strfunc.cc sql/item_strfunc.h - Changing parent class to Item_str_ascii_func - Clean-up in Item_func_hex::fix_length_and_dec() Using fix_char_length() instead of setting max_length directly.
[18 Aug 2010 12:15]
Alexander Barkov
The same crash happens in 5.5 without using WEIGHT_STRING() function. SET collation_connection=utf32_general_ci; DROP TABLE IF EXISTS t1; CREATE TABLE t1 AS SELECT hex(0x00);
[18 Aug 2010 12:22]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/116096 3187 Alexander Barkov 2010-08-18 Bug#45263 utf32_general_ci, bad effects around CREATE TABLE AS SELECT Problem: Item_func_hex::val_str() returned data in ASCII format, which did not match collation.collation pointing to my_charset_utf32_general_ci. Fix: changing parent class of Item_func_hex to Item_str_ascii_func, as val_str() implementation is heavily ASCII-oriented. mysql-test/r/ctype_utf32.result mysql-test/t/ctype_utf32.test Adding test case sql/item_strfunc.cc sql/item_strfunc.h - Changing parent class to Item_str_ascii_func - Clean-up in Item_func_hex::fix_length_and_dec() Using fix_char_length() instead of setting max_length directly.
[18 Aug 2010 13:50]
Alexander Barkov
Pushed into mysql-5.5-bugfixing (5.5.6-m3) Pushed into mysql-trunk-bugfixing (5.6.1-m4) Pushed into mysql-next-mr-bugfixing (5.6.99-m5)
[25 Aug 2010 9:22]
Bugs System
Pushed into mysql-5.5 5.5.6-m3 (revid:alik@ibmvm-20100825092002-2yvkb3iwu43ycpnm) (version source revid:alik@ibmvm-20100825092002-2yvkb3iwu43ycpnm) (merge vers: 5.5.6-m3) (pib:20)
[30 Aug 2010 8:30]
Bugs System
Pushed into mysql-trunk 5.6.1-m4 (revid:alik@sun.com-20100830082732-n2eyijnv86exc5ci) (version source revid:alik@sun.com-20100830082732-n2eyijnv86exc5ci) (merge vers: 5.6.1-m4) (pib:21)
[30 Aug 2010 8:34]
Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100830082745-n6sh01wlwh3itasv) (version source revid:alik@sun.com-20100830082745-n6sh01wlwh3itasv) (pib:21)
[2 Sep 2010 16:01]
Paul DuBois
Noted in 5.5.6, 5.6.1 changelogs. With character_set_connection set to utf16 or utf32, CREATE TABLE t1 AS SELECT HEX() ... caused a server crash.