diff options
Diffstat (limited to 'sql/sp_head.cc')
-rw-r--r-- | sql/sp_head.cc | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc index 7c91281956e..0cf3d37c230 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -531,8 +531,9 @@ sp_head::sp_head() m_backpatch.empty(); m_cont_backpatch.empty(); m_lex.empty(); - hash_init(&m_sptabs, system_charset_info, 0, 0, 0, sp_table_key, 0, 0); - hash_init(&m_sroutines, system_charset_info, 0, 0, 0, sp_sroutine_key, 0, 0); + my_hash_init(&m_sptabs, system_charset_info, 0, 0, 0, sp_table_key, 0, 0); + my_hash_init(&m_sroutines, system_charset_info, 0, 0, 0, sp_sroutine_key, + 0, 0); m_body_utf8.str= NULL; m_body_utf8.length= 0; @@ -781,8 +782,8 @@ sp_head::destroy() m_thd->lex= lex; } - hash_free(&m_sptabs); - hash_free(&m_sroutines); + my_hash_free(&m_sptabs); + my_hash_free(&m_sroutines); DBUG_VOID_RETURN; } @@ -3820,7 +3821,7 @@ sp_head::merge_table_list(THD *thd, TABLE_LIST *table, LEX *lex_for_tmp_check) for (uint i= 0 ; i < m_sptabs.records ; i++) { - tab= (SP_TABLE *)hash_element(&m_sptabs, i); + tab= (SP_TABLE*) my_hash_element(&m_sptabs, i); tab->query_lock_count= 0; } @@ -3854,8 +3855,8 @@ sp_head::merge_table_list(THD *thd, TABLE_LIST *table, LEX *lex_for_tmp_check) (and therefore should not be prelocked). Otherwise we will erroneously treat table with same name but with different alias as non-temporary. */ - if ((tab= (SP_TABLE *)hash_search(&m_sptabs, (uchar *)tname, tlen)) || - ((tab= (SP_TABLE *)hash_search(&m_sptabs, (uchar *)tname, + if ((tab= (SP_TABLE*) my_hash_search(&m_sptabs, (uchar *)tname, tlen)) || + ((tab= (SP_TABLE*) my_hash_search(&m_sptabs, (uchar *)tname, tlen - alen - 1)) && tab->temp)) { @@ -3940,7 +3941,7 @@ sp_head::add_used_tables_to_table_list(THD *thd, { char *tab_buff, *key_buff; TABLE_LIST *table; - SP_TABLE *stab= (SP_TABLE *)hash_element(&m_sptabs, i); + SP_TABLE *stab= (SP_TABLE*) my_hash_element(&m_sptabs, i); if (stab->temp) continue; |