MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:klewis Date:January 31 2008 5:19pm
Subject:bk commit into 6.0 tree (klewis:1.2794) 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-01-31 11:19:15-06:00, klewis@klewis-mysql. +2 -0
  Bug#34164 - Added code to allow serializable mode and read-uncommitted 
  mode to be automatically switched with the current version of repeatable read.  
  That is, it looks at the current value of falcon_consistent_read and sets 
  the the atctual isolation accordingly.

  storage/falcon/Table.cpp@stripped, 2008-01-31 11:19:00-06:00, klewis@klewis-mysql. +1 -2
    Delete extra call to isDuplicate used in debugging.

  storage/falcon/ha_falcon.cpp@stripped, 2008-01-31 11:19:03-06:00, klewis@klewis-mysql. +17 -7
    Bug#34164 - Added code to allow serializable mode and read-uncommitted 
    mode to be automatically switched with the current version of repeatable read.  
    That is, it looks at the current value of falcon_consistent_read and sets 
    the the atctual isolation accordingly.

diff -Nrup a/storage/falcon/Table.cpp b/storage/falcon/Table.cpp
--- a/storage/falcon/Table.cpp	2008-01-30 16:44:10 -06:00
+++ b/storage/falcon/Table.cpp	2008-01-31 11:19:00 -06:00
@@ -2479,8 +2479,7 @@ int Table::checkUniqueRecordVersion(int3
 
 			const char *text = "duplicate values for key %s in table %s.%s";
 			int code = UNIQUE_DUPLICATE;
-			isDuplicate(index, record, dup);
-			
+
 			if (state == Deadlock)
 				{
 				text = "deadlock on key %s in table %s.%s";
diff -Nrup a/storage/falcon/ha_falcon.cpp b/storage/falcon/ha_falcon.cpp
--- a/storage/falcon/ha_falcon.cpp	2008-01-30 00:58:03 -06:00
+++ b/storage/falcon/ha_falcon.cpp	2008-01-31 11:19:03 -06:00
@@ -86,11 +86,16 @@ FILE		*falcon_log_file;
 static const ulonglong MSB = ULL(1) << ((sizeof(void *)*8 - 1) & 63);
 ulonglong max_memory_address = MSB | (MSB - 1);
 
-
-int	isolation_levels[4] = {TRANSACTION_READ_UNCOMMITTED, 
-	                       TRANSACTION_READ_COMMITTED,
-	                       TRANSACTION_CONSISTENT_READ, // TRANSACTION_WRITE_COMMITTED, // This is repeatable read
-	                       TRANSACTION_SERIALIZABLE};
+// These are the isolation levels we actually use.
+// They corespond to enum_tx_isolation from hamdler.h
+// 0 = ISO_READ_UNCOMMITTED, 1 = ISO_READ_COMMITTED,
+// 2 = ISO_REPEATABLE_READ,  3 = ISO_SERIALIZABLE
+
+int	isolation_levels[4] = 
+	{TRANSACTION_CONSISTENT_READ, 	// TRANSACTION_READ_UNCOMMITTED
+	TRANSACTION_READ_COMMITTED,
+	TRANSACTION_CONSISTENT_READ, 	// TRANSACTION_WRITE_COMMITTED, // This is repeatable read
+	TRANSACTION_CONSISTENT_READ};	// TRANSACTION_SERIALIZABLE
 
 static const ulonglong default_table_flags = (	  HA_REC_NOT_IN_SEQ
 												| HA_NULL_IN_KEY
@@ -186,7 +191,10 @@ int StorageInterface::falcon_init(void *
 
 	int repeatableRead = (falcon_consistent_read ? 
 		TRANSACTION_CONSISTENT_READ : TRANSACTION_WRITE_COMMITTED);
-	isolation_levels[2] = repeatableRead;
+	if (isolation_levels[2] != repeatableRead)
+		for (int i = 0; i < 4; i++)
+			if ((i == 2) || (isolation_levels[i] == isolation_levels[2]))
+				isolation_levels[i] = repeatableRead;
 
 	if (falcon_debug_server)
 		storageHandler->startNfsServer();
@@ -3029,7 +3037,9 @@ void StorageInterface::updateConsistentR
 		TRANSACTION_CONSISTENT_READ : TRANSACTION_WRITE_COMMITTED);
 
 	if (isolation_levels[2] != newRepeatableRead)
-		isolation_levels[2] = newRepeatableRead;
+		for (int i = 0; i < 4; i++)
+			if ((i == 2) || (isolation_levels[i] == isolation_levels[2]))
+				isolation_levels[i] = newRepeatableRead;
 }
 
 void StorageInterface::updateRecordMemoryMax(MYSQL_THD thd, struct st_mysql_sys_var* variable, void* var_ptr, void* save)
Thread
bk commit into 6.0 tree (klewis:1.2794) BUG#34164klewis31 Jan