aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL
diff options
context:
space:
mode:
authorKunnis2009-08-15 10:54:48 -0500
committerTeravus Ovares (Dan Olivares)2009-08-16 14:17:29 -0400
commitd2e5380cb2325ad42917c528c52a8ad42ec0176f (patch)
tree614ef74c8083db2afb1384b2acba0108e493b6c7 /OpenSim/Data/MySQL
parent* Modified SQLite/SQLiteInventoryStore.cs to not throw if the inventory row d... (diff)
downloadopensim-SC-d2e5380cb2325ad42917c528c52a8ad42ec0176f.zip
opensim-SC-d2e5380cb2325ad42917c528c52a8ad42ec0176f.tar.gz
opensim-SC-d2e5380cb2325ad42917c528c52a8ad42ec0176f.tar.bz2
opensim-SC-d2e5380cb2325ad42917c528c52a8ad42ec0176f.tar.xz
* 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
Diffstat (limited to 'OpenSim/Data/MySQL')
-rw-r--r--OpenSim/Data/MySQL/MySQLAssetData.cs9
-rw-r--r--OpenSim/Data/MySQL/MySQLInventoryData.cs2
2 files changed, 2 insertions, 9 deletions
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
196 { 196 {
197 lock (_dbConnection) 197 lock (_dbConnection)
198 { 198 {
199 //m_log.Info("[ASSET DB]: Creating Asset " + asset.FullID);
200 if (ExistsAsset(asset.FullID))
201 {
202 //m_log.Info("[ASSET DB]: Asset exists already, ignoring.");
203 return;
204 }
205
206 _dbConnection.CheckConnection(); 199 _dbConnection.CheckConnection();
207 200
208 MySqlCommand cmd = 201 MySqlCommand cmd =
209 new MySqlCommand( 202 new MySqlCommand(
210 "insert INTO assets(id, name, description, assetType, local, temporary, create_time, access_time, data)" + 203 "replace INTO assets(id, name, description, assetType, local, temporary, create_time, access_time, data)" +
211 "VALUES(?id, ?name, ?description, ?assetType, ?local, ?temporary, ?create_time, ?access_time, ?data)", 204 "VALUES(?id, ?name, ?description, ?assetType, ?local, ?temporary, ?create_time, ?access_time, ?data)",
212 _dbConnection.Connection); 205 _dbConnection.Connection);
213 206
diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs
index 121ef7a..849c246 100644
--- a/OpenSim/Data/MySQL/MySQLInventoryData.cs
+++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs
@@ -604,7 +604,7 @@ namespace OpenSim.Data.MySQL
604 cmd.Parameters.AddWithValue("?agentID", folder.Owner.ToString()); 604 cmd.Parameters.AddWithValue("?agentID", folder.Owner.ToString());
605 cmd.Parameters.AddWithValue("?parentFolderID", folder.ParentID.ToString()); 605 cmd.Parameters.AddWithValue("?parentFolderID", folder.ParentID.ToString());
606 cmd.Parameters.AddWithValue("?folderName", folderName); 606 cmd.Parameters.AddWithValue("?folderName", folderName);
607 cmd.Parameters.AddWithValue("?type", (short) folder.Type); 607 cmd.Parameters.AddWithValue("?type", folder.Type);
608 cmd.Parameters.AddWithValue("?version", folder.Version); 608 cmd.Parameters.AddWithValue("?version", folder.Version);
609 609
610 try 610 try