* Restore non dash asset UUID persistence which was made dashed in r3069
* Apologies, any sqlite databases created between r3069 and this change will now contain unfindable assets. * But sqlite asset databases used previous to r3069 will now work again. * This change may have been done on purpose, so it's not impossible it will be re-revertedThreadPoolClientBranch
parent
258a4dc282
commit
c15eec2cb0
|
@ -66,7 +66,7 @@ namespace OpenSim.Framework.Data.SQLite
|
||||||
|
|
||||||
using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn))
|
using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn))
|
||||||
{
|
{
|
||||||
cmd.Parameters.Add(new SqliteParameter(":UUID", uuid.UUID.ToString()));
|
cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid)));
|
||||||
using (IDataReader reader = cmd.ExecuteReader())
|
using (IDataReader reader = cmd.ExecuteReader())
|
||||||
{
|
{
|
||||||
if (reader.Read())
|
if (reader.Read())
|
||||||
|
@ -86,7 +86,7 @@ namespace OpenSim.Framework.Data.SQLite
|
||||||
|
|
||||||
public void CreateAsset(AssetBase asset)
|
public void CreateAsset(AssetBase asset)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Verbose("SQLITE", "Creating Asset " + asset.FullID.UUID.ToString());
|
MainLog.Instance.Verbose("SQLITE", "Creating Asset " + Util.ToRawUuidString(asset.FullID));
|
||||||
if (ExistsAsset(asset.FullID))
|
if (ExistsAsset(asset.FullID))
|
||||||
{
|
{
|
||||||
MainLog.Instance.Verbose("SQLITE", "Asset exists, updating instead. You should fix the caller for this!");
|
MainLog.Instance.Verbose("SQLITE", "Asset exists, updating instead. You should fix the caller for this!");
|
||||||
|
@ -96,7 +96,7 @@ namespace OpenSim.Framework.Data.SQLite
|
||||||
{
|
{
|
||||||
using (SqliteCommand cmd = new SqliteCommand(InsertAssetSQL, m_conn))
|
using (SqliteCommand cmd = new SqliteCommand(InsertAssetSQL, m_conn))
|
||||||
{
|
{
|
||||||
cmd.Parameters.Add(new SqliteParameter(":UUID", asset.FullID.UUID.ToString()));
|
cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(asset.FullID)));
|
||||||
cmd.Parameters.Add(new SqliteParameter(":Name", asset.Name));
|
cmd.Parameters.Add(new SqliteParameter(":Name", asset.Name));
|
||||||
cmd.Parameters.Add(new SqliteParameter(":Description", asset.Description));
|
cmd.Parameters.Add(new SqliteParameter(":Description", asset.Description));
|
||||||
cmd.Parameters.Add(new SqliteParameter(":Type", asset.Type));
|
cmd.Parameters.Add(new SqliteParameter(":Type", asset.Type));
|
||||||
|
@ -116,7 +116,7 @@ namespace OpenSim.Framework.Data.SQLite
|
||||||
|
|
||||||
using (SqliteCommand cmd = new SqliteCommand(UpdateAssetSQL, m_conn))
|
using (SqliteCommand cmd = new SqliteCommand(UpdateAssetSQL, m_conn))
|
||||||
{
|
{
|
||||||
cmd.Parameters.Add(new SqliteParameter(":UUID", asset.FullID.UUID.ToString()));
|
cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(asset.FullID)));
|
||||||
cmd.Parameters.Add(new SqliteParameter(":Name", asset.Name));
|
cmd.Parameters.Add(new SqliteParameter(":Name", asset.Name));
|
||||||
cmd.Parameters.Add(new SqliteParameter(":Description", asset.Description));
|
cmd.Parameters.Add(new SqliteParameter(":Description", asset.Description));
|
||||||
cmd.Parameters.Add(new SqliteParameter(":Type", asset.Type));
|
cmd.Parameters.Add(new SqliteParameter(":Type", asset.Type));
|
||||||
|
@ -145,7 +145,7 @@ namespace OpenSim.Framework.Data.SQLite
|
||||||
{
|
{
|
||||||
using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn))
|
using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn))
|
||||||
{
|
{
|
||||||
cmd.Parameters.Add(new SqliteParameter(":UUID", uuid.UUID.ToString()));
|
cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid)));
|
||||||
using (IDataReader reader = cmd.ExecuteReader())
|
using (IDataReader reader = cmd.ExecuteReader())
|
||||||
{
|
{
|
||||||
if(reader.Read())
|
if(reader.Read())
|
||||||
|
@ -166,7 +166,7 @@ namespace OpenSim.Framework.Data.SQLite
|
||||||
{
|
{
|
||||||
using (SqliteCommand cmd = new SqliteCommand(DeleteAssetSQL, m_conn))
|
using (SqliteCommand cmd = new SqliteCommand(DeleteAssetSQL, m_conn))
|
||||||
{
|
{
|
||||||
cmd.Parameters.Add(new SqliteParameter(":UUID", uuid.UUID.ToString()));
|
cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid)));
|
||||||
|
|
||||||
cmd.ExecuteNonQuery();
|
cmd.ExecuteNonQuery();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue