Fixed BUG#7646: Stored procedure hang if show binlog events
Return false from show_binlog_events() if successful, otherwise stored procedures will think it failed. sql/sql_repl.cc: Return false from show_binlog_events() if successful, otherwise stored procedures will think it failed.
This commit is contained in:
parent
108702a34e
commit
cfff7e6e18
@ -1274,6 +1274,7 @@ bool mysql_show_binlog_events(THD* thd)
|
|||||||
DBUG_ENTER("show_binlog_events");
|
DBUG_ENTER("show_binlog_events");
|
||||||
List<Item> field_list;
|
List<Item> field_list;
|
||||||
const char *errmsg = 0;
|
const char *errmsg = 0;
|
||||||
|
bool ret = TRUE;
|
||||||
IO_CACHE log;
|
IO_CACHE log;
|
||||||
File file = -1;
|
File file = -1;
|
||||||
Format_description_log_event *description_event= new
|
Format_description_log_event *description_event= new
|
||||||
@ -1376,6 +1377,8 @@ bool mysql_show_binlog_events(THD* thd)
|
|||||||
pthread_mutex_unlock(log_lock);
|
pthread_mutex_unlock(log_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ret= FALSE;
|
||||||
|
|
||||||
err:
|
err:
|
||||||
delete description_event;
|
delete description_event;
|
||||||
if (file >= 0)
|
if (file >= 0)
|
||||||
@ -1395,7 +1398,7 @@ err:
|
|||||||
pthread_mutex_lock(&LOCK_thread_count);
|
pthread_mutex_lock(&LOCK_thread_count);
|
||||||
thd->current_linfo = 0;
|
thd->current_linfo = 0;
|
||||||
pthread_mutex_unlock(&LOCK_thread_count);
|
pthread_mutex_unlock(&LOCK_thread_count);
|
||||||
DBUG_RETURN(TRUE);
|
DBUG_RETURN(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user