From cabd28c68c68c2d673b778d43bd3fdbabb0a8968 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 12 Dec 2003 14:05:29 +0100 Subject: In order to make ALTER PROCEDURE|FUNCTION work correctly, and in general to make characteristics (and SHOW) work right, we had to separate the old definition blob in the mysql.proc table into separate fields for parameters, return type, and body, and handle the characteristics (like SQL SECURITY) separately... and then reassemble the CREATE string for parsing, of course. This is rather ugly, mostly the parser bit. (Hopefully that will be better with the new parser.) Docs/sp-imp-spec.txt: Separated the definitions string of the procedure into different columns in the mysql.proc schema. mysql-test/r/sp.result: New characteristics tests. mysql-test/t/sp.test: New characteristics tests. scripts/mysql_create_system_tables.sh: Separated the definitions string of the procedure into different columns in the mysql.proc schema. scripts/mysql_fix_privilege_tables.sql: Separated the definitions string of the procedure into different columns in the mysql.proc schema. sql/sp.cc: Separated the definitions string of the procedure into different columns. Rewrote much of the code related this (have a assemble the definition string from its different parts now) and the way characteristics are now handled, in order to make ALTER actually work. sql/sp.h: Changed prototypes. sql/sp_head.cc: Rewrote much of the code related to the new mysql.proc schema with separate definition fields (have to assemble the definition string from its different parts now) and the way characteristics are now handled, in order to make ALTER actually work. sql/sp_head.h: Separated the different parts of the definition strings: name, parameters, return type (for functions) and body. sql/sql_yacc.yy: Separated the different parts of the definition strings: name, parameters, return type (for functions) and body. This is ugly and messy; hopefully there's a more elegant way to do this when the new parser is installed. --- sql/sp.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'sql/sp.h') diff --git a/sql/sp.h b/sql/sp.h index 9bce886336d..b9f29138de2 100644 --- a/sql/sp.h +++ b/sql/sp.h @@ -32,8 +32,7 @@ sp_head * sp_find_procedure(THD *thd, LEX_STRING *name); int -sp_create_procedure(THD *thd, char *name, uint namelen, char *def, uint deflen, - st_sp_chistics *chistics); +sp_create_procedure(THD *thd, sp_head *sp); int sp_drop_procedure(THD *thd, char *name, uint namelen); @@ -54,8 +53,7 @@ sp_head * sp_find_function(THD *thd, LEX_STRING *name); int -sp_create_function(THD *thd, char *name, uint namelen, char *def, uint deflen, - st_sp_chistics *chistics); +sp_create_function(THD *thd, sp_head *sp); int sp_drop_function(THD *thd, char *name, uint namelen); -- cgit v1.2.1