Debian Codegraph @

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

raw
1
2 #
3 # exists as a session only
4 #
5 # 2010-01-20 OBN - Added check for session I_S values being equal to variable value
6 # - Added check for session variable value being numberic
7 #
8
9 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
10 select @@global.pseudo_thread_id;
11
12 --echo should be empty
13 show global variables like 'pseudo_thread_id';
14
15 # Check that shows returns a value (can't confirm the actual one)
16 --replace_column 2 #
17 show session variables like 'pseudo_thread_id';
18
19 # Global I_S variable is empty
20 --echo should be empty
21 select * from information_schema.global_variables where variable_name='pseudo_thread_id';
22
23 # Check that I_S value is same as variable
24 select @@session.pseudo_thread_id = variable_value from information_schema.session_variables where variable_name='pseudo_thread_id';
25
26 #
27 # show that it's writable
28 #
29 set session pseudo_thread_id=42;
30 select @@session.pseudo_thread_id;
31 select * from information_schema.global_variables where variable_name='pseudo_thread_id';
32 select variable_value from information_schema.session_variables where variable_name='pseudo_thread_id';
33 --error ER_LOCAL_VARIABLE
34 set global pseudo_thread_id=1;
35
36 #
37 # incorrect types
38 #
39 --error ER_WRONG_TYPE_FOR_VAR
40 set session pseudo_thread_id=1.1;
41 --error ER_WRONG_TYPE_FOR_VAR
42 set session pseudo_thread_id=1e1;
43 --error ER_WRONG_TYPE_FOR_VAR
44 set session pseudo_thread_id="foo";
45