summaryrefslogtreecommitdiff
path: root/mysql-test/r/user_var.result
diff options
context:
space:
mode:
authorunknown <monty@mishka.mysql.fi>2003-10-03 00:40:27 +0300
committerunknown <monty@mishka.mysql.fi>2003-10-03 00:40:27 +0300
commit2985e91acd78841fac42b298cea19c7332895eb9 (patch)
treedae461536c421dd366da2962a088561908db14ce /mysql-test/r/user_var.result
parent904dee7a9774510b3b5992d86981b0f467d8fe3c (diff)
downloadmariadb-git-2985e91acd78841fac42b298cea19c7332895eb9.tar.gz
Optimized code for setting user variables with := and fixed some bugs in old code (Bug #1194)
Use forced close of socket to make mysqld shutdown faster when used under valgrind mysql-test/mysql-test-run.sh: Added --skip-bdb for valgrind mysql-test/r/user_var.result: Extended test for user variables mysql-test/t/user_var.test: Extended test for user variables sql/item_func.cc: Optimized code for setting user variables with := and fixed some bugs in old code sql/item_func.h: Optimized code for setting user variables sql/log.cc: Fixed comments sql/mysqld.cc: Use forced close of socket to make mysqld shutdown faster when used under valgrind sql/sql_class.h: Optimized code for setting user variables
Diffstat (limited to 'mysql-test/r/user_var.result')
-rw-r--r--mysql-test/r/user_var.result33
1 files changed, 28 insertions, 5 deletions
diff --git a/mysql-test/r/user_var.result b/mysql-test/r/user_var.result
index d94ab6f57c3..d7c41d5dbc4 100644
--- a/mysql-test/r/user_var.result
+++ b/mysql-test/r/user_var.result
@@ -30,6 +30,7 @@ explain select * from t1 where i=@vv1;
table type possible_keys key key_len ref rows Extra
t1 ref i i 4 const 1 Using where
drop table t1,t2;
+set @a=0,@b=0;
select @a:=10, @b:=1, @a > @b, @a < @b;
@a:=10 @b:=1 @a > @b @a < @b
10 1 1 0
@@ -38,18 +39,18 @@ select @a:="10", @b:="1", @a > @b, @a < @b;
10 1 1 0
select @a:=10, @b:=2, @a > @b, @a < @b;
@a:=10 @b:=2 @a > @b @a < @b
-10 2 1 0
+10 2 0 1
select @a:="10", @b:="2", @a > @b, @a < @b;
@a:="10" @b:="2" @a > @b @a < @b
-10 2 0 1
+10 2 1 0
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);
+create table t1 (id int, d double, c char(10));
+insert into t1 values (1,2.0, "test");
select @c:=0;
@c:=0
0
@@ -70,7 +71,29 @@ select @c:=0;
select @c:=@c+1;
@c:=@c+1
1
+select @d,(@d:=id),@d from t1;
+@d (@d:=id) @d
+NULL 1 1
+select @e,(@e:=d),@e from t1;
+@e (@e:=d) @e
+NULL 2 2
+select @f,(@f:=c),@f from t1;
+@f (@f:=c) @f
+NULL test test
+set @g=1;
+select @g,(@g:=c),@g from t1;
+@g (@g:=c) @g
+1 test test
+select @c, @d, @e, @f;
+@c @d @e @f
+1 1 2 test
+select @d:=id, @e:=id, @f:=id, @g:=@id from t1;
+@d:=id @e:=id @f:=id @g:=@id
+1 1 1 NULL
+select @c, @d, @e, @f, @g;
+@c @d @e @f @g
+1 1 1 1 NULL
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
+10 2 1 10 2 1 10 2 1 10 2 1