Theoretical question about innodb autoincrements and binlog mode

Theoretical question about innodb autoincrements and binlog mode

am 30.04.2010 15:05:54 von Johan De Meersman

--00163613a11d4df947048573e78b
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

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
doc tml>states
that innodb_autoinc_lock_mode
=3D 2 (=93interleaved=94 lock mode) is "*not safe* when using statement-bas=
ed
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
logging,
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 ?

/johan


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

--00163613a11d4df947048573e78b--