diff options
author | unknown <thek@adventure.(none)> | 2007-05-18 14:29:24 +0200 |
---|---|---|
committer | unknown <thek@adventure.(none)> | 2007-05-18 14:29:24 +0200 |
commit | ad4da53510fe17b7b20912753232719fd8d3e033 (patch) | |
tree | 4f8326572903715f38fff117eb849e5a7360745c /mysql-test/t | |
parent | bf1198a91354a659a812a7490ac180768b19fe05 (diff) | |
parent | 755ae21b826d6e644560b0ad397eb46cd7191369 (diff) | |
download | mariadb-git-ad4da53510fe17b7b20912753232719fd8d3e033.tar.gz |
Merge adventure.(none):/home/thek/Development/cpp/bug26277/my51-bug26277
into adventure.(none):/home/thek/Development/cpp/mysql-5.1-runtime
mysql-test/t/sp-vars.test:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
mysql-test/r/sp-vars.result:
manual merge
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/sp-vars.test | 36 | ||||
-rw-r--r-- | mysql-test/t/type_date.test | 9 |
2 files changed, 42 insertions, 3 deletions
diff --git a/mysql-test/t/sp-vars.test b/mysql-test/t/sp-vars.test index 2cc68b054d5..fe063889f81 100644 --- a/mysql-test/t/sp-vars.test +++ b/mysql-test/t/sp-vars.test @@ -1412,3 +1412,39 @@ DROP PROCEDURE bug27415_text_test2| DELIMITER ;| # End of 5.0 tests. + +# +# Bug #26277 User variable returns one type in SELECT @v and other for CREATE as SELECT @v +# +--disable_warnings +drop function if exists f1; +drop table if exists t1; +--enable_warnings + +delimiter |; +create function f1() returns int +begin + if @a=1 then set @b='abc'; + else set @b=1; + end if; + set @a=1; + return 0; +end| + +create table t1 (a int)| +insert into t1 (a) values (1), (2)| + +set @b=1| +set @a=0| +select f1(), @b from t1| + +set @b:='test'| +set @a=0| +select f1(), @b from t1| + +delimiter ;| + +drop function f1; +drop table t1; +# End of 5.1 tests. + diff --git a/mysql-test/t/type_date.test b/mysql-test/t/type_date.test index 02cd07e3c16..dcee4fd2ffc 100644 --- a/mysql-test/t/type_date.test +++ b/mysql-test/t/type_date.test @@ -128,9 +128,12 @@ drop table t1; # Bug #23093: Implicit conversion of 9912101 to date does not match # cast(9912101 as date) # -select @d:=1111, year(@d), month(@d), day(@d), cast(@d as date); -select @d:=011111, year(@d), month(@d), day(@d), cast(@d as date); -select @d:=1311, year(@d), month(@d), day(@d), cast(@d as date); +select @d:=1111; +select year(@d), month(@d), day(@d), cast(@d as date); +select @d:=011111; +select year(@d), month(@d), day(@d), cast(@d as date); +select @d:=1311; +select year(@d), month(@d), day(@d), cast(@d as date); create table t1 (d date , dt datetime , ts timestamp); insert into t1 values (9912101,9912101,9912101); insert into t1 values (11111,11111,11111); |