• unknown's avatar
    Most of the groundwork for sprint task 729 (implement FUNCTIONs). · 0521fb54
    unknown authored
    Expanded the mysql.proc table, reworked the find/create/drop functions
    completely, added new functions for FUNCTIONs (lotta functions here :),
    got rid of some unnecessary use of Item_strings while at it. Extended
    the parser correspondingly, and fiddled around a bit to make SP FUNCTIONs
    coexist with UDFs.
    Can now CREATE and DROP FUNCTIONs. Invoking yet to come...
    
    
    Docs/sp-implemented.txt:
      Updated with info about CASCADE/RESTICT and METHOD, and some answers to questions.
    include/mysqld_error.h:
      New error message for misuse of RETURN.
    mysql-test/install_test_db.sh:
      Added enum field to mysql.proc to distinguish between FUNCTION and PROCEDURE.
    mysql-test/r/sp.result:
      New test for creating and dropping FUNCTIONS.
    mysql-test/t/sp.test:
      New test for creating and dropping FUNCTIONS.
    scripts/mysql_install_db.sh:
      Added enum field to mysql.proc to distinguish between FUNCTION and PROCEDURE.
    sql/lex.h:
      De-UDFed some symbol names, as they are now used for SPs as well.
      Added RETURN_SYM.
    sql/share/czech/errmsg.txt:
      New error message for misuse of RETURN.
    sql/share/danish/errmsg.txt:
      New error message for misuse of RETURN.
    sql/share/dutch/errmsg.txt:
      New error message for misuse of RETURN.
    sql/share/english/errmsg.txt:
      New error message for misuse of RETURN.
    sql/share/estonian/errmsg.txt:
      New error message for misuse of RETURN.
    sql/share/french/errmsg.txt:
      New error message for misuse of RETURN.
    sql/share/german/errmsg.txt:
      New error message for misuse of RETURN.
    sql/share/greek/errmsg.txt:
      New error message for misuse of RETURN.
    sql/share/hungarian/errmsg.txt:
      New error message for misuse of RETURN.
    sql/share/italian/errmsg.txt:
      New error message for misuse of RETURN.
    sql/share/japanese/errmsg.txt:
      New error message for misuse of RETURN.
    sql/share/korean/errmsg.txt:
      New error message for misuse of RETURN.
    sql/share/norwegian-ny/errmsg.txt:
      New error message for misuse of RETURN.
    sql/share/norwegian/errmsg.txt:
      New error message for misuse of RETURN.
    sql/share/polish/errmsg.txt:
      New error message for misuse of RETURN.
    sql/share/portuguese/errmsg.txt:
      New error message for misuse of RETURN.
    sql/share/romanian/errmsg.txt:
      New error message for misuse of RETURN.
    sql/share/russian/errmsg.txt:
      New error message for misuse of RETURN.
    sql/share/serbian/errmsg.txt:
      New error message for misuse of RETURN.
    sql/share/slovak/errmsg.txt:
      New error message for misuse of RETURN.
    sql/share/spanish/errmsg.txt:
      New error message for misuse of RETURN.
    sql/share/swedish/errmsg.txt:
      New error message for misuse of RETURN.
    sql/share/ukrainian/errmsg.txt:
      New error message for misuse of RETURN.
    sql/sp.cc:
      Major rehack to accomodate FUNCTIONs, and to make it easier to add
      future in-memory cache of prepared SPs.
    sql/sp.h:
      Major rehack to accomodate FUNCTIONs, and to make it easier to add
      future in-memory cache of prepared SPs.
    sql/sp_head.cc:
      Now creates FUNCTIONs too. (And got rid of some unnecessary Item_string use.)
    sql/sp_head.h:
      Now creates FUNCTIONs too. (And got rid of some unnecessary Item_string use.)
    sql/sql_lex.h:
      New stored FUNCTION commands.
    sql/sql_parse.cc:
      Added FUNCTION support ("drop" merged with the old UDF code), and made some
      additional changes for better error handling (following the sp.cc rehacking).
    sql/sql_yacc.yy:
      Some former UDF specific symbols renamed.
      Added CREATE FUNCTION parsing.
      DROP FUNCTION had to be partly merged with the old UDF code, because of the similar
      syntax.
      RETURN statement added, but still a no-op.
    0521fb54
sp_head.cc 10.8 KB