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-02-29 17:12:12-06:00, klewis@klewis-mysql. +15 -0
Bug34351 - Added 4 test cases and corrected 4 others
mysql-test/suite/falcon/r/falcon_bug_22160.result@stripped, 2008-02-29 17:11:27-06:00, klewis@klewis-mysql. +1 -1
The changes for Bug#34351 means that the second transaction
in this test does not atempt to lock the inserted record
since it is not visible, even after it was committed.
So the result is now 132 (ER_KEY_NOT_FOUND) instead of
1020 (ER_CHECKREAD or UpdateConflict)
mysql-test/suite/falcon/r/falcon_bug_22165.result@stripped, 2008-02-29 17:11:30-06:00, klewis@klewis-mysql. +3 -3
Cleanup; put SET TRANSACTION outside the while loop.
mysql-test/suite/falcon/r/falcon_bug_22175.result@stripped, 2008-02-29 17:11:33-06:00, klewis@klewis-mysql. +5 -0
This test case has been failing periodically because the timing
between the concurrent clients was not controlled. And when it
failed, it was actually getting the correct results. This test
expected a READ COMMITTED transaction to wait on a pending
record. But there is no reason for a READ COMMITTED transaction
to wait. Once a SELECT was added before the COMMIT, conn1
consistently deleted only the committed record, not the pending
one. That is what it should do.
mysql-test/suite/falcon/r/falcon_bug_34351_A.result@stripped, 2008-02-29 17:11:58-06:00, klewis@klewis-mysql. +42 -0
Bug#34351 - Concurrent procedures using CONSISTENT READ.
This test does not have update conflicts because the
INSERT and DELETE are in the same transaction and so the
INSERT is not seen by other transactions.
mysql-test/suite/falcon/r/falcon_bug_34351_A.result@stripped, 2008-02-29 17:11:58-06:00, klewis@klewis-mysql. +0 -0
mysql-test/suite/falcon/r/falcon_bug_34351_B.result@stripped, 2008-02-29 17:11:59-06:00, klewis@klewis-mysql. +100 -0
Bug#34351 - 3 determinant tests that show when a CONSISTENT
READ transaction should block and when it should not.
mysql-test/suite/falcon/r/falcon_bug_34351_B.result@stripped, 2008-02-29 17:11:59-06:00, klewis@klewis-mysql. +0 -0
mysql-test/suite/falcon/r/falcon_bug_34351_C.result@stripped, 2008-02-29 17:12:01-06:00, klewis@klewis-mysql. +41 -0
Bug#34351 - Using 'InnoDB-type' REPEATABLE READ allows
concurrent non-indexed DELETES to wait for each other
and avoid Update Conflicts. This test has an index on
the UUID field, but the MySQL server still uses a
sequential search when reading/locking to find records
to DELETE.
mysql-test/suite/falcon/r/falcon_bug_34351_C.result@stripped, 2008-02-29 17:12:01-06:00, klewis@klewis-mysql. +0 -0
mysql-test/suite/falcon/r/falcon_bug_34351_D.result@stripped, 2008-02-29 17:12:02-06:00, klewis@klewis-mysql. +97 -0
Bug#34351 - 3 determinant tests that show when a CONSISTENT
READ transaction should block and when it should not.
mysql-test/suite/falcon/r/falcon_bug_34351_D.result@stripped, 2008-02-29 17:12:02-06:00, klewis@klewis-mysql. +0 -0
mysql-test/suite/falcon/t/falcon_bug_22160.test@stripped, 2008-02-29 17:11:35-06:00, klewis@klewis-mysql. +6 -1
The changes for Bug#34351 means that the second transaction
in this test does not atempt to lock the inserted record
since it is not visible, even after it was committed.
So the result is now 132 (ER_KEY_NOT_FOUND) instead of
1020 (ER_CHECKREAD or UpdateConflict)
mysql-test/suite/falcon/t/falcon_bug_22165.test@stripped, 2008-02-29 17:11:38-06:00, klewis@klewis-mysql. +3 -3
Cleanup; put SET TRANSACTION outside the while loop.
mysql-test/suite/falcon/t/falcon_bug_22175.test@stripped, 2008-02-29 17:11:42-06:00, klewis@klewis-mysql. +6 -0
This test case has been failing periodically because the timing
between the concurrent clients was not controlled. And when it
failed, it was actually getting the correct results. This test
expected a READ COMMITTED transaction to wait on a pending
record. But there is no reason for a READ COMMITTED transaction
to wait. Once a SELECT was added before the COMMIT, conn1
consistently deleted only the committed record, not the pending
one. That is what it should do.
mysql-test/suite/falcon/t/falcon_bug_34164.test@stripped, 2008-02-29 17:11:45-06:00, klewis@klewis-mysql. +1 -7
Delete unnecessary sleeps.
mysql-test/suite/falcon/t/falcon_bug_34351_A.test@stripped, 2008-02-29 17:11:48-06:00, klewis@klewis-mysql. +92 -0
Bug#34351 - Concurrent procedures using CONSISTENT READ.
This test does not have update conflicts because the
INSERT and DELETE are in the same transaction and so the
INSERT is not seen by other transactions.
mysql-test/suite/falcon/t/falcon_bug_34351_A.test@stripped, 2008-02-29 17:11:48-06:00, klewis@klewis-mysql. +0 -0
mysql-test/suite/falcon/t/falcon_bug_34351_B.test@stripped, 2008-02-29 17:11:50-06:00, klewis@klewis-mysql. +139 -0
Bug#34351 - 3 determinant tests that show when a CONSISTENT
READ transaction should block and when it should not.
mysql-test/suite/falcon/t/falcon_bug_34351_B.test@stripped, 2008-02-29 17:11:50-06:00, klewis@klewis-mysql. +0 -0
mysql-test/suite/falcon/t/falcon_bug_34351_C.test@stripped, 2008-02-29 17:11:52-06:00, klewis@klewis-mysql. +91 -0
Bug#34351 - Using 'InnoDB-type' REPEATABLE READ allows
concurrent non-indexed DELETES to wait for each other
and avoid Update Conflicts. This test has an index on
the UUID field, but the MySQL server still uses a
sequential search when reading/locking to find records
to DELETE.
mysql-test/suite/falcon/t/falcon_bug_34351_C.test@stripped, 2008-02-29 17:11:52-06:00, klewis@klewis-mysql. +0 -0
mysql-test/suite/falcon/t/falcon_bug_34351_D.test@stripped, 2008-02-29 17:11:53-06:00, klewis@klewis-mysql. +138 -0
Bug#34351 - 3 determinant tests that show when a CONSISTENT
READ transaction should block and when it should not.
mysql-test/suite/falcon/t/falcon_bug_34351_D.test@stripped, 2008-02-29 17:11:53-06:00, klewis@klewis-mysql. +0 -0
diff -Nrup a/mysql-test/suite/falcon/r/falcon_bug_22160.result b/mysql-test/suite/falcon/r/falcon_bug_22160.result
--- a/mysql-test/suite/falcon/r/falcon_bug_22160.result 2008-02-06 09:21:10 -06:00
+++ b/mysql-test/suite/falcon/r/falcon_bug_22160.result 2008-02-29 17:11:27 -06:00
@@ -21,7 +21,7 @@ s1
COMMIT;
# Switch to connection conn1
REPLACE INTO t1 VALUES (1);
-ERROR HY000: Record has changed since last read in table 't1'
+ERROR HY000: Can't find record in 't1'
COMMIT;
# Switch to connection default
SELECT count(*) FROM t1;
diff -Nrup a/mysql-test/suite/falcon/r/falcon_bug_22165.result b/mysql-test/suite/falcon/r/falcon_bug_22165.result
--- a/mysql-test/suite/falcon/r/falcon_bug_22165.result 2008-02-22 11:51:52 -06:00
+++ b/mysql-test/suite/falcon/r/falcon_bug_22165.result 2008-02-29 17:11:30 -06:00
@@ -4,8 +4,8 @@ DROP PROCEDURE IF EXISTS db1.p1;
DROP EVENT IF EXISTS db1.e1;
DROP EVENT IF EXISTS db1.e2;
DROP DATABASE IF EXISTS db1;
-CREATE DATABASE db1//
-USE db1//
+CREATE DATABASE db1;
+USE db1;
CREATE PROCEDURE p1 ()
begin
declare v int default 0;
@@ -14,8 +14,8 @@ begin
declare continue handler for sqlexception begin end;
ALTER TABLE t1 MODIFY COLUMN c timestamp;
end;
-while v < 10 do
SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
+while v < 10 do
START TRANSACTION;
INSERT INTO t1 (a, b) VALUES (v, 'a');
UPDATE t1 SET c = current_timestamp WHERE a = v;
diff -Nrup a/mysql-test/suite/falcon/r/falcon_bug_22175.result b/mysql-test/suite/falcon/r/falcon_bug_22175.result
--- a/mysql-test/suite/falcon/r/falcon_bug_22175.result 2007-09-20 10:42:58 -05:00
+++ b/mysql-test/suite/falcon/r/falcon_bug_22175.result 2008-02-29 17:11:33 -06:00
@@ -18,6 +18,10 @@ SET TRANSACTION ISOLATION LEVEL READ COM
START TRANSACTION;
DELETE FROM t1;
# Switch to connection default
+SELECT * FROM t2;
+s1
+5
+6
COMMIT;
# Switch to connection conn1
DELETE FROM t2;
@@ -25,6 +29,7 @@ COMMIT;
# Switch to connection default
SELECT * FROM t1;
s1
+6
SELECT * FROM t2;
s1
DROP TRIGGER t1_bi;
diff -Nrup a/mysql-test/suite/falcon/r/falcon_bug_34351_A.result b/mysql-test/suite/falcon/r/falcon_bug_34351_A.result
--- /dev/null Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon/r/falcon_bug_34351_A.result 2008-02-29 17:11:58 -06:00
@@ -0,0 +1,42 @@
+*** Bug #34351 A ***
+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), KEY (t1_uuid)
+) ENGINE = Falcon;
+CREATE PROCEDURE p1 ()
+begin
+DECLARE my_count INT DEFAULT 0;
+DECLARE my_uuid CHAR(36) DEFAULT 0;
+while my_count < 10000 do
+SET my_uuid = UUID();
+START TRANSACTION;
+INSERT INTO t1 (t1_uuid) VALUES (my_uuid);
+DELETE FROM t1 WHERE t1_uuid IN (my_uuid);
+COMMIT;
+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/r/falcon_bug_34351_B.result b/mysql-test/suite/falcon/r/falcon_bug_34351_B.result
--- /dev/null Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon/r/falcon_bug_34351_B.result 2008-02-29 17:11:59 -06:00
@@ -0,0 +1,100 @@
+*** Bug #34351 ***
+SET @@storage_engine = 'Falcon';
+DROP TABLE IF EXISTS t1;
+# 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), KEY (t1_uuid)
+) ENGINE = Falcon;
+# Test #1 Filter on UUID Without a transaction
+SET @default_uuid = UUID();
+INSERT INTO t1 (t1_uuid) VALUES (@default_uuid);
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+t1_autoinc
+1
+START TRANSACTION;
+DELETE FROM t1 WHERE t1_uuid = (@default_uuid);
+# Switch to connection conn1
+SET @conn1_uuid = UUID();
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+t1_autoinc
+1
+INSERT INTO t1 (t1_uuid) VALUES (@conn1_uuid);
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+t1_autoinc
+1
+2
+DELETE FROM t1 WHERE t1_uuid = (@conn1_uuid);
+# Switch to connection default
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+t1_autoinc
+COMMIT;
+# Switch to connection conn1
+ERROR HY000: Record has changed since last read in table 't1'
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+t1_autoinc
+2
+DELETE FROM t1 WHERE t1_uuid = (@conn1_uuid);
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+t1_autoinc
+# Test #2 Filter on UUID With a transaction
+# Switch to connection default
+START TRANSACTION;
+SET @default_uuid = UUID();
+INSERT INTO t1 (t1_uuid) VALUES (@default_uuid);
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+t1_autoinc
+3
+DELETE FROM t1 WHERE t1_uuid = (@default_uuid);
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+t1_autoinc
+# Switch to connection conn1
+SET @conn1_uuid = UUID();
+START TRANSACTION;
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+t1_autoinc
+INSERT INTO t1 (t1_uuid) VALUES (@conn1_uuid);
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+t1_autoinc
+4
+DELETE FROM t1 WHERE t1_uuid = (@conn1_uuid);
+# Switch to connection default
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+t1_autoinc
+COMMIT;
+# Switch to connection conn1
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+t1_autoinc
+# Test #3 Filter on INT With a transaction
+# Switch to connection default
+START TRANSACTION;
+SET @default_uuid = UUID();
+INSERT INTO t1 VALUES (11, @default_uuid);
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+t1_autoinc
+11
+DELETE FROM t1 WHERE t1_uuid = (@default_uuid);
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+t1_autoinc
+# Switch to connection conn1
+SET @conn1_uuid = UUID();
+INSERT INTO t1 VALUES (12, @conn1_uuid);
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+t1_autoinc
+12
+DELETE FROM t1 WHERE t1_autoinc = 12;
+# Switch to connection default
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+t1_autoinc
+COMMIT;
+# Switch to connection conn1
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+t1_autoinc
+# Switch to connection default
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+t1_autoinc
+DROP TABLE IF EXISTS t1;
diff -Nrup a/mysql-test/suite/falcon/r/falcon_bug_34351_C.result b/mysql-test/suite/falcon/r/falcon_bug_34351_C.result
--- /dev/null Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon/r/falcon_bug_34351_C.result 2008-02-29 17:12:01 -06:00
@@ -0,0 +1,41 @@
+*** Bug #34351 A ***
+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), key(t1_uuid)
+) 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/r/falcon_bug_34351_D.result b/mysql-test/suite/falcon/r/falcon_bug_34351_D.result
--- /dev/null Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon/r/falcon_bug_34351_D.result 2008-02-29 17:12:02 -06:00
@@ -0,0 +1,97 @@
+*** Bug #34351 D ***
+SET @@storage_engine = 'Falcon';
+DROP TABLE IF EXISTS t1;
+# Establish connection conn1 (user = root)
+SET @@autocommit = 1;
+SET FALCON_CONSISTENT_READ=OFF;
+# Switch to connection default
+SET @@autocommit = 1;
+SET FALCON_CONSISTENT_READ=OFF;
+CREATE TABLE t1 (
+t1_autoinc INTEGER NOT NULL AUTO_INCREMENT,
+t1_uuid CHAR(36),
+PRIMARY KEY (t1_autoinc), KEY (t1_uuid)
+) ENGINE = Falcon;
+# Test #1 Filter on UUID Without a transaction
+SET @default_uuid = UUID();
+INSERT INTO t1 (t1_uuid) VALUES (@default_uuid);
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+t1_autoinc
+1
+START TRANSACTION;
+DELETE FROM t1 WHERE t1_uuid = (@default_uuid);
+# Switch to connection conn1
+SET @conn1_uuid = UUID();
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+t1_autoinc
+1
+INSERT INTO t1 (t1_uuid) VALUES (@conn1_uuid);
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+t1_autoinc
+1
+2
+DELETE FROM t1 WHERE t1_uuid = (@conn1_uuid);
+# Switch to connection default
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+t1_autoinc
+COMMIT;
+# Switch to connection conn1
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+t1_autoinc
+# Test #2 Filter on UUID With a transaction
+# Switch to connection default
+START TRANSACTION;
+SET @default_uuid = UUID();
+INSERT INTO t1 (t1_uuid) VALUES (@default_uuid);
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+t1_autoinc
+3
+DELETE FROM t1 WHERE t1_uuid = (@default_uuid);
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+t1_autoinc
+# Switch to connection conn1
+SET @conn1_uuid = UUID();
+START TRANSACTION;
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+t1_autoinc
+INSERT INTO t1 (t1_uuid) VALUES (@conn1_uuid);
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+t1_autoinc
+4
+DELETE FROM t1 WHERE t1_uuid = (@conn1_uuid);
+# Switch to connection default
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+t1_autoinc
+COMMIT;
+# Switch to connection conn1
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+t1_autoinc
+# Test #3 Filter on INT With a transaction
+# Switch to connection default
+START TRANSACTION;
+SET @default_uuid = UUID();
+INSERT INTO t1 VALUES (11, @default_uuid);
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+t1_autoinc
+11
+DELETE FROM t1 WHERE t1_uuid = (@default_uuid);
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+t1_autoinc
+# Switch to connection conn1
+SET @conn1_uuid = UUID();
+INSERT INTO t1 VALUES (12, @conn1_uuid);
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+t1_autoinc
+12
+DELETE FROM t1 WHERE t1_autoinc = 12;
+# Switch to connection default
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+t1_autoinc
+COMMIT;
+# Switch to connection conn1
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+t1_autoinc
+# Switch to connection default
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+t1_autoinc
+DROP TABLE IF EXISTS t1;
diff -Nrup a/mysql-test/suite/falcon/t/falcon_bug_22160.test b/mysql-test/suite/falcon/t/falcon_bug_22160.test
--- a/mysql-test/suite/falcon/t/falcon_bug_22160.test 2008-02-06 09:21:11 -06:00
+++ b/mysql-test/suite/falcon/t/falcon_bug_22160.test 2008-02-29 17:11:35 -06:00
@@ -1,6 +1,11 @@
--source include/have_falcon.inc
#
# Bug #22160: REPLACE crash with two interleaving transactions
+# The changes for Bug#34351 means that the second transaction
+# in this test does not atempt to lock the inserted record
+# since it is not visible, even after it was committed.
+# So the result is now 132 (ER_KEY_NOT_FOUND) instead of
+# 1020 (ER_CHECKREAD or UpdateConflict)
#
--echo *** Bug #22160 ***
@@ -47,7 +52,7 @@ COMMIT;
--echo # Switch to connection conn1
connection conn1;
--real_sleep 1
---error ER_CHECKREAD
+--error ER_KEY_NOT_FOUND
REPLACE INTO t1 VALUES (1);
COMMIT;
diff -Nrup a/mysql-test/suite/falcon/t/falcon_bug_22165.test b/mysql-test/suite/falcon/t/falcon_bug_22165.test
--- a/mysql-test/suite/falcon/t/falcon_bug_22165.test 2008-02-22 11:51:53 -06:00
+++ b/mysql-test/suite/falcon/t/falcon_bug_22165.test 2008-02-29 17:11:38 -06:00
@@ -17,9 +17,9 @@ DROP EVENT IF EXISTS db1.e2;
DROP DATABASE IF EXISTS db1;
--enable_warnings
+CREATE DATABASE db1;
+USE db1;
delimiter //;
-CREATE DATABASE db1//
-USE db1//
CREATE PROCEDURE p1 ()
begin
declare v int default 0;
@@ -28,8 +28,8 @@ begin
declare continue handler for sqlexception begin end;
ALTER TABLE t1 MODIFY COLUMN c timestamp;
end;
+ SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
while v < 10 do
- SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
START TRANSACTION;
INSERT INTO t1 (a, b) VALUES (v, 'a');
UPDATE t1 SET c = current_timestamp WHERE a = v;
diff -Nrup a/mysql-test/suite/falcon/t/falcon_bug_22175.test b/mysql-test/suite/falcon/t/falcon_bug_22175.test
--- a/mysql-test/suite/falcon/t/falcon_bug_22175.test 2007-09-28 23:30:36 -05:00
+++ b/mysql-test/suite/falcon/t/falcon_bug_22175.test 2008-02-29 17:11:42 -06:00
@@ -1,7 +1,12 @@
--source include/have_falcon.inc
--source include/have_innodb.inc
+#--disable_abort_on_error
#
# Bug #22175: Mixing with InnoDB table leads to an anomaly
+# The second client running a read-committed transaction should
+# not wait on any pending transaction. It only deletes the
+# committed record (5). Since record (6) is committed later,
+# it is not deleted by conn1
#
--echo #---- Bug 22175 ----
--disable_warnings
@@ -33,6 +38,7 @@ START TRANSACTION;
--echo # Switch to connection default
connection default;
+SELECT * FROM t2;
COMMIT;
--echo # Switch to connection conn1
diff -Nrup a/mysql-test/suite/falcon/t/falcon_bug_34164.test b/mysql-test/suite/falcon/t/falcon_bug_34164.test
--- a/mysql-test/suite/falcon/t/falcon_bug_34164.test 2008-02-25 13:29:25 -06:00
+++ b/mysql-test/suite/falcon/t/falcon_bug_34164.test 2008-02-29 17:11:45 -06:00
@@ -34,11 +34,9 @@ INSERT INTO t1 VALUES (4,4);
# --- with FALCON_CONSISTENT_READ=OFF --- #
# ----------------------------------------------------- #
---real_sleep=2
--echo # Establish connection conn1 (user = root)
connect (conn1,localhost,root,,);
connection conn1;
---real_sleep=1
USE test2;
#SET @@autocommit=1;
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
@@ -50,7 +48,6 @@ UPDATE t1 SET b = 11 WHERE a = 1;
--echo # Establish connection conn2 (user = root)
connect (conn2,localhost,root,,);
connection conn2;
---real_sleep=1
USE test2;
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
SHOW VARIABLES LIKE 'tx_isolation';
@@ -59,8 +56,8 @@ SELECT * FROM t1;
--send UPDATE t1 SET b = 111 WHERE a = 1
--echo # Switch to conn1
connection conn1;
-COMMIT;
--real_sleep=1
+COMMIT;
--echo # Switch to conn2
connection conn2;
--reap
@@ -82,7 +79,6 @@ SELECT * FROM t1;
UPDATE t1 SET b = 22 WHERE a = 2;
--echo # Switch to conn2
connection conn2;
---real_sleep=1
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SHOW VARIABLES LIKE 'tx_isolation';
START TRANSACTION;
@@ -121,7 +117,6 @@ UPDATE t1 SET b = 33 WHERE a = 3;
--echo # Establish connection conn4 (user = root)
connect (conn4,localhost,root,,);
connection conn4;
---real_sleep=1
USE test2;
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
SHOW VARIABLES LIKE 'tx_isolation';
@@ -154,7 +149,6 @@ SELECT * FROM t1;
UPDATE t1 SET b = 44 WHERE a = 4;
--echo # Switch to conn4
connection conn4;
---real_sleep=1
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SHOW VARIABLES LIKE 'tx_isolation';
START TRANSACTION;
diff -Nrup a/mysql-test/suite/falcon/t/falcon_bug_34351_A.test b/mysql-test/suite/falcon/t/falcon_bug_34351_A.test
--- /dev/null Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon/t/falcon_bug_34351_A.test 2008-02-29 17:11:48 -06:00
@@ -0,0 +1,92 @@
+--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.
+#
+--echo *** Bug #34351 A ***
+
+# ----------------------------------------------------- #
+# --- 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), KEY (t1_uuid)
+) 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;
+ while my_count < 10000 do
+ SET my_uuid = UUID();
+ START TRANSACTION;
+ INSERT INTO t1 (t1_uuid) VALUES (my_uuid);
+ DELETE FROM t1 WHERE t1_uuid IN (my_uuid);
+ COMMIT;
+ 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/mysql-test/suite/falcon/t/falcon_bug_34351_B.test b/mysql-test/suite/falcon/t/falcon_bug_34351_B.test
--- /dev/null Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon/t/falcon_bug_34351_B.test 2008-02-29 17:11:50 -06:00
@@ -0,0 +1,139 @@
+--source include/have_falcon.inc
+#--disable_abort_on_error
+#
+# Bug #34351: Update Conflict on non-overlapping transactions
+#
+--echo *** Bug #34351 ***
+
+# ----------------------------------------------------- #
+# --- Initialisation --- #
+# ----------------------------------------------------- #
+let $engine = 'Falcon';
+eval SET @@storage_engine = $engine;
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--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), KEY (t1_uuid)
+) ENGINE = Falcon;
+
+# ----------------------------------------------------- #
+# --- Test #1 Filter on UUID Without a transaction --- #
+# ----------------------------------------------------- #
+
+--echo # Test #1 Filter on UUID Without a transaction
+SET @default_uuid = UUID();
+INSERT INTO t1 (t1_uuid) VALUES (@default_uuid);
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+START TRANSACTION;
+DELETE FROM t1 WHERE t1_uuid = (@default_uuid);
+
+--echo # Switch to connection conn1
+connection conn1;
+SET @conn1_uuid = UUID();
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+INSERT INTO t1 (t1_uuid) VALUES (@conn1_uuid);
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+--send DELETE FROM t1 WHERE t1_uuid = (@conn1_uuid)
+
+--echo # Switch to connection default
+connection default;
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+COMMIT;
+
+--echo # Switch to connection conn1
+connection conn1;
+--error 1020
+reap;
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+DELETE FROM t1 WHERE t1_uuid = (@conn1_uuid);
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+
+# ----------------------------------------------------- #
+# --- Test #2 Filter on UUID With a transaction --- #
+# ----------------------------------------------------- #
+
+--echo # Test #2 Filter on UUID With a transaction
+--echo # Switch to connection default
+connection default;
+START TRANSACTION;
+SET @default_uuid = UUID();
+INSERT INTO t1 (t1_uuid) VALUES (@default_uuid);
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+DELETE FROM t1 WHERE t1_uuid = (@default_uuid);
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+
+--echo # Switch to connection conn1
+connection conn1;
+SET @conn1_uuid = UUID();
+START TRANSACTION;
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+INSERT INTO t1 (t1_uuid) VALUES (@conn1_uuid);
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+--send DELETE FROM t1 WHERE t1_uuid = (@conn1_uuid)
+
+--echo # Switch to connection default
+connection default;
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+COMMIT;
+
+--echo # Switch to connection conn1
+connection conn1;
+reap;
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+
+
+# ----------------------------------------------------- #
+# --- Test #3 Filter on INT Without a transaction --- #
+# ----------------------------------------------------- #
+--echo # Test #3 Filter on INT With a transaction
+--echo # Switch to connection default
+connection default;
+START TRANSACTION;
+SET @default_uuid = UUID();
+INSERT INTO t1 VALUES (11, @default_uuid);
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+DELETE FROM t1 WHERE t1_uuid = (@default_uuid);
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+
+--echo # Switch to connection conn1
+connection conn1;
+SET @conn1_uuid = UUID();
+INSERT INTO t1 VALUES (12, @conn1_uuid);
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+DELETE FROM t1 WHERE t1_autoinc = 12;
+
+--echo # Switch to connection default
+connection default;
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+COMMIT;
+
+# ----------------------------------------------------- #
+# --- Check --- #
+# ----------------------------------------------------- #
+
+--echo # Switch to connection conn1
+connection conn1;
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+
+--echo # Switch to connection default
+connection default;
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+
+# ----------------------------------------------------- #
+# --- Final cleanup --- #
+# ----------------------------------------------------- #
+disconnect conn1;
+DROP TABLE IF EXISTS t1;
diff -Nrup a/mysql-test/suite/falcon/t/falcon_bug_34351_C.test b/mysql-test/suite/falcon/t/falcon_bug_34351_C.test
--- /dev/null Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon/t/falcon_bug_34351_C.test 2008-02-29 17:11:52 -06:00
@@ -0,0 +1,91 @@
+--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.
+#
+--echo *** Bug #34351 A ***
+
+# ----------------------------------------------------- #
+# --- 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), key(t1_uuid)
+) 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/mysql-test/suite/falcon/t/falcon_bug_34351_D.test b/mysql-test/suite/falcon/t/falcon_bug_34351_D.test
--- /dev/null Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon/t/falcon_bug_34351_D.test 2008-02-29 17:11:53 -06:00
@@ -0,0 +1,138 @@
+--source include/have_falcon.inc
+#--disable_abort_on_error
+#
+# Bug #34351 D: Update Conflict on non-overlapping transactions
+#
+--echo *** Bug #34351 D ***
+
+# ----------------------------------------------------- #
+# --- Initialisation --- #
+# ----------------------------------------------------- #
+let $engine = 'Falcon';
+eval SET @@storage_engine = $engine;
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+--echo # Establish connection conn1 (user = root)
+connect (conn1,localhost,root,,);
+SET @@autocommit = 1;
+SET FALCON_CONSISTENT_READ=OFF;
+
+--echo # Switch to connection default
+connection default;
+SET @@autocommit = 1;
+SET FALCON_CONSISTENT_READ=OFF;
+
+CREATE TABLE t1 (
+ t1_autoinc INTEGER NOT NULL AUTO_INCREMENT,
+ t1_uuid CHAR(36),
+ PRIMARY KEY (t1_autoinc), KEY (t1_uuid)
+) ENGINE = Falcon;
+
+# ----------------------------------------------------- #
+# --- Test #1 Filter on UUID Without a transaction --- #
+# ----------------------------------------------------- #
+
+--echo # Test #1 Filter on UUID Without a transaction
+SET @default_uuid = UUID();
+INSERT INTO t1 (t1_uuid) VALUES (@default_uuid);
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+START TRANSACTION;
+DELETE FROM t1 WHERE t1_uuid = (@default_uuid);
+
+--echo # Switch to connection conn1
+connection conn1;
+SET @conn1_uuid = UUID();
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+INSERT INTO t1 (t1_uuid) VALUES (@conn1_uuid);
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+--send DELETE FROM t1 WHERE t1_uuid = (@conn1_uuid)
+
+--echo # Switch to connection default
+connection default;
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+COMMIT;
+
+--echo # Switch to connection conn1
+connection conn1;
+reap;
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+
+# ----------------------------------------------------- #
+# --- Test #2 Filter on UUID With a transaction --- #
+# ----------------------------------------------------- #
+
+--echo # Test #2 Filter on UUID With a transaction
+--echo # Switch to connection default
+connection default;
+START TRANSACTION;
+SET @default_uuid = UUID();
+INSERT INTO t1 (t1_uuid) VALUES (@default_uuid);
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+DELETE FROM t1 WHERE t1_uuid = (@default_uuid);
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+
+--echo # Switch to connection conn1
+connection conn1;
+SET @conn1_uuid = UUID();
+START TRANSACTION;
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+INSERT INTO t1 (t1_uuid) VALUES (@conn1_uuid);
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+--send DELETE FROM t1 WHERE t1_uuid = (@conn1_uuid)
+
+--echo # Switch to connection default
+connection default;
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+COMMIT;
+
+--echo # Switch to connection conn1
+connection conn1;
+reap;
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+
+
+# ----------------------------------------------------- #
+# --- Test #3 Filter on INT Without a transaction --- #
+# ----------------------------------------------------- #
+--echo # Test #3 Filter on INT With a transaction
+--echo # Switch to connection default
+connection default;
+START TRANSACTION;
+SET @default_uuid = UUID();
+INSERT INTO t1 VALUES (11, @default_uuid);
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+DELETE FROM t1 WHERE t1_uuid = (@default_uuid);
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+
+--echo # Switch to connection conn1
+connection conn1;
+SET @conn1_uuid = UUID();
+INSERT INTO t1 VALUES (12, @conn1_uuid);
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+DELETE FROM t1 WHERE t1_autoinc = 12;
+
+--echo # Switch to connection default
+connection default;
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+COMMIT;
+
+# ----------------------------------------------------- #
+# --- Check --- #
+# ----------------------------------------------------- #
+
+--echo # Switch to connection conn1
+connection conn1;
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+
+--echo # Switch to connection default
+connection default;
+SELECT t1_autoinc FROM t1 ORDER BY t1_autoinc;
+
+# ----------------------------------------------------- #
+# --- Final cleanup --- #
+# ----------------------------------------------------- #
+disconnect conn1;
+DROP TABLE IF EXISTS t1;
| Thread |
|---|
| • bk commit into 6.0 tree (klewis:1.2582) | klewis | 1 Mar |