diff options
author | unknown <vva@eagle.mysql.r18.ru> | 2003-10-01 12:22:30 -0400 |
---|---|---|
committer | unknown <vva@eagle.mysql.r18.ru> | 2003-10-01 12:22:30 -0400 |
commit | 866a3ada7b80129e4c8c24f6eafcccc82f704fff (patch) | |
tree | c06f5484c39ee897cb49b2207c950d2c1c64d329 /mysql-test | |
parent | 3d5505d56e9fe8ce8d06af6e39641a23eb25f9fe (diff) | |
parent | d7e308c667ebeacde05cc5f8e921ebd16f474634 (diff) | |
download | mariadb-git-866a3ada7b80129e4c8c24f6eafcccc82f704fff.tar.gz |
Merge eagle.mysql.r18.ru:/home/vva/work/mysql.orig/clear/mysql-4.0
into eagle.mysql.r18.ru:/home/vva/work/BUG_1194/mysql-4.0
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/user_var.result | 32 | ||||
-rw-r--r-- | mysql-test/t/user_var.test | 19 |
2 files changed, 51 insertions, 0 deletions
diff --git a/mysql-test/r/user_var.result b/mysql-test/r/user_var.result index 67e55acb29b..d94ab6f57c3 100644 --- a/mysql-test/r/user_var.result +++ b/mysql-test/r/user_var.result @@ -42,3 +42,35 @@ select @a:=10, @b:=2, @a > @b, @a < @b; select @a:="10", @b:="2", @a > @b, @a < @b; @a:="10" @b:="2" @a > @b @a < @b 10 2 0 1 +select @a:=1; +@a:=1 +1 +select @a, @a:=1; +@a @a:=1 +1 1 +create table t1 (id int); +insert into t1 values (1); +select @c:=0; +@c:=0 +0 +update t1 SET id=(@c:=@c+1); +select @c; +@c +1 +select @c:=0; +@c:=0 +0 +update t1 set id=(@c:=@c+1); +select @c; +@c +1 +select @c:=0; +@c:=0 +0 +select @c:=@c+1; +@c:=@c+1 +1 +drop table t1; +select @a:=10, @b:=2, @a>@b, @a:="10", @b:="2", @a>@b, @a:=10, @b:=2, @a>@b, @a:="10", @b:="2", @a>@b; +@a:=10 @b:=2 @a>@b @a:="10" @b:="2" @a>@b @a:=10 @b:=2 @a>@b @a:="10" @b:="2" @a>@b +10 2 1 10 2 0 10 2 1 10 2 0 diff --git a/mysql-test/t/user_var.test b/mysql-test/t/user_var.test index f5f91a8a680..1e466c149bb 100644 --- a/mysql-test/t/user_var.test +++ b/mysql-test/t/user_var.test @@ -23,3 +23,22 @@ select @a:=10, @b:=1, @a > @b, @a < @b; select @a:="10", @b:="1", @a > @b, @a < @b; select @a:=10, @b:=2, @a > @b, @a < @b; select @a:="10", @b:="2", @a > @b, @a < @b; + +# Fixed bug #1194 +select @a:=1; +select @a, @a:=1; + +create table t1 (id int); +insert into t1 values (1); +select @c:=0; +update t1 SET id=(@c:=@c+1); +select @c; +select @c:=0; +update t1 set id=(@c:=@c+1); +select @c; +select @c:=0; +select @c:=@c+1; +drop table t1; + +# just fof fun :) +select @a:=10, @b:=2, @a>@b, @a:="10", @b:="2", @a>@b, @a:=10, @b:=2, @a>@b, @a:="10", @b:="2", @a>@b;
\ No newline at end of file |