diff options
Diffstat (limited to 'sql')
-rw-r--r-- | sql/slave.cc | 5 | ||||
-rw-r--r-- | sql/sql_select.cc | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/sql/slave.cc b/sql/slave.cc index 15a70b788e6..3e3a02a7c21 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -4844,7 +4844,8 @@ Log_event* next_event(RELAY_LOG_INFO* rli) time_t save_timestamp= rli->last_master_timestamp; rli->last_master_timestamp= 0; - DBUG_ASSERT(rli->relay_log.get_open_count() == rli->cur_log_old_open_count); + DBUG_ASSERT(rli->relay_log.get_open_count() == + rli->cur_log_old_open_count); if (rli->ign_master_log_name_end[0]) { @@ -4854,13 +4855,13 @@ Log_event* next_event(RELAY_LOG_INFO* rli) 0, rli->ign_master_log_pos_end, Rotate_log_event::DUP_NAME); rli->ign_master_log_name_end[0]= 0; + pthread_mutex_unlock(log_lock); if (unlikely(!ev)) { errmsg= "Slave SQL thread failed to create a Rotate event " "(out of memory?), SHOW SLAVE STATUS may be inaccurate"; goto err; } - pthread_mutex_unlock(log_lock); ev->server_id= 0; // don't be ignored by slave SQL thread DBUG_RETURN(ev); } diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 18b48c33f5b..2d482290909 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -5906,7 +5906,7 @@ eq_ref_table(JOIN *join, ORDER *start_order, JOIN_TAB *tab) tab->cached_eq_ref_table=1; if (tab->type == JT_CONST) // We can skip const tables return (tab->eq_ref_table=1); /* purecov: inspected */ - if (tab->type != JT_EQ_REF) + if (tab->type != JT_EQ_REF || tab->table->maybe_null) return (tab->eq_ref_table=0); // We must use this Item **ref_item=tab->ref.items; Item **end=ref_item+tab->ref.key_parts; |