mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
a21ef88d2a
The variables now return real values. They can't be made usual variables because they do not have DEFAULT value.
37 lines
1.1 KiB
Text
37 lines
1.1 KiB
Text
|
|
#
|
|
# exists as a session only
|
|
#
|
|
# 2010-01-20 OBN - Added check for I_S value after variable value change
|
|
#
|
|
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
|
select @@global.rand_seed1;
|
|
--error ER_NO_DEFAULT
|
|
set session rand_seed1=default;
|
|
set session rand_seed1=10969771;
|
|
select @@session.rand_seed1;
|
|
show global variables like 'rand_seed1';
|
|
show session variables like 'rand_seed1';
|
|
select * from information_schema.global_variables where variable_name='rand_seed1';
|
|
select * from information_schema.session_variables where variable_name='rand_seed1';
|
|
|
|
#
|
|
# show that it's writable (note value can be set but not read - returned value is zero)
|
|
#
|
|
set session rand_seed1=1;
|
|
select @@session.rand_seed1;
|
|
select * from information_schema.global_variables where variable_name='rand_seed1';
|
|
select * from information_schema.session_variables where variable_name='rand_seed1';
|
|
--error ER_LOCAL_VARIABLE
|
|
set global rand_seed1=1;
|
|
|
|
#
|
|
# incorrect types
|
|
#
|
|
--error ER_WRONG_TYPE_FOR_VAR
|
|
set session rand_seed1=1.1;
|
|
--error ER_WRONG_TYPE_FOR_VAR
|
|
set session rand_seed1=1e1;
|
|
--error ER_WRONG_TYPE_FOR_VAR
|
|
set session rand_seed1="foo";
|
|
|