maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #07744
Re: MariaDB 10.0.14 got rid of replication safety warning without warning in release notes?
*Committer:* Michael Widenius
- *Date:* 2014-09-15 21:00:47 UTC
- *mto:* This revision was merged to the branch mainline in revision 4402
<http://bazaar.launchpad.net/~maria-captains/maria/10.0/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)
mysql-test/suite/binlog/r/binlog_unsafe.result
<http://bazaar.launchpad.net/~maria-captains/maria/10.0/revision/4400.1.3/mysql-test/suite/binlog/r/binlog_unsafe.result>
removed this line from test cases:
2709
Warnings:
2710
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
sql/sql_base.cc
<http://bazaar.launchpad.net/~maria-captains/maria/10.0/revision/4400.1.3/sql/sql_base.cc>
included this line:
5307
#ifdef NOT_USED_IN_MARIADB
AND SQL_CLASS.CC
6023
Auxiliary function to check if the warning for unsafe repliction statements
6024
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>:
> Hi,
>
> 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."
> http://bazaar.launchpad.net/~maria-captains/maria/10.0/revision/4400.1.3
> 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,
> Pavel
>
> _______________________________________________
> 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
SPAEmpresarial
Eng. Automação e Controle
Follow ups
References