-
Notifications
You must be signed in to change notification settings - Fork 4k
/
Copy pathcharacter_sets_dir_basic.test
35 lines (30 loc) · 1.16 KB
/
character_sets_dir_basic.test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#
# show the global and session values;
#
# workaround to adjust for the directory separators being different in
# different OSes : slash on unixes and backslash or slash on windows.
# TODO: fix with a proper comparison in mysqltest
let $rcd= `SELECT REPLACE('$MYSQL_CHARSETSDIR', '\\\\\', '.')`;
let $rcd= `SELECT REPLACE('$rcd', '/', '.')`;
let $regex_charsetdir= /$rcd[\\\/]/MYSQL_CHARSETSDIR/;
--replace_regex $regex_charsetdir
select @@global.character_sets_dir;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
select @@session.character_sets_dir;
--replace_regex $regex_charsetdir
show global variables like 'character_sets_dir';
--replace_regex $regex_charsetdir
show session variables like 'character_sets_dir';
--disable_warnings
--replace_regex $regex_charsetdir
select * from performance_schema.global_variables where variable_name='character_sets_dir';
--replace_regex $regex_charsetdir
select * from performance_schema.session_variables where variable_name='character_sets_dir';
--enable_warnings
#
# show that it's read-only
#
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
set global character_sets_dir="foo";
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
set session character_sets_dir="foo";