From 6a5d7650d02979c74abcbbb3595729a4a6b55411 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 24 Sep 2009 18:23:55 -0700 Subject: All tests pass for MySQL/MySQLRegionData. Added OpenSim.GridServer.ini.example that I have been using for testing the ROBUST grid service with the GridClient. --- OpenSim/Data/MySQL/MySQLRegionData.cs | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'OpenSim/Data') diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs index ced26a4..e13e12c 100644 --- a/OpenSim/Data/MySQL/MySQLRegionData.cs +++ b/OpenSim/Data/MySQL/MySQLRegionData.cs @@ -77,7 +77,7 @@ namespace OpenSim.Data.MySQL cmd.Parameters.AddWithValue("?scopeID", scopeID.ToString()); List ret = RunCommand(cmd); - if (ret == null) + if (ret.Count == 0) return null; return ret[0]; @@ -95,7 +95,7 @@ namespace OpenSim.Data.MySQL cmd.Parameters.AddWithValue("?scopeID", scopeID.ToString()); List ret = RunCommand(cmd); - if (ret == null) + if (ret.Count == 0) return null; return ret[0]; @@ -170,10 +170,7 @@ namespace OpenSim.Data.MySQL result.Close(); CloseReaderCommand(cmd); - if (retList.Count > 0) - return retList; - - return null; + return retList; } public bool Store(RegionData data) @@ -182,12 +179,6 @@ namespace OpenSim.Data.MySQL data.Data.Remove("uuid"); if (data.Data.ContainsKey("ScopeID")) data.Data.Remove("ScopeID"); - if (data.Data.ContainsKey("regionName")) - data.Data.Remove("regionName"); - if (data.Data.ContainsKey("posX")) - data.Data.Remove("posX"); - if (data.Data.ContainsKey("posY")) - data.Data.Remove("posY"); string[] fields = new List(data.Data.Keys).ToArray(); -- cgit v1.1