Bug #48027 Unable to create table with UNIQUE KEY
Submitted: 13 Oct 2009 16:36 Modified: 14 Oct 2009 14:53
Reporter: Davy NESTOR Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:7.0.7 OS:Linux (64 bits)
Assigned to: CPU Architecture:Any
Tags: Can't create table, Error: 2301

[13 Oct 2009 16:36] Davy NESTOR
Description:
Hello,

I'm trying to create a clone of my database running on ndbcluster engine with MySQL Cluster 7.0.7 64 bits.

I can drop my initial database then recreate from a dump but when I want to use my dump to create a clone I have the following error:

ERROR 1005 (HY000) at line 844: Can't create table 'database.table' (errno: 4247)

It seems that UNIQUE KEY are responsible for this error. When I use the dump without UNIQUE KEY it works very good.

Indeed, the whole system crashed several times (in 7.0.5 version) after I've tried this command. So I updated to 7.0.7, now it's only one data node crashed.

The Cluster Orginization:

Cluster Configuration
---------------------
[ndbd(NDB)]	2 node(s)
id=3	@10.0.0.109  (mysql-5.1.35 ndb-7.0.7, Nodegroup: 0, Master)
id=4	@10.0.0.110  (mysql-5.1.35 ndb-7.0.7, Nodegroup: 0)

[ndb_mgmd(MGM)]	2 node(s)
id=1	@10.0.0.105  (mysql-5.1.35 ndb-7.0.7)
id=2	@10.0.0.106  (mysql-5.1.35 ndb-7.0.7)

[mysqld(API)]	2 node(s)
id=5	@10.0.0.107  (mysql-5.1.35 ndb-7.0.7)
id=6	@10.0.0.108  (mysql-5.1.35 ndb-7.0.7)

Here is my configuration:

[ndbd default]
NoOfReplicas=2 
DataMemory=200M 
IndexMemory=100M
BackupDataDir=/usr/local/mysql/backups
MaxNoOfExecutionThreads=2
MaxNoOfUniqueHashIndexes=20000
MaxNoOfOrderedIndexes=20000
MaxNoOfAttributes=20000
datadir=/usr/local/mysql/data
StringMemory=20
MaxNoOfTables=10000
MaxNoOfTriggers=50000

I think I have the same problem that this issue: http://bugs.mysql.com/bug.php?id=46295

The database is not very big (100 tables) and approximatively 3 UNIQUE KEY per table.

The ouput of one of the data node:
Time: Tuesday 13 October 2009 - 12:22:32
Status: Temporary error, restart node
Message: Assertion (Internal error, programming error or missing error message, please report a bug)
Error: 2301
Error data: ArrayPool<T>::getPtr
Error object: ../../../../../storage/ndb/src/kernel/vm/ArrayPool.hpp line: 422 (block: DBDICT)
Program: ndbmtd
Pid: 1294
Trace: /usr/local/mysql/data/ndb_3_trace.log.17 /usr/local/mysql/data/ndb_3_trace.log.17_t1 /usr/local/mysql/data/ndb_3_trace.log.17_t2 /usr/local/mysql 

How to repeat:
Use the dump file for at least 2 database with the same config.

Suggested fix:
The first DB can be created without any problem and the second not.
So I think there is a limitation somewhere.
[14 Oct 2009 14:53] Davy NESTOR
another choice