List:Commits« Previous MessageNext Message »
From:U-ROWVWADEjas Date:November 28 2007 9:40pm
Subject:bk commit into 6.0 tree (jas:1.2713)
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, 2007-11-28 16:39:38-05:00, jas@rowvwade. +1 -0
  Don't get a shared truncate lock when we're planning to do a truncate.

  storage/falcon/ha_falcon.cpp@stripped, 2007-11-28 16:39:21-05:00, jas@rowvwade. +8 -3
    Don't get a shared truncate lock when we're planning to do a truncate.

diff -Nrup a/storage/falcon/ha_falcon.cpp b/storage/falcon/ha_falcon.cpp
--- a/storage/falcon/ha_falcon.cpp	2007-11-28 16:20:55 -05:00
+++ b/storage/falcon/ha_falcon.cpp	2007-11-28 16:39:21 -05:00
@@ -1737,7 +1737,8 @@ int StorageInterface::external_lock(THD 
 			storageConnection->setCurrentStatement(thd->query);
 
 		insertCount = 0;
-
+		bool isTruncate = false;
+		
 		switch (thd_sql_command(thd))
 			{
 			case SQLCOM_ALTER_TABLE:
@@ -1756,6 +1757,10 @@ int StorageInterface::external_lock(THD 
 				}
 				break;
 
+			case SQLCOM_TRUNCATE:
+				isTruncate = true;
+				break;
+				
 			default:
 				break;
 			}
@@ -1764,7 +1769,7 @@ int StorageInterface::external_lock(THD 
 			{
 			if (storageConnection->startTransaction(isolation_levels[thd_tx_isolation(thd)]))
 				{
-				if (storageTable)
+				if (!isTruncate && storageTable)
 					storageTable->setTruncateLock();
 				
 				trans_register_ha(thd, true, falcon_hton);
@@ -1777,7 +1782,7 @@ int StorageInterface::external_lock(THD 
 			{
 			if (storageConnection->startImplicitTransaction(isolation_levels[thd_tx_isolation(thd)]))
 				{
-				if (storageTable)
+				if (!isTruncate && storageTable)
 					storageTable->setTruncateLock();
 				
 				trans_register_ha(thd, false, falcon_hton);
Thread
bk commit into 6.0 tree (jas:1.2713)U-ROWVWADEjas28 Nov