diff options
author | unknown <pem@mysql.comhem.se> | 2004-03-19 19:01:54 +0100 |
---|---|---|
committer | unknown <pem@mysql.comhem.se> | 2004-03-19 19:01:54 +0100 |
commit | 2242bd3a66c8e3b08ff9729892312ebc9715c5ab (patch) | |
tree | 8a8b60eab5553d3fb3d8304e77dadd313b4c77e6 /sql/item_func.h | |
parent | cb8fa89e0309ca8480284e26fb2419ca16f27820 (diff) | |
download | mariadb-git-2242bd3a66c8e3b08ff9729892312ebc9715c5ab.tar.gz |
WL#1366: Use the schema (db) associated with an SP.
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.
Diffstat (limited to 'sql/item_func.h')
-rw-r--r-- | sql/item_func.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/item_func.h b/sql/item_func.h index e68826ca56e..6d313a8ea66 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -1107,7 +1107,10 @@ public: Item *it; if (execute(&it)) + { + null_value= 1; return 0.0; + } return it->val(); } @@ -1116,7 +1119,10 @@ public: Item *it; if (execute(&it)) + { + null_value= 1; return NULL; + } return it->val_str(str); } |