diff options
author | Alexander Nozdrin <alexander.nozdrin@oracle.com> | 2010-11-24 18:08:27 +0300 |
---|---|---|
committer | Alexander Nozdrin <alexander.nozdrin@oracle.com> | 2010-11-24 18:08:27 +0300 |
commit | 605d54e019374d0853db8424e950867b77182f0c (patch) | |
tree | 2d98c60b01dd908c3250f14fa4387ac7cca05124 /sql | |
parent | 39ce3628857ae593d932e28525c8042c972ab16a (diff) | |
download | mariadb-git-605d54e019374d0853db8424e950867b77182f0c.tar.gz |
Bug#45445: cannot execute procedures with thread_stack set to 128k.
Reverting the patch.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sp.cc | 6 | ||||
-rw-r--r-- | sql/sp_head.cc | 11 | ||||
-rw-r--r-- | sql/sql_parse.cc | 3 |
3 files changed, 4 insertions, 16 deletions
diff --git a/sql/sp.cc b/sql/sp.cc index 5d424564317..71a5afb437c 100644 --- a/sql/sp.cc +++ b/sql/sp.cc @@ -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; diff --git a/sql/sp_head.cc b/sql/sp_head.cc index 2f165310c28..54e32b67c65 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -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. */ diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 40cecb75b69..cb641b5ff68 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -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); |