Bug #52967 top-level autoincrement binary logging is safe
Submitted: 20 Apr 2010 7:25 Modified: 20 Apr 2010 9:20
Reporter: Andrei Elkin Email Updates:
Status: Not a Bug Impact on me:
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:5.1+ OS:Any
Assigned to: CPU Architecture:Any
Tags: auto_increment replication

[20 Apr 2010 7:25] Andrei Elkin
Unsafe warning (in 5.5) with the STATEMENT format is overkilling 
in the case of a query inserts into one
autoincrement table and does it on the top-level while stored routine(s)
do not deal with autoincrement.
Also switching to the ROW format in the MIXED mode is unnecessary
in this case.

How to repeat:
See the sources, execute  on 5.5 server

set @@binlog_format=statement;
create table t (a int auto_increment primary key);
create trigger trg before insert on t for each row set @a:=1;
insert into t set a=NULL;

to see the unsafe warning.

Suggested fix:
To refine logics of computing unsafety in decide_logging_format().
[20 Apr 2010 9:20] Andrei Elkin
Sorry for confusion. Double-checking with DaoGang (thanks) shows no issue.
Indeed, the top-level auto-increment is binary-logging safe which the manual has to say.