Below is the list of changes that have just been committed into a local
6.0 repository of hakan. When hakan does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2008-02-01 14:04:14+01:00, hakank@lu0011.(none) +2 -0
Fixed test case.
mysql-test/suite/falcon/r/falcon_bug_29452.result@stripped, 2008-02-01 14:04:09+01:00, hakank@lu0011.(none) +12 -2
Adjusted result file.
mysql-test/suite/falcon/t/falcon_bug_29452.test@stripped, 2008-02-01 14:04:09+01:00, hakank@lu0011.(none) +28 -6
Fixed test case to
- include/hava_falcon.inc
- clean up all created tables at the end of the test
- use storage engines as variables.
diff -Nrup a/mysql-test/suite/falcon/r/falcon_bug_29452.result b/mysql-test/suite/falcon/r/falcon_bug_29452.result
--- a/mysql-test/suite/falcon/r/falcon_bug_29452.result 2007-12-27 07:23:27 +01:00
+++ b/mysql-test/suite/falcon/r/falcon_bug_29452.result 2008-02-01 14:04:09 +01:00
@@ -1,4 +1,5 @@
*** Bug #29452 - Wait Lock Timout ***
+SET @@storage_engine = 'Falcon';
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
SELECT @@falcon_lock_wait_timeout INTO @previous_lock_wait_timeout;
@@ -11,8 +12,8 @@ Variable_name Value
falcon_lock_wait_timeout 2
# Establish connection conn1
# Switch to connection default
-CREATE TABLE t1 (a varchar(50), PRIMARY KEY (a)) engine = falcon;
-CREATE TABLE t2 (a varchar(50)) engine = myisam;
+CREATE TABLE t1 (a varchar(50), PRIMARY KEY (a));
+CREATE TABLE t2 (a varchar(50)) Engine 'MyISAM';
CREATE TRIGGER bi BEFORE INSERT ON t1 FOR EACH ROW INSERT INTO t2 VALUES ('inserted by trigger');
BEGIN;
INSERT INTO t1 VALUES('inserted by client 1');
@@ -32,7 +33,16 @@ inserted by trigger
INSERT INTO t1 VALUES('inserted by client 1');
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
# Switch to connection default
+COMMIT;
+SELECT count(*) FROM t1;
+count(*)
+1
+SELECT count(*) FROM t2;
+count(*)
+2
+# Switch to connection default
DROP TABLE t1;
+DROP TABLE t2;
SET GLOBAL FALCON_LOCK_WAIT_TIMEOUT = @previous_lock_wait_timeout;
SHOW VARIABLES LIKE 'FALCON_LOCK_WAIT_TIMEOUT';
Variable_name Value
diff -Nrup a/mysql-test/suite/falcon/t/falcon_bug_29452.test b/mysql-test/suite/falcon/t/falcon_bug_29452.test
--- a/mysql-test/suite/falcon/t/falcon_bug_29452.test 2007-12-27 07:23:35 +01:00
+++ b/mysql-test/suite/falcon/t/falcon_bug_29452.test 2008-02-01 14:04:09 +01:00
@@ -1,10 +1,16 @@
-#--disable_abort_on_error
-
+--source include/have_falcon.inc
#
-# 29452: Prevent ohterwise unpreventable deadlocks with a wait lock timout
+# Bug #29452: Prevent ohterwise unpreventable deadlocks with a wait lock timout
#
--echo *** Bug #29452 - Wait Lock Timout ***
+# ----------------------------------------------------- #
+# --- Initialisation --- #
+# ----------------------------------------------------- #
+let $engine = 'Falcon';
+let $other_engine = 'MyISAM';
+eval SET @@storage_engine = $engine;
+
--disable_warnings
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
@@ -20,9 +26,13 @@ connect (conn1,localhost,root,,);
--echo # Switch to connection default
connection default;
-CREATE TABLE t1 (a varchar(50), PRIMARY KEY (a)) engine = falcon;
-CREATE TABLE t2 (a varchar(50)) engine = myisam;
+CREATE TABLE t1 (a varchar(50), PRIMARY KEY (a));
+eval CREATE TABLE t2 (a varchar(50)) Engine $other_engine;
CREATE TRIGGER bi BEFORE INSERT ON t1 FOR EACH ROW INSERT INTO t2 VALUES ('inserted by trigger');
+
+# ----------------------------------------------------- #
+# --- Test --- #
+# ----------------------------------------------------- #
BEGIN;
INSERT INTO t1 VALUES('inserted by client 1');
SELECT * FROM t1;
@@ -36,10 +46,22 @@ SELECT * FROM t2;
--error 1205
INSERT INTO t1 VALUES('inserted by client 1');
+# ----------------------------------------------------- #
+# --- Check --- #
+# ----------------------------------------------------- #
+--echo # Switch to connection default
+connection default;
+COMMIT;
+SELECT count(*) FROM t1;
+SELECT count(*) FROM t2;
+
+# ----------------------------------------------------- #
+# --- Final cleanup --- #
+# ----------------------------------------------------- #
--echo # Switch to connection default
connection default;
disconnect conn1;
DROP TABLE t1;
+DROP TABLE t2;
SET GLOBAL FALCON_LOCK_WAIT_TIMEOUT = @previous_lock_wait_timeout;
SHOW VARIABLES LIKE 'FALCON_LOCK_WAIT_TIMEOUT';
-
| Thread |
|---|
| • bk commit into 6.0 tree (hakank:1.2797) | Hakan Kuecuekyilmaz | 1 Feb |