summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2005-11-23 02:49:44 +0200
committerunknown <bell@sanja.is.com.ua>2005-11-23 02:49:44 +0200
commit4aea839bde48c615d2d672ebbd29f20c297fe670 (patch)
treec387b8d71098e3974e477c26da2e2e0143817cae /sql
parentffc506e910d8b5cc02e0b900501c6a1f807d818e (diff)
downloadmariadb-git-4aea839bde48c615d2d672ebbd29f20c297fe670.tar.gz
postmerge fix
Diffstat (limited to 'sql')
-rw-r--r--sql/item.cc1
-rw-r--r--sql/sp.cc12
-rw-r--r--sql/sql_parse.cc6
-rw-r--r--sql/sql_trigger.cc1
4 files changed, 9 insertions, 11 deletions
diff --git a/sql/item.cc b/sql/item.cc
index b7983b13766..6d5855cd0ca 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -921,7 +921,6 @@ Item_splocal::type() const
DBUG_ASSERT(owner == thd->spcont->owner);
return thd->spcont->get_item(m_offset)->type();
}
- }
return NULL_ITEM; // Anything but SUBSELECT_ITEM
}
diff --git a/sql/sp.cc b/sql/sp.cc
index f98795c54a5..8991cc78b5e 100644
--- a/sql/sp.cc
+++ b/sql/sp.cc
@@ -400,7 +400,7 @@ db_load_routine(THD *thd, int type, sp_name *name, sp_head **sphp,
const char *definer, longlong created, longlong modified)
{
LEX *oldlex= thd->lex, newlex;
- sp_rcontext *save_spcont= ;thd->spcont;
+ sp_rcontext *save_spcont= thd->spcont;
String defstr;
char olddb[128];
bool dbchanged;
@@ -431,8 +431,6 @@ db_load_routine(THD *thd, int type, sp_name *name, sp_head **sphp,
lex_start(thd, (uchar*)defstr.c_ptr(), defstr.length());
- (*sphp)->set_definer((char*) definer, (uint) strlen(definer));
- (*sphp)->set_info(created, modified, &chistics, sql_mode);
thd->spcont= 0;
if (yyparse(thd) || thd->is_fatal_error || newlex.sphead == NULL)
{
@@ -446,18 +444,16 @@ db_load_routine(THD *thd, int type, sp_name *name, sp_head **sphp,
else
{
if (dbchanged && (ret= mysql_change_db(thd, olddb, 1)))
- goto db_end;
+ goto end;
*sphp= newlex.sphead;
(*sphp)->set_definer((char*) definer, (uint) strlen(definer));
- (*sphp)->set_info((char *)definer, (uint)strlen(definer),
- created, modified, &chistics, sql_mode);
+ (*sphp)->set_info(created, modified, &chistics, sql_mode);
(*sphp)->optimize();
}
-db_end:
+end:
thd->spcont= save_spcont;
thd->variables.sql_mode= old_sql_mode;
thd->variables.select_limit= select_limit;
-end:
thd->lex= oldlex;
return ret;
}
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 437e910d592..d06cceba77b 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -4566,9 +4566,11 @@ end_with_restore_list:
goto error;
}
if (lex->sql_command == SQLCOM_SHOW_PROC_CODE)
- sp= sp_find_procedure(thd, lex->spname);
+ sp= sp_find_routine(thd, TYPE_ENUM_PROCEDURE, lex->spname,
+ &thd->sp_proc_cache, FALSE);
else
- sp= sp_find_function(thd, lex->spname);
+ sp= sp_find_routine(thd, TYPE_ENUM_FUNCTION, lex->spname,
+ &thd->sp_func_cache, FALSE);
if (!sp || !sp->show_routine_code(thd))
{
/* We don't distinguish between errors for now */
diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc
index 224fa332d67..296b55679a3 100644
--- a/sql/sql_trigger.cc
+++ b/sql/sql_trigger.cc
@@ -913,6 +913,7 @@ bool Table_triggers_list::check_n_load(THD *thd, const char *db,
thd->db= save_db.str;
thd->db_length= save_db.length;
thd->lex= old_lex;
+ thd->spcont= save_spcont;
thd->variables.sql_mode= save_sql_mode;
DBUG_RETURN(0);