Attempt to handle MYSQL error fetching assets
parent
011ad46960
commit
232613638f
|
@ -76,21 +76,28 @@ namespace OpenSim.Framework.Data.MySQL
|
|||
_dbConnection.Connection);
|
||||
MySqlParameter p = cmd.Parameters.Add("?id", MySqlDbType.Binary, 16);
|
||||
p.Value = assetID.GetBytes();
|
||||
try
|
||||
{
|
||||
using (MySqlDataReader dbReader = cmd.ExecuteReader(CommandBehavior.SingleRow))
|
||||
{
|
||||
if (dbReader.Read())
|
||||
{
|
||||
asset = new AssetBase();
|
||||
asset.Data = (byte[]) dbReader["data"];
|
||||
asset.Description = (string) dbReader["description"];
|
||||
asset.Data = (byte[])dbReader["data"];
|
||||
asset.Description = (string)dbReader["description"];
|
||||
asset.FullID = assetID;
|
||||
asset.InvType = (sbyte) dbReader["invType"];
|
||||
asset.Local = ((sbyte) dbReader["local"]) != 0 ? true : false;
|
||||
asset.Name = (string) dbReader["name"];
|
||||
asset.Type = (sbyte) dbReader["assetType"];
|
||||
asset.InvType = (sbyte)dbReader["invType"];
|
||||
asset.Local = ((sbyte)dbReader["local"]) != 0 ? true : false;
|
||||
asset.Name = (string)dbReader["name"];
|
||||
asset.Type = (sbyte)dbReader["assetType"];
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
MainLog.Instance.Warn("ASSETS", "MySql failure fetching asset");
|
||||
}
|
||||
}
|
||||
return asset;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue