Commit efb1f640 authored by Alexander Nozdrin's avatar Alexander Nozdrin

Bug#45445: cannot execute procedures with thread_stack set to 128k.

Reverting the patch.
parent a92cc88a
......@@ -779,9 +779,6 @@ db_load_routine(THD *thd, int type, sp_name *name, sp_head **sphp,
int ret= 0;
if (check_stack_overrun(thd, STACK_MIN_SIZE, (uchar*)&ret))
return TRUE;
thd->lex= &newlex;
newlex.current_select= NULL;
......@@ -1611,9 +1608,6 @@ sp_find_routine(THD *thd, int type, sp_name *name, sp_cache **cp,
(int) name->m_name.length, name->m_name.str,
type, cache_only));
if (check_stack_overrun(thd, STACK_MIN_SIZE, (uchar*)&depth))
return NULL;
if ((sp= sp_cache_lookup(cp, name)))
{
ulong level;
......
......@@ -1240,8 +1240,11 @@ sp_head::execute(THD *thd, bool merge_da_on_success)
The same with db_load_routine() required circa 7k bytes and
14k bytes accordingly. Hence, here we book the stack with some
reasonable margin.
Reverting back to 8 * STACK_MIN_SIZE until further fix.
8 * STACK_MIN_SIZE is required on some exotic platforms.
*/
if (check_stack_overrun(thd, STACK_MIN_SIZE, (uchar*)&old_packet))
if (check_stack_overrun(thd, 8 * STACK_MIN_SIZE, (uchar*)&old_packet))
DBUG_RETURN(TRUE);
/* init per-instruction memroot */
......@@ -2915,9 +2918,6 @@ sp_lex_keeper::reset_lex_and_exec_core(THD *thd, uint *nextp,
It's merged with the saved parent's value at the exit of this func.
*/
bool parent_modified_non_trans_table= thd->transaction.stmt.modified_non_trans_table;
if (check_stack_overrun(thd, STACK_MIN_SIZE, (uchar*)&parent_modified_non_trans_table))
DBUG_RETURN(TRUE);
thd->transaction.stmt.modified_non_trans_table= FALSE;
DBUG_ASSERT(!thd->derived_tables);
DBUG_ASSERT(thd->change_list.is_empty());
......@@ -3073,9 +3073,6 @@ sp_instr_stmt::execute(THD *thd, uint *nextp)
DBUG_ENTER("sp_instr_stmt::execute");
DBUG_PRINT("info", ("command: %d", m_lex_keeper.sql_command()));
if (check_stack_overrun(thd, STACK_MIN_SIZE, (uchar*)&res))
DBUG_RETURN(TRUE);
const CSET_STRING query_backup= thd->query_string;
#if defined(ENABLED_PROFILING)
/* This s-p instr is profilable and will be captured. */
......
......@@ -7209,9 +7209,6 @@ bool parse_sql(THD *thd,
Object_creation_ctx *backup_ctx= NULL;
if (check_stack_overrun(thd, 2 * STACK_MIN_SIZE, (uchar*)&backup_ctx))
return TRUE;
if (creation_ctx)
backup_ctx= creation_ctx->set_n_backup(thd);
......
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