aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite/SQLiteAssetData.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2009-04-09 19:23:19 +0000
committerJustin Clarke Casey2009-04-09 19:23:19 +0000
commit7f8552fe63df19913364d04b133adf5856eed11a (patch)
treeca311ccea59f223b1f011649c0da453ce63e7c69 /OpenSim/Data/SQLite/SQLiteAssetData.cs
parent* Change UUIDs in SQLite user db to dashed format to match representations el... (diff)
downloadopensim-SC-7f8552fe63df19913364d04b133adf5856eed11a.zip
opensim-SC-7f8552fe63df19913364d04b133adf5856eed11a.tar.gz
opensim-SC-7f8552fe63df19913364d04b133adf5856eed11a.tar.bz2
opensim-SC-7f8552fe63df19913364d04b133adf5856eed11a.tar.xz
* Change SQLite asset UUID to dashed format to be consistent
* Remaining inconsistent uuids (non dashed) are in region store for sqlite and mysql * Migration of these will happen at a later date, unless someone else wants to do it
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/SQLite/SQLiteAssetData.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs
index 6a323e1..5a5260a 100644
--- a/OpenSim/Data/SQLite/SQLiteAssetData.cs
+++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs
@@ -102,7 +102,7 @@ namespace OpenSim.Data.SQLite
102 { 102 {
103 using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn)) 103 using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn))
104 { 104 {
105 cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid))); 105 cmd.Parameters.Add(new SqliteParameter(":UUID", uuid.ToString()));
106 using (IDataReader reader = cmd.ExecuteReader()) 106 using (IDataReader reader = cmd.ExecuteReader())
107 { 107 {
108 if (reader.Read()) 108 if (reader.Read())
@@ -127,7 +127,7 @@ namespace OpenSim.Data.SQLite
127 /// <param name="asset">Asset Base</param> 127 /// <param name="asset">Asset Base</param>
128 override public void CreateAsset(AssetBase asset) 128 override public void CreateAsset(AssetBase asset)
129 { 129 {
130 //m_log.Info("[ASSET DB]: Creating Asset " + Util.ToRawUuidString(asset.FullID)); 130 //m_log.Info("[ASSET DB]: Creating Asset " + asset.FullID.ToString());
131 if (ExistsAsset(asset.FullID)) 131 if (ExistsAsset(asset.FullID))
132 { 132 {
133 //m_log.Info("[ASSET DB]: Asset exists already, ignoring."); 133 //m_log.Info("[ASSET DB]: Asset exists already, ignoring.");
@@ -138,7 +138,7 @@ namespace OpenSim.Data.SQLite
138 { 138 {
139 using (SqliteCommand cmd = new SqliteCommand(InsertAssetSQL, m_conn)) 139 using (SqliteCommand cmd = new SqliteCommand(InsertAssetSQL, m_conn))
140 { 140 {
141 cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(asset.FullID))); 141 cmd.Parameters.Add(new SqliteParameter(":UUID", asset.FullID.ToString()));
142 cmd.Parameters.Add(new SqliteParameter(":Name", asset.Name)); 142 cmd.Parameters.Add(new SqliteParameter(":Name", asset.Name));
143 cmd.Parameters.Add(new SqliteParameter(":Description", asset.Description)); 143 cmd.Parameters.Add(new SqliteParameter(":Description", asset.Description));
144 cmd.Parameters.Add(new SqliteParameter(":Type", asset.Type)); 144 cmd.Parameters.Add(new SqliteParameter(":Type", asset.Type));
@@ -164,7 +164,7 @@ namespace OpenSim.Data.SQLite
164 { 164 {
165 using (SqliteCommand cmd = new SqliteCommand(UpdateAssetSQL, m_conn)) 165 using (SqliteCommand cmd = new SqliteCommand(UpdateAssetSQL, m_conn))
166 { 166 {
167 cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(asset.FullID))); 167 cmd.Parameters.Add(new SqliteParameter(":UUID", asset.FullID.ToString()));
168 cmd.Parameters.Add(new SqliteParameter(":Name", asset.Name)); 168 cmd.Parameters.Add(new SqliteParameter(":Name", asset.Name));
169 cmd.Parameters.Add(new SqliteParameter(":Description", asset.Description)); 169 cmd.Parameters.Add(new SqliteParameter(":Description", asset.Description));
170 cmd.Parameters.Add(new SqliteParameter(":Type", asset.Type)); 170 cmd.Parameters.Add(new SqliteParameter(":Type", asset.Type));
@@ -204,7 +204,7 @@ namespace OpenSim.Data.SQLite
204 lock (this) { 204 lock (this) {
205 using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn)) 205 using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn))
206 { 206 {
207 cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid))); 207 cmd.Parameters.Add(new SqliteParameter(":UUID", uuid.ToString()));
208 using (IDataReader reader = cmd.ExecuteReader()) 208 using (IDataReader reader = cmd.ExecuteReader())
209 { 209 {
210 if (reader.Read()) 210 if (reader.Read())
@@ -230,7 +230,7 @@ namespace OpenSim.Data.SQLite
230 { 230 {
231 using (SqliteCommand cmd = new SqliteCommand(DeleteAssetSQL, m_conn)) 231 using (SqliteCommand cmd = new SqliteCommand(DeleteAssetSQL, m_conn))
232 { 232 {
233 cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid))); 233 cmd.Parameters.Add(new SqliteParameter(":UUID", uuid.ToString()));
234 234
235 cmd.ExecuteNonQuery(); 235 cmd.ExecuteNonQuery();
236 } 236 }