aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Data.MySQL
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-01-16 21:43:22 +0000
committerJustin Clarke Casey2008-01-16 21:43:22 +0000
commite13feaa3758051c1fc6c5fb68be6c9570519ced5 (patch)
treea3fd53a9fb9fc4e5fa8ec4ae76551cc5de0c3155 /OpenSim/Framework/Data.MySQL
parentAdded (experimental) terrain elevate command to allow whole terrain to be ele... (diff)
downloadopensim-SC_OLD-e13feaa3758051c1fc6c5fb68be6c9570519ced5.zip
opensim-SC_OLD-e13feaa3758051c1fc6c5fb68be6c9570519ced5.tar.gz
opensim-SC_OLD-e13feaa3758051c1fc6c5fb68be6c9570519ced5.tar.bz2
opensim-SC_OLD-e13feaa3758051c1fc6c5fb68be6c9570519ced5.tar.xz
* More prim inventory synchronization
* Remove some mysql verbosity
Diffstat (limited to 'OpenSim/Framework/Data.MySQL')
-rw-r--r--OpenSim/Framework/Data.MySQL/MySQLDataStore.cs41
1 files changed, 22 insertions, 19 deletions
diff --git a/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs b/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs
index 183a2f9..50623df 100644
--- a/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs
+++ b/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs
@@ -1222,34 +1222,37 @@ namespace OpenSim.Framework.Data.MySQL
1222 1222
1223 foreach (DataRow row in dbItemRows) 1223 foreach (DataRow row in dbItemRows)
1224 { 1224 {
1225 MainLog.Instance.Verbose( 1225// MainLog.Instance.Verbose(
1226 "DATASTORE", 1226// "DATASTORE",
1227 "Found item {0}, {1} in prim id {2}", 1227// "Found item {0}, {1} in prim id {2}",
1228 row["name"], row["itemID"], primID); 1228// row["name"], row["itemID"], primID);
1229 1229
1230 dbItemsToRemove.Add((String)row["itemID"], row); 1230 dbItemsToRemove.Add((String)row["itemID"], row);
1231 } 1231 }
1232 1232
1233 // Eliminate rows from the deletion set which already exist for this prim's inventory 1233 // Eliminate rows from the deletion set which already exist for this prim's inventory
1234 // TODO Very temporary, need to take account of simple metadata changes soon 1234 // TODO Very temporary, need to take account of simple metadata changes soon
1235 foreach (LLUUID itemId in items.Keys) 1235 lock (items)
1236 { 1236 {
1237 String rawItemId = itemId.ToString(); 1237 foreach (LLUUID itemId in items.Keys)
1238
1239 if (dbItemsToRemove.ContainsKey(rawItemId))
1240 { 1238 {
1241 MainLog.Instance.Verbose( 1239 String rawItemId = itemId.ToString();
1242 "DATASTORE",
1243 "Discarding item {0}, {1} from remove candidates for prim id {2}",
1244 items[itemId].Name, rawItemId, primID);
1245 1240
1246 dbItemsToRemove.Remove(rawItemId); 1241 if (dbItemsToRemove.ContainsKey(rawItemId))
1247 } 1242 {
1248 else 1243// MainLog.Instance.Verbose(
1249 { 1244// "DATASTORE",
1250 itemsToAdd.Add(items[itemId]); 1245// "Discarding item {0}, {1} from remove candidates for prim id {2}",
1251 } 1246// items[itemId].Name, rawItemId, primID);
1252 } 1247
1248 dbItemsToRemove.Remove(rawItemId);
1249 }
1250 else
1251 {
1252 itemsToAdd.Add(items[itemId]);
1253 }
1254 }
1255 }
1253 1256
1254 // Delete excess rows 1257 // Delete excess rows
1255 foreach (DataRow row in dbItemsToRemove.Values) 1258 foreach (DataRow row in dbItemsToRemove.Values)