From 23d478f2fa06d1dedabfb24cf6ff763b586173ce Mon Sep 17 00:00:00 2001 From: Kunnis Date: Sun, 9 Aug 2009 02:01:21 -0500 Subject: Adding in Reflection-based testing, to ensure that all properties are covered. --- OpenSim/Data/MySQL/MySQLAssetData.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenSim/Data/MySQL/MySQLAssetData.cs') diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs index 26cdd06..5d87649 100644 --- a/OpenSim/Data/MySQL/MySQLAssetData.cs +++ b/OpenSim/Data/MySQL/MySQLAssetData.cs @@ -168,6 +168,7 @@ namespace OpenSim.Data.MySQL } asset.Name = (string) dbReader["name"]; asset.Type = (sbyte) dbReader["assetType"]; + asset.Temporary = (bool)dbReader["temporary"]; } dbReader.Close(); cmd.Dispose(); -- cgit v1.1 From d2e5380cb2325ad42917c528c52a8ad42ec0176f Mon Sep 17 00:00:00 2001 From: Kunnis Date: Sat, 15 Aug 2009 10:54:48 -0500 Subject: * Fixed MySQL/MySQLAssetData.cs to properly do updates * Removed an extra parameter from MySQL/MySQLInventoryData.cs * Fixed a bug in SQLite/SQLiteAssetData.cs that was causing a NRE when updating an asset. * Improved the BasicAssetTest.cs to do full create/update/get testing * Improved the BasicInventoryTest.cs to do full create/update/get of both a folder and an item * Moved the null ref tests to the start of the PropertyCompareConstraint.cs, so that it doesn't throw when passing in a null item --- OpenSim/Data/MySQL/MySQLAssetData.cs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'OpenSim/Data/MySQL/MySQLAssetData.cs') diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs index 5d87649..0865083 100644 --- a/OpenSim/Data/MySQL/MySQLAssetData.cs +++ b/OpenSim/Data/MySQL/MySQLAssetData.cs @@ -196,18 +196,11 @@ namespace OpenSim.Data.MySQL { lock (_dbConnection) { - //m_log.Info("[ASSET DB]: Creating Asset " + asset.FullID); - if (ExistsAsset(asset.FullID)) - { - //m_log.Info("[ASSET DB]: Asset exists already, ignoring."); - return; - } - _dbConnection.CheckConnection(); MySqlCommand cmd = new MySqlCommand( - "insert INTO assets(id, name, description, assetType, local, temporary, create_time, access_time, data)" + + "replace INTO assets(id, name, description, assetType, local, temporary, create_time, access_time, data)" + "VALUES(?id, ?name, ?description, ?assetType, ?local, ?temporary, ?create_time, ?access_time, ?data)", _dbConnection.Connection); -- cgit v1.1