diff options
author | unknown <pem@mysql.com> | 2003-03-03 15:03:19 +0100 |
---|---|---|
committer | unknown <pem@mysql.com> | 2003-03-03 15:03:19 +0100 |
commit | f519382d2bf276a9beb5d123fde93ec4cdfdefea (patch) | |
tree | 8f6f25b0c7c17695dfba611a482a1bde83285372 /Docs/sp-implemented.txt | |
parent | 8a9422bd2af6ea39676171b9ec16897c64104dc8 (diff) | |
download | mariadb-git-f519382d2bf276a9beb5d123fde93ec4cdfdefea.tar.gz |
New FUNCTION documentation, and a minor test case modification.
Docs/sp-imp-spec.txt:
Updated docs about stored FUNCTIONs.
Docs/sp-implemented.txt:
Updated docs about stored FUNCTIONs.
mysql-test/r/sp.result:
Changed the ifac test example into a combination of a procedure and a function.
mysql-test/t/sp.test:
Changed the ifac test example into a combination of a procedure and a function.
Diffstat (limited to 'Docs/sp-implemented.txt')
-rw-r--r-- | Docs/sp-implemented.txt | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/Docs/sp-implemented.txt b/Docs/sp-implemented.txt index b3b12b7edb8..5173606e95c 100644 --- a/Docs/sp-implemented.txt +++ b/Docs/sp-implemented.txt @@ -3,7 +3,6 @@ Stored Procedures implemented 2003-02-02: Summary of Not Yet Implemented: - - FUNCTIONs - Routine characteristics - External languages - Access control @@ -26,14 +25,14 @@ Summary of what's implemented: List of what's implemented: - - CREATE PROCEDURE name ( args ) body + - CREATE PROCEDURE|FUNCTION name ( args ) body No routine characteristics yet. - - ALTER PROCEDURE name ... + - ALTER PROCEDURE|FUNCTION name ... Is parsed, but a no-op (as there are no characteristics implemented yet). CASCADE/RESTRICT is not implemented (and CASCADE probably will not be). - - DROP PROCEDURE name + - DROP PROCEDURE|FUNCTION name CASCADE/RESTRICT is not implemented (and CASCADE probably will not be). - CALL name (args) @@ -45,7 +44,7 @@ List of what's implemented: will either generate an error message, or it might even work to call all procedures from the top-level. - - Procedure body: + - Function/Procedure body: - BEGIN/END Is parsed, but not the real thing with (optional) transaction control, it only serves as block syntax for multiple statements (and @@ -82,9 +81,23 @@ Closed questions: Answer: Same tables, with an additional key-field for the type. -Open questions: +Open questions/issues: - SQL-99 variables and parameters are typed. For the present we don't do any type checking, since this is the way MySQL works. I still don't know if we should keep it this way, or implement type checking. Possibly we should have optional, uset-settable, type checking. + + - FUNCTIONs do not work correctly in all circumstances yet. + For instance a function like: + create function s() returns int + begin + declare s int; + select sum(test.t.y) into s from test.t; + return s; + end + do not work. Invoking this in queries like "SELECT * FROM t2 WHERE x = s()" + will make things very complicated. And, in fact, even "SET @s=s()" and + "SELECT s()" fail, although the exact reasons in these cases are a bit + obscure; part of the problem might be the way the lex structure is + bit-copied (a not completely sound thing to do). |