From c289c2b6d48cb9f46a7573ed70705a13dda9c772 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Thu, 5 Jun 2008 13:57:58 +0000 Subject: Mantis#1450. Thank you kindly, Boscata for a patch that addresses: I have detected a bug of conversion data type in OpenSim.Data.MSSQL.MSSQLInventoryData.addInventoryItem(InventoryItemBase item) in the GroupOwned field. My sollution is to change the flield to bit in the table. In the readInventoryItem(IDataReader reader) change too item.Flags = (uint) reader["flags"]; to item.Flags = Convert.ToUInt32(reader["flags"]); Now Inventory runs fine. --- OpenSim/Data/MSSQL/MSSQLInventoryData.cs | 2 +- OpenSim/Data/MSSQL/Resources/CreateItemsTable.sql | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'OpenSim/Data/MSSQL') diff --git a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs index 0c1c3f1..128fb8f 100644 --- a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs +++ b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs @@ -317,7 +317,7 @@ namespace OpenSim.Data.MSSQL item.CreationDate = (int) reader["creationDate"]; item.GroupID = new LLUUID(reader["groupID"].ToString()); item.GroupOwned = Convert.ToBoolean(reader["groupOwned"]); - item.Flags = (uint) reader["flags"]; + item.Flags = Convert.ToUInt32(reader["flags"]); return item; } diff --git a/OpenSim/Data/MSSQL/Resources/CreateItemsTable.sql b/OpenSim/Data/MSSQL/Resources/CreateItemsTable.sql index 6f6bb43..7a76d47 100644 --- a/OpenSim/Data/MSSQL/Resources/CreateItemsTable.sql +++ b/OpenSim/Data/MSSQL/Resources/CreateItemsTable.sql @@ -22,7 +22,7 @@ CREATE TABLE [inventoryitems] ( [saleType] [tinyint] default NULL, [creationDate] [int] default NULL, [groupID] [varchar](36) default NULL, - [groupOwned] [tinyint] default NULL, + [groupOwned] [bit] default NULL, [flags] [int] unsigned default NULL, PRIMARY KEY CLUSTERED ( @@ -43,3 +43,4 @@ CREATE NONCLUSTERED INDEX [folder] ON [inventoryitems] SET ANSI_PADDING OFF + -- cgit v1.1