Commit graph

13 commits

Author SHA1 Message Date
pem@mysql.comhem.se
c81b848d20 Major rehacking and cleanup of sp_pcontext.
This finishes (almost) WL#2002: Implement stored procedure GOTO.
Only the syntax issue for free labels remains ("label L;" vs "L:").
2004-08-26 12:54:30 +02:00
pem@mysql.comhem.se
38b4cbbbd5 WL#2002: Implement stored procedure GOTO.
Mostly done, it works, but the temporary LABEL syntax still to be fixed.
2004-08-17 20:20:58 +02:00
pem@mysql.comhem.se
4a6e6251e7 Fixed BUG#2776: Stored procedure crash if variable assigned to default.
Keep track on the default value and use it. (Or NULL, if not declared.)
2004-04-06 15:48:58 +02:00
pem@mysql.comhem.se
c38bb3d79d Various bug fixes:
- Duplicate parameters/variables, conditions and cursors (not allowed).
  - ITERATE in labelled BEGIN-END (not allowed).
  - Missing SQLSTATE [VALUE] keywords in CONDITION/HANDLER declaration (added).
  - Empty BEGIN-END (now allowed).
  - End label (now optional).
2003-11-13 19:34:56 +01:00
pem@mysql.telia.com
689bb84f72 WL#962: Added simple, read-only, non-scrolling, asensitive cursors in SPs, using the
(updated) Protocol_cursor class.
Also did some bug fixes.
2003-10-10 16:57:21 +02:00
pem@mysql.telia.com
04f0570fe8 Implemented SP CONDITIONs and HANDLERs, with the extension of handling
MySQL error codes as well.
(No UNDO HANDLERs yet, and no SIGNAL or RESIGNAL.)
WL#850
2003-09-16 14:26:08 +02:00
pem@mysql.com
c673fcb813 Getting rid of lots of memory leaks (but not quite all of them yet,
some will go away when temporary code is replaced).
2003-04-02 20:42:28 +02:00
pem@mysql.com
2578564725 Added IF EXISTS to DROP PROCEDURE|FUNCTION.
Changed another unecessary use of Item_string into LEX_STRING (in sp_pcontext).
2003-03-26 12:29:58 +01:00
pem@mysql.com
58d3dda33f Added parsing of CASE (both generic and "simple"). 2002-12-17 10:01:52 +01:00
pem@mysql.com
b1593c9a69 Fixed the broken backpatching implementation.
Implemented IF-THEN-ELSE.
2002-12-16 15:40:44 +01:00
pem@mysql.com
77b671f594 Moved create/find/drop functions to a separate files (sp.cc,sp.h).
Fixed backpatching of forward jumps.
Implemented LOOP, WHILE, REPEAT (temporarily known as SPREPEAT).

Known bug: Expression evaluation still not quite ok (e.g. "x > 0"),
which is why IF and CASE is not yet implemented.
2002-12-12 13:14:23 +01:00
pem@mysql.com
f0137bcd68 Fixed bugs in the parameter evaluation and modified the execution engine
for better jump support. Some flow control support added too (but not
complete).
2002-12-11 14:24:29 +01:00
pem@mysql.com
aae07a4d45 Simplistic, experimental framework for Stored Procedures (SPs).
Implements creation and dropping of PROCEDUREs, IN, OUT, and INOUT parameters,
single-statement procedures, rudimentary multi-statement (begin-end) prodedures
(when the client can handle it), and local variables.
Missing most of the embedded SQL language, all attributes, FUNCTIONs, error handling,
reparses procedures at each call (no caching), etc, etc.
Certainly buggy too, but procedures can actually be created and called....
2002-12-08 19:59:22 +01:00