diff options
author | Justin Clark-Casey (justincc) | 2010-04-30 20:05:57 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-04-30 20:05:57 +0100 |
commit | 0b8b302aa0f2ee25be5cbdfefe232459e6e5b778 (patch) | |
tree | 8108a73ddf306c5f011e7bf91fb8ead5b6a678aa /OpenSim/Data/SQLiteLegacy/SQLiteEstateData.cs | |
parent | take out some debug logging in the sqlite db adaptor (diff) | |
download | opensim-SC-0b8b302aa0f2ee25be5cbdfefe232459e6e5b778.zip opensim-SC-0b8b302aa0f2ee25be5cbdfefe232459e6e5b778.tar.gz opensim-SC-0b8b302aa0f2ee25be5cbdfefe232459e6e5b778.tar.bz2 opensim-SC-0b8b302aa0f2ee25be5cbdfefe232459e6e5b778.tar.xz |
Fix a bunch of issues that crop up after the naive porting of the new sqlite db from master to 0.6.9
Diffstat (limited to 'OpenSim/Data/SQLiteLegacy/SQLiteEstateData.cs')
-rw-r--r-- | OpenSim/Data/SQLiteLegacy/SQLiteEstateData.cs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/OpenSim/Data/SQLiteLegacy/SQLiteEstateData.cs b/OpenSim/Data/SQLiteLegacy/SQLiteEstateData.cs index e135eaa..5a7fbd7 100644 --- a/OpenSim/Data/SQLiteLegacy/SQLiteEstateData.cs +++ b/OpenSim/Data/SQLiteLegacy/SQLiteEstateData.cs | |||
@@ -80,7 +80,7 @@ namespace OpenSim.Data.SQLiteLegacy | |||
80 | get { return new List<string>(m_FieldMap.Keys).ToArray(); } | 80 | get { return new List<string>(m_FieldMap.Keys).ToArray(); } |
81 | } | 81 | } |
82 | 82 | ||
83 | public EstateSettings LoadEstateSettings(UUID regionID, bool create) | 83 | public EstateSettings LoadEstateSettings(UUID regionID) |
84 | { | 84 | { |
85 | string sql = "select estate_settings."+String.Join(",estate_settings.", FieldList)+" from estate_map left join estate_settings on estate_map.EstateID = estate_settings.EstateID where estate_settings.EstateID is not null and RegionID = :RegionID"; | 85 | string sql = "select estate_settings."+String.Join(",estate_settings.", FieldList)+" from estate_map left join estate_settings on estate_map.EstateID = estate_settings.EstateID where estate_settings.EstateID is not null and RegionID = :RegionID"; |
86 | 86 | ||
@@ -89,10 +89,10 @@ namespace OpenSim.Data.SQLiteLegacy | |||
89 | cmd.CommandText = sql; | 89 | cmd.CommandText = sql; |
90 | cmd.Parameters.Add(":RegionID", regionID.ToString()); | 90 | cmd.Parameters.Add(":RegionID", regionID.ToString()); |
91 | 91 | ||
92 | return DoLoad(cmd, regionID, create); | 92 | return DoLoad(cmd, regionID); |
93 | } | 93 | } |
94 | 94 | ||
95 | private EstateSettings DoLoad(SqliteCommand cmd, UUID regionID, bool create) | 95 | private EstateSettings DoLoad(SqliteCommand cmd, UUID regionID) |
96 | { | 96 | { |
97 | EstateSettings es = new EstateSettings(); | 97 | EstateSettings es = new EstateSettings(); |
98 | es.OnSave += StoreEstateSettings; | 98 | es.OnSave += StoreEstateSettings; |
@@ -125,8 +125,10 @@ namespace OpenSim.Data.SQLiteLegacy | |||
125 | } | 125 | } |
126 | r.Close(); | 126 | r.Close(); |
127 | } | 127 | } |
128 | else if (create) | 128 | else |
129 | { | 129 | { |
130 | // Migration case | ||
131 | // | ||
130 | r.Close(); | 132 | r.Close(); |
131 | 133 | ||
132 | List<string> names = new List<string>(FieldList); | 134 | List<string> names = new List<string>(FieldList); |
@@ -335,7 +337,7 @@ namespace OpenSim.Data.SQLiteLegacy | |||
335 | cmd.CommandText = sql; | 337 | cmd.CommandText = sql; |
336 | cmd.Parameters.Add(":EstateID", estateID.ToString()); | 338 | cmd.Parameters.Add(":EstateID", estateID.ToString()); |
337 | 339 | ||
338 | return DoLoad(cmd, UUID.Zero, false); | 340 | return DoLoad(cmd, UUID.Zero); |
339 | } | 341 | } |
340 | 342 | ||
341 | public List<int> GetEstates(string search) | 343 | public List<int> GetEstates(string search) |