Bug #9540 Following DDL crashes server (InnoDB)
Submitted: 31 Mar 2005 19:48 Modified: 4 Apr 2005 6:30
Reporter: Mark Matthews Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version: OS:
Assigned to: CPU Architecture:Any

[31 Mar 2005 19:48] Mark Matthews
Description:
Found while trying to reproduce BUG#9437 which is totally unrelated.

The following DDL causes the server to crash. I tested on 5.0.3, Dean tested on 5.0.4 and will add a backtrace:

CREATE TABLE testBug9437 (languageCode char(2) NOT NULL default '',countryCode char(2) NOT NULL default '',supported enum('no','yes') NOT NULL default 'no',ordering int(11) default NULL,createDate datetime NOT NULL default '1000-01-01 00:00:03',modifyDate timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,PRIMARY KEY  (languageCode,countryCode),KEY languageCode (languageCode),KEY countryCode (countryCode),KEY ordering (ordering),KEY modifyDate (modifyDate)) ENGINE=InnoDB DEFAULT CHARSET=utf8

How to repeat:
Issue the following DDL using 'mysql', the server crashes:

CREATE TABLE testBug9437 (languageCode char(2) NOT NULL default '',countryCode char(2) NOT NULL default '',supported enum('no','yes') NOT NULL default 'no',ordering int(11) default NULL,createDate datetime NOT NULL default '1000-01-01 00:00:03',modifyDate timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,PRIMARY KEY  (languageCode,countryCode),KEY languageCode (languageCode),KEY countryCode (countryCode),KEY ordering (ordering),KEY modifyDate (modifyDate)) ENGINE=InnoDB DEFAULT CHARSET=utf8
[31 Mar 2005 19:49] Dean Ellis
Verified with a current pull of 5.0.4 with test case provided.

Stack trace:

0x81aad56 handle_segfault + 680
0xffffe420 _end + -141629136
(nil)
0x8349ae7 dict_create_table_step + 225
0x8365564 que_thr_step + 531
0x83648a0 que_run_threads + 42
0x837ba63 row_create_table_for_mysql + 599
0x8261fd7 create_table_def(trx_struct*, st_table*, char const*, char const*, unsigned long) + 129
0x825ddeb ha_innobase::create(char const*, st_table*, st_ha_create_information*) + 477
0x824db29 ha_create_table(char const*, st_ha_create_information*, bool) + 145
0x82372ed rea_create_table(THD*, char*, st_ha_create_information*, List<create_field>&, unsigned int, st_key*) + 115
0x827316b mysql_create_table(THD*, char const*, char const*, st_ha_create_information*, List<create_field>&, List<Key>&, bool, unsigned i + 791
0x81bf4ee mysql_execute_command(THD*) + 1986
0x81c6d1b mysql_parse(THD*, char*, unsigned int) + 277
0x81bd7ee dispatch_command(enum_server_command, THD*, char*, unsigned int) + 1188
0x81bd2f7 do_command(THD*) + 173
0x81bc721 handle_one_connection + 455
0xb7e83a41 _end + -1351139503
0xb7db972a _end + -1351967686
[4 Apr 2005 6:30] Heikki Tuuri
Probably a duplicate of #9526.