Debian Codegraph @

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

raw
1 ################### mysql-test\t\general_log_file_basic.test ###################
2 # #
3 # Variable Name: general_log_file #
4 # Scope: GLOBAL #
5 # Access Type: Dynamic #
6 # Data Type: Filename #
7 # Default Value: host_name.log #
8 # Valid Values: #
9 # #
10 # #
11 # Creation Date: 2008-03-16 #
12 # Author: Salman Rawala #
13 # Modified: HHunger 2008-09-11 Set system variable back to the start value #
14 # #
15 # Description: Test Cases of Dynamic System Variable "general_log_file" #
16 # that checks behavior of this variable in the following ways #
17 # * Default Value #
18 # * Valid & Invalid values #
19 # * Scope & Access method #
20 # * Data Integrity #
21 # #
22 # Reference: #
23 # http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html #
24 # #
25 ################################################################################
26
27 --source include/load_sysvars.inc
28
29 ###########################################################
30 # START OF general_log_file TESTS #
31 ###########################################################
32
33
34 ########################################################################
35 # Saving initial value of general_log_file in a temporary variable #
36 ########################################################################
37
38 SET @start_value = @@global.general_log_file;
39 SELECT length(@start_value) > 0;
40
41
42 --echo '#---------------------FN_DYNVARS_004_01-------------------------#'
43 ###############################################
44 # Verify default value of variable #
45 ###############################################
46
47 SET @@global.general_log_file = DEFAULT;
48 SELECT length(@@global.general_log_file) > 0;
49
50
51 --echo '#--------------------FN_DYNVARS_004_02------------------------#'
52 #######################################################################
53 # Change the value of general_log_file to a invalid value #
54 #######################################################################
55
56 --error ER_WRONG_TYPE_FOR_VAR
57 SET @@global.general_log_file = mytest.log;
58 --error ER_WRONG_TYPE_FOR_VAR
59 SET @@global.general_log_file = 12;
60
61 #
62 # MDEV-10465
63 #
64 --error ER_WRONG_VALUE_FOR_VAR
65 SET @@global.general_log_file = 'my.cnf';
66 --error ER_WRONG_VALUE_FOR_VAR
67 SET @@global.general_log_file = '/tmp/my.cnf';
68 --error ER_WRONG_VALUE_FOR_VAR
69 SET @@global.general_log_file = '.my.cnf';
70 --error ER_WRONG_VALUE_FOR_VAR
71 SET @@global.general_log_file = 'my.cnf\0foo';
72 --error ER_WRONG_VALUE_FOR_VAR
73 SET @@global.general_log_file = 'my.ini';
74
75
76 --echo '#----------------------FN_DYNVARS_004_03------------------------#'
77 ##############################################################################
78 # Check if the value in GLOBAL Tables matches values in variable #
79 ##############################################################################
80
81 SELECT @@global.general_log_file = VARIABLE_VALUE
82 FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
83 WHERE VARIABLE_NAME='general_log_file';
84
85 SET @@global.general_log_file= @start_value;
86
87 #####################################################
88 # END OF general_log_file TESTS #
89 #####################################################
90