aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLRegionData.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/MySQL/MySQLRegionData.cs24
1 files changed, 1 insertions, 23 deletions
diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs
index 12064a3..9115e93 100644
--- a/OpenSim/Data/MySQL/MySQLRegionData.cs
+++ b/OpenSim/Data/MySQL/MySQLRegionData.cs
@@ -81,15 +81,12 @@ namespace OpenSim.Data.MySQL
81 } 81 }
82 } 82 }
83 83
84 //BA MOD....
85 public RegionData GetSpecific(string regionName, UUID scopeID) 84 public RegionData GetSpecific(string regionName, UUID scopeID)
86 { 85 {
87 string command = "select * from `" + m_Realm + "` where regionName = ?regionName"; 86 string command = "select * from `" + m_Realm + "` where regionName = ?regionName";
88 if (scopeID != UUID.Zero) 87 if (scopeID != UUID.Zero)
89 command += " and ScopeID = ?scopeID"; 88 command += " and ScopeID = ?scopeID";
90 89
91 //command += " order by regionName";
92
93 using (MySqlCommand cmd = new MySqlCommand(command)) 90 using (MySqlCommand cmd = new MySqlCommand(command))
94 { 91 {
95 cmd.Parameters.AddWithValue("?regionName", regionName); 92 cmd.Parameters.AddWithValue("?regionName", regionName);
@@ -104,27 +101,8 @@ namespace OpenSim.Data.MySQL
104 101
105 } 102 }
106 103
107 public RegionData Get(int posX, int posY, UUID scopeID) 104 public RegionData Get(int posX, int posY, UUID scopeID)
108 { 105 {
109/* fixed size regions
110 string command = "select * from `"+m_Realm+"` where locX = ?posX and locY = ?posY";
111 if (scopeID != UUID.Zero)
112 command += " and ScopeID = ?scopeID";
113
114 using (MySqlCommand cmd = new MySqlCommand(command))
115 {
116 cmd.Parameters.AddWithValue("?posX", posX.ToString());
117 cmd.Parameters.AddWithValue("?posY", posY.ToString());
118 cmd.Parameters.AddWithValue("?scopeID", scopeID.ToString());
119
120 List<RegionData> ret = RunCommand(cmd);
121 if (ret.Count == 0)
122 return null;
123
124 return ret[0];
125 }
126*/
127 // extend database search for maximum region size area
128 string command = "select * from `" + m_Realm + "` where locX between ?startX and ?endX and locY between ?startY and ?endY"; 106 string command = "select * from `" + m_Realm + "` where locX between ?startX and ?endX and locY between ?startY and ?endY";
129 if (scopeID != UUID.Zero) 107 if (scopeID != UUID.Zero)
130 command += " and ScopeID = ?scopeID"; 108 command += " and ScopeID = ?scopeID";