diff options
author | Sean Dague | 2008-09-25 00:20:57 +0000 |
---|---|---|
committer | Sean Dague | 2008-09-25 00:20:57 +0000 |
commit | 7117f8b6803d1ef2bf9bbbdef2a8e4e3649c25e2 (patch) | |
tree | dfb695ffb8c38057c5df9e2d96cdd79313c95d68 /OpenSim | |
parent | -remove Common.Tests from nant.local (diff) | |
download | opensim-SC-7117f8b6803d1ef2bf9bbbdef2a8e4e3649c25e2.zip opensim-SC-7117f8b6803d1ef2bf9bbbdef2a8e4e3649c25e2.tar.gz opensim-SC-7117f8b6803d1ef2bf9bbbdef2a8e4e3649c25e2.tar.bz2 opensim-SC-7117f8b6803d1ef2bf9bbbdef2a8e4e3649c25e2.tar.xz |
removal of more dead alter table code
Diffstat (limited to 'OpenSim')
-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> |