From ba2bf78dcfe57a9e5f3d00a572f7cc82975a4fc0 Mon Sep 17 00:00:00 2001 From: Marck Date: Tue, 23 Nov 2010 10:40:31 +0100 Subject: Fix joining land parcels not being stored correctly in SQLite. Thank you to goetz for the initial patch in Mantis #5230. --- OpenSim/Data/SQLite/SQLiteSimulationData.cs | 3 +++ OpenSim/Data/SQLiteLegacy/SQLiteSimulationData.cs | 3 +++ 2 files changed, 6 insertions(+) (limited to 'OpenSim/Data') diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs index 0bfd73a..8d93354 100644 --- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs +++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs @@ -697,6 +697,7 @@ namespace OpenSim.Data.SQLite DataRow landRow = land.Rows.Find(globalID.ToString()); if (landRow != null) { + landRow.Delete(); land.Rows.Remove(landRow); } List rowsToDelete = new List(); @@ -707,6 +708,7 @@ namespace OpenSim.Data.SQLite } for (int iter = 0; iter < rowsToDelete.Count; iter++) { + rowsToDelete[iter].Delete(); landaccesslist.Rows.Remove(rowsToDelete[iter]); } } @@ -755,6 +757,7 @@ namespace OpenSim.Data.SQLite } for (int iter = 0; iter < rowsToDelete.Count; iter++) { + rowsToDelete[iter].Delete(); landaccesslist.Rows.Remove(rowsToDelete[iter]); } rowsToDelete.Clear(); diff --git a/OpenSim/Data/SQLiteLegacy/SQLiteSimulationData.cs b/OpenSim/Data/SQLiteLegacy/SQLiteSimulationData.cs index 1ad1e66..644864a 100644 --- a/OpenSim/Data/SQLiteLegacy/SQLiteSimulationData.cs +++ b/OpenSim/Data/SQLiteLegacy/SQLiteSimulationData.cs @@ -657,6 +657,7 @@ namespace OpenSim.Data.SQLiteLegacy DataRow landRow = land.Rows.Find(globalID.ToString()); if (landRow != null) { + landRow.Delete(); land.Rows.Remove(landRow); } List rowsToDelete = new List(); @@ -667,6 +668,7 @@ namespace OpenSim.Data.SQLiteLegacy } for (int iter = 0; iter < rowsToDelete.Count; iter++) { + rowsToDelete[iter].Delete(); landaccesslist.Rows.Remove(rowsToDelete[iter]); } @@ -717,6 +719,7 @@ namespace OpenSim.Data.SQLiteLegacy } for (int iter = 0; iter < rowsToDelete.Count; iter++) { + rowsToDelete[iter].Delete(); landaccesslist.Rows.Remove(rowsToDelete[iter]); } rowsToDelete.Clear(); -- cgit v1.1 From a4bf6c53437f6527f0ee422eb57898a2b0a65b6a Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 23 Nov 2010 07:44:42 -0800 Subject: Attempt at fixing failing test. --- OpenSim/Data/Tests/InventoryTests.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'OpenSim/Data') diff --git a/OpenSim/Data/Tests/InventoryTests.cs b/OpenSim/Data/Tests/InventoryTests.cs index 3205bfa..dc03259 100644 --- a/OpenSim/Data/Tests/InventoryTests.cs +++ b/OpenSim/Data/Tests/InventoryTests.cs @@ -323,7 +323,8 @@ namespace OpenSim.Data.Tests .IgnoreProperty(x => x.InvType) .IgnoreProperty(x => x.CreatorIdAsUuid) .IgnoreProperty(x => x.Description) - .IgnoreProperty(x => x.CreatorId)); + .IgnoreProperty(x => x.CreatorId) + .IgnoreProperty(x => x.CreatorData)); inventoryScrambler.Scramble(expected); db.updateInventoryItem(expected); @@ -333,7 +334,8 @@ namespace OpenSim.Data.Tests .IgnoreProperty(x => x.InvType) .IgnoreProperty(x => x.CreatorIdAsUuid) .IgnoreProperty(x => x.Description) - .IgnoreProperty(x => x.CreatorId)); + .IgnoreProperty(x => x.CreatorId) + .IgnoreProperty(x => x.CreatorData)); } [Test] -- cgit v1.1