mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
Thank you kindly, StrawberryFride for a patch that:
Solves the problem of unable to load prim items on region start in MSSQL. The error was in the MSSQLRegionData code that loads objects from the database, due to reliance on the ParentID field that is not used.
This commit is contained in:
@@ -185,7 +185,7 @@ namespace OpenSim.Data.MSSQL
|
||||
}
|
||||
if (type == typeof(sbyte))
|
||||
{
|
||||
return SqlDbType.TinyInt;
|
||||
return SqlDbType.Int;
|
||||
}
|
||||
if (type == typeof(Byte[]))
|
||||
{
|
||||
@@ -215,6 +215,10 @@ namespace OpenSim.Data.MSSQL
|
||||
{
|
||||
return value.ToString();
|
||||
}
|
||||
if (valueType == typeof(OpenMetaverse.UUID))
|
||||
{
|
||||
return value.ToString();
|
||||
}
|
||||
if (valueType == typeof(bool))
|
||||
{
|
||||
return (bool)value ? 1 : 0;
|
||||
@@ -223,6 +227,10 @@ namespace OpenSim.Data.MSSQL
|
||||
{
|
||||
return value;
|
||||
}
|
||||
if (valueType == typeof(int))
|
||||
{
|
||||
return value;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -269,6 +277,11 @@ namespace OpenSim.Data.MSSQL
|
||||
|
||||
private static readonly Dictionary<string, string> emptyDictionary = new Dictionary<string, string>();
|
||||
|
||||
/// <summary>
|
||||
/// Run a query and return a sql db command
|
||||
/// </summary>
|
||||
/// <param name="sql">The SQL query.</param>
|
||||
/// <returns></returns>
|
||||
internal AutoClosingSqlCommand Query(string sql)
|
||||
{
|
||||
return Query(sql, emptyDictionary);
|
||||
|
||||
Reference in New Issue
Block a user