squashing further warnings.
parent
3fb0a08619
commit
0171e76246
|
@ -166,7 +166,7 @@ namespace OpenSim.Data.MySQL
|
||||||
MySqlCommand cmd = m_connection.CreateCommand();
|
MySqlCommand cmd = m_connection.CreateCommand();
|
||||||
|
|
||||||
cmd.CommandText = sql;
|
cmd.CommandText = sql;
|
||||||
cmd.Parameters.Add("?RegionID", regionID.ToString());
|
cmd.Parameters.AddWithValue("?RegionID", regionID.ToString());
|
||||||
|
|
||||||
IDataReader r = cmd.ExecuteReader();
|
IDataReader r = cmd.ExecuteReader();
|
||||||
|
|
||||||
|
@ -209,13 +209,13 @@ namespace OpenSim.Data.MySQL
|
||||||
if(m_FieldMap[name].GetValue(es) is bool)
|
if(m_FieldMap[name].GetValue(es) is bool)
|
||||||
{
|
{
|
||||||
if((bool)m_FieldMap[name].GetValue(es))
|
if((bool)m_FieldMap[name].GetValue(es))
|
||||||
cmd.Parameters.Add("?"+name, "1");
|
cmd.Parameters.AddWithValue("?"+name, "1");
|
||||||
else
|
else
|
||||||
cmd.Parameters.Add("?"+name, "0");
|
cmd.Parameters.AddWithValue("?"+name, "0");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cmd.Parameters.Add("?"+name, m_FieldMap[name].GetValue(es).ToString());
|
cmd.Parameters.AddWithValue("?"+name, m_FieldMap[name].GetValue(es).ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -233,8 +233,8 @@ namespace OpenSim.Data.MySQL
|
||||||
r.Close();
|
r.Close();
|
||||||
|
|
||||||
cmd.CommandText = "insert into estate_map values (?RegionID, ?EstateID)";
|
cmd.CommandText = "insert into estate_map values (?RegionID, ?EstateID)";
|
||||||
cmd.Parameters.Add("?RegionID", regionID.ToString());
|
cmd.Parameters.AddWithValue("?RegionID", regionID.ToString());
|
||||||
cmd.Parameters.Add("?EstateID", es.EstateID.ToString());
|
cmd.Parameters.AddWithValue("?EstateID", es.EstateID.ToString());
|
||||||
|
|
||||||
// This will throw on dupe key
|
// This will throw on dupe key
|
||||||
try
|
try
|
||||||
|
@ -249,7 +249,7 @@ namespace OpenSim.Data.MySQL
|
||||||
//
|
//
|
||||||
cmd.Parameters.Clear();
|
cmd.Parameters.Clear();
|
||||||
cmd.CommandText = "insert into estateban select "+es.EstateID.ToString()+", bannedUUID, bannedIp, bannedIpHostMask, '' from regionban where regionban.regionUUID = ?UUID";
|
cmd.CommandText = "insert into estateban select "+es.EstateID.ToString()+", bannedUUID, bannedIp, bannedIpHostMask, '' from regionban where regionban.regionUUID = ?UUID";
|
||||||
cmd.Parameters.Add("?UUID", regionID.ToString());
|
cmd.Parameters.AddWithValue("?UUID", regionID.ToString());
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -283,13 +283,13 @@ namespace OpenSim.Data.MySQL
|
||||||
if(m_FieldMap[name].GetValue(es) is bool)
|
if(m_FieldMap[name].GetValue(es) is bool)
|
||||||
{
|
{
|
||||||
if((bool)m_FieldMap[name].GetValue(es))
|
if((bool)m_FieldMap[name].GetValue(es))
|
||||||
cmd.Parameters.Add("?"+name, "1");
|
cmd.Parameters.AddWithValue("?"+name, "1");
|
||||||
else
|
else
|
||||||
cmd.Parameters.Add("?"+name, "0");
|
cmd.Parameters.AddWithValue("?"+name, "0");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cmd.Parameters.Add("?"+name, m_FieldMap[name].GetValue(es).ToString());
|
cmd.Parameters.AddWithValue("?"+name, m_FieldMap[name].GetValue(es).ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -310,7 +310,7 @@ namespace OpenSim.Data.MySQL
|
||||||
MySqlCommand cmd = m_connection.CreateCommand();
|
MySqlCommand cmd = m_connection.CreateCommand();
|
||||||
|
|
||||||
cmd.CommandText = "select bannedUUID from estateban where EstateID = ?EstateID";
|
cmd.CommandText = "select bannedUUID from estateban where EstateID = ?EstateID";
|
||||||
cmd.Parameters.Add("?EstateID", es.EstateID);
|
cmd.Parameters.AddWithValue("?EstateID", es.EstateID);
|
||||||
|
|
||||||
IDataReader r = cmd.ExecuteReader();
|
IDataReader r = cmd.ExecuteReader();
|
||||||
|
|
||||||
|
@ -336,7 +336,7 @@ namespace OpenSim.Data.MySQL
|
||||||
MySqlCommand cmd = m_connection.CreateCommand();
|
MySqlCommand cmd = m_connection.CreateCommand();
|
||||||
|
|
||||||
cmd.CommandText = "delete from estateban where EstateID = ?EstateID";
|
cmd.CommandText = "delete from estateban where EstateID = ?EstateID";
|
||||||
cmd.Parameters.Add("?EstateID", es.EstateID.ToString());
|
cmd.Parameters.AddWithValue("?EstateID", es.EstateID.ToString());
|
||||||
|
|
||||||
cmd.ExecuteNonQuery();
|
cmd.ExecuteNonQuery();
|
||||||
|
|
||||||
|
@ -346,8 +346,8 @@ namespace OpenSim.Data.MySQL
|
||||||
|
|
||||||
foreach(EstateBan b in es.EstateBans)
|
foreach(EstateBan b in es.EstateBans)
|
||||||
{
|
{
|
||||||
cmd.Parameters.Add("?EstateID", es.EstateID.ToString());
|
cmd.Parameters.AddWithValue("?EstateID", es.EstateID.ToString());
|
||||||
cmd.Parameters.Add("?bannedUUID", b.bannedUUID.ToString());
|
cmd.Parameters.AddWithValue("?bannedUUID", b.bannedUUID.ToString());
|
||||||
|
|
||||||
cmd.ExecuteNonQuery();
|
cmd.ExecuteNonQuery();
|
||||||
cmd.Parameters.Clear();
|
cmd.Parameters.Clear();
|
||||||
|
@ -361,7 +361,7 @@ namespace OpenSim.Data.MySQL
|
||||||
MySqlCommand cmd = m_connection.CreateCommand();
|
MySqlCommand cmd = m_connection.CreateCommand();
|
||||||
|
|
||||||
cmd.CommandText = "delete from "+table+" where EstateID = ?EstateID";
|
cmd.CommandText = "delete from "+table+" where EstateID = ?EstateID";
|
||||||
cmd.Parameters.Add("?EstateID", EstateID.ToString());
|
cmd.Parameters.AddWithValue("?EstateID", EstateID.ToString());
|
||||||
|
|
||||||
cmd.ExecuteNonQuery();
|
cmd.ExecuteNonQuery();
|
||||||
|
|
||||||
|
@ -371,8 +371,8 @@ namespace OpenSim.Data.MySQL
|
||||||
|
|
||||||
foreach(LLUUID uuid in data)
|
foreach(LLUUID uuid in data)
|
||||||
{
|
{
|
||||||
cmd.Parameters.Add("?EstateID", EstateID.ToString());
|
cmd.Parameters.AddWithValue("?EstateID", EstateID.ToString());
|
||||||
cmd.Parameters.Add("?uuid", uuid.ToString());
|
cmd.Parameters.AddWithValue("?uuid", uuid.ToString());
|
||||||
|
|
||||||
cmd.ExecuteNonQuery();
|
cmd.ExecuteNonQuery();
|
||||||
cmd.Parameters.Clear();
|
cmd.Parameters.Clear();
|
||||||
|
@ -388,13 +388,13 @@ namespace OpenSim.Data.MySQL
|
||||||
MySqlCommand cmd = m_connection.CreateCommand();
|
MySqlCommand cmd = m_connection.CreateCommand();
|
||||||
|
|
||||||
cmd.CommandText = "select uuid from "+table+" where EstateID = ?EstateID";
|
cmd.CommandText = "select uuid from "+table+" where EstateID = ?EstateID";
|
||||||
cmd.Parameters.Add("?EstateID", EstateID);
|
cmd.Parameters.AddWithValue("?EstateID", EstateID);
|
||||||
|
|
||||||
IDataReader r = cmd.ExecuteReader();
|
IDataReader r = cmd.ExecuteReader();
|
||||||
|
|
||||||
while(r.Read())
|
while(r.Read())
|
||||||
{
|
{
|
||||||
EstateBan eb = new EstateBan();
|
// EstateBan eb = new EstateBan();
|
||||||
|
|
||||||
LLUUID uuid = new LLUUID();
|
LLUUID uuid = new LLUUID();
|
||||||
LLUUID.TryParse(r["uuid"].ToString(), out uuid);
|
LLUUID.TryParse(r["uuid"].ToString(), out uuid);
|
||||||
|
|
|
@ -298,7 +298,7 @@ namespace OpenSim.Data.NHibernate
|
||||||
Terrain t = session.Load(typeof(Terrain), regionID) as Terrain;
|
Terrain t = session.Load(typeof(Terrain), regionID) as Terrain;
|
||||||
return t.Doubles;
|
return t.Doubles;
|
||||||
}
|
}
|
||||||
catch (ObjectNotFoundException e)
|
catch (ObjectNotFoundException)
|
||||||
{
|
{
|
||||||
m_log.Info("No terrain yet");
|
m_log.Info("No terrain yet");
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -318,7 +318,7 @@ namespace OpenSim.Data.MySQL
|
||||||
|
|
||||||
while(r.Read())
|
while(r.Read())
|
||||||
{
|
{
|
||||||
EstateBan eb = new EstateBan();
|
// EstateBan eb = new EstateBan();
|
||||||
|
|
||||||
LLUUID uuid = new LLUUID();
|
LLUUID uuid = new LLUUID();
|
||||||
LLUUID.TryParse(r["uuid"].ToString(), out uuid);
|
LLUUID.TryParse(r["uuid"].ToString(), out uuid);
|
||||||
|
|
Loading…
Reference in New Issue