summaryrefslogtreecommitdiff
path: root/Docs/sp-implemented.txt
diff options
context:
space:
mode:
authorunknown <pem@mysql.telia.com>2003-07-08 17:50:23 +0200
committerunknown <pem@mysql.telia.com>2003-07-08 17:50:23 +0200
commitf5669b228878e3248c0687d7b60d9ea89739fa69 (patch)
tree74630fcd49c30dc287ee12828be728366d6d070e /Docs/sp-implemented.txt
parent2050e37585de2a48f5fde1f0ef34a0b1b657e481 (diff)
parent95b86e8403a84cd945bd7174571e68c1db0b9849 (diff)
downloadmariadb-git-f5669b228878e3248c0687d7b60d9ea89739fa69.tar.gz
Merge 4.1 into 5.0 (first pass).
BitKeeper/etc/ignore: auto-union BitKeeper/etc/logging_ok: auto-union BitKeeper/deleted/.del-cron-build: Delete: netware/BUILD/cron-build BitKeeper/deleted/.del-crontab: Delete: netware/BUILD/crontab BitKeeper/triggers/post-commit: Auto merged client/mysql.cc: Auto merged client/mysqltest.c: Auto merged configure.in: Auto merged include/my_global.h: Auto merged include/my_pthread.h: Auto merged include/mysql_com.h: Auto merged libmysqld/Makefile.am: Auto merged myisam/mi_check.c: Auto merged myisam/myisamchk.c: Auto merged myisam/myisamdef.h: Auto merged myisam/sort.c: Auto merged mysql-test/r/connect.result: Auto merged mysql-test/r/rpl_temporary.result: Auto merged mysql-test/r/show_check.result: Auto merged mysql-test/r/variables.result: Auto merged mysql-test/t/subselect.test: Auto merged mysql-test/t/variables.test: Auto merged netware/BUILD/compile-AUTOTOOLS: Auto merged netware/BUILD/compile-linux-tools: Auto merged netware/BUILD/compile-netware-END: Auto merged netware/BUILD/compile-netware-START: Auto merged netware/BUILD/compile-netware-all: Auto merged netware/BUILD/compile-netware-debug: Auto merged netware/BUILD/compile-netware-standard: Auto merged netware/BUILD/mwasmnlm: Auto merged netware/BUILD/mwccnlm: Auto merged netware/BUILD/mwldnlm: Auto merged netware/BUILD/nwbootstrap: Auto merged sql/filesort.cc: Auto merged sql/ha_myisam.cc: Auto merged sql/item.h: Auto merged sql/item_create.cc: Auto merged sql/item_func.h: Auto merged sql/log.cc: Auto merged sql/log_event.cc: Auto merged sql/protocol.cc: Auto merged sql/records.cc: Auto merged sql/repl_failsafe.cc: Auto merged sql/set_var.cc: Auto merged sql/slave.cc: Auto merged sql/sql_acl.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_db.cc: Auto merged sql/sql_delete.cc: Auto merged sql/sql_derived.cc: Auto merged sql/sql_error.cc: Auto merged sql/sql_load.cc: Auto merged sql/sql_prepare.cc: Auto merged sql/sql_repl.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_show.cc: Auto merged sql/sql_table.cc: Auto merged sql/sql_union.cc: Auto merged
Diffstat (limited to 'Docs/sp-implemented.txt')
-rw-r--r--Docs/sp-implemented.txt99
1 files changed, 99 insertions, 0 deletions
diff --git a/Docs/sp-implemented.txt b/Docs/sp-implemented.txt
new file mode 100644
index 00000000000..41e7c4b2923
--- /dev/null
+++ b/Docs/sp-implemented.txt
@@ -0,0 +1,99 @@
+Stored Procedures implemented 2003-03-07:
+
+
+Summary of Not Yet Implemented:
+
+ - SQL queries (like SELECT, INSERT, UPDATE etc) in FUNCTION bodies
+ - External languages
+ - Access control
+ - Routine characteristics (mostly used for external languages)
+ - Prepared SP caching; SPs are fetched and reparsed at each call
+ - SQL-99 COMMIT (related to BEGIN/END)
+ - DECLARE CURSOR ...
+ - FOR-loops (as it requires cursors)
+ - CASCADE/RESTRICT for ALTER and DROP
+ - ALTER/DROP METHOD (as it implies User Defined Types)
+ - CONDITIONs, HANDLERs, SIGNAL and RESIGNAL (will probably not be implemented)
+
+
+Summary of what's implemented:
+
+ - SQL PROCEDUREs/FUNCTIONs (CREATE/DROP)
+ - CALL
+ - DECLARE of local variables
+ - BEGIN/END, SET, CASE, IF, LOOP, WHILE, REPEAT, ITERATE, LEAVE
+ - SELECT INTO local variables
+ - "Non-query" FUNCTIONs only
+
+
+List of what's implemented:
+
+ - CREATE PROCEDURE|FUNCTION name ( args ) body
+ No routine characteristics yet.
+
+ - 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|FUNCTION [IF EXISTS] name
+ CASCADE/RESTRICT is not implemented (and CASCADE probably will not be).
+
+ - CALL name (args)
+ OUT and INOUT parameters are only supported for local variables, and
+ therefore only useful when calling such procedures from within another
+ procedure.
+ Note: For the time being, when a procedure with OUT/INOUT parameter is
+ called, the out values are silently discarded. In the future, this
+ will either generate an error message, or it might even work to
+ call all procedures from the top-level.
+
+ - 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
+ local variable binding).
+ Note: Multiple statements requires a client that can send bodies
+ containing ";". This is handled in the CLI clients mysql and
+ mysqltest with the "delimiter" command. Changing the end-of-query
+ delimiter ";" to for instance "|" allows ";" to be used in the
+ routine body.
+ - SET of local variables
+ Implemented as part of the pre-existing SET syntax. This allows an
+ extended syntax of "SET a=x, b=y, ..." where different variable types
+ (SP local and global) can be mixed. This also allows combinations
+ of local variables and some options that only make sense for
+ global/system variables; in that case the options are accepted but
+ ignored.
+ - The flow control constructs: CASE, IF, LOOP, WHILE, ITERATE and LEAVE
+ are fully implemented.
+ - SELECT ... INTO local variables (as well as global session variables)
+ is implemented. (Note: This is not SQL-99 feature, but common in other
+ databases.)
+ - A FUNCTION can have flow control contructs, but must not contain
+ an SQL query, like SELECT, INSERT, UPDATE, etc. The reason is that it's
+ hard to allow this is that a FUNCTION is executed as part of another
+ query (unlike a PROCEDURE, which is called as a statement). The table
+ locking scheme used makes it difficult to allow "subqueries" during
+ FUNCTION invokation.
+
+
+Closed questions:
+
+ - What is the expected result when creating a procedure with a name that
+ already exists? An error or overwrite?
+ Answer: Error
+
+ - Do PROCEDUREs and FUNCTIONs share namespace or not? I think not, but the
+ we need to flag the type in the mysql.proc table and the name alone is
+ not a unique key any more, or, we have separate tables.
+ (Unfortunately, mysql.func is already taken. Use "sfunc" and maybe even
+ rename "proc" into "sproc" while we still can, for consistency?)
+ Answer: Same tables, with an additional key-field for the type.
+
+
+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.