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. 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. 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. mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result: Update test results as INSERT ... ON DUPLICATE KEY UPDATE doesn't get logged anymore mysql-test/suite/binlog/r/binlog_unsafe.result: Update test results as INSERT ... ON DUPLICATE KEY UPDATE doesn't get logged anymore mysql-test/suite/engines/README: Fixed typos mysql-test/suite/rpl/r/rpl_known_bugs_detection.result: Update test results as INSERT ... ON DUPLICATE KEY UPDATE doesn't get logged anymore sql/sql_base.cc: Don't log 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. sql/sql_class.cc: Suppress error in binary log if we get too many unsafe logging errors in a short time. Only print unsafe logging errors if log_warnings > 1
Showing
Please register or sign in to comment