From 7fa64cce7dbf19d8b5886afd58e42be790f12dea Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Tue, 24 Sep 2013 13:41:44 -0700 Subject: Remove time based terrain storage in SQLite so revision number can be used to denote terrain format revision. Add terrain DB format revision codes to ISimulationDataStore.cs. Setup so legacy compatible terrain storage and fetch is possible while allowing future format extensions. --- OpenSim/Data/SQLite/SQLiteSimulationData.cs | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'OpenSim/Data/SQLite') diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs index d938b6b..b70af6b 100644 --- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs +++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs @@ -828,22 +828,12 @@ namespace OpenSim.Data.SQLite { lock (ds) { - int revision = Util.UnixTimeSinceEpoch(); - - // This is added to get rid of the infinitely growing - // terrain databases which negatively impact on SQLite - // over time. Before reenabling this feature there - // needs to be a limitter put on the number of - // revisions in the database, as this old - // implementation is a DOS attack waiting to happen. + int revision = (int)DBTerrainRevision.Legacy256; using ( - SqliteCommand cmd = - new SqliteCommand("delete from terrain where RegionUUID=:RegionUUID and Revision <= :Revision", - m_conn)) + SqliteCommand cmd = new SqliteCommand("delete from terrain where RegionUUID=:RegionUUID", m_conn)) { cmd.Parameters.Add(new SqliteParameter(":RegionUUID", regionID.ToString())); - cmd.Parameters.Add(new SqliteParameter(":Revision", revision)); cmd.ExecuteNonQuery(); } -- cgit v1.1