diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/PGSQL/PGSQLXAssetData.cs | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/OpenSim/Data/PGSQL/PGSQLXAssetData.cs b/OpenSim/Data/PGSQL/PGSQLXAssetData.cs index d3518cf..6e88489 100644 --- a/OpenSim/Data/PGSQL/PGSQLXAssetData.cs +++ b/OpenSim/Data/PGSQL/PGSQLXAssetData.cs | |||
@@ -141,7 +141,7 @@ namespace OpenSim.Data.PGSQL | |||
141 | 141 | ||
142 | using (NpgsqlCommand cmd = new NpgsqlCommand( | 142 | using (NpgsqlCommand cmd = new NpgsqlCommand( |
143 | @"SELECT name, description, access_time, ""AssetType"", local, temporary, asset_flags, creatorid, data | 143 | @"SELECT name, description, access_time, ""AssetType"", local, temporary, asset_flags, creatorid, data |
144 | FROM XAssetsMeta | 144 | FROM XAssetsMeta |
145 | JOIN XAssetsData ON XAssetsMeta.hash = XAssetsData.Hash WHERE id=:ID", | 145 | JOIN XAssetsData ON XAssetsMeta.hash = XAssetsData.Hash WHERE id=:ID", |
146 | dbcon)) | 146 | dbcon)) |
147 | { | 147 | { |
@@ -179,7 +179,7 @@ namespace OpenSim.Data.PGSQL | |||
179 | WebUtil.CopyStream(decompressionStream, outputStream, int.MaxValue); | 179 | WebUtil.CopyStream(decompressionStream, outputStream, int.MaxValue); |
180 | // int compressedLength = asset.Data.Length; | 180 | // int compressedLength = asset.Data.Length; |
181 | asset.Data = outputStream.ToArray(); | 181 | asset.Data = outputStream.ToArray(); |
182 | 182 | ||
183 | // m_log.DebugFormat( | 183 | // m_log.DebugFormat( |
184 | // "[XASSET DB]: Decompressed {0} {1} to {2} bytes from {3}", | 184 | // "[XASSET DB]: Decompressed {0} {1} to {2} bytes from {3}", |
185 | // asset.ID, asset.Name, asset.Data.Length, compressedLength); | 185 | // asset.ID, asset.Name, asset.Data.Length, compressedLength); |
@@ -223,16 +223,16 @@ namespace OpenSim.Data.PGSQL | |||
223 | { | 223 | { |
224 | assetName = asset.Name.Substring(0, 64); | 224 | assetName = asset.Name.Substring(0, 64); |
225 | m_log.WarnFormat( | 225 | m_log.WarnFormat( |
226 | "[XASSET DB]: Name '{0}' for asset {1} truncated from {2} to {3} characters on add", | 226 | "[XASSET DB]: Name '{0}' for asset {1} truncated from {2} to {3} characters on add", |
227 | asset.Name, asset.ID, asset.Name.Length, assetName.Length); | 227 | asset.Name, asset.ID, asset.Name.Length, assetName.Length); |
228 | } | 228 | } |
229 | 229 | ||
230 | string assetDescription = asset.Description; | 230 | string assetDescription = asset.Description; |
231 | if (asset.Description.Length > 64) | 231 | if (asset.Description.Length > 64) |
232 | { | 232 | { |
233 | assetDescription = asset.Description.Substring(0, 64); | 233 | assetDescription = asset.Description.Substring(0, 64); |
234 | m_log.WarnFormat( | 234 | m_log.WarnFormat( |
235 | "[XASSET DB]: Description '{0}' for asset {1} truncated from {2} to {3} characters on add", | 235 | "[XASSET DB]: Description '{0}' for asset {1} truncated from {2} to {3} characters on add", |
236 | asset.Description, asset.ID, asset.Description.Length, assetDescription.Length); | 236 | asset.Description, asset.ID, asset.Description.Length, assetDescription.Length); |
237 | } | 237 | } |
238 | 238 | ||
@@ -268,8 +268,8 @@ namespace OpenSim.Data.PGSQL | |||
268 | where not exists( Select id from XAssetsMeta where id = :ID); | 268 | where not exists( Select id from XAssetsMeta where id = :ID); |
269 | 269 | ||
270 | update XAssetsMeta | 270 | update XAssetsMeta |
271 | set id = :ID, hash = :Hash, name = :Name, description = :Description, | 271 | set id = :ID, hash = :Hash, name = :Name, description = :Description, |
272 | ""AssetType"" = :AssetType, local = :Local, temporary = :Temporary, create_time = :CreateTime, | 272 | ""AssetType"" = :AssetType, local = :Local, temporary = :Temporary, create_time = :CreateTime, |
273 | access_time = :AccessTime, asset_flags = :AssetFlags, creatorid = :CreatorID | 273 | access_time = :AccessTime, asset_flags = :AssetFlags, creatorid = :CreatorID |
274 | where id = :ID; | 274 | where id = :ID; |
275 | ", | 275 | ", |
@@ -321,13 +321,13 @@ namespace OpenSim.Data.PGSQL | |||
321 | { | 321 | { |
322 | m_log.ErrorFormat("[XASSET DB]: PGSQL failure creating asset data {0} with name \"{1}\". Error: {2}", | 322 | m_log.ErrorFormat("[XASSET DB]: PGSQL failure creating asset data {0} with name \"{1}\". Error: {2}", |
323 | asset.FullID, asset.Name, e.Message); | 323 | asset.FullID, asset.Name, e.Message); |
324 | 324 | ||
325 | transaction.Rollback(); | 325 | transaction.Rollback(); |
326 | 326 | ||
327 | return; | 327 | return; |
328 | } | 328 | } |
329 | } | 329 | } |
330 | 330 | ||
331 | transaction.Commit(); | 331 | transaction.Commit(); |
332 | } | 332 | } |
333 | } | 333 | } |
@@ -374,7 +374,7 @@ namespace OpenSim.Data.PGSQL | |||
374 | catch (Exception e) | 374 | catch (Exception e) |
375 | { | 375 | { |
376 | m_log.ErrorFormat( | 376 | m_log.ErrorFormat( |
377 | "[XASSET PGSQL DB]: Failure updating access_time for asset {0} with name {1} : {2}", | 377 | "[XASSET PGSQL DB]: Failure updating access_time for asset {0} with name {1} : {2}", |
378 | assetMetadata.ID, assetMetadata.Name, e.Message); | 378 | assetMetadata.ID, assetMetadata.Name, e.Message); |
379 | } | 379 | } |
380 | } | 380 | } |
@@ -519,7 +519,7 @@ namespace OpenSim.Data.PGSQL | |||
519 | { | 519 | { |
520 | dbcon.Open(); | 520 | dbcon.Open(); |
521 | using(NpgsqlCommand cmd = new NpgsqlCommand(@"SELECT name, description, access_time, ""AssetType"", temporary, id, asset_flags, creatorid | 521 | using(NpgsqlCommand cmd = new NpgsqlCommand(@"SELECT name, description, access_time, ""AssetType"", temporary, id, asset_flags, creatorid |
522 | FROM XAssetsMeta | 522 | FROM XAssetsMeta |
523 | LIMIT :start, :count",dbcon)) | 523 | LIMIT :start, :count",dbcon)) |
524 | { | 524 | { |
525 | cmd.Parameters.Add(m_database.CreateParameter("start",start)); | 525 | cmd.Parameters.Add(m_database.CreateParameter("start",start)); |