Bug #17142 Crash if create with encoded name
Submitted: 5 Feb 2006 19:56 Modified: 14 Mar 2006 17:19
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.1.7-beta-debug OS:Linux (SUSE 10.0)
Assigned to: Alexander Barkov CPU Architecture:Any

[5 Feb 2006 19:56] Peter Gulutzan
Description:
Due to recent improvements encoding table names to file names,
the name txu#P#p1 (which is the sort of thing that MySQL produces
for partitioned tables) is related to the name txu@0023P@0023p1.
I used both names in a series of SQL statements. Crash.

How to repeat:

mysql> create table `txu#P#p1` (s1 int);
Query OK, 0 rows affected (0.00 sec)

mysql> select * from txu@0023P@0023p1;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@0023P@0023p1' at line 1
mysql> select * from `txu@0023P@0023p1`;
Empty set (0.01 sec)

mysql> create table `txu@0023P@0023p1` (s1 int);
ERROR 2013 (HY000): Lost connection to MySQL server during query
[6 Feb 2006 0:47] Miguel Solorzano
Thank you for the bug report.

mysql> create table `txu@0023P@0023p1` (s1 int);
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql>
[7 Mar 2006 9:10] 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/3536
[7 Mar 2006 9:30] Alexander Barkov
Fixed in 5.1.8.
[14 Mar 2006 17:19] Mike Hillyer
Documented in 5.1.8 changelog:  

<listitem>
        <para>
          Creating a table with the same name as the mapped name of
          another table caused a server crash. For example, if MySQL
          maps the table name <literal>txu#P#p1</literal> to
          <literal>txu@0023P@0023p1</literal> on disk, creating another table
          named <literal>txu@0023P@0023p1</literal> crashed the server.
          (Bug #17142)
        </para>
      </listitem>