mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 13:02:28 +01:00
cacfcb6404
myisam/ft_boolean_search.c: Portability fix mysql-test/mysql-test-run.sh: Added slave_net_timeout mysql-test/r/func_if.result: Updated results after merge from 3.23 mysql-test/r/func_test.result: Updated results after merge from 3.23 mysql-test/r/innodb.result: Updated results after merge from 3.23 mysql-test/r/show_check.result: Updated results after merge from 3.23 mysql-test/r/variables.result: Updated results after merge from 3.23
60 lines
2.1 KiB
Text
60 lines
2.1 KiB
Text
drop table if exists t1;
|
|
set @`test`=1,@TEST=3,@select=2,@t5=1.23456;
|
|
select @test,@`select`,@TEST,@not_used;
|
|
@test @`select` @TEST @not_used
|
|
1 2 3 NULL
|
|
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;
|
|
@test_int @test_double @test_string @test_string2 @select
|
|
10 1e-10 abcdeghi abcdefghij NULL
|
|
set @test_int="hello",@test_double="hello",@test_string="hello",@test_string2="hello";
|
|
select @test_int,@test_double,@test_string,@test_string2;
|
|
@test_int @test_double @test_string @test_string2
|
|
hello hello hello hello
|
|
set @test_int="hellohello",@test_double="hellohello",@test_string="hellohello",@test_string2="hellohello";
|
|
select @test_int,@test_double,@test_string,@test_string2;
|
|
@test_int @test_double @test_string @test_string2
|
|
hellohello hellohello hellohello hellohello
|
|
set @test_int=null,@test_double=null,@test_string=null,@test_string2=null;
|
|
select @test_int,@test_double,@test_string,@test_string2;
|
|
@test_int @test_double @test_string @test_string2
|
|
NULL NULL NULL NULL
|
|
select @t1:=(@t2:=1)+@t3:=4,@t1,@t2,@t3;
|
|
@t1:=(@t2:=1)+@t3:=4 @t1 @t2 @t3
|
|
5 5 1 4
|
|
select @t5;
|
|
@t5
|
|
1.23456
|
|
CREATE TABLE t1 (c_id INT(4) NOT NULL, c_name CHAR(20), c_country CHAR(3), PRIMARY KEY(c_id));
|
|
INSERT INTO t1 VALUES (1,'Bozo','USA'),(2,'Ronald','USA'),(3,'Kinko','IRE'),(4,'Mr. Floppy','GB');
|
|
SELECT @min_cid:=min(c_id), @max_cid:=max(c_id) from t1;
|
|
@min_cid:=min(c_id) @max_cid:=max(c_id)
|
|
1 4
|
|
SELECT * FROM t1 WHERE c_id=@min_cid OR c_id=@max_cid;
|
|
c_id c_name c_country
|
|
1 Bozo USA
|
|
4 Mr. Floppy GB
|
|
SELECT * FROM t1 WHERE c_id=@min_cid OR c_id=@max_cid OR c_id=666;
|
|
c_id c_name c_country
|
|
1 Bozo USA
|
|
4 Mr. Floppy GB
|
|
ALTER TABLE t1 DROP PRIMARY KEY;
|
|
select * from t1 where c_id=@min_cid OR c_id=@max_cid;
|
|
c_id c_name c_country
|
|
1 Bozo USA
|
|
4 Mr. Floppy GB
|
|
drop table t1;
|
|
select @@VERSION=version();
|
|
@@VERSION=version()
|
|
1
|
|
select last_insert_id(345);
|
|
last_insert_id(345)
|
|
345
|
|
select @@IDENTITY,last_insert_id();
|
|
@@IDENTITY last_insert_id()
|
|
345 345
|
|
select @@identity;
|
|
@@IDENTITY
|
|
345
|
|
select @@unknown_variable;
|
|
Unknown system variable 'unknown_variable'
|