Bug #20871 Partitions: crash if --skip-innodb
Submitted: 5 Jul 2006 17:43 Modified: 22 Aug 2006 15:02
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Partitions Severity:S3 (Non-critical)
Version:5.1.12-beta-debug OS:Linux (SUSE 10.0 / 64-bit)
Assigned to: Sergey Glukhov CPU Architecture:Any

[5 Jul 2006 17:43] Peter Gulutzan
Description:
I start mysqld the usual way, with InnoDB support.
I create an InnoDB partitioned table.
I re-start mysqld, this time saying --skip-innodb.
I say "SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES".
Crash.

I know that there is an earlier bug: Bug#14941
A server crash in SHOW TABLES when there is an InnoDB table and --skip-innodb

But this is not a duplicate because Bug#14941 crash is in ha_innodb.cc,
and this crash is in sql_partition.cc. This happens only if I define the
table with partitioning.

How to repeat:
/* To make sure that 'j' is the table responsible, I destroyed
   all other tables. So at the start, all I have is one database
   named db2 (my default database), with zero tables in it. */

/* Start mysqld. Do not say --skip-innodb. */

mysql> CREATE TABLE j (id int(11), last_update datetime,  update_count decimal(10),   PRIMARY KEY (update_count,last_update,id) ) ENGINE=InnoDB PARTITION BY LIST (id) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10)) ;
Query OK, 0 rows affected (0.01 sec)

mysql> quit;
Bye

/* Stop mysqld. */

/* Start mysqld. This time, say --skip-innodb. */

mysql> select count(*) from information_schema.tables;
ERROR 2013 (HY000): Lost connection to MySQL server during query
[5 Jul 2006 17:58] Miguel Solorzano
Back Trace 5.1BK Suse Linux 32-bit w/o --skip-innodb

Attachment: bt-20871.txt (text/plain), 14.14 KiB.

[5 Jul 2006 18:01] Miguel Solorzano
I was able for to crash the server without to restart the server
with --skip-innodb. See attached file with back trace. I will
test with --skip-innodb and provide the back trace.

miguel@hegel:~/dbs/5.1> bin/mysqladmin -uroot create db2
miguel@hegel:~/dbs/5.1> bin/mysql -uroot db2
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 5.1.12-beta-debug

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

mysql> CREATE TABLE j (id int(11), last_update datetime,  update_count
    -> decimal(10),   PRIMARY KEY (update_count,last_update,id) ) ENGINE=InnoDB
    -> PARTITION BY LIST (id) (PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9,10)) ;
Query OK, 0 rows affected (0.02 sec)

mysql> quit
Bye
miguel@hegel:~/dbs/5.1> bin/mysqladmin shutdown -uroot
skipped 9 bytes from file: socket (3)
miguel@hegel:~/dbs/5.1> bin/mysql -uroot db2
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 2 to server version: 5.1.12-beta-debug

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

mysql> select count(*) from information_schema.tables;
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql>
[5 Jul 2006 18:09] Miguel Solorzano
Back Trace 5.1BK Suse Linux 32-bit with --skip-innodb

Attachment: bt-20871-a.txt (text/plain), 25.96 KiB.

[5 Jul 2006 18:12] Miguel Solorzano
Thank you for the bug report. On my side when restarted the server with
--skip-innodb it crashed at the start (not needed to query) and when
started with out --skip-innodb it crashed when queried. Both back traces
attached and tested on Suse 10 32-bit.
[26 Jul 2006 8:51] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/9571
[8 Aug 2006 12:29] Mikael Ronström
Found a test case that will not work with the patch:
CREATE TABLE t1 (a int)
PARTITION BY HASH (a);

restart mysqld server with --skip-innodb

select * from information_schema.tables;
probably causes a crash
[9 Aug 2006 12:42] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/10201

ChangeSet@1.2267, 2006-08-09 17:57:31+05:00, gluh@mysql.com +1 -0
  Bug#20871 Partitions: crash if --skip-innodb
  return error if engine is disabled
[16 Aug 2006 14:50] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/10550

ChangeSet@1.2271, 2006-08-16 20:07:12+05:00, gluh@mysql.com +1 -0
  Bug#20871 Partitions: crash if --skip-innodb
  return error if engine is disabled
[22 Aug 2006 14:39] Reggie Burnett
pushed into 5.1.12
[22 Aug 2006 15:02] Jon Stephens
Documented bugfix in 5.1.12 changelog.