From 7117f8b6803d1ef2bf9bbbdef2a8e4e3649c25e2 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Thu, 25 Sep 2008 00:20:57 +0000 Subject: removal of more dead alter table code --- OpenSim/Data/MySQL/MySQLRegionData.cs | 41 ++--------------------------------- 1 file changed, 2 insertions(+), 39 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs index 284c970..c94e6a3 100644 --- a/OpenSim/Data/MySQL/MySQLRegionData.cs +++ b/OpenSim/Data/MySQL/MySQLRegionData.cs @@ -1711,25 +1711,7 @@ namespace OpenSim.Data.MySQL s.ExtraParams = (byte[]) row["ExtraParams"]; - try - { - s.State = Convert.ToByte(row["State"]); - } - catch (InvalidCastException) - { - // Database table was created before we got here and needs to be created! :P - lock (m_dataSet) - { - using ( - MySqlCommand cmd = - new MySqlCommand( - "ALTER TABLE `primshapes` ADD COLUMN `State` int NOT NULL default 0;", - m_connection)) - { - cmd.ExecuteNonQuery(); - } - } - } + s.State = Convert.ToByte(row["State"]); return s; } @@ -1772,26 +1754,7 @@ namespace OpenSim.Data.MySQL row["ProfileHollow"] = s.ProfileHollow; row["Texture"] = s.TextureEntry; row["ExtraParams"] = s.ExtraParams; - - try - { - row["State"] = s.State; - } - catch (MySqlException) - { - lock (m_dataSet) - { - // Database table was created before we got here and needs to be created! :P - using ( - MySqlCommand cmd = - new MySqlCommand( - "ALTER TABLE `primshapes` ADD COLUMN `State` int NOT NULL default 0;", - m_connection)) - { - cmd.ExecuteNonQuery(); - } - } - } + row["State"] = s.State; } /// -- cgit v1.1