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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207
|
--echo #
--echo # WL#9343: Logging services: log writers
--echo #
# This tests whether we can load and unload the systemd log writer server.
# It also tests whether the log_syslog* system variables behave as expected.
# This used to be tested in the sys_vars suite, but since the behavior now
# depends on what service is loaded, if any, we test it here instead.
# In fact, we'll have to test it for each service that provides these.
--source include/linux.inc
--source include/have_log_component.inc
SELECT @@global.log_error_services;
--echo
--echo #
--echo # WL#9343: Logging services: log writers: syslog
--echo #
SELECT "*** SWITCHING ERROR LOG TO SYSLOG/EVENTLOG ***";
INSTALL COMPONENT "file://component_log_sink_syseventlog";
SET @@global.log_error_services="log_filter_internal; log_sink_internal; log_sink_syseventlog";
SELECT "logging to syseventlog";
################## mysql-test\t\log_syslog_facility_basic.test ################
# #
# Variable Name: log_syslog_facility #
# Scope: Global #
# Access Type: Dynamic #
# Data Type: string #
# #
# #
# Creation Date: 2014-02-14 #
# Author : Azundris (tnuernbe) #
# #
# Description:Test Cases of Dynamic System Variable #
# log_syslog_facility #
# that checks the behavior of this variable in the following ways #
# * Value Check #
# * Scope Check #
# #
# Reference: #
# http://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html #
# #
###############################################################################
SET @start_value= @@global.syseventlog.facility;
SET @@global.syseventlog.facility= DEFAULT;
SELECT @@global.syseventlog.facility, @start_value;
SET @@global.syseventlog.facility="user";
SELECT @@global.syseventlog.facility;
SET @@global.syseventlog.facility= "daemon";
SELECT @@global.syseventlog.facility;
SET @@global.syseventlog.facility= "local0";
SELECT @@global.syseventlog.facility;
--error ER_WRONG_TYPE_FOR_VAR
SET @@global.syseventlog.facility= 9;
--error ER_WRONG_TYPE_FOR_VAR
SET GLOBAL syseventlog.facility= 0.01;
--error ER_GLOBAL_VARIABLE
SET SESSION syseventlog.facility= "local1";
--error ER_GLOBAL_VARIABLE
SET LOCAL syseventlog.facility= "local1";
SET @@global.syseventlog.facility= "log_local5";
SELECT @@global.syseventlog.facility;
SET @@global.syseventlog.facility= "LOG_LOCAL7";
SELECT @@global.syseventlog.facility;
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.syseventlog.facility= "9";
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.syseventlog.facility= "local8";
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.syseventlog.facility= "";
SET @@global.syseventlog.facility= @start_value;
--echo
################## mysql-test\t\log_syslog_include_pid_basic.test #############
# #
# Variable Name: log_syslog_include_pid #
# Scope: Global #
# Access Type: Dynamic #
# Data Type: bool #
# #
# #
# Creation Date: 2014-02-14 #
# Author : Azundris (tnuernbe) #
# #
# Description:Test Cases of Dynamic System Variable #
# log_syslog_include_pid #
# that checks the behavior of this variable in the following ways #
# * Value Check #
# * Scope Check #
# #
# Reference: #
# http://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html #
# #
###############################################################################
SET @start_value= @@global.syseventlog.include_pid;
SET @@global.syseventlog.include_pid= DEFAULT;
SELECT @@global.syseventlog.include_pid;
SET @@global.syseventlog.include_pid= 0;
SELECT @@global.syseventlog.include_pid;
SET @@global.syseventlog.include_pid= 1;
SELECT @@global.syseventlog.include_pid;
SET @@global.syseventlog.include_pid= ON;
SELECT @@global.syseventlog.include_pid;
SET @@global.syseventlog.include_pid= OFF;
SELECT @@global.syseventlog.include_pid;
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.syseventlog.include_pid= 9;
SELECT @@global.syseventlog.include_pid;
--error ER_WRONG_TYPE_FOR_VAR
SET GLOBAL syseventlog.include_pid= 0.01;
--error ER_GLOBAL_VARIABLE
SET SESSION syseventlog.include_pid= 0;
--error ER_GLOBAL_VARIABLE
SET LOCAL syseventlog.include_pid= 0;
SET @@global.syseventlog.include_pid= @start_value;
################## mysql-test\t\syseventlog.tag_basic.test #####################
# #
# Variable Name: syseventlog.tag #
# Scope: Global #
# Access Type: Dynamic #
# Data Type: string #
# #
# #
# Creation Date: 2014-02-14 #
# Author : Azundris (tnuernbe) #
# #
# Description:Test Cases of Dynamic System Variable #
# syseventlog.tag #
# that checks the behavior of this variable in the following ways #
# * Value Check #
# * Scope Check #
# #
# Reference: #
# http://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html #
# #
###############################################################################
SET @start_value= @@global.syseventlog.tag;
SET @@global.syseventlog.tag= DEFAULT;
SELECT @@global.syseventlog.tag;
SET @@global.syseventlog.tag="production";
SELECT @@global.syseventlog.tag;
SET @@global.syseventlog.tag= "";
SELECT @@global.syseventlog.tag;
--error ER_WRONG_TYPE_FOR_VAR
SET @@global.syseventlog.tag= 9;
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.syseventlog.tag= "path/like";
--error ER_WRONG_TYPE_FOR_VAR
SET GLOBAL syseventlog.tag= 0.01;
--error ER_GLOBAL_VARIABLE
SET SESSION syseventlog.tag= "staging";
--error ER_GLOBAL_VARIABLE
SET LOCAL syseventlog.tag= "staging";
SET @@global.syseventlog.tag= @start_value;
FLUSH ERROR LOGS;
SET @@global.log_error_services=DEFAULT;
UNINSTALL COMPONENT "file://component_log_sink_syseventlog";
--echo
--echo ###
--echo ### done
--echo ###
|