From 098f86f5e00ae07c274982533528bf5d7d936b8b Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 22 Dec 2020 03:33:17 +0000 Subject: [PATCH] remove replaced code --- OpenSim/Data/MySQL/MySQLSimulationData.cs | 85 +---------------------- 1 file changed, 3 insertions(+), 82 deletions(-) diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs index 6ae66d7505..0cc024d846 100644 --- a/OpenSim/Data/MySQL/MySQLSimulationData.cs +++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs @@ -313,7 +313,7 @@ namespace OpenSim.Data.MySQL cmd.CommandText = "delete from primshapes where UUID " + sqlparams; ExecuteNonQuery(cmd); - cmd.CommandText = "delete from primitems where PrimID " + sqlparams; + cmd.CommandText = "delete from primitems where primID " + sqlparams; ExecuteNonQuery(cmd); dbcon.Close(); @@ -338,87 +338,8 @@ namespace OpenSim.Data.MySQL using (MySqlCommand cmd = dbcon.CreateCommand()) { - cmd.CommandText = "delete from primitems where PrimID = ?PrimID"; - cmd.Parameters.AddWithValue("PrimID", uuid.ToString()); - - ExecuteNonQuery(cmd); - } - dbcon.Close(); - } - } - } - - /// - /// Remove all persisted shapes for a list of prims - /// The caller must acquire the necessrary synchronization locks - /// - /// the list of UUIDs - private void RemoveShapes(List uuids) - { - lock (m_dbLock) - { - string sql = "delete from primshapes where "; - using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) - { - dbcon.Open(); - - using (MySqlCommand cmd = dbcon.CreateCommand()) - { - for (int i = 0; i < uuids.Count; i++) - { - if ((i + 1) == uuids.Count) - {// end of the list - sql += "(UUID = ?UUID" + i + ")"; - } - else - { - sql += "(UUID = ?UUID" + i + ") or "; - } - } - cmd.CommandText = sql; - - for (int i = 0; i < uuids.Count; i++) - cmd.Parameters.AddWithValue("UUID" + i, uuids[i].ToString()); - - ExecuteNonQuery(cmd); - } - dbcon.Close(); - } - } - } - - /// - /// Remove all persisted items for a list of prims - /// The caller must acquire the necessrary synchronization locks - /// - /// the list of UUIDs - private void RemoveItems(List uuids) - { - lock (m_dbLock) - { - string sql = "delete from primitems where "; - using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) - { - dbcon.Open(); - - using (MySqlCommand cmd = dbcon.CreateCommand()) - { - for (int i = 0; i < uuids.Count; i++) - { - if ((i + 1) == uuids.Count) - { - // end of the list - sql += "(PrimID = ?PrimID" + i + ")"; - } - else - { - sql += "(PrimID = ?PrimID" + i + ") or "; - } - } - cmd.CommandText = sql; - - for (int i = 0; i < uuids.Count; i++) - cmd.Parameters.AddWithValue("PrimID" + i, uuids[i].ToString()); + cmd.CommandText = "delete from primitems where primID = ?PrimID"; + cmd.Parameters.AddWithValue("primID", uuid.ToString()); ExecuteNonQuery(cmd); }