List:Commits« Previous MessageNext Message »
From:klewis Date:February 5 2008 7:06am
Subject:bk commit into 6.0 tree (klewis:1.2804) BUG#34164
View as plain text  
Below is the list of changes that have just been committed into a local
6.0 repository of . When  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-05 01:05:47-06:00, klewis@klewis-mysql. +3 -0
  Bug#34164 - Re-wrote test case for 34164 so that it displays 
  the autoselected repetable-read mode in a more straightforward
  manner, using updates on previously committed record
  instead of inserts.  Settings are made more carefully
  using 4 new connections.

  mysql-test/suite/falcon/r/falcon_bug_34164.result@stripped, 2008-02-05 01:05:28-06:00, klewis@klewis-mysql. +130 -24
    Bug#34164 - Re-wrote test case for 34164 so that it displays 
    the autoselected repetable-read mode in a more straightforward
    manner, using updates on previously committed record
    instead of inserts.  Settings are made more carefully
    using 4 new connections.

  mysql-test/suite/falcon/t/falcon_bug_22189.test@stripped, 2008-02-05 01:05:32-06:00, klewis@klewis-mysql. +1 -1
    Use the name of the error instead of the number.

  mysql-test/suite/falcon/t/falcon_bug_34164.test@stripped, 2008-02-05 01:05:35-06:00, klewis@klewis-mysql. +123 -21
    Bug#34164 - Re-wrote test case for 34164 so that it displays 
    the autoselected repetable-read mode in a more straightforward
    manner, using updates on previously committed record
    instead of inserts.  Settings are made more carefully
    using 4 new connections.

diff -Nrup a/mysql-test/suite/falcon/r/falcon_bug_34164.result b/mysql-test/suite/falcon/r/falcon_bug_34164.result
--- a/mysql-test/suite/falcon/r/falcon_bug_34164.result	2008-01-31 16:48:13 -06:00
+++ b/mysql-test/suite/falcon/r/falcon_bug_34164.result	2008-02-05 01:05:28 -06:00
@@ -1,10 +1,14 @@
-SET storage_engine = Falcon;
 *** Bug #34164 ***
+SET @@storage_engine = 'Falcon';
 DROP DATABASE IF EXISTS test2;
 SET GLOBAL FALCON_CONSISTENT_READ=OFF;
 CREATE DATABASE test2;
 USE test2;
 CREATE TABLE t1 (a int primary key, b int) engine=falcon;
+INSERT INTO t1 VALUES (1,1);
+INSERT INTO t1 VALUES (2,2);
+INSERT INTO t1 VALUES (3,3);
+INSERT INTO t1 VALUES (4,4);
 # Establish connection conn1 (user = root)
 USE test2;
 SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
@@ -17,16 +21,44 @@ falcon_consistent_read	OFF
 START TRANSACTION;
 SELECT * FROM t1;
 a	b
+1	1
+2	2
+3	3
+4	4
 Warnings:
 Warning	1568	Falcon does not support SERIALIZABLE ISOLATION, using REPEATABLE READ instead.
-INSERT INTO t1 VALUES (1,1);
+UPDATE t1 SET b = 11 WHERE a = 1;
 Warnings:
 Warning	1568	Falcon does not support SERIALIZABLE ISOLATION, using REPEATABLE READ instead.
-UPDATE t1 SET b = 11 WHERE a = 1;
+# Establish connection conn2 (user = root)
+USE test2;
+SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
+SHOW VARIABLES LIKE 'tx_isolation';
+Variable_name	Value
+tx_isolation	SERIALIZABLE
+START TRANSACTION;
+SELECT * FROM t1;
+a	b
+1	1
+2	2
+3	3
+4	4
+Warnings:
+Warning	1568	Falcon does not support SERIALIZABLE ISOLATION, using REPEATABLE READ instead.
+UPDATE t1 SET b = 111 WHERE a = 1;
+# Switch to conn1
 COMMIT;
+# Switch to conn2
+Warnings:
+Warning	1568	Falcon does not support SERIALIZABLE ISOLATION, using REPEATABLE READ instead.
 SELECT * FROM t1;
 a	b
