diff options
author | tomas@poseidon.ndb.mysql.com <> | 2006-02-02 16:19:49 +0100 |
---|---|---|
committer | tomas@poseidon.ndb.mysql.com <> | 2006-02-02 16:19:49 +0100 |
commit | ce8308a503118a062d2a5c537a9baf468962c607 (patch) | |
tree | bf6e4dbb25f308b87124507b82e250a05ccdebc2 /mysql-test | |
parent | 467720abf0ecf984fbb938c9e2d19a4c84a87445 (diff) | |
parent | 065f8066d5de10cf998b02d0e02216f61d87e9db (diff) | |
download | mariadb-git-ce8308a503118a062d2a5c537a9baf468962c607.tar.gz |
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into poseidon.ndb.mysql.com:/home/tomas/mysql51
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/alter_table.result | 4 | ||||
-rw-r--r-- | mysql-test/r/mysqltest.result | 1 | ||||
-rw-r--r-- | mysql-test/r/sp-code.result | 2 | ||||
-rw-r--r-- | mysql-test/r/sp-error.result | 2 | ||||
-rw-r--r-- | mysql-test/r/sp.result | 100 | ||||
-rw-r--r-- | mysql-test/r/variables.result | 4 | ||||
-rw-r--r-- | mysql-test/r/view_grant.result | 8 | ||||
-rw-r--r-- | mysql-test/t/alter_table.test | 10 | ||||
-rw-r--r-- | mysql-test/t/mysqltest.test | 8 | ||||
-rw-r--r-- | mysql-test/t/sp.test | 89 | ||||
-rw-r--r-- | mysql-test/t/type_decimal.test | 1 |
11 files changed, 211 insertions, 18 deletions
diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result index e218e008525..a62a30be5b7 100644 --- a/mysql-test/r/alter_table.result +++ b/mysql-test/r/alter_table.result @@ -617,3 +617,7 @@ select * from t1 where i between 2 and 4 and v in ('def','3r4f','lmn'); i v 4 3r4f drop table t1; +create table t1 (t varchar(255) default null, key t (t(80))) +engine=myisam default charset=latin1; +alter table t1 change t t text; +drop table t1; diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result index 1646260c218..f2d57fccad2 100644 --- a/mysql-test/r/mysqltest.result +++ b/mysql-test/r/mysqltest.result @@ -361,6 +361,7 @@ OK mysqltest: In included file "./var/tmp/con.sql": At line 7: Connection limit exhausted - increase MAX_CONS in mysqltest.c mysqltest: In included file "./var/tmp/con.sql": At line 3: connection 'test_con1' not found in connection pool mysqltest: In included file "./var/tmp/con.sql": At line 2: Connection test_con1 already exists +connect(localhost,root,,test,MASTER_PORT,MASTER_SOCKET); Output from mysqltest-x.inc Output from mysqltest-x.inc Output from mysqltest-x.inc diff --git a/mysql-test/r/sp-code.result b/mysql-test/r/sp-code.result index e6c4ffe1731..943471c2261 100644 --- a/mysql-test/r/sp-code.result +++ b/mysql-test/r/sp-code.result @@ -49,7 +49,7 @@ Pos Instruction 9 set err@1 1 10 hreturn 5 11 cfetch c@0 n@4 -12 jump_if_not 15 isnull(n@4) +12 jump_if_not 15(17) isnull(n@4) 13 set nulls@2 (nulls@2 + 1) 14 jump 17 15 set count@3 (count@3 + 1) diff --git a/mysql-test/r/sp-error.result b/mysql-test/r/sp-error.result index 1241e05fa74..a74a18375d5 100644 --- a/mysql-test/r/sp-error.result +++ b/mysql-test/r/sp-error.result @@ -522,7 +522,7 @@ fetch c into v; end| delete from t1| call bug7299()| -ERROR 02000: No data to FETCH +ERROR 02000: No data - zero rows fetched, selected, or processed drop procedure bug7299| create procedure bug9073() begin diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index 24beec04c4e..a025c0503cd 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -522,7 +522,7 @@ delete from t1| create table t3 ( s char(16), d int)| call into_test4()| Warnings: -Warning 1329 No data to FETCH +Warning 1329 No data - zero rows fetched, selected, or processed select * from t3| s d into4 NULL @@ -1787,10 +1787,10 @@ end| call bug1863(10)| Warnings: Note 1051 Unknown table 'temp_t1' -Warning 1329 No data to FETCH +Warning 1329 No data - zero rows fetched, selected, or processed call bug1863(10)| Warnings: -Warning 1329 No data to FETCH +Warning 1329 No data - zero rows fetched, selected, or processed select * from t4| f1 rc t3 2 0 NULL @@ -2084,10 +2084,10 @@ end| call bug4579_1()| call bug4579_1()| Warnings: -Warning 1329 No data to FETCH +Warning 1329 No data - zero rows fetched, selected, or processed call bug4579_1()| Warnings: -Warning 1329 No data to FETCH +Warning 1329 No data - zero rows fetched, selected, or processed drop procedure bug4579_1| drop procedure bug4579_2| drop table t3| @@ -2507,7 +2507,7 @@ call bug7743("OneWord")| var NULL Warnings: -Warning 1329 No data to FETCH +Warning 1329 No data - zero rows fetched, selected, or processed call bug7743("anotherword")| var 2 @@ -2515,7 +2515,7 @@ call bug7743("AnotherWord")| var NULL Warnings: -Warning 1329 No data to FETCH +Warning 1329 No data - zero rows fetched, selected, or processed drop procedure bug7743| drop table t4| delete from t3| @@ -4296,6 +4296,90 @@ id county 2 NULL drop table t3| drop procedure bug15441| +drop procedure if exists bug14498_1| +drop procedure if exists bug14498_2| +drop procedure if exists bug14498_3| +drop procedure if exists bug14498_4| +drop procedure if exists bug14498_5| +create procedure bug14498_1() +begin +declare continue handler for sqlexception select 'error' as 'Handler'; +if v then +select 'yes' as 'v'; +else +select 'no' as 'v'; +end if; +select 'done' as 'End'; +end| +create procedure bug14498_2() +begin +declare continue handler for sqlexception select 'error' as 'Handler'; +while v do +select 'yes' as 'v'; +end while; +select 'done' as 'End'; +end| +create procedure bug14498_3() +begin +declare continue handler for sqlexception select 'error' as 'Handler'; +repeat +select 'maybe' as 'v'; +until v end repeat; +select 'done' as 'End'; +end| +create procedure bug14498_4() +begin +declare continue handler for sqlexception select 'error' as 'Handler'; +case v +when 1 then +select '1' as 'v'; +when 2 then +select '2' as 'v'; +else +select '?' as 'v'; +end case; +select 'done' as 'End'; +end| +create procedure bug14498_5() +begin +declare continue handler for sqlexception select 'error' as 'Handler'; +case +when v = 1 then +select '1' as 'v'; +when v = 2 then +select '2' as 'v'; +else +select '?' as 'v'; +end case; +select 'done' as 'End'; +end| +call bug14498_1()| +Handler +error +End +done +call bug14498_2()| +Handler +error +End +done +call bug14498_3()| +v +maybe +Handler +error +End +done +call bug14498_5()| +Handler +error +End +done +drop procedure bug14498_1| +drop procedure bug14498_2| +drop procedure bug14498_3| +drop procedure bug14498_4| +drop procedure bug14498_5| drop table if exists t3| drop procedure if exists bug15231_1| drop procedure if exists bug15231_2| @@ -4340,7 +4424,7 @@ After NOT FOUND condtition is triggered xid xdone 1 0 Warnings: -Warning 1329 No data to FETCH +Warning 1329 No data - zero rows fetched, selected, or processed call bug15231_3()| Result Missed it (correct) diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index d192ee6fe1c..8ee6dfe53cf 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -537,10 +537,10 @@ select @@query_prealloc_size = @test; create table t1 (a int); select a into @x from t1; Warnings: -Warning 1329 No data to FETCH +Warning 1329 No data - zero rows fetched, selected, or processed show warnings; Level Code Message -Warning 1329 No data to FETCH +Warning 1329 No data - zero rows fetched, selected, or processed drop table t1; set @@warning_count=1; ERROR HY000: Variable 'warning_count' is a read only variable diff --git a/mysql-test/r/view_grant.result b/mysql-test/r/view_grant.result index daf34362b5d..f7156bbb701 100644 --- a/mysql-test/r/view_grant.result +++ b/mysql-test/r/view_grant.result @@ -350,12 +350,12 @@ select * from v1; f2() NULL Warnings: -Warning 1329 No data to FETCH +Warning 1329 No data - zero rows fetched, selected, or processed select * from v2; f2() NULL Warnings: -Warning 1329 No data to FETCH +Warning 1329 No data - zero rows fetched, selected, or processed select * from v3; ERROR HY000: View 'mysqltest.v3' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them select * from v4; @@ -396,12 +396,12 @@ select * from v3; f2() NULL Warnings: -Warning 1329 No data to FETCH +Warning 1329 No data - zero rows fetched, selected, or processed select * from v4; f2() NULL Warnings: -Warning 1329 No data to FETCH +Warning 1329 No data - zero rows fetched, selected, or processed select * from v5; ERROR HY000: View 'mysqltest.v5' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them drop view v1, v2, v3, v4, v5; diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test index 3cddd752763..6d0ec720840 100644 --- a/mysql-test/t/alter_table.test +++ b/mysql-test/t/alter_table.test @@ -439,3 +439,13 @@ select * from t1; alter table t1 add unique key (i, v); select * from t1 where i between 2 and 4 and v in ('def','3r4f','lmn'); drop table t1; + +# +# Bug#6073 "ALTER table minor glich": ALTER TABLE complains that an index +# without # prefix is not allowed for TEXT columns, while index +# is defined with prefix. +# +create table t1 (t varchar(255) default null, key t (t(80))) +engine=myisam default charset=latin1; +alter table t1 change t t text; +drop table t1; diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test index f928f0d3e6f..a59788ae229 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -909,7 +909,13 @@ select "a" as col1, "c" as col2; --error 1 --exec echo "source var/tmp/con.sql;" | $MYSQL_TEST 2>&1 - +# connect when "disable_abort_on_error" caused "connection not found" +--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT +--disable_abort_on_error +connect (con1,localhost,root,,); +connection default; +connection con1; +--enable_abort_on_error # ---------------------------------------------------------------------------- # Test mysqltest arguments diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test index 95147cc969b..836d24340ef 100644 --- a/mysql-test/t/sp.test +++ b/mysql-test/t/sp.test @@ -3753,7 +3753,7 @@ drop procedure if exists bug7088_2| --disable_parsing # temporarily disabled until Bar fixes BUG#11986 create procedure bug6063() - lâbel: begin end| + lâbel: begin end| call bug6063()| # QQ Known bug: this will not show the label correctly. show create procedure bug6063| @@ -5048,6 +5048,93 @@ call bug15441('Yale')| drop table t3| drop procedure bug15441| +# +# BUG#14498: Stored procedures: hang if undefined variable and exception +# +--disable_warnings +drop procedure if exists bug14498_1| +drop procedure if exists bug14498_2| +drop procedure if exists bug14498_3| +drop procedure if exists bug14498_4| +drop procedure if exists bug14498_5| +--enable_warnings + +create procedure bug14498_1() +begin + declare continue handler for sqlexception select 'error' as 'Handler'; + + if v then + select 'yes' as 'v'; + else + select 'no' as 'v'; + end if; + select 'done' as 'End'; +end| + +create procedure bug14498_2() +begin + declare continue handler for sqlexception select 'error' as 'Handler'; + + while v do + select 'yes' as 'v'; + end while; + select 'done' as 'End'; +end| + +create procedure bug14498_3() +begin + declare continue handler for sqlexception select 'error' as 'Handler'; + + repeat + select 'maybe' as 'v'; + until v end repeat; + select 'done' as 'End'; +end| + +create procedure bug14498_4() +begin + declare continue handler for sqlexception select 'error' as 'Handler'; + + case v + when 1 then + select '1' as 'v'; + when 2 then + select '2' as 'v'; + else + select '?' as 'v'; + end case; + select 'done' as 'End'; +end| + +create procedure bug14498_5() +begin + declare continue handler for sqlexception select 'error' as 'Handler'; + + case + when v = 1 then + select '1' as 'v'; + when v = 2 then + select '2' as 'v'; + else + select '?' as 'v'; + end case; + select 'done' as 'End'; +end| + +call bug14498_1()| +call bug14498_2()| +call bug14498_3()| +# We couldn't call this before, due to a known bug (BUG#14643) +# QQ We still can't since the new set_case_expr instruction breaks +# the semantics of case; it won't crash, but will get the wrong result. +#call bug14498_4()| +call bug14498_5()| + +drop procedure bug14498_1| +drop procedure bug14498_2| +drop procedure bug14498_3| +drop procedure bug14498_4| +drop procedure bug14498_5| # # BUG#15231: Stored procedure bug with not found condition handler diff --git a/mysql-test/t/type_decimal.test b/mysql-test/t/type_decimal.test index 1f6310cb819..07347322453 100644 --- a/mysql-test/t/type_decimal.test +++ b/mysql-test/t/type_decimal.test @@ -376,3 +376,4 @@ insert INTO t2 SELECT * FROM t1; select * from t2; drop table t1, t2; + |