Bug #24247 create index idx_a on a(a) cause innodb crashed?
Submitted: 13 Nov 2006 10:45 Modified: 4 Dec 2006 12:48
Reporter: littlestar a Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S1 (Critical)
Version:5.1.12beta OS:Windows (Windows 2003 X86, XP X64)
Assigned to: Assigned Account CPU Architecture:Any
Tags: debug build, innodb

[13 Nov 2006 10:45] littlestar a
Description:
create index idx_a on a(a) cause innodb crashed?

MySQL 5.1.12 beta on Windows Debug.

create table a(a int) engine=innodb;
create index idx_a on a(a);

it cause innodb crash on Windows.
but these works well on MySQL 5.1.11beta.
why?

How to repeat:
MySQL 5.1.12 beta on Windows Debug.
Compile with CMake and VS2003.

create table a(a int) engine=innodb;
create index idx_a on a(a);
[13 Nov 2006 10:50] littlestar a
when 5.1.13 released?
5.1 final?
Thanks!
[13 Nov 2006 13:40] MySQL Verification Team
Thank you for the bug report.

C:\build\5.1\bin>mysql -uroot test
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.13-beta-nt-debug Source distribution

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

mysql> create table a(a int) engine=innodb;
Query OK, 0 rows affected (0.14 sec)

mysql> create index idx_a on a(a);
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql>
[13 Nov 2006 15:53] Heikki Tuuri
Miguel,

does mysqld print anything to the .err file? Can you run inside a debugger, so that we see where the crash happens?

I was not able to repeat with a relatively recent Linux binary:

heikki@127:~/mysql-5.1/client$ ./mysql -uroot test
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.1.12-beta-debug

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

mysql> drop table a;
Query OK, 0 rows affected (0.07 sec)

mysql> create table a(a int) engine=innodb;
Query OK, 0 rows affected (0.05 sec)

mysql> create index idx_a on a(a);
Query OK, 0 rows affected (0.05 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql>

Regards,

Heikki
[13 Nov 2006 16:15] Heikki Tuuri
The 32-bit Windows official binary does not crash.

Maybe the crash is due to 64-bit unclean code?

C:\mysql-noinstall-5.1.12-beta-win32\mysql-5.1.12-beta-win32\bin>mysql -uroot te
st
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.12-beta-community-nt-log MySQL Community Server (GPL)

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

mysql> create table a(a int) engine=innodb;
Query OK, 0 rows affected (0.31 sec)

mysql> create index idx_a on a(a);
Query OK, 0 rows affected (0.45 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql>
[14 Nov 2006 6:22] littlestar a
I can repeat it on MySQL 5.1.12beta+Windows, build with CMake+VS2003, Debug Vesion.

Where to get the 5.1.13 ?
[1 Dec 2006 14:09] Heikki Tuuri
littlestar,

does mysqld write something to the .err log in the crash?

Regards,

Heikki
[1 Dec 2006 14:16] littlestar a
I will test it with the latest code in bitkeeper this weekend.
[1 Dec 2006 14:19] MySQL Verification Team
I just tested against the latest 32-bit 5.1.14 and don't crash anymore:

C:\build\5.1\bin>mysql -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.1.14-beta-nt Source distribution

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

mysql> use test
Database changed
mysql> create table a(a int) engine=innodb;
Query OK, 0 rows affected (0.14 sec)

mysql> create index idx_a on a(a);
Query OK, 0 rows affected (0.36 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql>

I will ask someone to test on 64-bit.
[1 Dec 2006 14:25] littlestar a
The official site only 5.1.12, whereis 5.1.14???
[1 Dec 2006 14:31] Heikki Tuuri
Miguel,

I think it has only crashed on 64 bits.

If we are very lucky, then this is the same bug as http://bugs.mysql.com/bug.php?id=19424 and we finally find out what is wrong on 64 bits.

Regards,

Heikki
[1 Dec 2006 14:42] Tonci Grgin
Debug version from our site crashes server as described; HEAP corruption, writing before start of heap buffer. However, mysqld-nt works just fine.

Servers where started with --console --standalone on 3GB AMDx64 box with WinXPx64.
[2 Dec 2006 6:55] littlestar a
I did run mysqld with "--console --standalone" for debug version.
VS 2003.

Windows 2003 X86 SP1
[2 Dec 2006 7:01] littlestar a
I did run mysqld with "--console --standalone" for debug program.
VS 2003, crashed.
Windows 2003 X86 SP1.
[2 Dec 2006 10:54] MySQL Verification Team
Call Stack debug version on X86

Attachment: call-stack-bug24247.txt (text/plain), 4.11 KiB.

[2 Dec 2006 10:56] MySQL Verification Team
Indeed 32-bit debug version of today source crashes as well. I attached the
call stack file.
[2 Dec 2006 12:12] littlestar a
:)
MySQL Official reproduced my report bug now, :)

If you solved the bug, please let me known, I will make the bug closed.
[4 Dec 2006 12:48] Heikki Tuuri
Ok, this is a duplicate of http://bugs.mysql.com/bug.php?id=23573