List:Commits« Previous MessageNext Message »
From:klewis Date:March 5 2008 9:29pm
Subject:bk commit into 6.0 tree (klewis:1.2589)
View as plain text  
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-03-05 14:28:53-06:00, klewis@klewis-mysql. +2 -0
  Cleanup from code review.

  storage/falcon/Database.cpp@stripped, 2008-03-05 14:28:33-06:00, klewis@klewis-mysql. +5 -10
    Cleanup from code review.

  storage/falcon/Scheduler.cpp@stripped, 2008-03-05 14:28:37-06:00, klewis@klewis-mysql. +7 -6
    Cleanup from code review.

diff -Nrup a/storage/falcon/Database.cpp b/storage/falcon/Database.cpp
--- a/storage/falcon/Database.cpp	2008-03-03 12:40:14 -06:00
+++ b/storage/falcon/Database.cpp	2008-03-05 14:28:33 -06:00
@@ -1737,19 +1737,14 @@ void Database::scavenge()
 
 void Database::retireRecords(bool forced)
 {
-	Sync syncDDL(&syncSysDDL, "Database::retireRecords");
-	syncDDL.lock(Shared);
-
 	// Commit pending system transactions before proceeding
 	
 	if (!forced && systemConnection->transaction)
-		{
-		syncDDL.unlock();
-		if (systemConnection->transaction)
-			commitSystemTransaction();
-		syncDDL.lock(Shared);
-		}
-		
+		commitSystemTransaction();
+
+	Sync syncDDL(&syncSysDDL, "Database::retireRecords");
+	syncDDL.lock(Shared);
+
 	Sync syncScavenger(&syncScavenge, "Database::retireRecords");
 	syncScavenger.lock(Exclusive);
 
diff -Nrup a/storage/falcon/Scheduler.cpp b/storage/falcon/Scheduler.cpp
--- a/storage/falcon/Scheduler.cpp	2008-03-03 12:40:15 -06:00
+++ b/storage/falcon/Scheduler.cpp	2008-03-05 14:28:37 -06:00
@@ -163,7 +163,7 @@ void Scheduler::addEvent(Schedule * sche
 	schedule->addRef();
 	Sync sync (&syncObject, "Scheduler::addEvent");
 	sync.lock (Exclusive);
-    Schedule **ptr;
+	Schedule **ptr;
 
 	for (ptr = &next; *ptr && (*ptr)->eventTime < schedule->eventTime;
 		 ptr = &(*ptr)->next)
@@ -210,6 +210,9 @@ void Scheduler::start()
 
 void Scheduler::updateSchedule(const char *appName, const char *eventName, User *user,
const char *schedule)
 {
+	Sync syncDDL (&database->syncSysDDL, "Scheduler::updateSchedule(2)");
+	syncDDL.lock (Exclusive);
+
 	Sync syncObj(&syncObject, "Scheduler::updateSchedule");
 	syncObj.lock(Exclusive);
 
@@ -227,8 +230,6 @@ void Scheduler::updateSchedule(const cha
 
 	// If no schedule, we're done
 
-	Sync syncDDL (&database->syncSysDDL, "Scheduler::updateSchedule(2)");
-	syncDDL.lock (Exclusive);
 
 	if (!schedule || !schedule[0])
 		{
@@ -238,8 +239,8 @@ void Scheduler::updateSchedule(const cha
 		statement->setString (2, eventName);
 		statement->executeUpdate();
 		statement->close();
-		syncDDL.unlock();
 		syncObj.unlock();
+		syncDDL.unlock();
 		database->commitSystemTransaction();
 		return;
 		}
@@ -253,12 +254,12 @@ void Scheduler::updateSchedule(const cha
 	statement->setString (n++, schedule);
 	statement->executeUpdate();
 	statement->close();
-	syncDDL.unlock();
 	syncObj.unlock();
+	syncDDL.unlock();
 	database->commitSystemTransaction();
-	//syncObj.lock (Exclusive);
 
 #ifndef STORAGE_ENGINE
+	syncObj.lock (Exclusive);
 	Application *application = database->getApplication (appName);
 
 	if (application)
Thread
bk commit into 6.0 tree (klewis:1.2589)klewis5 Mar