Bug #16310 DD: ERROR 1005 (HY000): Can't create table 'mysqltest.t1' (errno:
Submitted: 9 Jan 2006 22:41 Modified: 19 Sep 2006 13:58
Reporter: Jonathan Miller Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.1.5-alpha OS:Linux (Linux)
Assigned to: Jonathan Miller CPU Architecture:Any

[9 Jan 2006 22:41] Jonathan Miller
Description:
http://bugs.mysql.com/bug.php?id=16309

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)

perror --ndb 155
OS error code 155:  No message slogan found (please report a bug if you get this error code): Unknown: Unknown

perror  155
Illegal error code: 155

perror  1005
Illegal error code: 1005

perror  --ndb 1005
OS error code 1005:  No message slogan found (please report a bug if you get this error code): Unknown: Unknown

How to repeat:
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:38] Jonas Oreland
Since parent bug is closed...i cant reproduce this one...
[10 Jan 2006 14:10] Jonathan Miller
~/jmiller/builds/bin/perror 1005
Illegal error code: 1005
 ~/jmiller/builds/bin/perror --ndb 1005
OS error code 1005:  No message slogan found (please report a bug if you get this error code): Unknown: Unknown
 ~/jmiller/builds/bin/perror --ndb 155
OS error code 155:  No message slogan found (please report a bug if you get this error code): Unknown: Unknown
 ~/jmiller/builds/bin/perror 155
Illegal error code: 155
[10 Jan 2006 14:22] Jonas Oreland
1) I cant repeat failure in create table
2) The error codes does not come from ndb

mysql> create table t1 (a int primary key) engine = myisam;
Query OK, 0 rows affected (0.61 sec)

mysql> create table t1 (a int primary key) engine = myisam;
ERROR 1050 (42S01): Table 't1' already exists

bash>perror 1050
Illegal error code: 1050

----

I.e. I have no idea where this comes from...
You should file this on server if you like.
Not on ndb, and not on ndb dd
[10 Jan 2006 14:29] Jonathan Miller
Moving over to server team per Jonas.
[20 Jun 2006 10:56] Anjuta Widenius
Couldn't repeat the bug in 5.1.10-beta-valgrind-max-debug.
[21 Aug 2006 11:37] Roland Bouman
Experiencing the same problem when creating a table using the name of a non-existing tablespace on a 5.1.11 beta version.

create table bla (id int) 
tablespace idonotexist storage disk 
engine ndb
;
[21 Aug 2006 11:40] Roland Bouman
Sorry - forget my previous comment please. 

I thought the bug had to do with the unclear error message.
[21 Aug 2006 12:08] Jonas Oreland
so did i...so I created a patch with the following result...

mysql> create table bla (id int)  tablespace idonotexist storage disk  engine ndb;
ERROR 1005 (HY000): Can't create table 'test.bla' (errno: 140)
mysql> show warnings;
+-------+------+---------------------------------------------+
| Level | Code | Message                                     |
+-------+------+---------------------------------------------+
| Error | 1296 | Got error 755 'Invalid tablespace' from NDB | 
| Error | 1005 | Can't create table 'test.bla' (errno: 140)  | 
+-------+------+---------------------------------------------+
2 rows in set (0.00 sec)

mysql>
[21 Aug 2006 12:10] 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/10668

ChangeSet@1.2275, 2006-08-21 14:09:50+02:00, jonas@perch.ndb.mysql.com +2 -0
  ndb - bug#16310
    better error message for creating table with non-existing tablespace