| 1 |
# Verify that more than one component can register system variables, different and such with |
| 2 |
# same name. |
| 3 |
|
| 4 |
--source ../include/have_component_test_sys_var_service.inc |
| 5 |
|
| 6 |
call mtr.add_suppression("duplicate variable name"); |
| 7 |
call mtr.add_suppression("variable name.*not found"); |
| 8 |
|
| 9 |
INSTALL COMPONENT "file://component_test_sys_var_service"; |
| 10 |
INSTALL COMPONENT "file://component_test_sys_var_service_int"; |
| 11 |
INSTALL COMPONENT "file://component_test_sys_var_service_str"; |
| 12 |
|
| 13 |
--echo # file://component_test_sys_var_service: |
| 14 |
SELECT @@test_component.enum_sys_var; |
| 15 |
SET GLOBAL test_component.enum_sys_var="LOW"; |
| 16 |
SELECT @@test_component.enum_sys_var; |
| 17 |
|
| 18 |
SELECT @@test_component.str_sys_var; |
| 19 |
SET GLOBAL test_component.str_sys_var="dictionary.txt"; |
| 20 |
SELECT @@test_component.str_sys_var; |
| 21 |
SET GLOBAL test_component.str_sys_var=default; |
| 22 |
SELECT @@test_component.str_sys_var; |
| 23 |
|
| 24 |
--echo # file://component_test_sys_var_service_str: |
| 25 |
SELECT @@test_component_str.str_sys_var; |
| 26 |
SET GLOBAL test_component_str.str_sys_var="dictionary.txt"; |
| 27 |
SELECT @@test_component_str.str_sys_var; |
| 28 |
SET GLOBAL test_component_str.str_sys_var=default; |
| 29 |
SELECT @@test_component_str.str_sys_var; |
| 30 |
|
| 31 |
--echo # file://component_test_sys_var_service: |
| 32 |
SELECT @@test_component.uint_sys_var; |
| 33 |
SET GLOBAL test_component.uint_sys_var=12345678; |
| 34 |
SELECT @@test_component.uint_sys_var; |
| 35 |
SET GLOBAL test_component.uint_sys_var=default; |
| 36 |
SELECT @@test_component.uint_sys_var; |
| 37 |
|
| 38 |
--echo # Testing long type variable |
| 39 |
SELECT @@test_component.long_sys_var; |
| 40 |
SET GLOBAL test_component.long_sys_var=1234567890; |
| 41 |
SELECT @@test_component.long_sys_var; |
| 42 |
SET GLOBAL test_component.long_sys_var=default; |
| 43 |
SELECT @@test_component.long_sys_var; |
| 44 |
|
| 45 |
--echo # Testing unsigned long type variable |
| 46 |
SELECT @@test_component.ulong_sys_var; |
| 47 |
SET GLOBAL test_component.ulong_sys_var=1234567890; |
| 48 |
SELECT @@test_component.ulong_sys_var; |
| 49 |
SET GLOBAL test_component.ulong_sys_var=default; |
| 50 |
SELECT @@test_component.ulong_sys_var; |
| 51 |
|
| 52 |
--echo # Testing long long type variable |
| 53 |
SELECT @@test_component.longlong_sys_var; |
| 54 |
SET GLOBAL test_component.longlong_sys_var=1234567890; |
| 55 |
SELECT @@test_component.longlong_sys_var; |
| 56 |
SET GLOBAL test_component.longlong_sys_var=default; |
| 57 |
SELECT @@test_component.longlong_sys_var; |
| 58 |
|
| 59 |
--echo # file://component_test_sys_var_service_int: |
| 60 |
SELECT @@test_component_int.uint_sys_var; |
| 61 |
SET GLOBAL test_component_int.uint_sys_var=12345678; |
| 62 |
SELECT @@test_component_int.uint_sys_var; |
| 63 |
SET GLOBAL test_component_int.uint_sys_var=default; |
| 64 |
SELECT @@test_component_int.uint_sys_var; |
| 65 |
|
| 66 |
SELECT @@test_component_int.int_sys_var; |
| 67 |
SET GLOBAL test_component_int.int_sys_var=12345678; |
| 68 |
SELECT @@test_component_int.int_sys_var; |
| 69 |
SET GLOBAL test_component_int.int_sys_var=default; |
| 70 |
SELECT @@test_component_int.int_sys_var; |
| 71 |
|
| 72 |
--echo # file://component_test_sys_var_service_str: |
| 73 |
SELECT @@test_component_str.str_sys_var; |
| 74 |
SET GLOBAL test_component_str.str_sys_var="dictionary.txt"; |
| 75 |
SELECT @@test_component_str.str_sys_var; |
| 76 |
|
| 77 |
UNINSTALL COMPONENT "file://component_test_sys_var_service"; |
| 78 |
UNINSTALL COMPONENT "file://component_test_sys_var_service_int"; |
| 79 |
UNINSTALL COMPONENT "file://component_test_sys_var_service_str"; |
| 80 |
|
| 81 |
# Write the test results in "test_component_sys_var_service.log" into the |
| 82 |
# result file of this test |
| 83 |
--echo ########## test_component_sys_var_service.log: |
| 84 |
let $MYSQLD_DATADIR= `select @@datadir`; |
| 85 |
cat_file $MYSQLD_DATADIR/test_component_sys_var_service.log; |
| 86 |
cat_file $MYSQLD_DATADIR/test_component_sys_var_service_int.log; |
| 87 |
cat_file $MYSQLD_DATADIR/test_component_sys_var_service_str.log; |
| 88 |
remove_file $MYSQLD_DATADIR/test_component_sys_var_service.log; |
| 89 |
remove_file $MYSQLD_DATADIR/test_component_sys_var_service_int.log; |
| 90 |
remove_file $MYSQLD_DATADIR/test_component_sys_var_service_str.log; |