Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
7518ea2e
Commit
7518ea2e
authored
Oct 29, 2007
by
kaa@polly.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge polly.(none):/home/kaa/src/opt/bug29131/my51-bug29131
into polly.(none):/home/kaa/src/opt/mysql-5.1-opt
parents
bf2bb354
6281f1ab
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
105 additions
and
2 deletions
+105
-2
mysql-test/r/log_state.result
mysql-test/r/log_state.result
+63
-0
mysql-test/t/log_state.test
mysql-test/t/log_state.test
+36
-0
sql/set_var.cc
sql/set_var.cc
+6
-2
No files found.
mysql-test/r/log_state.result
View file @
7518ea2e
...
...
@@ -175,3 +175,66 @@ SET GLOBAL slow_query_log = ON;
SET GLOBAL READ_ONLY = OFF;
SET GLOBAL general_log = @old_general_log_state;
SET GLOBAL slow_query_log = @old_slow_log_state;
SET @old_general_log_state = @@global.general_log;
SET @old_slow_log_state = @@global.slow_query_log;
SHOW VARIABLES LIKE 'general_log';
Variable_name Value
general_log ON
SHOW VARIABLES LIKE 'log';
Variable_name Value
log ON
SELECT @@general_log, @@log;
@@general_log @@log
1 1
SET GLOBAL log = 0;
SHOW VARIABLES LIKE 'general_log';
Variable_name Value
general_log OFF
SHOW VARIABLES LIKE 'log';
Variable_name Value
log OFF
SELECT @@general_log, @@log;
@@general_log @@log
0 0
SET GLOBAL general_log = 1;
SHOW VARIABLES LIKE 'general_log';
Variable_name Value
general_log ON
SHOW VARIABLES LIKE 'log';
Variable_name Value
log ON
SELECT @@general_log, @@log;
@@general_log @@log
1 1
SHOW VARIABLES LIKE 'slow_query_log';
Variable_name Value
slow_query_log OFF
SHOW VARIABLES LIKE 'log_slow_queries';
Variable_name Value
log_slow_queries OFF
SELECT @@slow_query_log, @@log_slow_queries;
@@slow_query_log @@log_slow_queries
0 0
SET GLOBAL log_slow_queries = 0;
SHOW VARIABLES LIKE 'slow_query_log';
Variable_name Value
slow_query_log OFF
SHOW VARIABLES LIKE 'log_slow_queries';
Variable_name Value
log_slow_queries OFF
SELECT @@slow_query_log, @@log_slow_queries;
@@slow_query_log @@log_slow_queries
0 0
SET GLOBAL slow_query_log = 1;
SHOW VARIABLES LIKE 'slow_query_log';
Variable_name Value
slow_query_log ON
SHOW VARIABLES LIKE 'log_slow_queries';
Variable_name Value
log_slow_queries ON
SELECT @@slow_query_log, @@log_slow_queries;
@@slow_query_log @@log_slow_queries
1 1
SET GLOBAL general_log = @old_general_log_state;
SET GLOBAL slow_query_log = @old_slow_log_state;
End of 5.1 tests
mysql-test/t/log_state.test
View file @
7518ea2e
...
...
@@ -179,6 +179,42 @@ SET GLOBAL READ_ONLY = OFF;
SET
GLOBAL
general_log
=
@
old_general_log_state
;
SET
GLOBAL
slow_query_log
=
@
old_slow_log_state
;
#
# Bug #29131: SHOW VARIABLES reports variable 'log' but SET doesn't recognize it
#
SET
@
old_general_log_state
=
@@
global
.
general_log
;
SET
@
old_slow_log_state
=
@@
global
.
slow_query_log
;
SHOW
VARIABLES
LIKE
'general_log'
;
SHOW
VARIABLES
LIKE
'log'
;
SELECT
@@
general_log
,
@@
log
;
SET
GLOBAL
log
=
0
;
SHOW
VARIABLES
LIKE
'general_log'
;
SHOW
VARIABLES
LIKE
'log'
;
SELECT
@@
general_log
,
@@
log
;
SET
GLOBAL
general_log
=
1
;
SHOW
VARIABLES
LIKE
'general_log'
;
SHOW
VARIABLES
LIKE
'log'
;
SELECT
@@
general_log
,
@@
log
;
SHOW
VARIABLES
LIKE
'slow_query_log'
;
SHOW
VARIABLES
LIKE
'log_slow_queries'
;
SELECT
@@
slow_query_log
,
@@
log_slow_queries
;
SET
GLOBAL
log_slow_queries
=
0
;
SHOW
VARIABLES
LIKE
'slow_query_log'
;
SHOW
VARIABLES
LIKE
'log_slow_queries'
;
SELECT
@@
slow_query_log
,
@@
log_slow_queries
;
SET
GLOBAL
slow_query_log
=
1
;
SHOW
VARIABLES
LIKE
'slow_query_log'
;
SHOW
VARIABLES
LIKE
'log_slow_queries'
;
SELECT
@@
slow_query_log
,
@@
log_slow_queries
;
SET
GLOBAL
general_log
=
@
old_general_log_state
;
SET
GLOBAL
slow_query_log
=
@
old_slow_log_state
;
--
echo
End
of
5.1
tests
--
enable_ps_protocol
#
...
...
sql/set_var.cc
View file @
7518ea2e
...
...
@@ -641,8 +641,14 @@ static sys_var_const_str sys_license(&vars, "license", STRINGIFY_ARG(LICENSE));
/* Global variables which enable|disable logging */
static
sys_var_log_state
sys_var_general_log
(
&
vars
,
"general_log"
,
&
opt_log
,
QUERY_LOG_GENERAL
);
/* Synonym of "general_log" for consistency with SHOW VARIABLES output */
static
sys_var_log_state
sys_var_log
(
&
vars
,
"log"
,
&
opt_log
,
QUERY_LOG_GENERAL
);
static
sys_var_log_state
sys_var_slow_query_log
(
&
vars
,
"slow_query_log"
,
&
opt_slow_log
,
QUERY_LOG_SLOW
);
/* Synonym of "slow_query_log" for consistency with SHOW VARIABLES output */
static
sys_var_log_state
sys_var_log_slow
(
&
vars
,
"log_slow_queries"
,
&
opt_slow_log
,
QUERY_LOG_SLOW
);
sys_var_str
sys_var_general_log_path
(
&
vars
,
"general_log_file"
,
sys_check_log_path
,
sys_update_general_log_path
,
sys_default_general_log_path
,
...
...
@@ -678,10 +684,8 @@ static SHOW_VAR fixed_vars[]= {
#ifdef HAVE_MLOCKALL
{
"locked_in_memory"
,
(
char
*
)
&
locked_in_memory
,
SHOW_MY_BOOL
},
#endif
{
"log"
,
(
char
*
)
&
opt_log
,
SHOW_MY_BOOL
},
{
"log_bin"
,
(
char
*
)
&
opt_bin_log
,
SHOW_BOOL
},
{
"log_error"
,
(
char
*
)
log_error_file
,
SHOW_CHAR
},
{
"log_slow_queries"
,
(
char
*
)
&
opt_slow_log
,
SHOW_MY_BOOL
},
{
"lower_case_file_system"
,
(
char
*
)
&
lower_case_file_system
,
SHOW_MY_BOOL
},
{
"lower_case_table_names"
,
(
char
*
)
&
lower_case_table_names
,
SHOW_INT
},
{
"myisam_recover_options"
,
(
char
*
)
&
myisam_recover_options_str
,
SHOW_CHAR_PTR
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment