diff options
author | Charles Krinke | 2009-01-07 15:03:41 +0000 |
---|---|---|
committer | Charles Krinke | 2009-01-07 15:03:41 +0000 |
commit | 0f9918f1d3df19e4feeb6a742de376aebe4d6f2f (patch) | |
tree | aa60bf8dd5147082bd43aa6f07b517ae2b9614d5 /OpenSim/Data/MSSQL/MSSQLManager.cs | |
parent | * Added a client version report. (diff) | |
download | opensim-SC_OLD-0f9918f1d3df19e4feeb6a742de376aebe4d6f2f.zip opensim-SC_OLD-0f9918f1d3df19e4feeb6a742de376aebe4d6f2f.tar.gz opensim-SC_OLD-0f9918f1d3df19e4feeb6a742de376aebe4d6f2f.tar.bz2 opensim-SC_OLD-0f9918f1d3df19e4feeb6a742de376aebe4d6f2f.tar.xz |
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.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/MSSQL/MSSQLManager.cs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLManager.cs b/OpenSim/Data/MSSQL/MSSQLManager.cs index b3e9b6e..47d4cbc 100644 --- a/OpenSim/Data/MSSQL/MSSQLManager.cs +++ b/OpenSim/Data/MSSQL/MSSQLManager.cs | |||
@@ -185,7 +185,7 @@ namespace OpenSim.Data.MSSQL | |||
185 | } | 185 | } |
186 | if (type == typeof(sbyte)) | 186 | if (type == typeof(sbyte)) |
187 | { | 187 | { |
188 | return SqlDbType.TinyInt; | 188 | return SqlDbType.Int; |
189 | } | 189 | } |
190 | if (type == typeof(Byte[])) | 190 | if (type == typeof(Byte[])) |
191 | { | 191 | { |
@@ -215,6 +215,10 @@ namespace OpenSim.Data.MSSQL | |||
215 | { | 215 | { |
216 | return value.ToString(); | 216 | return value.ToString(); |
217 | } | 217 | } |
218 | if (valueType == typeof(OpenMetaverse.UUID)) | ||
219 | { | ||
220 | return value.ToString(); | ||
221 | } | ||
218 | if (valueType == typeof(bool)) | 222 | if (valueType == typeof(bool)) |
219 | { | 223 | { |
220 | return (bool)value ? 1 : 0; | 224 | return (bool)value ? 1 : 0; |
@@ -223,6 +227,10 @@ namespace OpenSim.Data.MSSQL | |||
223 | { | 227 | { |
224 | return value; | 228 | return value; |
225 | } | 229 | } |
230 | if (valueType == typeof(int)) | ||
231 | { | ||
232 | return value; | ||
233 | } | ||
226 | return value; | 234 | return value; |
227 | } | 235 | } |
228 | 236 | ||
@@ -269,6 +277,11 @@ namespace OpenSim.Data.MSSQL | |||
269 | 277 | ||
270 | private static readonly Dictionary<string, string> emptyDictionary = new Dictionary<string, string>(); | 278 | private static readonly Dictionary<string, string> emptyDictionary = new Dictionary<string, string>(); |
271 | 279 | ||
280 | /// <summary> | ||
281 | /// Run a query and return a sql db command | ||
282 | /// </summary> | ||
283 | /// <param name="sql">The SQL query.</param> | ||
284 | /// <returns></returns> | ||
272 | internal AutoClosingSqlCommand Query(string sql) | 285 | internal AutoClosingSqlCommand Query(string sql) |
273 | { | 286 | { |
274 | return Query(sql, emptyDictionary); | 287 | return Query(sql, emptyDictionary); |