2006-06-19 15:30:55 +02:00
|
|
|
-- source include/not_embedded.inc
|
|
|
|
--source include/have_csv.inc
|
|
|
|
|
|
|
|
--disable_ps_protocol
|
|
|
|
set global general_log= OFF;
|
|
|
|
truncate table mysql.general_log;
|
|
|
|
truncate table mysql.slow_log;
|
|
|
|
show global variables
|
|
|
|
where Variable_name = 'log' or Variable_name = 'log_slow_queries' or
|
|
|
|
Variable_name = 'general_log' or Variable_name = 'slow_query_log';
|
|
|
|
flush logs;
|
|
|
|
set global general_log= ON;
|
|
|
|
create table t1(f1 int);
|
2006-06-22 16:20:29 +02:00
|
|
|
--replace_column 1 TIMESTAMP 2 USER_HOST 3 #
|
2006-06-19 15:30:55 +02:00
|
|
|
select * from mysql.general_log;
|
|
|
|
set global general_log= OFF;
|
|
|
|
drop table t1;
|
2006-06-22 16:20:29 +02:00
|
|
|
--replace_column 1 TIMESTAMP 2 USER_HOST 3 #
|
2006-06-19 15:30:55 +02:00
|
|
|
select * from mysql.general_log;
|
|
|
|
set global general_log= ON;
|
|
|
|
flush logs;
|
|
|
|
show global variables
|
|
|
|
where Variable_name = 'log' or Variable_name = 'log_slow_queries' or
|
|
|
|
Variable_name = 'general_log' or Variable_name = 'slow_query_log';
|
|
|
|
|
|
|
|
connect (con1,localhost,root,,);
|
|
|
|
connection con1;
|
|
|
|
set session long_query_time=1;
|
|
|
|
select sleep(2);
|
2006-06-22 16:20:29 +02:00
|
|
|
--replace_column 1 TIMESTAMP 2 USER_HOST 3 QUERY_TIME
|
2006-06-19 15:30:55 +02:00
|
|
|
select * from mysql.slow_log;
|
|
|
|
connection default;
|
|
|
|
|
|
|
|
set global slow_query_log= ON;
|
|
|
|
connection con1;
|
|
|
|
set session long_query_time=1;
|
|
|
|
select sleep(2);
|
2006-06-22 16:20:29 +02:00
|
|
|
--replace_column 1 TIMESTAMP 2 USER_HOST 3 QUERY_TIME
|
2006-06-19 15:30:55 +02:00
|
|
|
select * from mysql.slow_log;
|
|
|
|
connection default;
|
|
|
|
show global variables
|
|
|
|
where Variable_name = 'log' or Variable_name = 'log_slow_queries' or
|
|
|
|
Variable_name = 'general_log' or Variable_name = 'slow_query_log';
|
|
|
|
|
|
|
|
set global general_log= ON;
|
|
|
|
set global general_log= OFF;
|
|
|
|
set global general_log= OFF;
|
|
|
|
set global slow_query_log= ON;
|
|
|
|
set global slow_query_log= OFF;
|
|
|
|
set global slow_query_log= OFF;
|
|
|
|
|
|
|
|
set global general_log= ON;
|
|
|
|
truncate table mysql.general_log;
|
|
|
|
create table t1(f1 int);
|
|
|
|
drop table t1;
|
2006-06-22 16:20:29 +02:00
|
|
|
--replace_column 1 TIMESTAMP 2 USER_HOST 3 #
|
2006-06-19 15:30:55 +02:00
|
|
|
select * from mysql.general_log;
|
|
|
|
set global general_log= OFF;
|
|
|
|
truncate table mysql.general_log;
|
2006-06-22 16:20:29 +02:00
|
|
|
--replace_column 1 TIMESTAMP 2 USER_HOST 3 #
|
2006-06-19 15:30:55 +02:00
|
|
|
select * from mysql.general_log;
|
|
|
|
set global general_log= ON;
|
|
|
|
show global variables
|
|
|
|
where Variable_name = 'log' or Variable_name = 'log_slow_queries' or
|
|
|
|
Variable_name = 'general_log' or Variable_name = 'slow_query_log';
|
|
|
|
|
|
|
|
--replace_column 2 #
|
|
|
|
show variables like 'general_log_file';
|
|
|
|
--replace_column 2 #
|
|
|
|
show variables like 'slow_query_log_file';
|
|
|
|
show variables like 'log_output';
|
|
|
|
|
2007-02-20 21:00:05 +01:00
|
|
|
# Can't set general_log_file to a non existing file
|
2006-06-19 15:30:55 +02:00
|
|
|
--error 1231
|
|
|
|
set global general_log_file='/not exiting path/log.master';
|
2007-02-20 21:00:05 +01:00
|
|
|
|
|
|
|
# Can't set general_log_file to a directory
|
|
|
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
2006-06-19 15:30:55 +02:00
|
|
|
--error 1231
|
2007-02-20 21:00:05 +01:00
|
|
|
eval set global general_log_file='$MYSQLTEST_VARDIR';
|
|
|
|
|
|
|
|
# Can't set general_log_file to empty string
|
2006-06-19 15:30:55 +02:00
|
|
|
--error 1231
|
|
|
|
set global general_log_file='';
|
2007-02-20 21:00:05 +01:00
|
|
|
|
2006-06-19 15:30:55 +02:00
|
|
|
--replace_column 2 #
|
|
|
|
show variables like 'general_log_file';
|
|
|
|
set global general_log= OFF;
|
2006-07-04 22:37:32 +02:00
|
|
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
|
|
|
eval set global general_log_file='$MYSQLTEST_VARDIR/tmp/log.master';
|
2006-06-19 15:30:55 +02:00
|
|
|
set global general_log= ON;
|
|
|
|
create table t1(f1 int);
|
|
|
|
drop table t1;
|
|
|
|
set global general_log= OFF;
|
|
|
|
set global general_log_file=default;
|
|
|
|
set global general_log= ON;
|
|
|
|
create table t1(f1 int);
|
|
|
|
drop table t1;
|
|
|
|
--replace_column 2 #
|
|
|
|
show variables like 'general_log_file';
|
|
|
|
--replace_column 2 #
|
|
|
|
show variables like 'slow_query_log_file';
|
|
|
|
|
|
|
|
set global general_log= default;
|
|
|
|
set global slow_query_log= default;
|
|
|
|
set global general_log_file= default;
|
|
|
|
set global slow_query_log_file= default;
|
|
|
|
show variables like 'general_log';
|
|
|
|
show variables like 'slow_query_log';
|
|
|
|
set global general_log=ON;
|
|
|
|
set global log_output=default;
|
|
|
|
show variables like 'log_output';
|
|
|
|
set global general_log=OFF;
|
|
|
|
set global log_output=FILE;
|
|
|
|
truncate table mysql.general_log;
|
|
|
|
show variables like 'log_output';
|
|
|
|
set global general_log=ON;
|
|
|
|
create table t1(f1 int);
|
2006-06-22 16:20:29 +02:00
|
|
|
--replace_column 1 TIMESTAMP 2 USER_HOST 3 #
|
2006-06-19 15:30:55 +02:00
|
|
|
select * from mysql.general_log;
|
|
|
|
set global general_log=OFF;
|
|
|
|
set global log_output="FILE,TABLE";
|
|
|
|
show variables like 'log_output';
|
|
|
|
set global general_log=ON;
|
|
|
|
drop table t1;
|
2006-06-22 16:20:29 +02:00
|
|
|
--replace_column 1 TIMESTAMP 2 USER_HOST 3 #
|
2006-06-19 15:30:55 +02:00
|
|
|
select * from mysql.general_log;
|
|
|
|
|
|
|
|
--enable_ps_protocol
|
2007-01-30 12:52:26 +01:00
|
|
|
|
|
|
|
#
|
|
|
|
# Cleanup (must be done last to avoid delayed 'Quit' message in general log)
|
|
|
|
#
|
|
|
|
disconnect con1;
|