From: Frazer Clement Date: May 3 2012 8:13am Subject: bzr push into mysql-trunk branch (frazer.clement:3773 to 3774) List-Archive: http://lists.mysql.com/commits/143718 Message-Id: <201205030813.q438D4YL025910@acsmt358.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3774 Frazer Clement 2012-05-03 Revert accidental push of WL6003 patch (revision 3768) modified: sql/log_event.cc sql/rpl_reporting.cc sql/rpl_reporting.h sql/rpl_slave.cc sql/share/errmsg-utf8.txt 3773 Mattias Jonsson 2012-05-03 bug#14026815: mysql_client_test_embedded takes too long time require big-test to run, to avoid sporadic timeouts. modified: mysql-test/t/mysql_client_test_embedded.test === modified file 'sql/log_event.cc' --- a/sql/log_event.cc 2012-05-02 23:45:28 +0000 +++ b/sql/log_event.cc 2012-05-03 08:11:43 +0000 @@ -4277,35 +4277,6 @@ int Query_log_event::do_apply_event(Rela return do_apply_event(rli, query, q_len); } -/* - is_silent_error - - Return true if the thread has an error which should be - handled silently -*/ - -static bool is_silent_error(THD* thd) -{ - DBUG_ENTER("is_silent_error"); - Diagnostics_area::Sql_condition_iterator it= - thd->get_stmt_da()->sql_conditions(); - const Sql_condition *err; - while ((err= it++)) - { - DBUG_PRINT("info", ("has condition %d %s", err->get_sql_errno(), - err->get_message_text())); - switch (err->get_sql_errno()) - { - case ER_SLAVE_SILENT_RETRY_TRANSACTION: - { - DBUG_RETURN(true); - } - default: - break; - } - } - DBUG_RETURN(false); -} /** @todo @@ -4655,14 +4626,11 @@ Default database: '%s'. Query: '%s'", */ else if (thd->is_slave_error || thd->is_fatal_error) { - if (!is_silent_error(thd)) - { - rli->report(ERROR_LEVEL, actual_error, - "Error '%s' on query. Default database: '%s'. Query: '%s'", - (actual_error ? thd->get_stmt_da()->message() : - "unexpected success or fatal error"), - print_slave_db_safe(thd->db), query_arg); - } + rli->report(ERROR_LEVEL, actual_error, + "Error '%s' on query. Default database: '%s'. Query: '%s'", + (actual_error ? thd->get_stmt_da()->message() : + "unexpected success or fatal error"), + print_slave_db_safe(thd->db), query_arg); thd->is_slave_error= 1; } === modified file 'sql/rpl_reporting.cc' --- a/sql/rpl_reporting.cc 2012-05-02 23:45:28 +0000 +++ b/sql/rpl_reporting.cc 2012-05-03 08:11:43 +0000 @@ -38,12 +38,10 @@ Slave_reporting_capability::Slave_report @error_arg the error code for assessment. defaults to zero which makes the function check the top of the reported errors stack. - @silent bool indicating whether the error should be silently handled. @return 1 as the positive and 0 as the negative verdict */ -int Slave_reporting_capability::has_temporary_error(THD *thd, - uint error_arg, bool* silent) const +int Slave_reporting_capability::has_temporary_error(THD *thd, uint error_arg) const { uint error; DBUG_ENTER("has_temporary_error"); @@ -77,6 +75,7 @@ int Slave_reporting_capability::has_temp (error == ER_LOCK_DEADLOCK || error == ER_LOCK_WAIT_TIMEOUT)) DBUG_RETURN(1); +#ifdef HAVE_NDB_BINLOG /* currently temporary error set in ndbcluster */ @@ -91,16 +90,11 @@ int Slave_reporting_capability::has_temp { case ER_GET_TEMPORARY_ERRMSG: DBUG_RETURN(1); - case ER_SLAVE_SILENT_RETRY_TRANSACTION: - { - if (silent != NULL) - *silent= true; - DBUG_RETURN(1); - } default: break; } } +#endif DBUG_RETURN(0); } #endif // EMBEDDED_LIBRARY === modified file 'sql/rpl_reporting.h' --- a/sql/rpl_reporting.h 2012-05-02 23:45:28 +0000 +++ b/sql/rpl_reporting.h 2012-05-03 08:11:43 +0000 @@ -76,7 +76,7 @@ public: /** Check if the current error is of temporary nature or not. */ - int has_temporary_error(THD *thd, uint error_arg= 0, bool* silent= 0) const; + int has_temporary_error(THD *thd, uint error_arg= 0) const; #endif // EMBEDDED_LIBRARY /** === modified file 'sql/rpl_slave.cc' --- a/sql/rpl_slave.cc 2012-05-02 23:45:28 +0000 +++ b/sql/rpl_slave.cc 2012-05-03 08:11:43 +0000 @@ -3623,9 +3623,8 @@ static int exec_relay_log_event(THD* thd if (slave_trans_retries) { int UNINIT_VAR(temp_err); - bool silent= false; if (exec_res && !is_mts_worker(thd) /* no reexecution in MTS mode */ && - (temp_err= rli->has_temporary_error(thd, 0, &silent)) && + (temp_err= rli->has_temporary_error(thd)) && !thd->transaction.all.cannot_safely_rollback()) { const char *errmsg; @@ -3664,9 +3663,7 @@ static int exec_relay_log_event(THD* thd slave_sleep(thd, min(rli->trans_retries, MAX_SLAVE_RETRY_PAUSE), sql_slave_killed, rli); mysql_mutex_lock(&rli->data_lock); // because of SHOW STATUS - if (!silent) - rli->trans_retries++; - + rli->trans_retries++; rli->retried_trans++; mysql_mutex_unlock(&rli->data_lock); DBUG_PRINT("info", ("Slave retries transaction " === modified file 'sql/share/errmsg-utf8.txt' --- a/sql/share/errmsg-utf8.txt 2012-05-02 23:45:28 +0000 +++ b/sql/share/errmsg-utf8.txt 2012-05-03 08:11:43 +0000 @@ -6755,9 +6755,6 @@ ER_MTS_RECOVERY_FAILURE eng "Cannot recover after SLAVE errored out in parallel execution mode. Additional error messages can be found in the MySQL error log." ER_MTS_RESET_WORKERS eng "Cannot clean up worker info tables. Additional error messages can be found in the MySQL error log." - -ER_SLAVE_SILENT_RETRY_TRANSACTION - eng "Slave must silently retry current transaction" # # End of 5.6 error messages. # No bundle (reason: useless for push emails).