mirror of
https://github.com/opensim/opensim.git
synced 2026-05-20 15:25:47 +08:00
Added capbility to use MySQL as the database backend in stand alone mode for assets and inventory.
Added asset_plugin key to "StandAlone" section of OpenSim.ini
This commit is contained in:
@@ -40,28 +40,9 @@ namespace OpenSim.Framework.Data.MySQL
|
||||
|
||||
}
|
||||
|
||||
public AssetBase FetchAsset(LLUUID assetID)
|
||||
public AssetBase FetchAsset(LLUUID uuid)
|
||||
{
|
||||
AssetBase asset = null;
|
||||
|
||||
MySqlCommand cmd = new MySqlCommand("SELECT name, description, assetType, invType, local, temporary, data FROM assets WHERE id=?id", _dbConnection.Connection);
|
||||
MySqlParameter p = cmd.Parameters.Add("?id", MySqlDbType.Binary, 16);
|
||||
p.Value = assetID.GetBytes();
|
||||
using (MySqlDataReader dbReader = cmd.ExecuteReader(System.Data.CommandBehavior.SingleRow))
|
||||
{
|
||||
if (dbReader.Read())
|
||||
{
|
||||
asset = new AssetBase();
|
||||
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"];
|
||||
}
|
||||
}
|
||||
return asset;
|
||||
throw new Exception("The method or operation is not implemented.");
|
||||
}
|
||||
|
||||
public void CreateAsset(AssetBase asset)
|
||||
|
||||
Reference in New Issue
Block a user