mariadb/mysql-test/t/variables.test
unknown a0ca35c1e5 SHOW VARIABLES LIKE ... are now case insensitive
Fixed stack overflow checking with crash-me with gcc 3.0.4
Using @@unknown_variable doesn't hang client anymore
Added @@VERSION variable


Docs/manual.texi:
  Changelog
libmysql/libmysql.c:
  Fixed typo
myisam/myisampack.c:
  Removed not used argument
mysql-test/r/show_check.result:
  Added test of case insensitive SHOW VARIABLES LIKE
mysql-test/r/variables.result:
  test of system variables
mysql-test/t/show_check.test:
  Added test of case insensitive SHOW VARIABLES LIKE
mysql-test/t/variables.test:
  test of system variables
sql/item_func.cc:
  Fixed stack overflow checking with crash-me with gcc 3.0.4
  Using @@unknown_variable doesn't hang client anymore
  Added @@VERSION variable
sql/mysql_priv.h:
  Fixed stack overflow checking with crash-me with gcc 3.0.4
sql/share/czech/errmsg.txt:
  Fixed wrong error message
sql/share/danish/errmsg.txt:
  Fixed wrong error message
sql/share/dutch/errmsg.txt:
  Fixed wrong error message
sql/share/english/errmsg.txt:
  Fixed wrong error message
sql/share/estonian/errmsg.txt:
  Fixed wrong error message
sql/share/french/errmsg.txt:
  Fixed wrong error message
sql/share/german/errmsg.txt:
  Fixed wrong error message
sql/share/greek/errmsg.txt:
  Fixed wrong error message
sql/share/hungarian/errmsg.txt:
  Fixed wrong error message
sql/share/italian/errmsg.txt:
  Fixed wrong error message
sql/share/japanese/errmsg.txt:
  Fixed wrong error message
sql/share/korean/errmsg.txt:
  Fixed wrong error message
sql/share/norwegian-ny/errmsg.txt:
  Fixed wrong error message
sql/share/norwegian/errmsg.txt:
  Fixed wrong error message
sql/share/polish/errmsg.txt:
  Fixed wrong error message
sql/share/portuguese/errmsg.txt:
  Fixed wrong error message
sql/share/romanian/errmsg.txt:
  Fixed wrong error message
sql/share/russian/errmsg.txt:
  Fixed wrong error message
sql/share/slovak/errmsg.txt:
  Fixed wrong error message
BitKeeper/deleted/.del-identity.result~e41453a364242503:
  not used file
BitKeeper/deleted/.del-identity.test~326f469b59105404:
  not used file
sql/share/spanish/errmsg.txt:
  Fixed wrong error message
sql/share/swedish/errmsg.txt:
  Fixed wrong error message
sql/share/ukrainian/errmsg.txt:
  Fixed wrong error message
sql/sql_show.cc:
  SHOW VARIABLES LIKE ... are now case insensitive
2002-04-18 18:24:14 +03:00

40 lines
1.5 KiB
Text

#
# test variables
#
drop table if exists t1;
set @`test`=1,@TEST=3,@select=2,@t5=1.23456;
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;
select @t5;
#
# Test problem with WHERE and variables
#
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;
SELECT * FROM t1 WHERE c_id=@min_cid OR c_id=@max_cid;
SELECT * FROM t1 WHERE c_id=@min_cid OR c_id=@max_cid OR c_id=666;
ALTER TABLE t1 DROP PRIMARY KEY;
select * from t1 where c_id=@min_cid OR c_id=@max_cid;
drop table t1;
#
# Test system variables
#
select @@VERSION=version();
select last_insert_id(345);
select @@IDENTITY,last_insert_id();
select @@identity;
--error 1193
select @@unknown_variable;