diff options
author | Justin Clarke Casey | 2008-05-01 13:41:36 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-05-01 13:41:36 +0000 |
commit | 13e51b197cb842de916645c5e4b4d2d2898b8f00 (patch) | |
tree | d0a0c6f36e90b2b11ddfaa72394219054d471dd9 | |
parent | * Align new fields upgrade sql to have the same 'not null' and default settin... (diff) | |
download | opensim-SC-13e51b197cb842de916645c5e4b4d2d2898b8f00.zip opensim-SC-13e51b197cb842de916645c5e4b4d2d2898b8f00.tar.gz opensim-SC-13e51b197cb842de916645c5e4b4d2d2898b8f00.tar.bz2 opensim-SC-13e51b197cb842de916645c5e4b4d2d2898b8f00.tar.xz |
* Add more class cast exceptions to mysql read inventory item to cover all new fields - not just those I think are initially failing.
* This is more likely to allow existing mysql databases to work temporarily, if the previous revision doesn't work
-rw-r--r-- | OpenSim/Data/MySQL/MySQLInventoryData.cs | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs index 991e9c7..592ade9 100644 --- a/OpenSim/Data/MySQL/MySQLInventoryData.cs +++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs | |||
@@ -343,7 +343,14 @@ namespace OpenSim.Data.MySQL | |||
343 | m_log.WarnFormat("Could not cast salePrice {0} to {1}", reader["salePrice"], "int"); | 343 | m_log.WarnFormat("Could not cast salePrice {0} to {1}", reader["salePrice"], "int"); |
344 | } | 344 | } |
345 | 345 | ||
346 | item.SaleType = Convert.ToByte(reader["saleType"]); | 346 | try |
347 | { | ||
348 | item.SaleType = Convert.ToByte(reader["saleType"]); | ||
349 | } | ||
350 | catch (InvalidCastException) | ||
351 | { | ||
352 | m_log.WarnFormat("Could not convert saleType {0} to {1}", reader["saleType"], "byte"); | ||
353 | } | ||
347 | 354 | ||
348 | try | 355 | try |
349 | { | 356 | { |
@@ -354,8 +361,24 @@ namespace OpenSim.Data.MySQL | |||
354 | m_log.WarnFormat("Could not cast creationDate {0} to {1}", reader["creationDate"], "int"); | 361 | m_log.WarnFormat("Could not cast creationDate {0} to {1}", reader["creationDate"], "int"); |
355 | } | 362 | } |
356 | 363 | ||
357 | item.GroupID = new LLUUID(reader["groupID"].ToString()); | 364 | try |
358 | item.GroupOwned = Convert.ToBoolean(reader["groupOwned"]); | 365 | { |
366 | item.GroupID = new LLUUID(reader["groupID"].ToString()); | ||
367 | } | ||
368 | catch (Exception) | ||
369 | { | ||
370 | item.GroupID = LLUUID.Zero; | ||
371 | m_log.WarnFormat("Could not convert groupID {0} to {1}", reader["groupID"], "LLUUID"); | ||
372 | } | ||
373 | |||
374 | try | ||
375 | { | ||
376 | item.GroupOwned = Convert.ToBoolean(reader["groupOwned"]); | ||
377 | } | ||
378 | catch (InvalidCastException) | ||
379 | { | ||
380 | m_log.WarnFormat("Could not cast groupOwned {0} to {1}", reader["groupOwned"], "boolean"); | ||
381 | } | ||
359 | 382 | ||
360 | try | 383 | try |
361 | { | 384 | { |