From a6fbde9db78b91f0f069030b85dc3ba59e543b9f Mon Sep 17 00:00:00 2001 From: "pem@mysql.com" <> Date: Tue, 18 Apr 2006 11:07:34 +0200 Subject: Fixed BUG#18949: Test case sp-goto is disabled Removed sp-goto.test, sp-goto.result and all (disabled) GOTO code. Also removed some related code that's not needed any more (no possible unresolved label references any more, so no need to check for them). NB: Keeping the ER_SP_GOTO_IN_HNDLR in errmsg.txt; it might become useful in the future, and removing it (and thus re-enumerating error codes) might upset things. (Anything referring to explicit error codes.) --- sql/sp_head.cc | 37 ++----------------------------------- 1 file changed, 2 insertions(+), 35 deletions(-) (limited to 'sql/sp_head.cc') diff --git a/sql/sp_head.cc b/sql/sp_head.cc index 15d621b1d6d..6b7cdb1ea98 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -1670,44 +1670,11 @@ sp_head::backpatch(sp_label_t *lab) while ((bp= li++)) { - if (bp->lab == lab || - (bp->lab->type == SP_LAB_REF && - my_strcasecmp(system_charset_info, bp->lab->name, lab->name) == 0)) - { - if (bp->lab->type != SP_LAB_REF) - bp->instr->backpatch(dest, lab->ctx); - else - { - sp_label_t *dstlab= bp->lab->ctx->find_label(lab->name); - - if (dstlab) - { - bp->lab= lab; - bp->instr->backpatch(dest, dstlab->ctx); - } - } - } - } -} - -int -sp_head::check_backpatch(THD *thd) -{ - bp_t *bp; - List_iterator_fast li(m_backpatch); - - while ((bp= li++)) - { - if (bp->lab->type == SP_LAB_REF) - { - my_error(ER_SP_LILABEL_MISMATCH, MYF(0), "GOTO", bp->lab->name); - return -1; - } + if (bp->lab == lab) + bp->instr->backpatch(dest, lab->ctx); } - return 0; } - /* Prepare an instance of create_field for field creation (fill all necessary attributes). -- cgit v1.2.1