1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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

Reverting the patch.
This commit is contained in:
Alexander Nozdrin
2010-11-24 18:08:27 +03:00
parent 39ce362885
commit 605d54e019
3 changed files with 4 additions and 16 deletions

View File

@ -779,9 +779,6 @@ db_load_routine(THD *thd, int type, sp_name *name, sp_head **sphp,
int ret= 0; int ret= 0;
if (check_stack_overrun(thd, STACK_MIN_SIZE, (uchar*)&ret))
return TRUE;
thd->lex= &newlex; thd->lex= &newlex;
newlex.current_select= NULL; 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, (int) name->m_name.length, name->m_name.str,
type, cache_only)); type, cache_only));
if (check_stack_overrun(thd, STACK_MIN_SIZE, (uchar*)&depth))
return NULL;
if ((sp= sp_cache_lookup(cp, name))) if ((sp= sp_cache_lookup(cp, name)))
{ {
ulong level; ulong level;

View File

@ -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 The same with db_load_routine() required circa 7k bytes and
14k bytes accordingly. Hence, here we book the stack with some 14k bytes accordingly. Hence, here we book the stack with some
reasonable margin. 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); DBUG_RETURN(TRUE);
/* init per-instruction memroot */ /* 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. 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; 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; thd->transaction.stmt.modified_non_trans_table= FALSE;
DBUG_ASSERT(!thd->derived_tables); DBUG_ASSERT(!thd->derived_tables);
DBUG_ASSERT(thd->change_list.is_empty()); 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_ENTER("sp_instr_stmt::execute");
DBUG_PRINT("info", ("command: %d", m_lex_keeper.sql_command())); 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; const CSET_STRING query_backup= thd->query_string;
#if defined(ENABLED_PROFILING) #if defined(ENABLED_PROFILING)
/* This s-p instr is profilable and will be captured. */ /* This s-p instr is profilable and will be captured. */

View File

@ -7209,9 +7209,6 @@ bool parse_sql(THD *thd,
Object_creation_ctx *backup_ctx= NULL; Object_creation_ctx *backup_ctx= NULL;
if (check_stack_overrun(thd, 2 * STACK_MIN_SIZE, (uchar*)&backup_ctx))
return TRUE;
if (creation_ctx) if (creation_ctx)
backup_ctx= creation_ctx->set_n_backup(thd); backup_ctx= creation_ctx->set_n_backup(thd);