mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Simplistic, experimental framework for Stored Procedures (SPs).
Implements creation and dropping of PROCEDUREs, IN, OUT, and INOUT parameters, single-statement procedures, rudimentary multi-statement (begin-end) prodedures (when the client can handle it), and local variables. Missing most of the embedded SQL language, all attributes, FUNCTIONs, error handling, reparses procedures at each call (no caching), etc, etc. Certainly buggy too, but procedures can actually be created and called....
This commit is contained in:
@ -21,6 +21,9 @@
|
||||
class Table_ident;
|
||||
class sql_exchange;
|
||||
class LEX_COLUMN;
|
||||
class sp_head;
|
||||
class sp_instr;
|
||||
class sp_pcontext;
|
||||
|
||||
/*
|
||||
The following hack is needed because mysql_yacc.cc does not define
|
||||
@ -72,6 +75,8 @@ enum enum_sql_command {
|
||||
SQLCOM_SHOW_WARNS, SQLCOM_EMPTY_QUERY, SQLCOM_SHOW_ERRORS,
|
||||
SQLCOM_SHOW_COLUMN_TYPES, SQLCOM_SHOW_TABLE_TYPES, SQLCOM_SHOW_PRIVILEGES,
|
||||
SQLCOM_HELP,
|
||||
SQLCOM_CREATE_PROCEDURE, SQLCOM_CALL, SQLCOM_DROP_PROCEDURE,
|
||||
SQLCOM_ALTER_PROCEDURE,
|
||||
|
||||
/* This should be the last !!! */
|
||||
SQLCOM_END
|
||||
@ -402,6 +407,7 @@ typedef struct st_lex
|
||||
SELECT_LEX_NODE *current_select;
|
||||
/* list of all SELECT_LEX */
|
||||
SELECT_LEX *all_selects_list;
|
||||
uchar *buf; /* The beginning of string, used by SPs */
|
||||
uchar *ptr,*tok_start,*tok_end,*end_of_query;
|
||||
char *length,*dec,*change,*name;
|
||||
char *backup_dir; /* For RESTORE/BACKUP */
|
||||
@ -459,6 +465,8 @@ typedef struct st_lex
|
||||
uint slave_thd_opt;
|
||||
CHARSET_INFO *charset;
|
||||
char *help_arg;
|
||||
sp_head *sphead;
|
||||
sp_pcontext *spcont;
|
||||
} LEX;
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user