Below is the list of changes that have just been committed into a local
6.0 repository of klewis. When klewis 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-03-05 14:25:44-06:00, klewis@klewis-mysql. +12 -0
Bug#34990 - Fixed the condition in which two different
threads could get the same record number for an insert.
mysql-test/suite/falcon/r/falcon_bug_34351_A.result@stripped, 2008-03-05 14:25:02-06:00,
klewis@klewis-mysql. +1 -1
Cleanup
mysql-test/suite/falcon/r/falcon_bug_34351_B.result@stripped, 2008-03-05 14:25:06-06:00,
klewis@klewis-mysql. +1 -1
Cleanup
mysql-test/suite/falcon/r/falcon_bug_34351_C.result@stripped, 2008-03-05 14:25:09-06:00,
klewis@klewis-mysql. +1 -1
Cleanup
mysql-test/suite/falcon/r/falcon_bug_34351_D.result@stripped, 2008-03-05 14:25:12-06:00,
klewis@klewis-mysql. +1 -1
Cleanup
mysql-test/suite/falcon/r/falcon_bug_34890.result@stripped, 2008-03-05 14:25:33-06:00,
klewis@klewis-mysql. +41 -0
Bug#34890 - Added new testcase to catch a faux lock timeout
which may be the cause of 34890
mysql-test/suite/falcon/r/falcon_bug_34890.result@stripped, 2008-03-05 14:25:33-06:00,
klewis@klewis-mysql. +0 -0
mysql-test/suite/falcon/t/disabled.def@stripped, 2008-03-05 14:25:14-06:00,
klewis@klewis-mysql. +1 -2
Bug#34990 - These test cases should work now.
Added new one for Bug#34890
mysql-test/suite/falcon/t/falcon_bug_34351_A.test@stripped, 2008-03-05 14:25:17-06:00,
klewis@klewis-mysql. +2 -2
Cleanup
mysql-test/suite/falcon/t/falcon_bug_34351_B.test@stripped, 2008-03-05 14:25:20-06:00,
klewis@klewis-mysql. +2 -2
Cleanup
mysql-test/suite/falcon/t/falcon_bug_34351_C.test@stripped, 2008-03-05 14:25:22-06:00,
klewis@klewis-mysql. +3 -4
Corrected the comment
mysql-test/suite/falcon/t/falcon_bug_34351_D.test@stripped, 2008-03-05 14:25:25-06:00,
klewis@klewis-mysql. +2 -2
Cleanup
mysql-test/suite/falcon/t/falcon_bug_34890.test@stripped, 2008-03-05 14:25:30-06:00,
klewis@klewis-mysql. +92 -0
Bug#34890 - Added new testcase to catch a faux lock timeout
which may be the cause of 34890
mysql-test/suite/falcon/t/falcon_bug_34890.test@stripped, 2008-03-05 14:25:30-06:00,
klewis@klewis-mysql. +0 -0
storage/falcon/Section.cpp@stripped, 2008-03-05 14:25:28-06:00, klewis@klewis-mysql. +0 -5
Bug#34990 - The call to Section::insertStub() was returning
the same record Number to two different threads that
did an insert of a new record. The second one looses.
Section::insertStub() uses Table::syncInsert to protect
a couple bitmaps it uses to decide which record slot is
available. But it would release this SyncObject during
the search of the section page. I made it hold the
synObject for the whole function and the assert did not
happen anymore.
diff -Nrup a/mysql-test/suite/falcon/r/falcon_bug_34351_A.result
b/mysql-test/suite/falcon/r/falcon_bug_34351_A.result
--- a/mysql-test/suite/falcon/r/falcon_bug_34351_A.result 2008-02-29 17:11:58 -06:00
+++ b/mysql-test/suite/falcon/r/falcon_bug_34351_A.result 2008-03-05 14:25:02 -06:00
@@ -1,4 +1,4 @@
-*** Bug #34351 A ***
+*** Bug #34351_A ***
SET @@storage_engine = 'Falcon';
DROP TABLE IF EXISTS t1;
DROP PROCEDURE IF EXISTS p1;
diff -Nrup a/mysql-test/suite/falcon/r/falcon_bug_34351_B.result
b/mysql-test/suite/falcon/r/falcon_bug_34351_B.result
--- a/mysql-test/suite/falcon/r/falcon_bug_34351_B.result 2008-02-29 23:28:40 -06:00
+++ b/mysql-test/suite/falcon/r/falcon_bug_34351_B.result 2008-03-05 14:25:06 -06:00
@@ -1,4 +1,4 @@
-*** Bug #34351 ***
+*** Bug #34351_B ***
SET @@storage_engine = 'Falcon';
DROP TABLE IF EXISTS t1;
# Establish connection conn1 (user = root)
diff -Nrup a/mysql-test/suite/falcon/r/falcon_bug_34351_C.result
b/mysql-test/suite/falcon/r/falcon_bug_34351_C.result
--- a/mysql-test/suite/falcon/r/falcon_bug_34351_C.result 2008-02-29 17:12:01 -06:00
+++ b/mysql-test/suite/falcon/r/falcon_bug_34351_C.result 2008-03-05 14:25:09 -06:00
@@ -1,4 +1,4 @@
-*** Bug #34351 A ***
+*** Bug #34351_C ***
SET @@storage_engine = 'Falcon';
DROP TABLE IF EXISTS t1;
DROP PROCEDURE IF EXISTS p1;
diff -Nrup a/mysql-test/suite/falcon/r/falcon_bug_34351_D.result
b/mysql-test/suite/falcon/r/falcon_bug_34351_D.result
--- a/mysql-test/suite/falcon/r/falcon_bug_34351_D.result 2008-02-29 23:28:51 -06:00
+++ b/mysql-test/suite/falcon/r/falcon_bug_34351_D.result 2008-03-05 14:25:12 -06:00
@@ -1,4 +1,4 @@
-*** Bug #34351 D ***
+*** Bug #34351_D ***
SET @@storage_engine = 'Falcon';
DROP TABLE IF EXISTS t1;
# Establish connection conn1 (user = root)
diff -Nrup a/mysql-test/suite/falcon/r/falcon_bug_34890.result
b/mysql-test/suite/falcon/r/falcon_bug_34890.result
--- /dev/null Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon/r/falcon_bug_34890.result 2008-03-05 14:25:33 -06:00
@@ -0,0 +1,41 @@
+*** Bug #34890 ***
+SET @@storage_engine = 'Falcon';
+DROP TABLE IF EXISTS t1;
+DROP PROCEDURE IF EXISTS p1;
+# Establish connection conn1 (user = root)
+SET @@autocommit = 1;
+# Switch to connection default
+SET @@autocommit = 1;
+CREATE TABLE t1 (
+t1_autoinc INTEGER NOT NULL AUTO_INCREMENT,
+t1_uuid CHAR(36),
+PRIMARY KEY (t1_autoinc)
+) ENGINE = Falcon;
+CREATE PROCEDURE p1 ()
+begin
+DECLARE my_count INT DEFAULT 0;
+DECLARE my_uuid CHAR(36) DEFAULT 0;
+SET FALCON_CONSISTENT_READ=OFF;
+while my_count < 10000 do
+SET my_uuid = UUID();
+INSERT INTO t1 (t1_uuid) VALUES (my_uuid);
+DELETE FROM t1 WHERE t1_uuid IN (my_uuid);
+SET my_count = my_count + 1;
+end while;
+end//
+# Send call p1() to the server but do not pull the results
+CALL p1();
+# Switch to connection conn1
+CALL p1();
+# Switch to connection default
+# Pull the results of the preceeding call p1()
+# Send call p1() to the server but do not pull the results
+CALL p1();
+# Switch to connection conn1
+CALL p1();
+# Switch to connection default
+# Pull the results of the preceeding call p1()
+SELECT count(*) FROM t1;
+count(*)
+0
+DROP PROCEDURE p1;
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 2008-03-02 20:15:17 -06:00
+++ b/mysql-test/suite/falcon/t/disabled.def 2008-03-05 14:25:14 -06:00
@@ -29,8 +29,7 @@ falcon_bug_30282 : Bug#30282 2007-08-
falcon_bug_30480_A : Bug#30282 2007-09-07 klewis Currently failing
falcon_bug_30480_B : Bug#30282 2007-09-07 klewis Currently failing
falcon_bug_32413 : Bug#32413 2008-02-11 hakank Either works on 64-bit or on 32-bit,
but not on both platforms. This is a test case problem and not a bug.
-falcon_bug_34351_A : Bug#34990 2008-02-11 klewis Periodic failures, various asserts
(table.cpp Line 2917 & faux timeouts)
-falcon_bug_34351_C : Bug#34990 2008-02-11 klewis Periodic failures, various asserts
(table.cpp Line 2917, line 2455 & faux timeouts)
+falcon_bug_34890 : Bug#34890 2008-02-11 klewis shows a faux lock timeout
falcon_deadlock : Bug#34182 2008-01-31 hakank Bug in SELECT ... FOR UPDATE
index_merge_falcon : Bug#32696 index_merge_falcon.test fails
ps_8falcon : Bug#32683 Test ps_8falcon fails in 6.0
diff -Nrup a/mysql-test/suite/falcon/t/falcon_bug_34351_A.test
b/mysql-test/suite/falcon/t/falcon_bug_34351_A.test
--- a/mysql-test/suite/falcon/t/falcon_bug_34351_A.test 2008-02-29 17:11:48 -06:00
+++ b/mysql-test/suite/falcon/t/falcon_bug_34351_A.test 2008-03-05 14:25:17 -06:00
@@ -1,10 +1,10 @@
--source include/have_falcon.inc
#
-# Bug #34351 A: Update Conflict on non-overlapping transactions
+# Bug #34351_A: Update Conflict on non-overlapping transactions
# This test works because the INSERT and DELETE are in the same
# transaction and so the INSERT is not seen by other transactions.
#
---echo *** Bug #34351 A ***
+--echo *** Bug #34351_A ***
# ----------------------------------------------------- #
# --- Initialisation --- #
diff -Nrup a/mysql-test/suite/falcon/t/falcon_bug_34351_B.test
b/mysql-test/suite/falcon/t/falcon_bug_34351_B.test
--- a/mysql-test/suite/falcon/t/falcon_bug_34351_B.test 2008-02-29 23:28:57 -06:00
+++ b/mysql-test/suite/falcon/t/falcon_bug_34351_B.test 2008-03-05 14:25:20 -06:00
@@ -1,9 +1,9 @@
--source include/have_falcon.inc
#--disable_abort_on_error
#
-# Bug #34351: Update Conflict on non-overlapping transactions
+# Bug #34351_B: Update Conflict on non-overlapping transactions
#
---echo *** Bug #34351 ***
+--echo *** Bug #34351_B ***
# ----------------------------------------------------- #
# --- Initialisation --- #
diff -Nrup a/mysql-test/suite/falcon/t/falcon_bug_34351_C.test
b/mysql-test/suite/falcon/t/falcon_bug_34351_C.test
--- a/mysql-test/suite/falcon/t/falcon_bug_34351_C.test 2008-02-29 17:11:52 -06:00
+++ b/mysql-test/suite/falcon/t/falcon_bug_34351_C.test 2008-03-05 14:25:22 -06:00
@@ -1,10 +1,9 @@
--source include/have_falcon.inc
#
-# Bug #34351 A: Update Conflict on non-overlapping transactions
-# This test works because the INSERT and DELETE are in the same
-# transaction and so the INSERT is not seen by other transactions.
+# Bug #34351_C: Update Conflict on non-overlapping transactions
+# This test works because it uses FALCON_CONSISTENT_READ=OFF
#
---echo *** Bug #34351 A ***
+--echo *** Bug #34351_C ***
# ----------------------------------------------------- #
# --- Initialisation --- #
diff -Nrup a/mysql-test/suite/falcon/t/falcon_bug_34351_D.test
b/mysql-test/suite/falcon/t/falcon_bug_34351_D.test
--- a/mysql-test/suite/falcon/t/falcon_bug_34351_D.test 2008-02-29 23:29:00 -06:00
+++ b/mysql-test/suite/falcon/t/falcon_bug_34351_D.test 2008-03-05 14:25:25 -06:00
@@ -1,9 +1,9 @@
--source include/have_falcon.inc
#--disable_abort_on_error
#
-# Bug #34351 D: Update Conflict on non-overlapping transactions
+# Bug #34351_D: Update Conflict on non-overlapping transactions
#
---echo *** Bug #34351 D ***
+--echo *** Bug #34351_D ***
# ----------------------------------------------------- #
# --- Initialisation --- #
diff -Nrup a/mysql-test/suite/falcon/t/falcon_bug_34890.test
b/mysql-test/suite/falcon/t/falcon_bug_34890.test
--- /dev/null Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon/t/falcon_bug_34890.test 2008-03-05 14:25:30 -06:00
@@ -0,0 +1,92 @@
+--source include/have_falcon.inc
+#
+# Bug #34890: Update Conflict on non-overlapping transactions
+# This test works because it uses FALCON_CONSISTENT_READ=OFF
+# This test is different from 34351_C in that there is no index
+# on t1_uuid.
+#
+--echo *** Bug #34890 ***
+
+# ----------------------------------------------------- #
+# --- Initialisation --- #
+# ----------------------------------------------------- #
+let $engine = 'Falcon';
+eval SET @@storage_engine = $engine;
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP PROCEDURE IF EXISTS p1;
+--enable_warnings
+
+--echo # Establish connection conn1 (user = root)
+connect (conn1,localhost,root,,);
+SET @@autocommit = 1;
+
+--echo # Switch to connection default
+connection default;
+SET @@autocommit = 1;
+
+CREATE TABLE t1 (
+ t1_autoinc INTEGER NOT NULL AUTO_INCREMENT,
+ t1_uuid CHAR(36),
+ PRIMARY KEY (t1_autoinc)
+) ENGINE = Falcon;
+
+# declare continue handler for sqlexception
+
+delimiter //;
+CREATE PROCEDURE p1 ()
+begin
+ DECLARE my_count INT DEFAULT 0;
+ DECLARE my_uuid CHAR(36) DEFAULT 0;
+ SET FALCON_CONSISTENT_READ=OFF;
+ while my_count < 10000 do
+ SET my_uuid = UUID();
+ INSERT INTO t1 (t1_uuid) VALUES (my_uuid);
+ DELETE FROM t1 WHERE t1_uuid IN (my_uuid);
+ SET my_count = my_count + 1;
+ end while;
+end//
+delimiter ;//
+
+# ----------------------------------------------------- #
+# --- Test --- #
+# ----------------------------------------------------- #
+
+--echo # Send call p1() to the server but do not pull the results
+--send CALL p1()
+
+--echo # Switch to connection conn1
+connection conn1;
+--real_sleep 1
+CALL p1();
+
+--echo # Switch to connection default
+connection default;
+--echo # Pull the results of the preceeding call p1()
+--reap
+--echo # Send call p1() to the server but do not pull the results
+--real_sleep 1
+--send CALL p1()
+
+--echo # Switch to connection conn1
+connection conn1;
+--real_sleep 1
+CALL p1();
+
+--echo # Switch to connection default
+connection default;
+--echo # Pull the results of the preceeding call p1()
+--reap
+
+
+# ----------------------------------------------------- #
+# --- Check --- #
+# ----------------------------------------------------- #
+# Checking row count is not applicable here.
+SELECT count(*) FROM t1;
+
+# ----------------------------------------------------- #
+# --- Final cleanup --- #
+# ----------------------------------------------------- #
+DROP PROCEDURE p1;
diff -Nrup a/storage/falcon/Section.cpp b/storage/falcon/Section.cpp
--- a/storage/falcon/Section.cpp 2008-02-08 10:34:54 -06:00
+++ b/storage/falcon/Section.cpp 2008-03-05 14:25:28 -06:00
@@ -334,7 +334,6 @@ int32 Section::insertStub(TransId transI
if (reservedRecordNumbers && reservedRecordNumbers->isSet(line))
continue;
- sync.unlock();
int32 indexSequence = line / linesPerPage;
RecordLocatorPage *page;
@@ -357,7 +356,6 @@ int32 Section::insertStub(TransId transI
bdb->release(REL_HISTORY);
bdb = NULL;
line = (line + linesPerSection) / linesPerSection * linesPerSection - 1;
- sync.lock(Exclusive);
continue;
}
@@ -418,7 +416,6 @@ int32 Section::insertStub(TransId transI
if (reservedRecordNumbers || freeLines)
{
- sync.lock(Shared);
int next = nextLine;
if (reservedRecordNumbers)
@@ -438,7 +435,6 @@ int32 Section::insertStub(TransId transI
}
int nextSequence = next / linesPerSection;
- sync.unlock();
if (nextSequence > sequence)
markFull(true, sequence, transId);
@@ -465,7 +461,6 @@ int32 Section::insertStub(TransId transI
markFull(true, indexSequence / dbb->pagesPerSection, transId);
}
- sync.lock(Exclusive);
}
}
| Thread |
|---|
| • bk commit into 6.0 tree (klewis:1.2588) BUG#34990 | klewis | 5 Mar 2008 |