List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:June 11 1999 6:36pm
Subject:MySQL Bug?
View as plain text  
>>>>> "Boaz" == Boaz Yahav <berber@stripped> writes:

Boaz> Hi
Boaz> Please have a look at this table creation : 

MySQL> create table mysql_seq (seq char(1) NOT NULL PRIMARY KEY, nextval
Boaz> bigint(20) unsigned NOT NULL auto_increment, Key(nextval));
Boaz> Query OK, 0 rows affected (0.00 sec)

mysql> desc mysql_seq;
Boaz> +---------+---------------------+------+-----+---------+----------------+
Boaz> | Field   | Type                | Null | Key | Default | Extra          |
Boaz> +---------+---------------------+------+-----+---------+----------------+
Boaz> | seq     | char(1)             |      | PRI |         |                |
Boaz> | nextval | bigint(20) unsigned |      | MUL | 0       | auto_increment |
Boaz> +---------+---------------------+------+-----+---------+----------------+
Boaz> 2 rows in set (0.00 sec)



Boaz> Is this a bug? I mean the fact that the AUTO_INCREMENT field is not a
Boaz> primary key?
Boaz> or is my understanding of the AUTO_INCREMENT field wrong?

Hi!

No this isn't a bug;  You can have any numeric key as an auto_increment key.

Regards,
Monty
Thread
MySQL Bug?Boaz Yahav11 Jun
  • Re: MySQL Bug?Christian Mack11 Jun
  • MySQL Bug?Michael Widenius11 Jun