Bug #52351 InnoDB: Assertion failure with alter table
Submitted: 25 Mar 2010 2:40 Modified: 7 Apr 2010 18:01
Reporter: Miguel Solorzano Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S1 (Critical)
Version:5.6.99-m4-debug OS:Linux (Ubuntu 10.04 X86_64)
Assigned to: Jimmy Yang CPU Architecture:Any
Tags: ALTER TABLE

[25 Mar 2010 2:40] Miguel Solorzano
Description:
Assertion failure on server built from mysql-next-mr source tree:

miguel@atonal:~$ dbs/5.5-mr/bin/mysql -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.99-m4-debug Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> create database d2;
Query OK, 1 row affected (0.00 sec)

mysql> use d2
Database changed
mysql> create table t6 (id int not null auto_increment primary key, col1 varchar(200));
Query OK, 0 rows affected (0.07 sec)

mysql> alter table t6 engine innodb;
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql> 

miguel@atonal:~$ dbs/5.5-mr/libexec/mysqld
100324 23:31:46 [Note] Buffered information: Performance schema disabled (reason: start parameters).

100324 23:31:46 [Note] Plugin 'FEDERATED' is disabled.
100324 23:31:46 [Note] Plugin 'ndbcluster' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
100324 23:31:46  InnoDB: highest supported file format is Barracuda.
100324 23:31:46 InnoDB Plugin 1.0.6 started; log sequence number 47559
100324 23:31:46 [Note] Event Scheduler: Loaded 0 events
100324 23:31:46 [Note] dbs/5.5-mr/libexec/mysqld: ready for connections.
Version: '5.6.99-m4-debug'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
100324 23:32:30  InnoDB: Assertion failure in thread 140191132604176 in file rem/rem0rec.c line 538
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.1/en/forcing-recovery.html
InnoDB: about forcing recovery.
100324 23:32:30 - mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.

key_buffer_size=8388608
read_buffer_size=131072
max_used_connections=1
max_threads=151
thread_count=1
connection_count=1
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 338449 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd: 0x2c25a48
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0x7f80caa8ce68 thread_stack 0x40000
dbs/5.5-mr/libexec/mysqld(my_print_stacktrace+0x35)[0xba95f3]
dbs/5.5-mr/libexec/mysqld(handle_segfault+0x2a7)[0x6c36f1]
/lib/libpthread.so.0(+0xf920)[0x7f80db16a920]
/lib/libc.so.6(gsignal+0x35)[0x7f80da533a85]
/lib/libc.so.6(abort+0x180)[0x7f80da537520]
dbs/5.5-mr/libexec/mysqld[0x9be75e]
dbs/5.5-mr/libexec/mysqld[0xa098ea]
dbs/5.5-mr/libexec/mysqld[0xa2bc57]
dbs/5.5-mr/libexec/mysqld[0xa2bd17]
dbs/5.5-mr/libexec/mysqld[0xa2599a]
dbs/5.5-mr/libexec/mysqld[0x980d79]
dbs/5.5-mr/libexec/mysqld(_ZN7handler9ha_createEPKcP5TABLEP24st_ha_create_information+0x4e)[0x82930c]
dbs/5.5-mr/libexec/mysqld(_Z15ha_create_tableP3THDPKcS2_S2_P24st_ha_create_informationb+0x1b2)[0x829a3d]
dbs/5.5-mr/libexec/mysqld(_Z16rea_create_tableP3THDPKcS2_S2_P24st_ha_create_informationR4ListI12Create_fieldEjP6st_keyP7handler+0x1f9)[0x7cf701]
dbs/5.5-mr/libexec/mysqld(_Z26mysql_create_table_no_lockP3THDPKcS2_P24st_ha_create_informationP10Alter_infobj+0x103d)[0x84f410]
dbs/5.5-mr/libexec/mysqld(_Z17mysql_alter_tableP3THDPcS1_P24st_ha_create_informationP10TABLE_LISTP10Alter_infojP8st_orderb+0x1f84)[0x8577fa]
dbs/5.5-mr/libexec/mysqld(_Z21mysql_execute_commandP3THD+0x1fdb)[0x6d74c9]
dbs/5.5-mr/libexec/mysqld(_Z11mysql_parseP3THDPKcjPS2_+0x280)[0x6dfa30]
dbs/5.5-mr/libexec/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0xada)[0x6d3577]
dbs/5.5-mr/libexec/mysqld(_Z10do_commandP3THD+0x252)[0x6d2888]
dbs/5.5-mr/libexec/mysqld(_Z24do_handle_one_connectionP3THD+0x14f)[0x6d0a4d]
dbs/5.5-mr/libexec/mysqld(handle_one_connection+0x33)[0x6d08f7]
/lib/libpthread.so.0(+0x69ca)[0x7f80db1619ca]
/lib/libc.so.6(clone+0x6d)[0x7f80da5e638d]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x2cb0578 = alter table t6 engine innodb
thd->thread_id=1
thd->killed=NOT_KILLED
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
miguel@atonal:~$ 

How to repeat:
See description

Suggested fix:
-
[7 Apr 2010 18:01] MySQL Verification Team
I couldn't repeat anymore too:

miguel@tikal:~$ dbs/5.5-mr/bin/mysql -uroot test
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.99-m4-debug Source distribution

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> create database d2;
Query OK, 1 row affected (0.00 sec)

mysql> use d2
Database changed
mysql> create table t6 (id int not null auto_increment primary key, col1 varchar(200));
Query OK, 0 rows affected (0.05 sec)

mysql> alter table t6 engine innodb;
Query OK, 0 rows affected (0.15 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> 

So closing as Can't Repeat.