View Issue Details

IDProjectCategoryView StatusLast Update
0006408OXID eShop (all versions)4.01. Database handlingpublic2016-06-08 10:00
Status acknowledgedResolutionopen 
Product Version4.9.9 / 5.2.9 
Target VersionFixed in Version 
Summary0006408: Master-Slave: INSERT ... ON DUPLICATE KEY UPDATE statements are considered unsafe
DescriptionThe using of SQL statements "Insert On Duplicate Key Update" are considered unsafe my MySQL if the Master Slave option is activated. Furthermore a lot of warning messages will be created and filling the log:
160530  7:46:12 [Warning] 

Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. 
INSERT... ON DUPLICATE KEY UPDATE  on a table with more than one UNIQUE KEY is unsafe Statement:

insert into 
        (oxobjectid, oxident, oxshopid, oxlang, oxstdurl, oxseourl, oxtype, oxfixed, oxexpired, oxparams)
    on duplicate key update

MySQL documentation says:

INSERT ... ON DUPLICATE KEY UPDATE statements on tables with multiple primary or unique keys. When executed against a table that contains more than one primary or unique key, this statement is considered unsafe, being sensitive to the order in which the storage engine checks the keys, which is not deterministic, and on which the choice of rows updated by the MySQL Server depends.

An INSERT ... ON DUPLICATE KEY UPDATE statement against a table having more than one unique or primary key is marked as unsafe for statement-based replication. (Bug #11765650, Bug #58637)

Additional Information

I couldn't find any MySQL bug with the reference number #11765650
TagsNo tags attached.
ThemeNot defined
BrowserNot defined
PHP VersionNot defined
Database VersionNot defined


There are no notes attached to this issue.