diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLRegionData.cs | 41 |
1 files changed, 2 insertions, 39 deletions
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 | |||
1711 | 1711 | ||
1712 | s.ExtraParams = (byte[]) row["ExtraParams"]; | 1712 | s.ExtraParams = (byte[]) row["ExtraParams"]; |
1713 | 1713 | ||
1714 | try | 1714 | s.State = Convert.ToByte(row["State"]); |
1715 | { | ||
1716 | s.State = Convert.ToByte(row["State"]); | ||
1717 | } | ||
1718 | catch (InvalidCastException) | ||
1719 | { | ||
1720 | // Database table was created before we got here and needs to be created! :P | ||
1721 | lock (m_dataSet) | ||
1722 | { | ||
1723 | using ( | ||
1724 | MySqlCommand cmd = | ||
1725 | new MySqlCommand( | ||
1726 | "ALTER TABLE `primshapes` ADD COLUMN `State` int NOT NULL default 0;", | ||
1727 | m_connection)) | ||
1728 | { | ||
1729 | cmd.ExecuteNonQuery(); | ||
1730 | } | ||
1731 | } | ||
1732 | } | ||
1733 | 1715 | ||
1734 | return s; | 1716 | return s; |
1735 | } | 1717 | } |
@@ -1772,26 +1754,7 @@ namespace OpenSim.Data.MySQL | |||
1772 | row["ProfileHollow"] = s.ProfileHollow; | 1754 | row["ProfileHollow"] = s.ProfileHollow; |
1773 | row["Texture"] = s.TextureEntry; | 1755 | row["Texture"] = s.TextureEntry; |
1774 | row["ExtraParams"] = s.ExtraParams; | 1756 | row["ExtraParams"] = s.ExtraParams; |
1775 | 1757 | row["State"] = s.State; | |
1776 | try | ||
1777 | { | ||
1778 | row["State"] = s.State; | ||
1779 | } | ||
1780 | catch (MySqlException) | ||
1781 | { | ||
1782 | lock (m_dataSet) | ||
1783 | { | ||
1784 | // Database table was created before we got here and needs to be created! :P | ||
1785 | using ( | ||
1786 | MySqlCommand cmd = | ||
1787 | new MySqlCommand( | ||
1788 | "ALTER TABLE `primshapes` ADD COLUMN `State` int NOT NULL default 0;", | ||
1789 | m_connection)) | ||
1790 | { | ||
1791 | cmd.ExecuteNonQuery(); | ||
1792 | } | ||
1793 | } | ||
1794 | } | ||
1795 | } | 1758 | } |
1796 | 1759 | ||
1797 | /// <summary> | 1760 | /// <summary> |