Bug #10311 Server crashes on creation of a UTF8 SET or ENUM
Submitted: 2 May 2005 11:46 Modified: 3 May 2005 6:22
Reporter: Rob Booker Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.3-beta-nt OS:Windows (XP Pro)
Assigned to: CPU Architecture:Any

[2 May 2005 11:46] Rob Booker
Description:
The MySQL server service crashes when I try to add to a table a SET or ENUM column of type UTF8.  This also happens when I try to copy a table with an existing UTF8 SET or ENUM column using the method 'create table as select * from mytable'. 

I'm using a vanilla 5.0.3 installation on which the default character sets for 'character_set_client' and 'character_set_connection' etc are all 'latin1' except for 'character_set_system' which is utf8.

How to repeat:
Try and execute:-

create table test.moo as select * from mysql.user

This causes the server to crash apparantly because it's full of UTF8 enumerations. It creates the .frm file anyhow but not the .myd or .myi (assuming MyISAM).  Now try:-

create table test.baa as select * from mysql.proc

This works, and the only ENUM in Proc has no character set at all.

Also this works:-

create table test.moo (col1 enum('Y', 'N') character set latin1 default 'Y');

but this causes the server to crash:-

create table test.moo (col1 enum('Y', 'N') character set utf8 default 'Y');

All the above applies to SET types and InnoDb tables as well.
[2 May 2005 12:50] MySQL Verification Team
I verified with server built from BK source and I was unable to repeat:

c:\mysql\bin>mysql -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.6-beta-nt

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create table test.moo as select * from mysql.user;
Query OK, 1 row affected (0.16 sec)
Records: 1  Duplicates: 0  Warnings: 0

mysql> create table test.baa as select * from mysql.proc;
Query OK, 2 rows affected (0.15 sec)
Records: 2  Duplicates: 0  Warnings: 0

mysql> drop table test.moo;
Query OK, 0 rows affected (0.00 sec)

mysql> create table test.moo (col1 enum('Y', 'N') character set utf8 default 'Y');
Query OK, 0 rows affected (0.08 sec)

mysql>
[2 May 2005 17:51] Rob Booker
Hi,

I can promise you that my steps cause my 5.0.3 server to crash (I see that you're using 5.0.6 though).  Is there any more info I can give you?
[2 May 2005 18:24] MySQL Verification Team
I tested with 5.0.3 and I got the crash. I will test again with 5.0.6.
Notice that for to crash the server is necessary to have default-storage-engine=innodb

Thank you for the bug report.
[2 May 2005 18:33] MySQL Verification Team
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html
[3 May 2005 6:22] Heikki Tuuri
Hi!

Please download 5.0.4. This bug is fixed in it:

http://dev.mysql.com/doc/mysql/en/news-5-0-4.html

This is a duplicate of bug #9526

Regards,

Heikki