aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAdam Frisby2007-10-22 22:15:38 +0000
committerAdam Frisby2007-10-22 22:15:38 +0000
commit3e5fcf90aa034a9ae59dc7a7ac2ace793e60d4ae (patch)
treee3008797f9d77a0cd88e7c4f11ee2cdccd61178e
parent* Temporary fix for SQLite error -- temporarily disables terrain storage. (diff)
downloadopensim-SC_OLD-3e5fcf90aa034a9ae59dc7a7ac2ace793e60d4ae.zip
opensim-SC_OLD-3e5fcf90aa034a9ae59dc7a7ac2ace793e60d4ae.tar.gz
opensim-SC_OLD-3e5fcf90aa034a9ae59dc7a7ac2ace793e60d4ae.tar.bz2
opensim-SC_OLD-3e5fcf90aa034a9ae59dc7a7ac2ace793e60d4ae.tar.xz
* Table creation now checks if the table already exists before building it.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs30
1 files changed, 27 insertions, 3 deletions
diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs
index e5b9cc0..e2614ee 100644
--- a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs
+++ b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs
@@ -860,9 +860,33 @@ namespace OpenSim.DataStore.MonoSqlite
860 SqliteCommand scmd = new SqliteCommand(createShapes, conn); 860 SqliteCommand scmd = new SqliteCommand(createShapes, conn);
861 SqliteCommand tcmd = new SqliteCommand(createTerrain, conn); 861 SqliteCommand tcmd = new SqliteCommand(createTerrain, conn);
862 conn.Open(); 862 conn.Open();
863 pcmd.ExecuteNonQuery(); 863
864 scmd.ExecuteNonQuery(); 864 try
865 tcmd.ExecuteNonQuery(); 865 {
866 pcmd.ExecuteNonQuery();
867 }
868 catch (SqliteSyntaxException) {
869 MainLog.Instance.Warn("SQLITE","Primitives Table Already Exists");
870 }
871
872 try
873 {
874 scmd.ExecuteNonQuery();
875 }
876 catch (SqliteSyntaxException)
877 {
878 MainLog.Instance.Warn("SQLITE", "Shapes Table Already Exists");
879 }
880
881 try
882 {
883 tcmd.ExecuteNonQuery();
884 }
885 catch (SqliteSyntaxException)
886 {
887 MainLog.Instance.Warn("SQLITE", "Terrain Table Already Exists");
888 }
889
866 conn.Close(); 890 conn.Close();
867 } 891 }
868 892