• unknown's avatar
    WL#1366: Use the schema (db) associated with an SP. · d2ad3cff
    unknown authored
    Phase 3: Made qualified names work for functions as well.
    
    
    mysql-test/r/sp-security.result:
      New testcases for functions with qualified names.
    mysql-test/t/sp-security.test:
      New testcases for functions with qualified names.
    sql/item_func.cc:
      Added error handling for stored function, if it doesn't exist.
    sql/item_func.h:
      Set null_value if execution of a stored function fails.
    sql/mysql_priv.h:
      Reverted previous change: No optional args for mysql_change_db().
      (SPs use a specially tailored function instead.)
    sql/sp.cc:
      Copied mysql_change_db() from sql_db.cc and modified specially for SPs.
    sql/sp_head.cc:
      Fixed error handling for errors in functions during query/statement execution.
    sql/sql_db.cc:
      Reverted previous change: No optional args for mysql_change_db().
      (SPs use a specially tailored function instead.)
    sql/sql_yacc.yy:
      Reworked the stored function/UDF invokation parsing and added qualified names
      for stored functions. UDFs now have precedence over stored functions (whith
      unqualified name). When using an unqualified name, only IDENT_sys is allowed
      (i.e. no unreserved keywords), since we get unresolvable reduce/reduce conflicts
      otherwise.
    d2ad3cff
sql_yacc.yy 170 KB