-1	11
+1	111
+2	2
+3	3
+4	4
+COMMIT;
+# Switch to conn1
 SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
 SHOW VARIABLES LIKE 'tx_isolation';
 Variable_name	Value
@@ -37,20 +69,45 @@ falcon_consistent_read	OFF
 START TRANSACTION;
 SELECT * FROM t1;
 a	b
-1	11
+1	111
+2	2
+3	3
+4	4
 Warnings:
 Warning	1568	Falcon does not support READ UNCOMMITTED ISOLATION, using REPEATABLE READ instead.
-INSERT INTO t1 VALUES (2,2);
+UPDATE t1 SET b = 22 WHERE a = 2;
 Warnings:
 Warning	1568	Falcon does not support READ UNCOMMITTED ISOLATION, using REPEATABLE READ instead.
-UPDATE t1 SET b = 22 WHERE a = 2;
+# Switch to conn2
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SHOW VARIABLES LIKE 'tx_isolation';
+Variable_name	Value
+tx_isolation	READ-UNCOMMITTED
+START TRANSACTION;
+SELECT * FROM t1;
+a	b
+1	111
+2	2
+3	3
+4	4
+Warnings:
+Warning	1568	Falcon does not support READ UNCOMMITTED ISOLATION, using REPEATABLE READ instead.
+UPDATE t1 SET b = 222 WHERE a = 2;
+# Switch to conn1
 COMMIT;
+# Switch to conn2
+Warnings:
+Warning	1568	Falcon does not support READ UNCOMMITTED ISOLATION, using REPEATABLE READ instead.
 SELECT * FROM t1;
 a	b
-1	11
-2	22
+1	111
+2	222
+3	3
+4	4
+COMMIT;
+# Switch to default connection
 SET GLOBAL FALCON_CONSISTENT_READ=ON;
-# Establish connection conn2 (user = root)
+# Establish connection conn3 (user = root)
 USE test2;
 SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
 SHOW VARIABLES LIKE 'tx_isolation';
@@ -62,20 +119,43 @@ falcon_consistent_read	ON
 START TRANSACTION;
 SELECT * FROM t1;
 a	b
-1	11
-2	22
+1	111
+2	222
+3	3
+4	4
 Warnings:
 Warning	1568	Falcon does not support SERIALIZABLE ISOLATION, using REPEATABLE READ instead.
-INSERT INTO t1 VALUES (3,3);
+UPDATE t1 SET b = 33 WHERE a = 3;
 Warnings:
 Warning	1568	Falcon does not support SERIALIZABLE ISOLATION, using REPEATABLE READ instead.
-UPDATE t1 SET b = 33 WHERE a = 3;
+# Establish connection conn4 (user = root)
+USE test2;
+SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
+SHOW VARIABLES LIKE 'tx_isolation';
+Variable_name	Value
+tx_isolation	SERIALIZABLE
+START TRANSACTION;
+SELECT * FROM t1;
+a	b
+1	111
+2	222
+3	3
+4	4
+Warnings:
+Warning	1568	Falcon does not support SERIALIZABLE ISOLATION, using REPEATABLE READ instead.
+UPDATE t1 SET b = 333 WHERE a = 3;
+# Switch to conn3
 COMMIT;
+# Switch to conn4
+ERROR HY000: Record has changed since last read in table 't1'
 SELECT * FROM t1;
 a	b
-1	11
-2	22
+1	111
+2	222
 3	3
+4	4
+COMMIT;
+# Switch to conn3
 SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
 SHOW VARIABLES LIKE 'tx_isolation';
 Variable_name	Value
@@ -86,21 +166,47 @@ falcon_consistent_read	ON
 START TRANSACTION;
 SELECT * FROM t1;
 a	b
-1	11
-2	22
-3	3
+1	111
+2	222
+3	33
+4	4
 Warnings:
 Warning	1568	Falcon does not support READ UNCOMMITTED ISOLATION, using REPEATABLE READ instead.
