summaryrefslogtreecommitdiff
path: root/sql/sp_head.cc
diff options
context:
space:
mode:
authorKristofer Pettersson <kristofer.pettersson@sun.com>2009-11-20 21:56:43 +0100
committerKristofer Pettersson <kristofer.pettersson@sun.com>2009-11-20 21:56:43 +0100
commitf9af124e7d4bad947aca9836efb32806e75ef1eb (patch)
treed942b1e12f96e633ab490237e450308772c5f7c6 /sql/sp_head.cc
parent3596983d7a2dad2d804d46db425e3f9c45020d66 (diff)
parent0a686030589dae2fe6bf99f4c3d4a73d4268a491 (diff)
downloadmariadb-git-f9af124e7d4bad947aca9836efb32806e75ef1eb.tar.gz
merge
Diffstat (limited to 'sql/sp_head.cc')
-rw-r--r--sql/sp_head.cc24
1 files changed, 18 insertions, 6 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index f0c858cc50a..51a731138ca 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -2090,8 +2090,18 @@ sp_head::reset_lex(THD *thd)
DBUG_RETURN(FALSE);
}
-/// Restore lex during parsing, after we have parsed a sub statement.
-void
+
+/**
+ Restore lex during parsing, after we have parsed a sub statement.
+
+ @param thd Thread handle
+
+ @return
+ @retval TRUE failure
+ @retval FALSE success
+*/
+
+bool
sp_head::restore_lex(THD *thd)
{
DBUG_ENTER("sp_head::restore_lex");
@@ -2102,7 +2112,7 @@ sp_head::restore_lex(THD *thd)
oldlex= (LEX *)m_lex.pop();
if (! oldlex)
- return; // Nothing to restore
+ DBUG_RETURN(FALSE); // Nothing to restore
oldlex->trg_table_fields.push_back(&sublex->trg_table_fields);
@@ -2118,7 +2128,8 @@ sp_head::restore_lex(THD *thd)
Add routines which are used by statement to respective set for
this routine.
*/
- sp_update_sp_used_routines(&m_sroutines, &sublex->sroutines);
+ if (sp_update_sp_used_routines(&m_sroutines, &sublex->sroutines))
+ DBUG_RETURN(TRUE);
/*
Merge tables used by this statement (but not by its functions or
procedures) to multiset of tables used by this routine.
@@ -2130,7 +2141,7 @@ sp_head::restore_lex(THD *thd)
delete sublex;
}
thd->lex= oldlex;
- DBUG_VOID_RETURN;
+ DBUG_RETURN(FALSE);
}
/**
@@ -3868,7 +3879,8 @@ sp_head::merge_table_list(THD *thd, TABLE_LIST *table, LEX *lex_for_tmp_check)
tab->lock_type= table->lock_type;
tab->lock_count= tab->query_lock_count= 1;
tab->trg_event_map= table->trg_event_map;
- my_hash_insert(&m_sptabs, (uchar *)tab);
+ if (my_hash_insert(&m_sptabs, (uchar *)tab))
+ return FALSE;
}
}
return TRUE;