• unknown's avatar
    Simplistic, experimental framework for Stored Procedures (SPs). · 27de9ece
    unknown authored
    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....
    
    
    sql/Makefile.am:
      Added SP files.
    sql/item.cc:
      Added this*_item() methods for Item_splocal. (SP local variable)
    sql/item.h:
      Added this*_item() methods for SPs in Item, and the new Item_splocal
      class (SP local variable).
    sql/lex.h:
      Added new symbols for SPs. (Note: SPSET is temporary and will go away later.)
    sql/sql_class.cc:
      Initialize SP runtime context in THD.
    sql/sql_class.h:
      Add SP runtime context to THD.
    sql/sql_lex.cc:
      Init. buf pointer to beginning of command (needed by SPs).
      Also initialize SP head and parse time context.
    sql/sql_lex.h:
      New SQLCOM_ tags for SPs, and added pointer to beginning of command pointer and
      SP head and parse-time context to LEX.
    sql/sql_parse.cc:
      Added SQLCOM_CREATE_PROCEDURE, _CALL, _ALTER_PROCEDURE and _DROP_PROCEDURE cases.
      (Still rudimentary and lacking proper error handling...)
    sql/sql_yacc.yy:
      Lots and lots of additions for SPs...
      (Still even more missing, and no error messages...)
    27de9ece
sp_pcontext.h 2.42 KB