Bug #16309 DD: Cluster fails to create tables with BLOB or TEXT columns
Submitted: 9 Jan 2006 22:34 Modified: 10 Jan 2006 14:56
Reporter: Jonathan Miller Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:5.1.5-alpha OS:Linux (Linux)
Assigned to: Jonas Oreland CPU Architecture:Any

[9 Jan 2006 22:34] Jonathan Miller
Description:
I was trying to create the following table:
CREATE TABLE mysqltest.t1 (c1 INT, c2 DOUBLE, c3 FLOAT, c4 TIMESTAMP, c5 TEXT, c6 LONGBLOB, c7 CHAR, c8 MEDIUMINT AUTO_INCREMENT, c9 BIT(8), c10 DECIMAL(10,2), c11 char(10), c12 VARCHAR(150), PRIMARY KEY (c8)) TABLESPACE ts1 STORAGE DISK ENGINE=NDB;

But I kept getting ERROR 1005 (HY000): Can't create table 'mysqltest.t1' (errno: 155)

Yet, if I try just a regular cluster
mysql> CREATE TABLE mysqltest.t1 (c1 INT, c2 DOUBLE, c3 FLOAT, c4 TIMESTAMP, c5 TEXT, c6 LONGBLOB, c7 CHAR, c8 MEDIUMINT AUTO_INCREMENT, c9 BIT(8), c10 DECIMAL(10,2), c11 char(10), c12 VARCHAR(150), PRIMARY KEY (c8)) ENGINE=NDB;
Query OK, 0 rows affected (1.31 sec)

How to repeat:
SMALLER TESTCASES:
mysql> DROP DATABASE IF EXISTS mysqltest;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> CREATE DATABASE mysqltest;
Query OK, 1 row affected (0.00 sec)

mysql> CREATE LOGFILE GROUP lg1
    -> ADD UNDOFILE 'undofile.dat'
    -> INITIAL_SIZE 3M
    -> UNDO_BUFFER_SIZE = 1M
    -> ENGINE=NDB;
Query OK, 0 rows affected (0.83 sec)

mysql> CREATE TABLESPACE ts1
    -> ADD DATAFILE 'datafile.dat'
    -> USE LOGFILE GROUP lg1
    -> INITIAL_SIZE 3M
    -> ENGINE NDB;
Query OK, 0 rows affected (0.72 sec)

mysql> CREATE TABLE mysqltest.t1 (c1 INT, c5 TEXT, PRIMARY KEY (c1)) TABLESPACE ts1 STORAGE DISK ENGINE=NDB;
ERROR 1005 (HY000): Can't create table 'mysqltest.t1' (errno: 155)
mysql> CREATE TABLE mysqltest.t1 (c1 INT, c6 LONGBLOB, PRIMARY KEY (c1)) TABLESPACE ts1 STORAGE DISK ENGINE=NDB; ERROR 1005 (HY000): Can't create table 'mysqltest.t1' (errno: 155)
[10 Jan 2006 7:35] 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/836
[10 Jan 2006 7:36] Jonas Oreland
fixed and pushed
[10 Jan 2006 9:38] Jonas Oreland
please retest
[10 Jan 2006 14:56] Jonathan Miller
Table is now created. Thanks!