List:General Discussion« Previous MessageNext Message »
From:Johan De Meersman Date:April 30 2010 1:05pm
Subject:Theoretical question about innodb autoincrements and binlog mode
View as plain text  
Hey you all,

I'm messing about with various settings and parsing the documentation, and
my naughty mind saw something that's not very clear in the docs:

The InnoDB autoincrement
that innodb_autoinc_lock_mode
= 2 (“interleaved” lock mode) is "*not safe* when using statement-based
replication or recovery scenarios when SQL statements are replayed from the
binary log", but "If you are using row-based replication, all of the
auto-increment lock modes are safe".

Quite clear, but I had to switch an (unrelated) machine to mixed mode
binlogging a few days ago. The page about mixed-mode
however, only specifies a switch to row-based logging "Prior to MySQL
5.1.40, when two or more tables with AUTO_INCREMENT columns are updated. As
of 5.1.40, when one or more tables with AUTO_INCREMENT columns are updated
and a trigger or stored function is invoked".

So, I cannot help but wonder wether or not the mode would correctly switch
when the InnoDB autoincrement is set to mode 2 and inserts are done ?

Again, this is (for me) theoretical, I've no need to set the autoincrement
mode to 2 on any machines. I'm just curious :-)

Anyone with an answer ?


Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel

Theoretical question about innodb autoincrements and binlog modeJohan De Meersman30 Apr