Bug #19540 Error 4336 on Creating 2nd of 2 Tables, any order
Submitted: 4 May 2006 15:58 Modified: 21 Jun 2006 13:10
Reporter: Arne Hüggenberg Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:5.1.10-bk OS:Linux (Gentoo Linux AMD64)
Assigned to: CPU Architecture:Any

[4 May 2006 15:58] Arne Hüggenberg
Description:
I have a Problem with the import of one of my DB's

Trying to Import my Dump exits with Error 4336 on the second table in the dump.

Further poking shows that either of the CREATE statements works by itself in a new database, but no matter wich one i try to CREATE second, it will fail.

How to repeat:
mysql> create database video;
Query OK, 1 row affected (0.32 sec)
mysql> use video
Database changed
mysql> CREATE TABLE `magazin` (   `pk_magazin` int(11) NOT NULL auto_increment,  `beschreibung` varchar(255) default NULL,   `filename` varchar(255) NOT NULL default '',   `fk_spiel` int(9) NOT NULL default '0',   `art` char(1) NOT NULL default '',   PRIMARY KEY  (`pk_magazin`) ) ENGINE=NDB;
Query OK, 0 rows affected (0.86 sec)
mysql> CREATE TABLE `bundesliga` (   `pk_video` int(11) NOT NULL auto_increment,   `heim` varchar(255) NOT NULL default '',   `gast` varchar(255) NOT NULL default '',   `ergebnis` varchar(255) NOT NULL default '',   `datum` varchar(255) NOT NULL default '',   `link` varchar(255) NOT NULL default '',   `dlink` varchar(255) NOT NULL default '',   `bild` varchar(255) NOT NULL default '',   `fk_spiel` int(7) default NULL,   PRIMARY KEY  (`pk_video`) ) ENGINE=NDB;
ERROR 1005 (HY000): Can't create table 'video.bundesliga' (errno: 4336)
mysql>                      

mysql> create database video;
Query OK, 1 row affected (0.26 sec)
mysql> use video
Database changed
mysql> CREATE TABLE `bundesliga` (   `pk_video` int(11) NOT NULL auto_increment,   `heim` varchar(255) NOT NULL default '',   `gast` varchar(255) NOT NULL default '',   `ergebnis` varchar(255) NOT NULL default '',   `datum` varchar(255) NOT NULL default '',   `link` varchar(255) NOT NULL default '',   `dlink` varchar(255) NOT NULL default '',   `bild` varchar(255) NOT NULL default '',   `fk_spiel` int(7) default NULL,   PRIMARY KEY  (`pk_video`) ) ENGINE=NDB;
Query OK, 0 rows affected (0.94 sec)
mysql> CREATE TABLE `magazin` (   `pk_magazin` int(11) NOT NULL auto_increment,  `beschreibung` varchar(255) default NULL,   `filename` varchar(255) NOT NULL default '',   `fk_spiel` int(9) NOT NULL default '0',   `art` char(1) NOT NULL default '',   PRIMARY KEY  (`pk_magazin`) ) ENGINE=NDB;
ERROR 1005 (HY000): Can't create table 'video.magazin' (errno: 4336)
mysql>
[4 May 2006 16:00] Arne Hüggenberg
Changed Category to Cluster
[4 May 2006 20:32] Jonas Oreland
The problem is related to auto increment, so if you remove that your troubbles will go away.
Can you do a ndb_show_tables and put output here in bug report.
I suspect that this is a duplicate of http://bugs.mysql.com/bug.php?id=14509

thx

/Jonas
[8 May 2006 13:21] Arne Hüggenberg
ndb_show_tables output provided
[8 May 2006 16:30] Arne Hüggenberg
Since i suspect your right in your suspicions about this being a DUP of http://bugs.mysql.com/bug.php?id=14509 im wondering what the Status is of getting the Patch attached to the Report into 5.1?

I tried massaging the Patch into a 5.1 Tree but didnt really get all that far.
[9 May 2006 8:50] Jonas Oreland
The patch was for 5.0 (4.1) and quite a lot has changed in this area in 5.1
But, hopefully pekka will merge it anytime soon.
I however guess that it will not make 5.1.10...(but will be in 5.1.11)

/Jonas
[9 Jun 2006 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[21 Jun 2006 13:10] Arne Hüggenberg
Just tried it on 5.1.11 and the issue seems to be fixed.