View Issue Details

IDProjectCategoryView StatusLast Update
0006408OXID eShop (all versions)4.01. Database handlingpublic2016-06-08 10:00
Reportermichael_keiluweit 
PrioritynormalSeverityminorReproducibilityalways
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 
    oxseo
        (oxobjectid, oxident, oxshopid, oxlang, oxstdurl, oxseourl, oxtype, oxfixed, oxexpired, oxparams)
    values
       [...]
    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)


Source: http://dev.mysql.com/doc/refman/5.7/en/replication-rbr-safe-unsafe.html
Additional Informationhttp://bugs.mysql.com/bug.php?id=58637

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

Activities

There are no notes attached to this issue.