MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Hakan Kuecuekyilmaz Date:October 18 2007 11:17pm
Subject:bk commit into 6.0 tree (hakank:1.2634) BUG#29452
View as plain text  
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, 2007-10-19 01:17:21+02:00, hakank@lu0011.(none) +3 -0
  Added test case for Bug #29452.

  mysql-test/suite/falcon/r/falcon_bug_29452.result@stripped, 2007-10-19 01:17:17+02:00, hakank@lu0011.(none) +34 -0
    New BitKeeper file ``mysql-test/suite/falcon/r/falcon_bug_29452.result''

  mysql-test/suite/falcon/r/falcon_bug_29452.result@stripped, 2007-10-19 01:17:17+02:00, hakank@lu0011.(none) +0 -0

  mysql-test/suite/falcon/t/disabled.def@stripped, 2007-10-19 01:17:17+02:00, hakank@lu0011.(none) +1 -0
    falcon_bug_29452 currently hangs.

  mysql-test/suite/falcon/t/falcon_bug_29452.test@stripped, 2007-10-19 01:17:17+02:00, hakank@lu0011.(none) +69 -0
    New BitKeeper file ``mysql-test/suite/falcon/t/falcon_bug_29452.test''

  mysql-test/suite/falcon/t/falcon_bug_29452.test@stripped, 2007-10-19 01:17:17+02:00, hakank@lu0011.(none) +0 -0

diff -Nrup a/mysql-test/suite/falcon/r/falcon_bug_29452.result b/mysql-test/suite/falcon/r/falcon_bug_29452.result
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon/r/falcon_bug_29452.result	2007-10-19 01:17:17 +02:00
@@ -0,0 +1,34 @@
+*** Bug #29452 ***
+SET @@storage_engine = 'Falcon';
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t2;
+DROP TRIGGER IF EXISTS bi_t1;
+SET @@autocommit = 0;
+CREATE TABLE t1 (a varchar(5));
+CREATE UNIQUE INDEX i1 ON t1(a);
+CREATE TABLE t2 (a int) Engine MyISAM;
+CREATE TRIGGER bi_t1
+BEFORE INSERT ON t1 FOR EACH ROW INSERT INTO t2 VALUES (1);
+# Establish and switch to connection conn1
+SET @@autocommit = 0;
+# Switch to connection default
+INSERT INTO t1 VALUES ('I');
+# Switch to connection conn1
+INSERT INTO t1 VALUES ('j');
+# Switch to connection default
+INSERT INTO t1 VALUES ('j');
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+# Switch to connection conn1
+INSERT INTO t1 VALUES ('I');
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+COMMIT;
+SELECT count(*) FROM t1;
+count(*)
+1
+SELECT count(*) FROM t2;
+count(*)
+4
+# Switch to connection default
+COMMIT;
+DROP TABLE t1;
+DROP TABLE t2;
diff -Nrup a/mysql-test/suite/falcon/t/disabled.def b/mysql-test/suite/falcon/t/disabled.def
--- a/mysql-test/suite/falcon/t/disabled.def	2007-09-22 06:58:08 +02:00
+++ b/mysql-test/suite/falcon/t/disabled.def	2007-10-19 01:17:17 +02:00
@@ -35,6 +35,7 @@ falcon_bug_28006    : Bug#28006 2007-08-
 falcon_bug_28076    : Bug#28076 2007-04-25 klewis Currently failing
 falcon_bug_29151    : Bug#29151 2007-08-01 hakank Currently failing
 falcon_bug_29246    : Bug#29246 2007-06-21 hakank Currently failing
+falcon_bug_29452    : Bug#29452 2007-10-19 hakank Currently hangs
 falcon_bug_30282    : Bug#30282 2007-08-21 hakank Currently failing
 falcon_bug_30878    : Bug#30878 2007-09-06 cpowers Currently failing (server bug)
 falcon_bug_30480_A  : Bug#30282 2007-09-07 klewis Currently failing
diff -Nrup a/mysql-test/suite/falcon/t/falcon_bug_29452.test b/mysql-test/suite/falcon/t/falcon_bug_29452.test
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon/t/falcon_bug_29452.test	2007-10-19 01:17:17 +02:00
@@ -0,0 +1,69 @@
+--source include/have_falcon.inc
+#
+# Bug #29452: Falcon: two-way deadlock with unique index and trigger
+#
+--echo *** Bug #29452 ***
+
+# ----------------------------------------------------- #
+# --- Initialisation                                --- #
+# ----------------------------------------------------- #
+let $engine = 'Falcon';
+eval SET @@storage_engine = $engine;
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t2;
+DROP TRIGGER IF EXISTS bi_t1;
+--enable_warnings
+
+SET @@autocommit = 0;
+CREATE TABLE t1 (a varchar(5));
+CREATE UNIQUE INDEX i1 ON t1(a);
+CREATE TABLE t2 (a int) Engine MyISAM;
+CREATE TRIGGER bi_t1
+  BEFORE INSERT ON t1 FOR EACH ROW INSERT INTO t2 VALUES (1);
+
+--echo # Establish and switch to connection conn1
+connect (conn1,localhost,root,,);
+connection conn1;
+SET @@autocommit = 0;
+
+# ----------------------------------------------------- #
+# --- Test                                          --- #
+# ----------------------------------------------------- #
+--echo # Switch to connection default
+connection default;
+INSERT INTO t1 VALUES ('I');
+
+--echo # Switch to connection conn1
+connection conn1;
+INSERT INTO t1 VALUES ('j');
+
+--echo # Switch to connection default
+connection default;
+--error ER_LOCK_WAIT_TIMEOUT
+# Waits for connection conn1.
+INSERT INTO t1 VALUES ('j');
+
+--echo # Switch to connection conn1
+connection conn1;
+--error ER_LOCK_WAIT_TIMEOUT
+# Waits for connection default.
+INSERT INTO t1 VALUES ('I');
+COMMIT;
+
+# ----------------------------------------------------- #
+# --- Check                                         --- #
+# ----------------------------------------------------- #
+SELECT count(*) FROM t1;
+SELECT count(*) FROM t2;
+
+# ----------------------------------------------------- #
+# --- Final cleanup                                 --- #
+# ----------------------------------------------------- #
+--echo # Switch to connection default
+connection default;
+COMMIT;
+disconnect conn1;
+DROP TABLE t1;
+DROP TABLE t2;
Thread
bk commit into 6.0 tree (hakank:1.2634) BUG#29452Hakan Kuecuekyilmaz19 Oct