mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +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);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
5
OpenSim/Data/MSSQL/Resources/012_RegionStore.sql
Normal file
5
OpenSim/Data/MSSQL/Resources/012_RegionStore.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
BEGIN TRANSACTION
|
||||
|
||||
ALTER TABLE prims ADD LinkNumber integer not null default 0
|
||||
|
||||
COMMIT
|
||||
Reference in New Issue
Block a user