MySQL Forums
Forum List  »  Archive Storage Engine

Mysql 5.0 ARCHIVE and auto_increment question.
Posted by: Jay Pike
Date: December 23, 2005 01:33PM

Hello All,

I was wondering if the ARCHIVE table type lacks support for auto_increment fields?

While trying to create the following table:

DROP TABLE IF EXISTS `autoincrementtest`;
CREATE TABLE `autoincrementtest` (
`autoincrementfield` int(11) NOT NULL auto_increment
) ENGINE=Archive;


I get the following error:

mysql> CREATE TABLE `autoincrementtest` (
-> `autoincrementfield` int(11) NOT NULL auto_increment
-> ) ENGINE=Archive;
ERROR 1164 (42000): The used table type doesn't support AUTO_INCREMENT columns
mysql>

But, if I drop the 'auto_increment' option, the create goes through just fine:

mysql> CREATE TABLE `autoincrementtest` (
-> `autoincrementfield` int(11) NOT NULL
-> ) ENGINE=Archive;
Query OK, 0 rows affected (0.07 sec)

The online docs don't mention the auto_increment option.

I can get around this with a stored procedure just fine, but was curious about this issue.

Thanks,

jp

Options: ReplyQuote


Subject
Views
Written By
Posted
Mysql 5.0 ARCHIVE and auto_increment question.
12097
December 23, 2005 01:33PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.