aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLAssetData.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLAssetData.cs')
-rw-r--r--OpenSim/Data/MySQL/MySQLAssetData.cs8
1 files changed, 5 insertions, 3 deletions
diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs
index d55369a..5a2af4f 100644
--- a/OpenSim/Data/MySQL/MySQLAssetData.cs
+++ b/OpenSim/Data/MySQL/MySQLAssetData.cs
@@ -161,8 +161,8 @@ namespace OpenSim.Data.MySQL
161 161
162 MySqlCommand cmd = 162 MySqlCommand cmd =
163 new MySqlCommand( 163 new MySqlCommand(
164 "replace INTO assets(id, name, description, assetType, local, temporary, create_time, access_time, data)" + 164 "replace INTO assets(id, name, description, assetType, local, temporary, create_time, access_time, asset_flags, data)" +
165 "VALUES(?id, ?name, ?description, ?assetType, ?local, ?temporary, ?create_time, ?access_time, ?data)", 165 "VALUES(?id, ?name, ?description, ?assetType, ?local, ?temporary, ?create_time, ?access_time, ?asset_flags, ?data)",
166 dbcon); 166 dbcon);
167 167
168 string assetName = asset.Name; 168 string assetName = asset.Name;
@@ -194,6 +194,7 @@ namespace OpenSim.Data.MySQL
194 cmd.Parameters.AddWithValue("?temporary", asset.Temporary); 194 cmd.Parameters.AddWithValue("?temporary", asset.Temporary);
195 cmd.Parameters.AddWithValue("?create_time", now); 195 cmd.Parameters.AddWithValue("?create_time", now);
196 cmd.Parameters.AddWithValue("?access_time", now); 196 cmd.Parameters.AddWithValue("?access_time", now);
197 cmd.Parameters.AddWithValue("?asset_flags", (int)asset.Flags);
197 cmd.Parameters.AddWithValue("?data", asset.Data); 198 cmd.Parameters.AddWithValue("?data", asset.Data);
198 cmd.ExecuteNonQuery(); 199 cmd.ExecuteNonQuery();
199 cmd.Dispose(); 200 cmd.Dispose();
@@ -302,7 +303,7 @@ namespace OpenSim.Data.MySQL
302 using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) 303 using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
303 { 304 {
304 dbcon.Open(); 305 dbcon.Open();
305 MySqlCommand cmd = new MySqlCommand("SELECT name,description,assetType,temporary,id FROM assets LIMIT ?start, ?count", dbcon); 306 MySqlCommand cmd = new MySqlCommand("SELECT name,description,assetType,temporary,id,asset_flags FROM assets LIMIT ?start, ?count", dbcon);
306 cmd.Parameters.AddWithValue("?start", start); 307 cmd.Parameters.AddWithValue("?start", start);
307 cmd.Parameters.AddWithValue("?count", count); 308 cmd.Parameters.AddWithValue("?count", count);
308 309
@@ -317,6 +318,7 @@ namespace OpenSim.Data.MySQL
317 metadata.Description = (string)dbReader["description"]; 318 metadata.Description = (string)dbReader["description"];
318 metadata.Type = (sbyte)dbReader["assetType"]; 319 metadata.Type = (sbyte)dbReader["assetType"];
319 metadata.Temporary = Convert.ToBoolean(dbReader["temporary"]); // Not sure if this is correct. 320 metadata.Temporary = Convert.ToBoolean(dbReader["temporary"]); // Not sure if this is correct.
321 metadata.Flags = (AssetFlags)Convert.ToInt32(dbReader["asset_flags"]);
320 metadata.FullID = new UUID((string)dbReader["id"]); 322 metadata.FullID = new UUID((string)dbReader["id"]);
321 323
322 // Current SHA1s are not stored/computed. 324 // Current SHA1s are not stored/computed.