auto_increment in NDB tables

Giuseppe Maxia <[email protected]> Mon, 30 Aug 2004 23:48:51 +0200
Newsgroups gmane.comp.db.mysql.bugs
Message-ID <[email protected]>
An auto_increment column in a NDB table starts its generated values from 
zero instead of 1.

Test done using MySQL-max 4.1.3, binaries compiled by MySQL AB
(mysql-max-4.1.3-beta-pc-linux-i686.tar.gz)

Cheers

gmax


--------------------------------------------------------
How to reproduce the bug:

mysql> create table ndbtest (i int not null auto_increment primary key) 
engine=ndb;

mysql> create table myisamtest (i int not null auto_increment primary 
key) engine=myisam;

mysql> create table innodbtest (i int not null auto_increment primary 
key) engine=innodb;

mysql> show tables;
+----------------+
| Tables_in_test |
+----------------+
| innodbtest     |
| myisamtest     |
| ndbtest        |
+----------------+

mysql> insert into innodbtest values (NULL);
mysql> insert into myisamtest values (NULL);
mysql> insert into ndbtest values (NULL);

mysql> select * from myisamtest;
+---+
| i |
+---+
| 1 |
+---+

mysql> select * from innodbtest;
+---+
| i |
+---+
| 1 |
+---+

mysql> select * from ndbtest;
+---+
| i |
+---+
| 0 |
+---+



-- 
Giuseppe Maxia
CTO
http://www.StarData.it
        __              __     __
   ___ / /____ ________/ /__ _/ /____ _
  (_-</ __/ _ `/ __/ _  / _ `/ __/ _ `/
/___/\__/\_,_/_/  \_,_/\_,_/\__/\_,_/
        Database is our business


-- 
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe:    http://lists.mysql.com/[email protected]