summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <Kristofer.Pettersson@naruto.>2006-12-01 09:49:19 +0100
committerunknown <Kristofer.Pettersson@naruto.>2006-12-01 09:49:19 +0100
commite284256ef0f24ea4cb826df1ad321adc3604cf0d (patch)
treecf32823947bbb9254c2685b380726922c6bb676e /mysql-test
parent154c6e06775d6e644fd4e5f863104ab566fc4a68 (diff)
downloadmariadb-git-e284256ef0f24ea4cb826df1ad321adc3604cf0d.tar.gz
Bug#17733 Flushing logs causes daily server crash
Server crashes if a flush commmand is issued and binlog is closed. - added check to prevent binlog access when binlog file isn't opened. sql/sql_parse.cc: - removed deprecated environment consistency check. - added check to prevent binlog access on closed binlog. mysql-test/t/flush2-master.opt: - Added test case (master options) mysql-test/t/flush2.test: - Added test case mysql-test/r/flush2.result: - Added test case (resultfile)
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/flush2.result24
-rw-r--r--mysql-test/t/flush2-master.opt1
-rw-r--r--mysql-test/t/flush2.test9
3 files changed, 34 insertions, 0 deletions
diff --git a/mysql-test/r/flush2.result b/mysql-test/r/flush2.result
new file mode 100644
index 00000000000..7c94219fd71
--- /dev/null
+++ b/mysql-test/r/flush2.result
@@ -0,0 +1,24 @@
+flush logs;
+set global expire_logs_days = 3;
+show variables like 'log%';
+Variable_name Value
+log ON
+log_bin OFF
+log_bin_trust_function_creators ON
+log_error
+log_queries_not_using_indexes OFF
+log_slave_updates OFF
+log_slow_queries OFF
+log_warnings 1
+flush logs;
+show variables like 'log%';
+Variable_name Value
+log ON
+log_bin OFF
+log_bin_trust_function_creators ON
+log_error
+log_queries_not_using_indexes OFF
+log_slave_updates OFF
+log_slow_queries OFF
+log_warnings 1
+set global expire_logs_days = 0;
diff --git a/mysql-test/t/flush2-master.opt b/mysql-test/t/flush2-master.opt
new file mode 100644
index 00000000000..ccbd01c91d3
--- /dev/null
+++ b/mysql-test/t/flush2-master.opt
@@ -0,0 +1 @@
+--disable-log-bin
diff --git a/mysql-test/t/flush2.test b/mysql-test/t/flush2.test
new file mode 100644
index 00000000000..fc9e88e3141
--- /dev/null
+++ b/mysql-test/t/flush2.test
@@ -0,0 +1,9 @@
+#
+# Bug#17733 Flushing logs causes daily server crash
+#
+flush logs;
+set global expire_logs_days = 3;
+show variables like 'log%';
+flush logs;
+show variables like 'log%';
+set global expire_logs_days = 0;