tags:

views:

30

answers:

2

I have created a InnoDB table named foo in MySQL. As soon as I perform an insert into the table, I see that another table foo_seq is created.

If I drop the auto generated table, it appears after the next insert.

What is causing this?

+1  A: 

That sounds like a sequence is being created, do you have any autogenerated primary keys or IDs?

Matias Valdenegro
Not sure what you mean by "autogenerated", I have auto incrementing primary key on the table.
mmattax
Since when does MySQL have sequences?
a_horse_with_no_name
@mmattax That's basically a autogenerated value.
Matias Valdenegro
+1  A: 

Issue this query, chances are very high it will tell you what happens before an insert:

SHOW TRIGGERS LIKE 'foo';
Wrikken