diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Data.MySQL/MySQLDataStore.cs | 41 | ||||
-rw-r--r-- | OpenSim/Framework/Data.SQLite/SQLiteRegionData.cs | 25 |
2 files changed, 36 insertions, 30 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) |
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteRegionData.cs b/OpenSim/Framework/Data.SQLite/SQLiteRegionData.cs index 94c05e1..1364d3e 100644 --- a/OpenSim/Framework/Data.SQLite/SQLiteRegionData.cs +++ b/OpenSim/Framework/Data.SQLite/SQLiteRegionData.cs | |||
@@ -1283,19 +1283,22 @@ namespace OpenSim.Framework.Data.SQLite | |||
1283 | 1283 | ||
1284 | // Eliminate rows from the deletion set which already exist for this prim's inventory | 1284 | // Eliminate rows from the deletion set which already exist for this prim's inventory |
1285 | // TODO Very temporary, need to take account of simple metadata changes soon | 1285 | // TODO Very temporary, need to take account of simple metadata changes soon |
1286 | foreach (LLUUID itemId in items.Keys) | 1286 | lock (items) |
1287 | { | 1287 | { |
1288 | String rawItemId = itemId.ToString(); | 1288 | foreach (LLUUID itemId in items.Keys) |
1289 | |||
1290 | if (dbItemsToRemove.ContainsKey(rawItemId)) | ||
1291 | { | ||
1292 | dbItemsToRemove.Remove(rawItemId); | ||
1293 | } | ||
1294 | else | ||
1295 | { | 1289 | { |
1296 | itemsToAdd.Add(items[itemId]); | 1290 | String rawItemId = itemId.ToString(); |
1297 | } | 1291 | |
1298 | } | 1292 | if (dbItemsToRemove.ContainsKey(rawItemId)) |
1293 | { | ||
1294 | dbItemsToRemove.Remove(rawItemId); | ||
1295 | } | ||
1296 | else | ||
1297 | { | ||
1298 | itemsToAdd.Add(items[itemId]); | ||
1299 | } | ||
1300 | } | ||
1301 | } | ||
1299 | 1302 | ||
1300 | // Delete excess rows | 1303 | // Delete excess rows |
1301 | foreach (DataRow row in dbItemsToRemove.Values) | 1304 | foreach (DataRow row in dbItemsToRemove.Values) |