-INSERT INTO t1 VALUES (4,4);
+UPDATE t1 SET b = 44 WHERE a = 4;
 Warnings:
 Warning	1568	Falcon does not support READ UNCOMMITTED ISOLATION, using REPEATABLE READ instead.
-UPDATE t1 SET b = 44 WHERE a = 4;
+# Switch to conn4
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SHOW VARIABLES LIKE 'tx_isolation';
+Variable_name	Value
+tx_isolation	READ-UNCOMMITTED
+START TRANSACTION;
+SELECT * FROM t1;
+a	b
+1	111
+2	222
+3	33
+4	4
+Warnings:
+Warning	1568	Falcon does not support READ UNCOMMITTED ISOLATION, using REPEATABLE READ instead.
+UPDATE t1 SET b = 444 WHERE a = 4;
+# Switch to conn3
 COMMIT;
+# Switch to conn4
+ERROR HY000: Record has changed since last read in table 't1'
 SELECT * FROM t1;
 a	b
-1	11
-2	22
-3	3
+1	111
+2	222
+3	33
 4	4
+COMMIT;
+SELECT * FROM t1;
+a	b
+1	111
+2	222
+3	33
+4	44
+# Switch to default connection and cleanup other connections
 DROP DATABASE test2;
 USE test;
diff -Nrup a/mysql-test/suite/falcon/t/falcon_bug_22189.test b/mysql-test/suite/falcon/t/falcon_bug_22189.test
--- a/mysql-test/suite/falcon/t/falcon_bug_22189.test	2007-09-28 23:30:36 -05:00
+++ b/mysql-test/suite/falcon/t/falcon_bug_22189.test	2008-02-05 01:05:32 -06:00
@@ -61,7 +61,7 @@ ROLLBACK;
 --echo # Switch to connection conn1
 connection conn1;
 INSERT INTO x1 VALUES (0,6);
---error 1062
+--error ER_DUP_ENTRY
 INSERT INTO x1 VALUES (0,6);
 
 --echo # Switch to connection default
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-01-31 16:48:15 -06:00
+++ b/mysql-test/suite/falcon/t/falcon_bug_34164.test	2008-02-05 01:05:35 -06:00
@@ -1,89 +1,191 @@
 --disable_abort_on_error
 --source include/have_falcon.inc
-
-SET storage_engine = Falcon;
 #
 # Bug #34164: Serializable Transaction asserts
 #
 --echo *** Bug #34164 ***
+
+# ----------------------------------------------------- #
+# --- Initialisation                                --- #
+# ----------------------------------------------------- #
+let $engine = 'Falcon';
+eval SET @@storage_engine = $engine;
+
 --disable_warnings
 DROP DATABASE IF EXISTS test2;
 --enable_warnings
 
+# ----------------------------------------------------- #
+# --- Test                                          --- #
+# ----------------------------------------------------- #
+
 SET GLOBAL FALCON_CONSISTENT_READ=OFF;
 CREATE DATABASE test2;
 USE test2;
+#SET @@autocommit=1;
 CREATE TABLE t1 (a int primary key, b int) engine=falcon;
+INSERT INTO t1 VALUES (1,1);
+INSERT INTO t1 VALUES (2,2);
+INSERT INTO t1 VALUES (3,3);
+INSERT INTO t1 VALUES (4,4);
 
+# ----------------------------------------------------- #
+# --- Check SERIALIZABLE                            --- #
+# --- 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;
 SHOW VARIABLES LIKE 'tx_isolation';
 SHOW VARIABLES LIKE 'falcon_consistent_read';
 START TRANSACTION;
 SELECT * FROM t1;
-INSERT INTO t1 VALUES (1,1);
-connection default;
---send UPDATE t1 SET b = 11 WHERE a = 1
+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';
+START TRANSACTION;
+SELECT * FROM t1;
+--send UPDATE t1 SET b = 111 WHERE a = 1
+--echo # Switch to conn1
 connection conn1;
 COMMIT;
-connection default;
+--real_sleep=1
+--echo # Switch to conn2
+connection conn2;
 --reap
 SELECT * FROM t1;
