Commit ba485814 authored by Davi Arnaut's avatar Davi Arnaut

Backport a old cleanup patch.

Formatting cleanup: removing tabs and trailing spaces
to conform to MySQL Internals Coding Guidelines.
parent 229cc4e1
......@@ -3352,6 +3352,7 @@ START SLAVE; . Query: '%s'", expected_error, thd->query());
actual_error= thd->is_error() ? thd->stmt_da->sql_errno() : 0;
DBUG_PRINT("info",("expected_error: %d sql_errno: %d",
expected_error, actual_error));
if ((expected_error && expected_error != actual_error &&
!concurrency_error_code(expected_error)) &&
!ignored_error_code(actual_error) &&
......@@ -3435,7 +3436,8 @@ Default database: '%s'. Query: '%s'",
*/
} /* End of if (db_ok(... */
{/**
{
/**
The following failure injecion works in cooperation with tests
setting @@global.debug= 'd,stop_slave_middle_group'.
The sql thread receives the killed status and will proceed
......@@ -4793,9 +4795,7 @@ int Load_log_event::do_apply_event(NET* net, Relay_log_info const *rli,
thd->set_query(load_data_query, (uint) (end - load_data_query));
if (sql_ex.opt_flags & REPLACE_FLAG)
{
handle_dup= DUP_REPLACE;
}
else if (sql_ex.opt_flags & IGNORE_FLAG)
{
ignore= 1;
......@@ -4854,9 +4854,7 @@ int Load_log_event::do_apply_event(NET* net, Relay_log_info const *rli,
{
// mysql_load will use thd->net to read the file
thd->net.vio = net->vio;
/*
Make sure the client does not get confused about the packet sequence
*/
// Make sure the client does not get confused about the packet sequence
thd->net.pkt_nr = net->pkt_nr;
}
/*
......
......@@ -1024,16 +1024,14 @@ subst_spvars(THD *thd, sp_instr *instr, LEX_STRING *query_str)
}
/*
/**
Return appropriate error about recursion limit reaching
SYNOPSIS
sp_head::recursion_level_error()
thd Thread handle
@param thd Thread handle
NOTE
For functions and triggers we return error about prohibited recursion.
For stored procedures we return about reaching recursion limit.
@remark For functions and triggers we return error about
prohibited recursion. For stored procedures we
return about reaching recursion limit.
*/
void sp_head::recursion_level_error(THD *thd)
......@@ -1217,7 +1215,7 @@ sp_head::execute(THD *thd)
do
{
sp_instr *i;
uint hip; // Handler ip
uint hip;
#if defined(ENABLED_PROFILING)
/*
......@@ -1229,7 +1227,8 @@ sp_head::execute(THD *thd)
thd->profiling.start_new_query("continuing inside routine");
#endif
i = get_instr(ip); // Returns NULL when we're done.
/* get_instr returns NULL when we're done. */
i = get_instr(ip);
if (i == NULL)
{
#if defined(ENABLED_PROFILING)
......@@ -1240,9 +1239,12 @@ sp_head::execute(THD *thd)
DBUG_PRINT("execute", ("Instruction %u", ip));
/* Don't change NOW() in FUNCTION or TRIGGER */
/*
Make current_time() et al work. But don't change NOW() in FUNCTION
or TRIGGER.
*/
if (!thd->in_sub_stmt)
thd->set_time(); // Make current_time() et al work
thd->set_time();
/*
We have to set thd->stmt_arena before executing the instruction
......@@ -1253,8 +1255,8 @@ sp_head::execute(THD *thd)
thd->stmt_arena= i;
/*
Will write this SP statement into binlog separately
(TODO: consider changing the condition to "not inside event union")
Will write this SP statement into binlog separately.
TODO: consider changing the condition to "not inside event union".
*/
if (thd->locked_tables_mode <= LTM_LOCK_TABLES)
thd->user_var_events_alloc= thd->mem_root;
......@@ -1880,9 +1882,9 @@ sp_head::execute_procedure(THD *thd, List<Item> *args)
save_spcont= octx= thd->spcont;
if (! octx)
{ // Create a temporary old context
if (!(octx= new sp_rcontext(m_pcont, NULL, octx)) ||
octx->init(thd))
{
/* Create a temporary old context. */
if (!(octx= new sp_rcontext(m_pcont, NULL, octx)) || octx->init(thd))
{
delete octx; /* Delete octx if it was init() that failed. */
DBUG_RETURN(TRUE);
......@@ -2509,8 +2511,6 @@ sp_head::show_create_routine(THD *thd, int type)
}
/**
Add instruction to SP.
......@@ -2894,8 +2894,7 @@ sp_instr_stmt::execute(THD *thd, uint *nextp)
if (unlikely((thd->variables.option_bits & OPTION_LOG_OFF)==0))
general_log_write(thd, COM_QUERY, thd->query(), thd->query_length());
if (query_cache_send_result_to_client(thd,
thd->query(),
if (query_cache_send_result_to_client(thd, thd->query(),
thd->query_length()) <= 0)
{
res= m_lex_keeper.reset_lex_and_exec_core(thd, nextp, FALSE, this);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment