As I mentioned in my previous entry, InnoDB has it’s own auto increment counter which it uses to generate the next value for the database kernel (as we call it in Drizzle). At Drizzle project, we came across a suspicion that InnoDB doesn’t increment it’s internal counter on row updates. So what can this mean to you as a database admin?
Well, consider this simple table:
CREATE TABLE t1 (
a INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
val INT
) ENGINE=InnoDB;
and the following statements:
drizzle> INSERT INTO t1 (val) VALUES (1); Query OK, 1 row affected (0.01 sec) drizzle> UPDATE t1 SET a=4 WHERE a=1; Query OK, 1 row …[Read more]