mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 04:22:27 +01:00
07953513ed
Adds --general_log_file, --slow_query_log_file command- line options to match system variables of the same names. Deprecates --log, --log-slow-queries command-line options and log, log_slow_queries system-variables for v7.0; they are superseded by general_log/general_log_file and slow_query_log/slow_query_log_file, respectively. mysql-test/r/log_basic.result: Change deprecated system variable "log" to general log. mysql-test/r/log_state.result: Show that all log-related server variables that should throw deprecation warnings do, and the others don't. mysql-test/t/log_basic.test: Change deprecated system variable "log" to general log. mysql-test/t/log_state.test: Show that all log-related server variables that should throw deprecation warnings do, and the others don't. sql/mysqld.cc: Add command-line options --general_log_file and --slow_query_log_file to match server options of the same name. Deprecated --log and --log-slow-queries command-line options; they are superseded by --general-log/ --general-log-file and --slow-query-log/--slow-query-log-file, respectively sql/set_var.cc: Deprecate system-variables log in favour of general_log, log_slow_queries in favour of slow_query_log for 7.0, both for value- and DEFAULT-setting.
60 lines
3.2 KiB
Text
60 lines
3.2 KiB
Text
###################### mysql-test\t\log_basic.test ############################
|
|
# #
|
|
# Variable Name: log_basic #
|
|
# Scope: GLOBAL #
|
|
# Access Type: Dynamic #
|
|
# Data Type: string #
|
|
# Default Value: #
|
|
# Range: #
|
|
# #
|
|
# #
|
|
# Creation Date: 2008-02-07 #
|
|
# Author: Rizwan #
|
|
# #
|
|
# Description: Test Cases of Dynamic System Variable log #
|
|
# that checks the behavior of this variable in the following ways#
|
|
# * Default Value #
|
|
# * Valid & Invalid values #
|
|
# * Scope & Access method #
|
|
# * Data Integrity #
|
|
# #
|
|
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
|
|
# server-system-variables.html #
|
|
# #
|
|
###############################################################################
|
|
|
|
--source include/load_sysvars.inc
|
|
|
|
#####################################
|
|
## START OF log TESTS ##
|
|
#####################################
|
|
|
|
--echo '#--------------------FN_DYNVARS_062_01------------------#'
|
|
#############################################################
|
|
# Accessing variable #
|
|
#############################################################
|
|
|
|
SELECT @@global.log AS INIT_VALUE;
|
|
|
|
SELECT @@log AS INIT_VALUE;
|
|
|
|
SET @@global.general_log = ON;
|
|
|
|
SET global general_log = 0;
|
|
|
|
--echo 'Bug# 34832: log is a system but it is not accessible using SET @@global.log;'
|
|
--echo 'SET GLOBAL log; and SELECT @@global.log. SHOW VARIABLES shows the value of log.'
|
|
|
|
|
|
--echo '#--------------------FN_DYNVARS_062_02-------------------------#'
|
|
###################################################################################
|
|
# Check if the value in GLOBAL Table matches value in variable #
|
|
###################################################################################
|
|
# We can only access log value from information schema global_variables table
|
|
SELECT VARIABLE_VALUE
|
|
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
|
WHERE VARIABLE_NAME='log';
|
|
|
|
############################################
|
|
# END OF log TESTS #
|
|
############################################
|