List:Commits« Previous MessageNext Message »
From:Christopher Powers Date:February 23 2009 8:16pm
Subject:bzr commit into mysql-6.0-falcon-team branch (christopher.powers:3032)
Bug#42725 Bug#42830
View as plain text  
#At file:///home/cpowers/work/dev/dev-06/mysql/

 3032 Christopher Powers	2009-02-23
      Bug#42725 "Exception when filling I_S.TABLESPACES by Falcon"
      Bug#42830 "Falcon Exception: ResultSet has been closed after recovery"
      
      The exception occurs because the system transaction is committed
      while the result set is being accessed. The commit closes the
      statement and clears the associated result sets.
      
      To prevent this, the tablespace getinfo methods now get a
      shared lock on syncSysDDL before executing queries.
      
      Database::openDatabase also gets a shared lock on syncSysDDL
      prior to executing query and processing the result set. Note that
      this issue was indirectly addressed by disabling scavenging during
      recovery: http://lists.mysql.com/commits/66823.
modified:
  storage/falcon/Database.cpp
  storage/falcon/TableSpaceManager.cpp

per-file messages:
  storage/falcon/Database.cpp
    Database::openDatabase()
    - Get shared lock on syncSysDDL prior to executing system query
  storage/falcon/TableSpaceManager.cpp
    TableSpaceManager::getTableSpaceInfo()
    TableSpaceManager::getTableSpaceFilesInfo()
    - Get shared lock on syncSysDDL prior to executing system query
=== modified file 'storage/falcon/Database.cpp'
--- a/storage/falcon/Database.cpp	2009-02-19 00:23:00 +0000
+++ b/storage/falcon/Database.cpp	2009-02-23 20:16:03 +0000
@@ -782,6 +782,9 @@ void Database::openDatabase(const char *
 		END_FOR;
 		}
 
+	Sync syncDDL(&syncSysDDL, "Database::openDatabase");
+	syncDDL.lock(Shared);
+	
 	PreparedStatement *statement = prepareStatement ("select tableid from tables");
 	ResultSet *resultSet = statement->executeQuery();
 
@@ -795,6 +798,8 @@ void Database::openDatabase(const char *
 
 	resultSet->close();
 	statement->close();
+	syncDDL.unlock();
+	
 	upgradeSystemTables();
 	Trigger::initialize (this);
 	serialLog->checkpoint(true);

=== modified file 'storage/falcon/TableSpaceManager.cpp'
--- a/storage/falcon/TableSpaceManager.cpp	2009-02-23 15:30:57 +0000
+++ b/storage/falcon/TableSpaceManager.cpp	2009-02-23 20:16:03 +0000
@@ -476,6 +476,9 @@ JString TableSpaceManager::tableSpaceTyp
 
 void TableSpaceManager::getTableSpaceInfo(InfoTable* infoTable)
 {
+	Sync syncDDL(&database->syncSysDDL, "TableSpaceManager::getTableSpaceInfo");
+	syncDDL.lock(Shared);
+
 	PStatement statement = database->systemConnection->prepareStatement(
 		"select tablespace, comment from system.tablespaces");
 	RSet resultSet = statement->executeQuery();
@@ -520,6 +523,9 @@ JString TableSpaceManager::tableSpaceFil
 
 void TableSpaceManager::getTableSpaceFilesInfo(InfoTable* infoTable)
 {
+	Sync syncDDL(&database->syncSysDDL, "TableSpaceManager::getTableSpaceFilesInfo");
+	syncDDL.lock(Shared);
+	
 	PStatement statement = database->systemConnection->prepareStatement(
 		"select tablespace, filename from system.tablespaces");
 	RSet resultSet = statement->executeQuery();

Thread
bzr commit into mysql-6.0-falcon-team branch (christopher.powers:3032)Bug#42725 Bug#42830Christopher Powers23 Feb