diff options
author | Robert Adams | 2013-09-24 13:41:44 -0700 |
---|---|---|
committer | Robert Adams | 2013-09-25 17:30:51 -0700 |
commit | 7fa64cce7dbf19d8b5886afd58e42be790f12dea (patch) | |
tree | 425a4223825f01f5f07be0b304cb7a9a45bc5117 /OpenSim/Data/MySQL/MySQLSimulationData.cs | |
parent | varregion: go back to using Constants.RegionSize so as not to break (diff) | |
download | opensim-SC_OLD-7fa64cce7dbf19d8b5886afd58e42be790f12dea.zip opensim-SC_OLD-7fa64cce7dbf19d8b5886afd58e42be790f12dea.tar.gz opensim-SC_OLD-7fa64cce7dbf19d8b5886afd58e42be790f12dea.tar.bz2 opensim-SC_OLD-7fa64cce7dbf19d8b5886afd58e42be790f12dea.tar.xz |
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.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLSimulationData.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs index b03a904..5751dc8 100644 --- a/OpenSim/Data/MySQL/MySQLSimulationData.cs +++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs | |||
@@ -575,6 +575,7 @@ namespace OpenSim.Data.MySQL | |||
575 | public void StoreTerrain(double[,] ter, UUID regionID) | 575 | public void StoreTerrain(double[,] ter, UUID regionID) |
576 | { | 576 | { |
577 | m_log.Info("[REGION DB]: Storing terrain"); | 577 | m_log.Info("[REGION DB]: Storing terrain"); |
578 | int revision = (int)DBTerrainRevision.Legacy256; | ||
578 | 579 | ||
579 | lock (m_dbLock) | 580 | lock (m_dbLock) |
580 | { | 581 | { |
@@ -589,10 +590,10 @@ namespace OpenSim.Data.MySQL | |||
589 | 590 | ||
590 | ExecuteNonQuery(cmd); | 591 | ExecuteNonQuery(cmd); |
591 | 592 | ||
592 | cmd.CommandText = "insert into terrain (RegionUUID, " + | 593 | cmd.CommandText = "insert into terrain (RegionUUID, Revision, Heightfield)" |
593 | "Revision, Heightfield) values (?RegionUUID, " + | 594 | + "values (?RegionUUID, ?Revision, ?Heightfield)"; |
594 | "1, ?Heightfield)"; | ||
595 | 595 | ||
596 | cmd.Parameters.AddWithValue("Revision", revision); | ||
596 | cmd.Parameters.AddWithValue("Heightfield", SerializeTerrain(ter)); | 597 | cmd.Parameters.AddWithValue("Heightfield", SerializeTerrain(ter)); |
597 | 598 | ||
598 | ExecuteNonQuery(cmd); | 599 | ExecuteNonQuery(cmd); |