Bug #13563 Crash with two tables in own tablespace sharing loggroup
Submitted: 28 Sep 2005 12:58 Modified: 28 Sep 2005 14:11
Reporter: Stewart Smith Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S1 (Critical)
Version:5.1-ndb-dd OS:
Assigned to: Jonas Oreland CPU Architecture:Any

[28 Sep 2005 12:58] Stewart Smith
Description:
Creating two tablespaces, creating a table in each. Inserting data.

The attached script will crash the ndbd nodes.

How to repeat:
mysql> CREATE TABLESPACE ts1 ADD DATAFILE 'datafile.dat' USE LOGFILE GROUP lg1 INITIAL_SIZE = 12M ENGINE NDB; Query OK, 0 rows affected (2.35 sec) 
mysql> CREATE TABLE t1 (pk1 int not null primary key auto_increment, b int not null, c int not null) tablespace ts1 storage disk engine ndb; Query OK, 0 rows affected (0.58 sec) 
mysql> insert into t1 (b,c) values (1,2),(2,3),(3,4),(1,2),(2,3),(3,4),(1,2),(2,3),(3,4),(1,2),(2,3),(3,4),(1,2),(2,3),(3,4),(1,2),(2,3),(3,4),(1,2),(2,3),(3,4),(1,2),(2,3),(3,4),(1,2),(2,3),(3,4),(1,2),(2,3),(3,4),(1,2),(2,3),(3,4),(1,2),(2,3),(3,4);
Query OK, 36 rows affected (0.04 sec)
Records: 36  Duplicates: 0  Warnings: 0

mysql> CREATE TABLESPACE ts2 ADD DATAFILE 'datafile2.dat' USE LOGFILE GROUP lg1 INITIAL_SIZE = 12M ENGINE NDB; Query OK, 0 rows affected (1.86 sec)

mysql> CREATE TABLE t2 (pk1 int not null primary key auto_increment, b int not null, c int not null) tablespace ts2 storage disk engine ndb; Query OK, 0 rows affected (0.49 sec) 
mysql> insert into t2 (b,c) values (1,2),(2,3),(3,4),(1,2),(2,3),(3,4),(1,2),(2,3),(3,4),(1,2),(2,3),(3,4),(1,2),(2,3),(3,4),(1,2),(2,3),(3,4),(1,2),(2,3),(3,4),(1,2),(2,3),(3,4),(1,2),(2,3),(3,4),(1,2),(2,3),(3,4),(1,2),(2,3),(3,4),(1,2),(2,3),(3,4);

Suggested fix:
Not to crash. Have the space allocated in ts2 and the insert succeed.
[28 Sep 2005 12:59] Stewart Smith
Naturally with this as the first step:
mysql> CREATE LOGFILE GROUP lg1 ADD UNDOFILE 'undofile.dat' INITIAL_SIZE 16M UNDO_BUFFER_SIZE = 1M ENGINE=NDB;
[28 Sep 2005 14:11] 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/internals/30444
[28 Sep 2005 14:11] Jonas Oreland
fixed