Debian Codegraph @

mysql-test/suite/sys_vars/t/rand_seed1_basic.test

raw
1
2 #
3 # exists as a session only
4 #
5 # 2010-01-20 OBN - Added check for I_S value after variable value change
6 #
7 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
8 select @@global.rand_seed1;
9 --error ER_NO_DEFAULT
10 set session rand_seed1=default;
11 set session rand_seed1=10969771;
12 select @@session.rand_seed1;
13 show global variables like 'rand_seed1';
14 show session variables like 'rand_seed1';
15 select * from information_schema.global_variables where variable_name='rand_seed1';
16 select * from information_schema.session_variables where variable_name='rand_seed1';
17
18 #
19 # show that it's writable (note value can be set but not read - returned value is zero)
20 #
21 set session rand_seed1=1;
22 select @@session.rand_seed1;
23 select * from information_schema.global_variables where variable_name='rand_seed1';
24 select * from information_schema.session_variables where variable_name='rand_seed1';
25 --error ER_LOCAL_VARIABLE
26 set global rand_seed1=1;
27
28 #
29 # incorrect types
30 #
31 --error ER_WRONG_TYPE_FOR_VAR
32 set session rand_seed1=1.1;
33 --error ER_WRONG_TYPE_FOR_VAR
34 set session rand_seed1=1e1;
35 --error ER_WRONG_TYPE_FOR_VAR
36 set session rand_seed1="foo";
37