Bug #26402 | Server crashes with old-style named table | ||
---|---|---|---|
Submitted: | 15 Feb 2007 13:11 | Modified: | 18 Jun 2007 13:41 |
Reporter: | Andrey Hristov | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Charsets | Severity: | S2 (Serious) |
Version: | 5.1.16 | OS: | Linux (OpenSuSE 10.2) |
Assigned to: | Alexander Barkov | CPU Architecture: | Any |
[15 Feb 2007 13:11]
Andrey Hristov
[15 Feb 2007 13:46]
Sveta Smirnova
Thank you for the report. Verified as described.
[29 Mar 2007 7:49]
Alexander Barkov
Andrei, Sveta - I cannot repeat the problem with the current 5.1.17 bk sources. Can you please help me?
[29 Mar 2007 8:11]
Sveta Smirnova
I can repeat it again with table created by MySQL 5.0.40 and MySQL 5.1.18: $mysql50; Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 627 Server version: 5.0.40-debug Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> select version(); +--------------+ | version() | +--------------+ | 5.0.40-debug | +--------------+ 1 row in set (0.00 sec) mysql> create database if not exists test4; Query OK, 1 row affected (0.01 sec) mysql> use test4; Database changed mysql> set names utf8; Query OK, 0 rows affected (0.00 sec) mysql> create table табличка (a int); Query OK, 0 rows affected (0.11 sec) mysql> \q Bye $boot_manager stop $cd $mv build/mysql-5.0/data/test4/ build/mysql-5.1/data mv: cannot overwrite directory `build/mysql-5.1/data/test4' $rm -rf build/mysql-5.1/data/test4 $mv build/mysql-5.0/data/test4/ build/mysql-5.1/data $boot_manager start [10888/3086583488] [07/03/29 10:08:19] [INFO] Loading config file '/users/ssmirnova/.my.cnf'... $mysql51 Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.1.18-beta-debug Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> select version(); +-------------------+ | version() | +-------------------+ | 5.1.18-beta-debug | +-------------------+ 1 row in set (0.00 sec) mysql> use test4; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> show tables; ERROR 2006 (HY000): MySQL server has gone away No connection. Trying to reconnect... Connection id: 1 Current database: test4 ERROR 2006 (HY000): MySQL server has gone away No connection. Trying to reconnect... ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql_ssmirnova51.sock' (111) ERROR: Can't connect to the server mysql> \q Bye
[14 Jun 2007 6:05]
Alexander Barkov
Crash happens when mysql rehashes table and column names, when executing mysql_list_fields() API function. Another way to reproduce the same crash without automatic rehashing is: mysql --no-auto-rehash test4 mysql> show tables; +-------------------+ | Tables_in_test4 | +-------------------+ | #mysql50#???????? | - ??? are fine - cannot display Russian name in Latin1 +-------------------+ 1 row in set (0.01 sec) mysql> show fields from `#mysql50#????????`; ERROR 2013 (HY000): Lost connection to MySQL server during query
[14 Jun 2007 6:35]
Alexander Barkov
An easier way to reproduce the same crash is just to execute this query: show columns from `#mysql50#????????`; without creating any tables.
[14 Jun 2007 6:51]
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/28715 ChangeSet@1.2544, 2007-06-14 11:50:09+05:00, bar@mysql.com +5 -0 Bug#26402 Server crashes with old-style named table Problem: crash on attempt to open a table having "#mysql50#" prefix in db or table name. Fix: This prefix is reserved for "mysql_upgrade" to access 5.0 tables whose file names are not encoded according to "5.1 tablename to filename encoded". Don't try open tables whose db name or table name has this prefix.
[14 Jun 2007 11:19]
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/28738 ChangeSet@1.2549, 2007-06-14 16:18:47+05:00, bar@mysql.com +5 -0 Bug#26402 Server crashes with old-style named table Problem: crash on attempt to open a table having "#mysql50#" prefix in db or table name. Fix: This prefix is reserved for "mysql_upgrade" to access 5.0 tables whose file names are not encoded according to "5.1 tablename to filename encoded". Don't try open tables whose db name or table name has this prefix.
[14 Jun 2007 11:29]
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/28740 ChangeSet@1.2549, 2007-06-14 16:28:33+05:00, bar@mysql.com +5 -0 Bug#26402 Server crashes with old-style named table Problem: crash on attempt to open a table having "#mysql50#" prefix in db or table name. Fix: This prefix is reserved for "mysql_upgrade" to access 5.0 tables whose file names are not encoded according to "5.1 tablename to filename encoded". Don't try open tables whose db name or table name has this prefix.
[14 Jun 2007 11:31]
Alexander Barkov
Pushed into 5.1.20-engines
[18 Jun 2007 7:48]
Bugs System
Pushed into 5.1.20-beta
[18 Jun 2007 13:41]
Paul DuBois
Noted in 5.1.20 changelog.
[30 Jan 2009 13:27]
Bugs System
Pushed into 6.0.10-alpha (revid:luis.soares@sun.com-20090129165607-wiskabxm948yx463) (version source revid:luis.soares@sun.com-20090129163120-e2ntks4wgpqde6zt) (merge vers: 6.0.10-alpha) (pib:6)
[30 Jan 2009 15:08]
Bugs System
Pushed into 5.1.32 (revid:luis.soares@sun.com-20090129165946-d6jnnfqfokuzr09y) (version source revid:sp1r-msvensson@pilot.mysql.com-20080424112628-62493) (merge vers: 5.1.25-rc) (pib:6)
[17 Feb 2009 14:54]
Bugs System
Pushed into 5.1.32-ndb-6.3.23 (revid:tomas.ulin@sun.com-20090217131017-6u8qz1edkjfiobef) (version source revid:tomas.ulin@sun.com-20090203133556-9rclp06ol19bmzs4) (merge vers: 5.1.32-ndb-6.3.22) (pib:6)
[17 Feb 2009 16:42]
Bugs System
Pushed into 5.1.32-ndb-6.4.3 (revid:tomas.ulin@sun.com-20090217134419-5ha6xg4dpedrbmau) (version source revid:tomas.ulin@sun.com-20090203133556-9rclp06ol19bmzs4) (merge vers: 5.1.32-ndb-6.3.22) (pib:6)
[17 Feb 2009 18:18]
Bugs System
Pushed into 5.1.32-ndb-6.2.17 (revid:tomas.ulin@sun.com-20090217134216-5699eq74ws4oxa0j) (version source revid:tomas.ulin@sun.com-20090201210519-vehobc4sy3g9s38e) (merge vers: 5.1.32-ndb-6.2.17) (pib:6)