store sop pseudocrc and region cacheID on sqlite

master
UbitUmarov 2020-03-28 16:18:31 +00:00
parent 0958eceadd
commit 2e66f8dbdf
2 changed files with 18 additions and 1 deletions

View File

@ -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 `standtargetz` float NOT NULL DEFAULT '0.0';
ALTER TABLE `prims` ADD COLUMN `sitactrange` float NOT NULL DEFAULT '0.0'; ALTER TABLE `prims` ADD COLUMN `sitactrange` float NOT NULL DEFAULT '0.0';
COMMIT; 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;

View File

@ -632,7 +632,7 @@ namespace OpenSim.Data.SQLite
ds.AcceptChanges(); ds.AcceptChanges();
} }
// m_log.Info("[Dump of prims]: " + ds.GetXml()); // m_log.Info("[Dump of prims]: " + ds.GetXml());
} }
/// <summary> /// <summary>
@ -1323,6 +1323,8 @@ namespace OpenSim.Data.SQLite
createCol(prims, "standtargetz", typeof(float)); createCol(prims, "standtargetz", typeof(float));
createCol(prims, "sitactrange", typeof(float)); createCol(prims, "sitactrange", typeof(float));
createCol(prims, "pseudocrc", typeof(int));
// Add in contraints // Add in contraints
prims.PrimaryKey = new DataColumn[] { prims.Columns["UUID"] }; prims.PrimaryKey = new DataColumn[] { prims.Columns["UUID"] };
@ -1532,6 +1534,7 @@ namespace OpenSim.Data.SQLite
createCol(regionsettings, "parcel_tile_ID", typeof(String)); createCol(regionsettings, "parcel_tile_ID", typeof(String));
createCol(regionsettings, "block_search", typeof(Boolean)); createCol(regionsettings, "block_search", typeof(Boolean));
createCol(regionsettings, "casino", typeof(Boolean)); createCol(regionsettings, "casino", typeof(Boolean));
createCol(regionsettings, "cacheID", typeof(string));
regionsettings.PrimaryKey = new DataColumn[] { regionsettings.Columns["regionUUID"] }; regionsettings.PrimaryKey = new DataColumn[] { regionsettings.Columns["regionUUID"] };
return regionsettings; return regionsettings;
} }
@ -1868,6 +1871,10 @@ namespace OpenSim.Data.SQLite
pdata = PhysicsInertiaData.FromXml2(row["PhysInertia"].ToString()); pdata = PhysicsInertiaData.FromXml2(row["PhysInertia"].ToString());
prim.PhysicsInertia = pdata; prim.PhysicsInertia = pdata;
int pseudocrc = Convert.ToInt32(row["pseudocrc"]);
if(pseudocrc != 0)
prim.PseudoCRC = pseudocrc;
return prim; return prim;
} }
@ -2303,6 +2310,7 @@ namespace OpenSim.Data.SQLite
else else
row["PhysInertia"] = String.Empty; row["PhysInertia"] = String.Empty;
row["pseudocrc"] = prim.PseudoCRC;
} }
/// <summary> /// <summary>
@ -2450,6 +2458,7 @@ namespace OpenSim.Data.SQLite
row["parcel_tile_ID"] = settings.ParcelImageID.ToString(); row["parcel_tile_ID"] = settings.ParcelImageID.ToString();
row["block_search"] = settings.GodBlockSearch; row["block_search"] = settings.GodBlockSearch;
row["casino"] = settings.Casino; row["casino"] = settings.Casino;
row["cacheID"] = settings.CacheID;
} }
/// <summary> /// <summary>