diff options
author | Robert Adams | 2013-09-24 13:41:44 -0700 |
---|---|---|
committer | Robert Adams | 2013-09-28 07:33:55 -0700 |
commit | aea5d3a84212a236fe1a766131b8e3513f3705a8 (patch) | |
tree | bf433ef9106c2de99e5a6d90a048c6c38e107670 /OpenSim/Data/MySQL | |
parent | varregion: go back to using Constants.RegionSize so as not to break (diff) | |
download | opensim-SC_OLD-aea5d3a84212a236fe1a766131b8e3513f3705a8.zip opensim-SC_OLD-aea5d3a84212a236fe1a766131b8e3513f3705a8.tar.gz opensim-SC_OLD-aea5d3a84212a236fe1a766131b8e3513f3705a8.tar.bz2 opensim-SC_OLD-aea5d3a84212a236fe1a766131b8e3513f3705a8.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 'OpenSim/Data/MySQL')
-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); |