+COMMIT;
 
+# ----------------------------------------------------- #
+# --- Check READ UNCOMMITTED                        --- #
+# --- with FALCON_CONSISTENT_READ=OFF               --- #
+# ----------------------------------------------------- #
 
+--echo # Switch to conn1
 connection conn1;
 SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
 SHOW VARIABLES LIKE 'tx_isolation';
 SHOW VARIABLES LIKE 'falcon_consistent_read';
 START TRANSACTION;
 SELECT * FROM t1;
-INSERT INTO t1 VALUES (2,2);
-connection default;
---send UPDATE t1 SET b = 22 WHERE a = 2
+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;
+SELECT * FROM t1;
+--send UPDATE t1 SET b = 222 WHERE a = 2
+--echo # Switch to conn1
 connection conn1;
+--real_sleep=1
 COMMIT;
-connection default;
+--echo # Switch to conn2
+connection conn2;
 --reap
 SELECT * FROM t1;
+COMMIT;
 
 
+# ----------------------------------------------------- #
+# --- Check SERIALIZABLE                            --- #
+# --- with FALCON_CONSISTENT_READ=ON                --- #
+# ----------------------------------------------------- #
+
+--echo # Switch to default connection
+connection default;
 SET GLOBAL FALCON_CONSISTENT_READ=ON;
---echo # Establish connection conn2 (user = root)
-connect (conn2,localhost,root,,);
-connection conn2;
+--echo # Establish connection conn3 (user = root)
+connect (conn3,localhost,root,,);
+connection conn3;
 USE test2;
+#SET @@autocommit=1;
 SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
 SHOW VARIABLES LIKE 'tx_isolation';
 SHOW VARIABLES LIKE 'falcon_consistent_read';
 START TRANSACTION;
 SELECT * FROM t1;
-INSERT INTO t1 VALUES (3,3);
-connection default;
 UPDATE t1 SET b = 33 WHERE a = 3;
-connection conn2;
+--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';
+START TRANSACTION;
+SELECT * FROM t1;
+--send UPDATE t1 SET b = 333 WHERE a = 3
+--echo # Switch to conn3
+connection conn3;
+--real_sleep=1
 COMMIT;
+--echo # Switch to conn4
+connection conn4;
+--error 1020
+--reap
 SELECT * FROM t1;
+COMMIT;
 
-connection conn2;
+# ----------------------------------------------------- #
+# --- Check READ UNCOMMITTED                        --- #
+# --- with FALCON_CONSISTENT_READ=ON                --- #
+# ----------------------------------------------------- #
+
+--echo # Switch to conn3
+connection conn3;
 SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
 SHOW VARIABLES LIKE 'tx_isolation';
 SHOW VARIABLES LIKE 'falcon_consistent_read';
 START TRANSACTION;
 SELECT * FROM t1;
-INSERT INTO t1 VALUES (4,4);
-connection default;
 UPDATE t1 SET b = 44 WHERE a = 4;
-connection conn2;
+--echo # Switch to conn4
+connection conn4;
+--real_sleep=1
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SHOW VARIABLES LIKE 'tx_isolation';
+START TRANSACTION;
+SELECT * FROM t1;
+--send UPDATE t1 SET b = 444 WHERE a = 4
+--echo # Switch to conn3
+connection conn3;
+--real_sleep=1
+COMMIT;
+--echo # Switch to conn4
+connection conn4;
+--error 1020
+--reap
+SELECT * FROM t1;
 COMMIT;
 SELECT * FROM t1;
 
 
-# Final cleanup
+# ----------------------------------------------------- #
+# --- Final cleanup                                 --- #
+# ----------------------------------------------------- #
+--echo # Switch to default connection and cleanup other connections
 connection default;
 disconnect conn1;
 disconnect conn2;
+disconnect conn3;
+disconnect conn4;
 DROP DATABASE test2;
 USE test;
+
+
+
+
+
Thread
bk commit into 6.0 tree (klewis:1.2804) BUG#34164klewis5 Feb