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:
None 
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
Description:
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.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.048 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.