maria-developers team mailing list archive
Mailing list archive
Re: MariaDB 10.0.14 got rid of replication safety warning without warning in release notes?
No, the commit means that in the following case:
create table t (n int, m int, unique(n), unique(m));
insert into t values (1, 1);
insert into t values (2, 2);
insert into t values (1, 2) on duplicate key update m = m + 10;
The last statement can update different rows on master and slave and
user won't get the warning that the statement is unsafe for
I didn't look closely into the rest of the changes bundled for some
reason into the same commit. It's the changes in sql_base.cc that I'm
On Fri, Sep 26, 2014 at 10:19 AM, Roberto Spadim <roberto@xxxxxxxxxxxxx> wrote:
> Committer: Michael Widenius
> Date: 2014-09-15 21:00:47 UTC
> mto: This revision was merged to the branch mainline in revision 4402.
> Revision ID: monty@xxxxxxxxxxx-20140915210047-prls1zl5gbs51hj2
> Don't give warning if there are two unique keys used with INSERT .. ON
> DUPLICATE KEY UPDATE.
> We should assume that the store engine will report the first duplicate key
> for this case.
> From what i understood, if there's two unique keys that have duplicate keys
> (insert values (1,1); insert values(1,1);) the first key will report the
> first warning, the second warning isn't a problem since the first one
> reported a duplicate key
> that's what i understood (but i'm not sure)
> removed this line from test cases:
> Note 1592 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
> included this line:
> #ifdef NOT_USED_IN_MARIADB
> AND SQL_CLASS.CC
> Auxiliary function to check if the warning for unsafe repliction
> should be thrown or suppressed.
> From what i understood it's only to don't log many useless messages, and if
> a 'real' problem occur thrown an error instead of supress it
> Old code of suppression of unsafe logging error with LIMIT didn't work,
> because of wrong usage of my_interval_timer().
> Suppress unsafe logging errors to the error log if we get too many unsafe
> logging errors in a short time.
> as expected at sql_class.cc
> This is to not overflow the error log with meaningless errors.
> - Each error code is suppressed and counted separately.
> - We do a 5 minute suppression of new errors if we get more than 10 errors
> in that time.
> Only print unsafe logging errors if log_warnings > 1.
> I don't know what's an unsafe log erro, should be nice an explain here
> 2014-09-26 13:38 GMT-03:00 Pavel Ivanov <pivanof@xxxxxxxxxx>:
>> I see that in MariaDB 10.0.14 Michael disabled replication safety
>> warning for the case of INSERT ON DUPLICATE KEY UPDATE with several
>> unique keys with a comment "We should assume that the store engine
>> will report the first duplicate key for this case."
>> What does that mean? Which key is "the first duplicate key" and why
>> MariaDB relies on an engine behavior which AFAIK is not guaranteed?
>> And why this serious change in behavior wasn't mentioned in the
>> Release Notes?
>> On the related note Release Notes mention the error log flood
>> protection. Why it's not behind flag? How should I disable the feature
>> and get back to the old behavior?
>> Thank you,
>> Mailing list: https://launchpad.net/~maria-developers
>> Post to : maria-developers@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~maria-developers
>> More help : https://help.launchpad.net/ListHelp
> Roberto Spadim
> Eng. Automação e Controle