summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <pem@mysql.com>2003-02-04 17:40:18 +0100
committerunknown <pem@mysql.com>2003-02-04 17:40:18 +0100
commit565d98958efd48d7c0a39891c5c0d463626dd1fc (patch)
tree713bbe3bbbdbcc413487207b67a5366a9b84ae24 /sql
parent77f30e19a6da4d17a5e282e5967cf4c61b35ddec (diff)
downloadmariadb-git-565d98958efd48d7c0a39891c5c0d463626dd1fc.tar.gz
Some new stuff in the Docs/sp-* files, and renamed a few functions in preparation
for future work. Docs/sp-imp-spec.txt: Started on the FUNCTION parts... Docs/sp-implemented.txt: Added som info on SET behaviour, and added Open questions. sql/sp.cc: Renamed functions. sql/sp.h: Renamed functions. sql/sql_parse.cc: Renamed functions.
Diffstat (limited to 'sql')
-rw-r--r--sql/sp.cc4
-rw-r--r--sql/sp.h15
-rw-r--r--sql/sql_parse.cc8
3 files changed, 19 insertions, 8 deletions
diff --git a/sql/sp.cc b/sql/sp.cc
index caeb01200ff..a4fd239b513 100644
--- a/sql/sp.cc
+++ b/sql/sp.cc
@@ -24,7 +24,7 @@
// the in-memory cache for SPs. (And store newly prepared SPs there of
// course.)
sp_head *
-sp_find(THD *thd, Item_string *iname)
+sp_find_procedure(THD *thd, Item_string *iname)
{
extern int yyparse(void *thd);
LEX *tmplex;
@@ -92,7 +92,7 @@ sp_create_procedure(THD *thd, char *name, uint namelen, char *def, uint deflen)
}
int
-sp_drop(THD *thd, char *name, uint namelen)
+sp_drop_procedure(THD *thd, char *name, uint namelen)
{
TABLE *table;
TABLE_LIST tables;
diff --git a/sql/sp.h b/sql/sp.h
index cb3343a4e92..99ea97cba8f 100644
--- a/sql/sp.h
+++ b/sql/sp.h
@@ -22,12 +22,23 @@
// Finds a stored procedure given its name. Returns NULL if not found.
//
sp_head *
-sp_find(THD *thd, Item_string *name);
+sp_find_procedure(THD *thd, Item_string *name);
int
sp_create_procedure(THD *thd, char *name, uint namelen, char *def, uint deflen);
int
-sp_drop(THD *thd, char *name, uint namelen);
+sp_drop_procedure(THD *thd, char *name, uint namelen);
+
+#if 0
+sp_head *
+sp_find_function(THD *thd, Item_string *name);
+
+int
+sp_create_function(THD *thd, char *name, uint namelen, char *def, uint deflen);
+
+int
+sp_drop_function(THD *thd, char *name, uint namelen);
+#endif
#endif /* _SP_H_ */
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index d1515025723..d1d6f63694e 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -2833,7 +2833,7 @@ mysql_execute_command(THD *thd)
sp_head *sp;
s= (Item_string*)lex->value_list.head();
- sp= sp_find(thd, s);
+ sp= sp_find_procedure(thd, s);
if (! sp)
{
send_error(thd, ER_SP_DOES_NOT_EXIST);
@@ -2862,7 +2862,7 @@ mysql_execute_command(THD *thd)
sp_head *sp;
s= (Item_string*)lex->value_list.head();
- sp= sp_find(thd, s);
+ sp= sp_find_procedure(thd, s);
if (! sp)
{
send_error(thd, ER_SP_DOES_NOT_EXIST);
@@ -2882,7 +2882,7 @@ mysql_execute_command(THD *thd)
sp_head *sp;
s = (Item_string*)lex->value_list.head();
- sp = sp_find(thd, s);
+ sp = sp_find_procedure(thd, s);
if (! sp)
{
send_error(thd, ER_SP_DOES_NOT_EXIST);
@@ -2892,7 +2892,7 @@ mysql_execute_command(THD *thd)
{
String *name = s->const_string();
- res= sp_drop(thd, name->c_ptr(), name->length());
+ res= sp_drop_procedure(thd, name->c_ptr(), name->length());
if (res != 0)
{
send_error(thd, ER_SP_DROP_FAILED);