MySQL Forums
Forum List  »  InnoDB

Failed to read auto-increment value from storage engineI
Posted by: Firrela Que
Date: January 16, 2009 03:32AM

create table Enterprise (id bigint not null auto_increment,description varchar(200), entname varchar(50) not null, phone bigint, registerTime datetime
not null, primary key (id)) ENGINE=InnoDB;

create table User (id bigint not null auto_increment, password varchar(255) not null, password_hint varchar(255), phone_number varchar(255), username varchar(50) not null unique, ENTERPRISE_ID bigint, primary key (id)) ENGINE=InnoDB;

alter table User add index FK9029507829B1566D (ENTERPRISE_ID), add constraint
FK9029507829B1566D foreign key (ENTERPRISE_ID) references Enterprise (id);

mysql> insert into Enterprise(entname,account) values('a','ee');
Query OK, 1 row affected, 4 warnings (0.00 sec)

mysql> insert into User(username, password, ENTERPRISE_ID) values('a','c',1);
ERROR 1467 (HY000): Failed to read auto-increment value from storage engine

mysql Version:
Server version: 5.1.30-community-log MySQL Community Server (GPL)

Master/Slave Mode, one Master and one Slave.

How to deal with it?

Thanks a lot.

Options: ReplyQuote


Subject
Views
Written By
Posted
Failed to read auto-increment value from storage engineI
15215
January 16, 2009 03:32AM


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.