diff --git a/OpenSim/Data/SQLite/Resources/RegionStore.migrations b/OpenSim/Data/SQLite/Resources/RegionStore.migrations index a1bb78d3cf..3cc02c1429 100644 --- a/OpenSim/Data/SQLite/Resources/RegionStore.migrations +++ b/OpenSim/Data/SQLite/Resources/RegionStore.migrations @@ -386,3 +386,11 @@ ALTER TABLE `prims` ADD COLUMN `standtargety` float NOT NULL DEFAULT '0.0'; ALTER TABLE `prims` ADD COLUMN `standtargetz` float NOT NULL DEFAULT '0.0'; ALTER TABLE `prims` ADD COLUMN `sitactrange` float NOT NULL DEFAULT '0.0'; COMMIT; + + +:VERSION 38 #----- Add pseudo CRC and region cache id + +BEGIN; +ALTER TABLE `prims` ADD COLUMN `pseudocrc` integer DEFAULT '0'; +ALTER TABLE `regionsettings` ADD COLUMN `cacheID` char(36) DEFAULT NULL; +COMMIT; diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs index 2fc56bc862..3b9e46a884 100644 --- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs +++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs @@ -632,7 +632,7 @@ namespace OpenSim.Data.SQLite ds.AcceptChanges(); } - // m_log.Info("[Dump of prims]: " + ds.GetXml()); + // m_log.Info("[Dump of prims]: " + ds.GetXml()); } /// @@ -1323,6 +1323,8 @@ namespace OpenSim.Data.SQLite createCol(prims, "standtargetz", typeof(float)); createCol(prims, "sitactrange", typeof(float)); + createCol(prims, "pseudocrc", typeof(int)); + // Add in contraints prims.PrimaryKey = new DataColumn[] { prims.Columns["UUID"] }; @@ -1532,6 +1534,7 @@ namespace OpenSim.Data.SQLite createCol(regionsettings, "parcel_tile_ID", typeof(String)); createCol(regionsettings, "block_search", typeof(Boolean)); createCol(regionsettings, "casino", typeof(Boolean)); + createCol(regionsettings, "cacheID", typeof(string)); regionsettings.PrimaryKey = new DataColumn[] { regionsettings.Columns["regionUUID"] }; return regionsettings; } @@ -1868,6 +1871,10 @@ namespace OpenSim.Data.SQLite pdata = PhysicsInertiaData.FromXml2(row["PhysInertia"].ToString()); prim.PhysicsInertia = pdata; + int pseudocrc = Convert.ToInt32(row["pseudocrc"]); + if(pseudocrc != 0) + prim.PseudoCRC = pseudocrc; + return prim; } @@ -2303,6 +2310,7 @@ namespace OpenSim.Data.SQLite else row["PhysInertia"] = String.Empty; + row["pseudocrc"] = prim.PseudoCRC; } /// @@ -2450,6 +2458,7 @@ namespace OpenSim.Data.SQLite row["parcel_tile_ID"] = settings.ParcelImageID.ToString(); row["block_search"] = settings.GodBlockSearch; row["casino"] = settings.Casino; + row["cacheID"] = settings.CacheID; } ///