diff options
Diffstat (limited to 'sql/rpl_injector.cc')
-rw-r--r-- | sql/rpl_injector.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sql/rpl_injector.cc b/sql/rpl_injector.cc index b855dec35f9..3c0ec34f352 100644 --- a/sql/rpl_injector.cc +++ b/sql/rpl_injector.cc @@ -105,7 +105,7 @@ int injector::transaction::use_table(server_id_type sid, table tbl) int error; - if ((error= check_state(TABLE_STATE))) + if (unlikely((error= check_state(TABLE_STATE)))) DBUG_RETURN(error); server_id_type save_id= m_thd->variables.server_id; @@ -180,7 +180,8 @@ void injector::new_trans(THD *thd, injector::transaction *ptr) int injector::record_incident(THD *thd, Incident incident) { Incident_log_event ev(thd, incident); - if (int error= mysql_bin_log.write(&ev)) + int error; + if (unlikely((error= mysql_bin_log.write(&ev)))) return error; return mysql_bin_log.rotate_and_purge(true); } @@ -189,7 +190,8 @@ int injector::record_incident(THD *thd, Incident incident, const LEX_CSTRING *message) { Incident_log_event ev(thd, incident, message); - if (int error= mysql_bin_log.write(&ev)) + int error; + if (unlikely((error= mysql_bin_log.write(&ev)))) return error; return mysql_bin_log.rotate_and_purge(true); } |