diff options
author | Alexander Barkov <bar@mariadb.org> | 2016-08-22 06:17:26 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2017-04-05 15:02:45 +0400 |
commit | 4212039db78b8a559addd38eaeef3e97b8c5abe9 (patch) | |
tree | a017a6a3773c3c460f68aa755bf541753edea621 /sql/sp_head.h | |
parent | ed19ed6a4bb2792e6911515810451b700f3f319d (diff) | |
download | mariadb-git-4212039db78b8a559addd38eaeef3e97b8c5abe9.tar.gz |
MDEV-10411 Providing compatibility for basic PL/SQL constructs
Part 17: RETURN in stored procedures
Diffstat (limited to 'sql/sp_head.h')
-rw-r--r-- | sql/sp_head.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/sql/sp_head.h b/sql/sp_head.h index 3d55d9e911d..fe83c27c769 100644 --- a/sql/sp_head.h +++ b/sql/sp_head.h @@ -1030,6 +1030,41 @@ private: }; // class sp_instr_jump_if_not : public sp_instr_jump +class sp_instr_preturn : public sp_instr +{ + sp_instr_preturn(const sp_instr_preturn &); /**< Prevent use of these */ + void operator=(sp_instr_preturn &); + +public: + + sp_instr_preturn(uint ip, sp_pcontext *ctx) + : sp_instr(ip, ctx) + {} + + virtual ~sp_instr_preturn() + {} + + virtual int execute(THD *thd, uint *nextp) + { + DBUG_ENTER("sp_instr_preturn::execute"); + *nextp= UINT_MAX; + DBUG_RETURN(0); + } + + virtual void print(String *str) + { + str->append(STRING_WITH_LEN("preturn")); + } + + virtual uint opt_mark(sp_head *sp, List<sp_instr> *leads) + { + marked= 1; + return UINT_MAX; + } + +}; // class sp_instr_preturn : public sp_instr + + class sp_instr_freturn : public sp_instr { sp_instr_freturn(const sp_instr_freturn &); /**< Prevent use of these */ |