2009-12-22 10:35:56 +01:00
|
|
|
|
|
|
|
#
|
|
|
|
# exists as a session only
|
|
|
|
#
|
2010-01-28 22:33:00 -08:00
|
|
|
#
|
|
|
|
# 2010-01-20 OBN - Added check for I_S value after variable value change
|
|
|
|
#
|
2009-12-22 10:35:56 +01:00
|
|
|
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
|
|
|
select @@global.rand_seed2;
|
|
|
|
select @@session.rand_seed2;
|
|
|
|
show global variables like 'rand_seed2';
|
|
|
|
show session variables like 'rand_seed2';
|
|
|
|
select * from information_schema.global_variables where variable_name='rand_seed2';
|
|
|
|
select * from information_schema.session_variables where variable_name='rand_seed2';
|
|
|
|
|
|
|
|
#
|
2010-01-28 22:33:00 -08:00
|
|
|
# show that it's writable (note value can be set but not read - returned value is zero)
|
2009-12-22 10:35:56 +01:00
|
|
|
#
|
|
|
|
set session rand_seed2=1;
|
|
|
|
select @@session.rand_seed2;
|
2010-01-28 22:33:00 -08:00
|
|
|
select * from information_schema.global_variables where variable_name='rand_seed2';
|
|
|
|
select * from information_schema.session_variables where variable_name='rand_seed2';
|
2009-12-22 10:35:56 +01:00
|
|
|
--error ER_LOCAL_VARIABLE
|
|
|
|
set global rand_seed2=1;
|
|
|
|
|
|
|
|
#
|
|
|
|
# incorrect types
|
|
|
|
#
|
|
|
|
--error ER_WRONG_TYPE_FOR_VAR
|
|
|
|
set session rand_seed2=1.1;
|
|
|
|
--error ER_WRONG_TYPE_FOR_VAR
|
|
|
|
set session rand_seed2=1e1;
|
|
|
|
--error ER_WRONG_TYPE_FOR_VAR
|
|
|
|
set session rand_seed2="foo";
|
|
|
|
|