diff options
author | pem@mysql.com <> | 2005-07-01 15:25:51 +0200 |
---|---|---|
committer | pem@mysql.com <> | 2005-07-01 15:25:51 +0200 |
commit | 481bb717d738aa8cea8c309fb468778f1602900b (patch) | |
tree | 2b81457b3223f96449285b78748c31bb3a0fd9c6 /mysql-test/t/sp.test | |
parent | b590f0dec0d4fd7b5e21905f2904f80dba8662b3 (diff) | |
download | mariadb-git-481bb717d738aa8cea8c309fb468778f1602900b.tar.gz |
Disabled the GOTO feature. (It's non-standard and undocumented.)
We want to have the defacto standard syntax for labels ("L:" instead of "label L;"),
and fix some known bugs, before we enable this again.
The code is left intact (#ifdef'ed SP_GOTO) and the test cases are kept in
sp-goto.test, for the future...
Diffstat (limited to 'mysql-test/t/sp.test')
-rw-r--r-- | mysql-test/t/sp.test | 150 |
1 files changed, 1 insertions, 149 deletions
diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test index 314ed58b5a9..7455bc139dc 100644 --- a/mysql-test/t/sp.test +++ b/mysql-test/t/sp.test @@ -12,6 +12,7 @@ # Tests that check privilege and security issues go to sp-security.test. # Tests that require multiple connections, except security/privilege tests, # go to sp-thread. +# Tests that uses 'goto' to into sp-goto.test (currently disabled) use test; @@ -585,139 +586,6 @@ delete from t1| drop procedure i| -# The non-standard GOTO, for compatibility -# -# QQQ The "label" syntax is temporary, it will (hopefully) -# change to the more common "L:" syntax soon. -# ---disable_warnings -drop procedure if exists goto1| ---enable_warnings -create procedure goto1() -begin - declare y int; - -label a; - select * from t1; - select count(*) into y from t1; - if y > 2 then - goto b; - end if; - insert into t1 values ("j", y); - goto a; -label b; -end| - -call goto1()| -drop procedure goto1| - -# With dummy handlers, just to test restore of contexts with jumps ---disable_warnings -drop procedure if exists goto2| ---enable_warnings -create procedure goto2(a int) -begin - declare x int default 0; - declare continue handler for sqlstate '42S98' set x = 1; - -label a; - select * from t1; -b: - while x < 2 do - begin - declare continue handler for sqlstate '42S99' set x = 2; - - if a = 0 then - set x = x + 1; - iterate b; - elseif a = 1 then - leave b; - elseif a = 2 then - set a = 1; - goto a; - end if; - end; - end while b; - - select * from t1; -end| - -call goto2(0)| -call goto2(1)| -call goto2(2)| - -drop procedure goto2| -delete from t1| - -# Check label visibility for some more cases. We don't call these. ---disable_warnings -drop procedure if exists goto3| ---enable_warnings -create procedure goto3() -begin - label L1; - begin - end; - goto L1; -end| -drop procedure goto3| - ---disable_warnings -drop procedure if exists goto4| ---enable_warnings -create procedure goto4() -begin - begin - label lab1; - begin - goto lab1; - end; - end; -end| -drop procedure goto4| - ---disable_warnings -drop procedure if exists goto5| ---enable_warnings -create procedure goto5() -begin - begin - begin - goto lab1; - end; - label lab1; - end; -end| -drop procedure goto5| - ---disable_warnings -drop procedure if exists goto6| ---enable_warnings -create procedure goto6() -begin - label L1; - goto L5; - begin - label L2; - goto L1; - goto L5; - begin - label L3; - goto L1; - goto L2; - goto L3; - goto L4; - goto L5; - end; - goto L2; - goto L4; - label L4; - end; - label L5; - goto L1; -end| -drop procedure goto6| - # SELECT with one of more result set sent back to the clinet insert into t1 values ("foo", 3), ("bar", 19)| insert into t2 values ("x", 9, 4.1), ("y", -1, 19.2), ("z", 3, 2.2)| @@ -3635,22 +3503,6 @@ drop function bug9902| # -# BUG#6898: Stored procedure crash if GOTO statements exist -# ---disable_warnings -drop procedure if exists bug6898| ---enable_warnings -create procedure bug6898() -begin - goto label1; - label label1; - begin end; - goto label1; -end| -drop procedure bug6898| - - -# # BUG#9102: Stored proccedures: function which returns blob causes crash # --disable_warnings |