aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorCasperW2009-12-27 07:11:21 +0100
committerCasperW2009-12-27 07:11:21 +0100
commit4b96a780399439b1bb05b92b016bed1bc614b1f6 (patch)
tree5fd4c5939161e4d5b32e55ae9988730dc86ff20e
parentConvert some remaining legacy lock()s for m_parts in SceneObjectGroup to Read... (diff)
parentCorrect some issues with the last commit (diff)
downloadopensim-SC_OLD-4b96a780399439b1bb05b92b016bed1bc614b1f6.zip
opensim-SC_OLD-4b96a780399439b1bb05b92b016bed1bc614b1f6.tar.gz
opensim-SC_OLD-4b96a780399439b1bb05b92b016bed1bc614b1f6.tar.bz2
opensim-SC_OLD-4b96a780399439b1bb05b92b016bed1bc614b1f6.tar.xz
Merge branch 'master' into casper
-rw-r--r--OpenSim/Data/MySQL/MySQLGenericTableHandler.cs8
1 files changed, 5 insertions, 3 deletions
diff --git a/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs b/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs
index 4dfc324..b2bd5f6 100644
--- a/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs
+++ b/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs
@@ -205,7 +205,8 @@ namespace OpenSim.Data.MySQL
205 foreach (FieldInfo fi in m_Fields.Values) 205 foreach (FieldInfo fi in m_Fields.Values)
206 { 206 {
207 names.Add(fi.Name); 207 names.Add(fi.Name);
208 values.Add(fi.GetValue(row).ToString()); 208 values.Add("?" + fi.Name);
209 cmd.Parameters.AddWithValue(fi.Name, fi.GetValue(row).ToString());
209 } 210 }
210 211
211 if (m_DataField != null) 212 if (m_DataField != null)
@@ -216,11 +217,12 @@ namespace OpenSim.Data.MySQL
216 foreach (KeyValuePair<string, string> kvp in data) 217 foreach (KeyValuePair<string, string> kvp in data)
217 { 218 {
218 names.Add(kvp.Key); 219 names.Add(kvp.Key);
219 values.Add(kvp.Value); 220 values.Add("?" + kvp.Key);
221 cmd.Parameters.AddWithValue("?" + kvp.Key, kvp.Value);
220 } 222 }
221 } 223 }
222 224
223 query = String.Format("replace into {0} (`", m_Realm) + String.Join("`,`", names.ToArray()) + "`) values ('" + String.Join("','", values.ToArray()) + "')"; 225 query = String.Format("replace into {0} (`", m_Realm) + String.Join("`,`", names.ToArray()) + "`) values (" + String.Join(",", values.ToArray()) + ")";
224 226
225 cmd.CommandText = query; 227 cmd.CommandText = query;
226 228