aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Data.MySQL/MySQLGridData.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Data.MySQL/MySQLGridData.cs')
-rw-r--r--OpenSim/Framework/Data.MySQL/MySQLGridData.cs21
1 files changed, 13 insertions, 8 deletions
diff --git a/OpenSim/Framework/Data.MySQL/MySQLGridData.cs b/OpenSim/Framework/Data.MySQL/MySQLGridData.cs
index 9876ab1..fdfc61c 100644
--- a/OpenSim/Framework/Data.MySQL/MySQLGridData.cs
+++ b/OpenSim/Framework/Data.MySQL/MySQLGridData.cs
@@ -25,13 +25,13 @@
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28
28using System; 29using System;
29using System.Collections.Generic; 30using System.Collections.Generic;
30using System.Data; 31using System.Data;
31using System.Security.Cryptography; 32using System.Security.Cryptography;
32using System.Text; 33using System.Text;
33using libsecondlife; 34using libsecondlife;
34
35using OpenSim.Framework.Console; 35using OpenSim.Framework.Console;
36 36
37namespace OpenSim.Framework.Data.MySQL 37namespace OpenSim.Framework.Data.MySQL
@@ -59,7 +59,9 @@ namespace OpenSim.Framework.Data.MySQL
59 string settingPooling = GridDataMySqlFile.ParseFileReadValue("pooling"); 59 string settingPooling = GridDataMySqlFile.ParseFileReadValue("pooling");
60 string settingPort = GridDataMySqlFile.ParseFileReadValue("port"); 60 string settingPort = GridDataMySqlFile.ParseFileReadValue("port");
61 61
62 database = new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling, settingPort); 62 database =
63 new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling,
64 settingPort);
63 } 65 }
64 66
65 /// <summary> 67 /// <summary>
@@ -108,7 +110,10 @@ namespace OpenSim.Framework.Data.MySQL
108 param["?xmax"] = xmax.ToString(); 110 param["?xmax"] = xmax.ToString();
109 param["?ymax"] = ymax.ToString(); 111 param["?ymax"] = ymax.ToString();
110 112
111 IDbCommand result = database.Query("SELECT * FROM regions WHERE locX >= ?xmin AND locX <= ?xmax AND locY >= ?ymin AND locY <= ?ymax", param); 113 IDbCommand result =
114 database.Query(
115 "SELECT * FROM regions WHERE locX >= ?xmin AND locX <= ?xmax AND locY >= ?ymin AND locY <= ?ymax",
116 param);
112 IDataReader reader = result.ExecuteReader(); 117 IDataReader reader = result.ExecuteReader();
113 118
114 RegionProfileData row; 119 RegionProfileData row;
@@ -123,7 +128,6 @@ namespace OpenSim.Framework.Data.MySQL
123 result.Dispose(); 128 result.Dispose();
124 129
125 return rows.ToArray(); 130 return rows.ToArray();
126
127 } 131 }
128 } 132 }
129 catch (Exception e) 133 catch (Exception e)
@@ -266,7 +270,10 @@ namespace OpenSim.Framework.Data.MySQL
266 Dictionary<string, string> param = new Dictionary<string, string>(); 270 Dictionary<string, string> param = new Dictionary<string, string>();
267 param["?x"] = x.ToString(); 271 param["?x"] = x.ToString();
268 param["?y"] = y.ToString(); 272 param["?y"] = y.ToString();
269 IDbCommand result = database.Query("SELECT * FROM reservations WHERE resXMin <= ?x AND resXMax >= ?x AND resYMin <= ?y AND resYMax >= ?y", param); 273 IDbCommand result =
274 database.Query(
275 "SELECT * FROM reservations WHERE resXMin <= ?x AND resXMax >= ?x AND resYMin <= ?y AND resYMax >= ?y",
276 param);
270 IDataReader reader = result.ExecuteReader(); 277 IDataReader reader = result.ExecuteReader();
271 278
272 ReservationData row = database.readReservationRow(reader); 279 ReservationData row = database.readReservationRow(reader);
@@ -284,6 +291,4 @@ namespace OpenSim.Framework.Data.MySQL
284 } 291 }
285 } 292 }
286 } 293 }
287 294} \ No newline at end of file
288
289}