aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorTleiades Hax2007-11-01 21:36:47 +0000
committerTleiades Hax2007-11-01 21:36:47 +0000
commitcb2ae6eaed5b5038dc6239bebe30242687993027 (patch)
treea6b1ca462426b58af5765be1683b84ef4f5ab57c
parentScriptServer fixes: Added more debug logging, mutex lock (to be extra-super-s... (diff)
downloadopensim-SC-cb2ae6eaed5b5038dc6239bebe30242687993027.zip
opensim-SC-cb2ae6eaed5b5038dc6239bebe30242687993027.tar.gz
opensim-SC-cb2ae6eaed5b5038dc6239bebe30242687993027.tar.bz2
opensim-SC-cb2ae6eaed5b5038dc6239bebe30242687993027.tar.xz
-rw-r--r--OpenSim/Framework/Data.MySQL/MySQLAssetData.cs24
1 files changed, 14 insertions, 10 deletions
diff --git a/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs b/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs
index 055cd92..114538d 100644
--- a/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs
+++ b/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs
@@ -101,16 +101,20 @@ namespace OpenSim.Framework.Data.MySQL
101 "REPLACE INTO assets(id, name, description, assetType, invType, local, temporary, data)" + 101 "REPLACE INTO assets(id, name, description, assetType, invType, local, temporary, data)" +
102 "VALUES(?id, ?name, ?description, ?assetType, ?invType, ?local, ?temporary, ?data)", 102 "VALUES(?id, ?name, ?description, ?assetType, ?invType, ?local, ?temporary, ?data)",
103 _dbConnection.Connection); 103 _dbConnection.Connection);
104 MySqlParameter p = cmd.Parameters.Add("?id", MySqlDbType.Binary, 16); 104
105 p.Value = asset.FullID.GetBytes(); 105 using (cmd)
106 cmd.Parameters.AddWithValue("?name", asset.Name); 106 {
107 cmd.Parameters.AddWithValue("?description", asset.Description); 107 MySqlParameter p = cmd.Parameters.Add("?id", MySqlDbType.Binary, 16);
108 cmd.Parameters.AddWithValue("?assetType", asset.Type); 108 p.Value = asset.FullID.GetBytes();
109 cmd.Parameters.AddWithValue("?invType", asset.InvType); 109 cmd.Parameters.AddWithValue("?name", asset.Name);
110 cmd.Parameters.AddWithValue("?local", asset.Local); 110 cmd.Parameters.AddWithValue("?description", asset.Description);
111 cmd.Parameters.AddWithValue("?temporary", asset.Temporary); 111 cmd.Parameters.AddWithValue("?assetType", asset.Type);
112 cmd.Parameters.AddWithValue("?data", asset.Data); 112 cmd.Parameters.AddWithValue("?invType", asset.InvType);
113 cmd.ExecuteNonQuery(); 113 cmd.Parameters.AddWithValue("?local", asset.Local);
114 cmd.Parameters.AddWithValue("?temporary", asset.Temporary);
115 cmd.Parameters.AddWithValue("?data", asset.Data);
116 cmd.ExecuteNonQuery();
117 }
114 } 118 }
115 119
116 public void UpdateAsset(AssetBase asset) 120 public void UpdateAsset(AssetBase asset)