#At file:///home/hakan/work/mysql/mysql-6.0-falcon/
2894 Hakan Kuecuekyilmaz 2008-11-04
Refactored test for 28095 to use a "soft" server restart
using --shutdown_server command.
removed:
mysql-test/suite/falcon/r/falcon_bug_28095_II.result
mysql-test/suite/falcon/t/falcon_bug_28095_II-master.opt
mysql-test/suite/falcon/t/falcon_bug_28095_II.test
renamed:
mysql-test/suite/falcon/r/falcon_bug_28095_I.result => mysql-test/suite/falcon/r/falcon_bug_28095.result
mysql-test/suite/falcon/t/falcon_bug_28095_I.test => mysql-test/suite/falcon/t/falcon_bug_28095.test
modified:
mysql-test/suite/falcon/t/disabled.def
mysql-test/suite/falcon/r/falcon_bug_28095.result
mysql-test/suite/falcon/t/falcon_bug_28095.test
per-file messages:
mysql-test/suite/falcon/r/falcon_bug_28095.result
Adjusted result file.
mysql-test/suite/falcon/t/disabled.def
Removed falcon_bug_28095_I and falcon_bug_28095_II,
which works now.
mysql-test/suite/falcon/t/falcon_bug_28095.test
Refactored test for 28095 to use a "soft" server restart
using --shutdown_server command.
=== renamed file 'mysql-test/suite/falcon/r/falcon_bug_28095_I.result' => 'mysql-test/suite/falcon/r/falcon_bug_28095.result'
--- a/mysql-test/suite/falcon/r/falcon_bug_28095_I.result 2007-09-20 15:44:25 +0000
+++ b/mysql-test/suite/falcon/r/falcon_bug_28095.result 2008-11-04 15:22:06 +0000
@@ -1,15 +1,35 @@
-SET STORAGE_ENGINE = Falcon;
-*** Bug #126: First phase ***
-*** Also covering bug #113 ***
+*** Bug #28095: First phase ***
+SET @@storage_engine = 'Falcon';
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
CREATE TABLE t1 (a int);
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (2);
INSERT INTO t1 VALUES (3);
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
a
1
2
3
CREATE TABLE t2 (b int);
+SELECT @@GLOBAL.falcon_debug_mask;
+@@GLOBAL.falcon_debug_mask
+0
+SET GLOBAL falcon_debug_mask = 4096;
+SELECT @@GLOBAL.falcon_debug_mask;
+@@GLOBAL.falcon_debug_mask
+4096
+*** Bug #28095: Second phase ***
+SELECT * FROM t1 ORDER BY a;
+a
+1
+2
+3
+SELECT count(*) FROM t1;
+count(*)
+3
+SELECT @@GLOBAL.falcon_debug_mask;
+@@GLOBAL.falcon_debug_mask
+0
+DROP TABLE t1;
+DROP TABLE t2;
=== removed file 'mysql-test/suite/falcon/r/falcon_bug_28095_II.result'
--- a/mysql-test/suite/falcon/r/falcon_bug_28095_II.result 2008-03-28 17:13:51 +0000
+++ b/mysql-test/suite/falcon/r/falcon_bug_28095_II.result 1970-01-01 00:00:00 +0000
@@ -1,9 +0,0 @@
-*** Bug #126: Second phase ***
-*** Also test for bug #123 ***
-SET @@storage_engine = Falcon;
-SELECT * FROM t1;
-a
-1
-2
-3
-DROP TABLE t1, t2;
=== modified file 'mysql-test/suite/falcon/t/disabled.def'
--- a/mysql-test/suite/falcon/t/disabled.def 2008-09-11 16:28:29 +0000
+++ b/mysql-test/suite/falcon/t/disabled.def 2008-11-04 15:22:06 +0000
@@ -10,6 +10,4 @@
#
##############################################################################
-falcon_bug_28095_I : Bug#xxxxx 2008-04-22 hakank Disabled until soft restart is in main tree
-falcon_bug_28095_II : Bug#xxxxx 2008-03-22 hakank Disabled until soft restart is in main tree
falcon_bug_32398 : HF disabled until new fix for this bug is developed
=== renamed file 'mysql-test/suite/falcon/t/falcon_bug_28095_I.test' => 'mysql-test/suite/falcon/t/falcon_bug_28095.test'
--- a/mysql-test/suite/falcon/t/falcon_bug_28095_I.test 2007-09-29 04:30:42 +0000
+++ b/mysql-test/suite/falcon/t/falcon_bug_28095.test 2008-11-04 15:22:06 +0000
@@ -1,20 +1,59 @@
--source include/have_falcon.inc
-SET STORAGE_ENGINE = Falcon;
+
+#
+# Bug #28095: Falcon Drop table causes crash
#
-# Mantis bug #126 first phase: Drop table causes crash
-# Mantis bug #113: JStar is crashing on shutdown
+# Note: This test consists of two test file and
+# needs a "soft" server restart.
#
---echo *** Bug #126: First phase ***
---echo *** Also covering bug #113 ***
+--echo *** Bug #28095: First phase ***
+
+# ----------------------------------------------------- #
+# --- Initialisation --- #
+# ----------------------------------------------------- #
+let $engine = 'Falcon';
+eval SET @@storage_engine = $engine;
+
--disable_warnings
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
--enable_warnings
CREATE TABLE t1 (a int);
+
+# ----------------------------------------------------- #
+# --- Test --- #
+# ----------------------------------------------------- #
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (2);
INSERT INTO t1 VALUES (3);
-SELECT * FROM t1;
+SELECT * FROM t1 ORDER BY a;
CREATE TABLE t2 (b int);
+
+#
+# We set a global variable to make sure that the
+# following restart really works. Global variables
+# should be resetted after a server restart.
+#
+SELECT @@GLOBAL.falcon_debug_mask;
+SET GLOBAL falcon_debug_mask = 4096;
+SELECT @@GLOBAL.falcon_debug_mask;
+
+
+--source include/restart_mysqld.inc
+
+--echo *** Bug #28095: Second phase ***
+SELECT * FROM t1 ORDER BY a;
+
+# ----------------------------------------------------- #
+# --- Check --- #
+# ----------------------------------------------------- #
+SELECT count(*) FROM t1;
+SELECT @@GLOBAL.falcon_debug_mask;
+
+# ----------------------------------------------------- #
+# --- Final cleanup --- #
+# ----------------------------------------------------- #
+DROP TABLE t1;
+DROP TABLE t2;
=== removed file 'mysql-test/suite/falcon/t/falcon_bug_28095_II-master.opt'
--- a/mysql-test/suite/falcon/t/falcon_bug_28095_II-master.opt 2008-03-28 17:13:51 +0000
+++ b/mysql-test/suite/falcon/t/falcon_bug_28095_II-master.opt 1970-01-01 00:00:00 +0000
@@ -1 +0,0 @@
---sql_mode=''
=== removed file 'mysql-test/suite/falcon/t/falcon_bug_28095_II.test'
--- a/mysql-test/suite/falcon/t/falcon_bug_28095_II.test 2008-03-28 17:13:51 +0000
+++ b/mysql-test/suite/falcon/t/falcon_bug_28095_II.test 1970-01-01 00:00:00 +0000
@@ -1,11 +0,0 @@
---source include/have_falcon.inc
-#
-# Mantis bug #126 second phase: Drop table causes crash
-# Mantis bug #123: Table cannot be read after restarting mysqld
-#
---echo *** Bug #126: Second phase ***
---echo *** Also test for bug #123 ***
-SET @@storage_engine = Falcon;
-
-SELECT * FROM t1;
-DROP TABLE t1, t2;