summaryrefslogtreecommitdiff
path: root/mysql-test/t/variables.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/variables.test')
-rw-r--r--mysql-test/t/variables.test14
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test
new file mode 100644
index 00000000000..1067559b759
--- /dev/null
+++ b/mysql-test/t/variables.test
@@ -0,0 +1,14 @@
+#
+# test variables
+#
+set @`test`=1,@TEST=3,@select=2;
+select @test,@`select`,@TEST,@not_used;
+set @test_int=10,@test_double=1e-10,@test_string="abcdeghi",@test_string2="abcdefghij",@select=NULL;
+select @test_int,@test_double,@test_string,@test_string2,@select;
+set @test_int="hello",@test_double="hello",@test_string="hello",@test_string2="hello";
+select @test_int,@test_double,@test_string,@test_string2;
+set @test_int="hellohello",@test_double="hellohello",@test_string="hellohello",@test_string2="hellohello";
+select @test_int,@test_double,@test_string,@test_string2;
+set @test_int=null,@test_double=null,@test_string=null,@test_string2=null;
+select @test_int,@test_double,@test_string,@test_string2;
+select @t1:=(@t2:=1)+@t3:=4,@t1,@t2,@t3;