Bug #14348 Crash: Accessing InnoDB tables when mysql hasn't been started with InnoDb on
Submitted: 26 Oct 2005 19:00 Modified: 14 Mar 2006 13:55
Reporter: Peter Romianowski Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.15/5.0.16 BK source OS:Windows (Win XP SP2/Linux)
Assigned to: Assigned Account CPU Architecture:Any

[26 Oct 2005 19:00] Peter Romianowski
Description:
MySQL crashes when InnoDB tables are accessed but InnoDB-Support has been disabled.
After re-enabling InnoDB everything works fine again.

How to repeat:
1. Configure MySQL with InnoDB-Support (restart)
2. Create a database with some InnoDB-Tables
3. Configure MySQL without InnoDB-Support (restart)
4. Starting an application that accesses the database via JDBC causes MySQL to crash
5. Crash

Connector/J version 3.1.11 has been used.

Suggested fix:
Don't crash - send some SQL Error
[26 Oct 2005 19:25] MySQL Verification Team
Thank you for the bug report.

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 5.0.16-debug

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

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

mysql> exit
Bye
miguel@hegel:~/dbs/5.0> bin/mysqladmin shutdown -uroot
miguel@hegel:~/dbs/5.0> bin/mysql -uroot test
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.16-debug

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

mysql> select * from tb;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)
ERROR: 
Can't connect to the server

miguel@hegel:~/dbs/5.0> libexec/mysqld --skip-innodb
051026 17:21:03 [Note] libexec/mysqld: ready for connections.
Version: '5.0.16-debug'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
safe_mutex: Trying to lock unitialized mutex at ha_innodb.cc, line 6652
mysqld got signal 6;

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.16-debug-log

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

mysql> create database db5;
Query OK, 1 row affected (0.05 sec)

mysql> use db5
Database changed
mysql> create table tb (id int) engine=innodb;
Query OK, 0 rows affected (0.13 sec)

mysql> exit
Bye

c:\mysql\bin>mysqladmin shutdown -uroot

c:\mysql\bin>mysql -uroot db5
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.16-debug-log

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

mysql> select * from tb;
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql>

 	ntdll.dll!7c918fea() 	
>	mysqld-debug.exe!my_casedn_utf8(charset_info_st * cs=0x00958868, char * src=0x02a0ce3a, unsigned int srclen=6, char * dst=0x02a0ce3a, unsigned int dstlen=6)  Line 2165 + 0x15	C
 	mysqld-debug.exe!my_casedn_str_utf8(charset_info_st * cs=0x00000000, char * s=0x0000aed8)  Line 2176 + 0x19	C
 	mysqld-debug.exe!innobase_casedn_str(char * a=0x00a464e4)  Line 702 + 0x17	C++
 	ntdll.dll!7c90104b() 	
 	mysqld-debug.exe!get_share(const char * table_name=0x02a0d4c4)  Line 6653	C++
 	mysqld-debug.exe!ha_innobase::open(const char * name=0x02a0d4c4, int mode=2, unsigned int test_if_locked=2)  Line 2359 + 0x9	C++
 	mysqld-debug.exe!handler::ha_open(const char * name=0x02a0d4c4, int mode=2, int test_if_locked=2)  Line 1369 + 0x17	C++
 	mysqld-debug.exe!openfrm(THD * thd=0x00fa10c0, const char * name=0x02a0d988, const char * alias=0x00fac728, unsigned int db_stat=8231, unsigned int prgflag=44, unsigned int ha_open_flags=0, st_table * outparam=0x00f73d88)  Line 921 + 0x86	C++
 	mysqld-debug.exe!open_unireg_entry(THD * thd=0x00fa10c0, st_table * entry=0x00f73d88, const char * db=0x00f73cd0, const char * name=0x00fac708, const char * alias=0x00fac728, st_table_list * table_desc=0x00fac730, st_mem_root * mem_root=0x02a0e5e4)  Line 1762 + 0x29	C++
 	mysqld-debug.exe!open_table(THD * thd=0x00fa10c0, st_table_list * table_list=0x00fac730, st_mem_root * mem_root=0x02a0e5e4, int * refresh=0x02a0e614, unsigned int flags=0)  Line 1301 + 0x2a	C++
 	mysqld-debug.exe!open_tables(THD * thd=0x00fa10c0, st_table_list * * start=0x02a0e660, unsigned int * counter=0x02a0e644, unsigned int flags=0)  Line 2019 + 0x26	C++
 	mysqld-debug.exe!open_and_lock_tables(THD * thd=0x00fa10c0, st_table_list * tables=0x00fac730)  Line 2314 + 0x13	C++
 	mysqld-debug.exe!mysql_execute_command(THD * thd=0x00fa10c0)  Line 2451 + 0xd	C++
 	mysqld-debug.exe!mysql_parse(THD * thd=0x00fa10c0, char * inBuf=0x00fac630, unsigned int length=16)  Line 5558 + 0x9	C++
 	mysqld-debug.exe!dispatch_command(enum_server_command command=COM_QUERY, THD * thd=0x00fa10c0, char * packet=0x00fa4581, unsigned int packet_length=17)  Line 1697 + 0x1d	C++
 	mysqld-debug.exe!do_command(THD * thd=0x00fa10c0)  Line 1498 + 0x31	C++
 	mysqld-debug.exe!handle_one_connection(void * arg=0x00fa10c0)  Line 1143 + 0x9	C++
 	mysqld-debug.exe!pthread_start(void * param=0x00f80828)  Line 63 + 0x7	C
 	mysqld-debug.exe!_threadstart(void * ptd=0x00f76508)  Line 196 + 0xd	C
 	kernel32.dll!7c80b50b() 	
 	kernel32.dll!7c8399f3() 	
 	mysqld-debug.exe!make_join_select(JOIN * join=0x00420000, SQL_SELECT * select=0x00740075, Item * cond=0x006f0074)  Line 5392 + 0x36	C++
 	mysqld-debug.exe!TaoCrypt::RoundUpToMultipleOf<unsigned int>(unsigned int n=139299604, unsigned int m=3238547851)  Line 316 + 0x14	C++
 	5089fc45()
[5 Dec 2005 9:53] Kolbe Kegel
This is also a problem when using the NDBCLUSTER storage engine.

If the server is started with --ndbcluster and connects to a cluster, it fetches the table definitions for the various tables on the cluster.

If the server is restarted without the --ndbcluster option, and any attempt is made to read from the cluster tables, the server crashes.

Restarting the server again with --ndbcluster permits the server to operate normally.
[14 Mar 2006 9:00] Antony Curtis
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the original bug instead.

Thank you for your interest in MySQL.

Additional info:

Duplicate for Bug#14575
[14 Mar 2006 13:55] Peter Romianowski
Antony,

it's quite funny, that you identify this issue from october 2005 as a duplicate of another issue from november 2005 and suggest that I do not submit a bug report twice ;)