aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMW2007-08-24 13:35:51 +0000
committerMW2007-08-24 13:35:51 +0000
commitbbc7b5b84720624c9188ed2425fa09568ed1e443 (patch)
tree734db5f627ca328d79c9ca1c17255ebe5291ff53
parentHad "using OpenSim.Physics.Manager;" defined twice in SceneObjectGroup.cs, so... (diff)
downloadopensim-SC_OLD-bbc7b5b84720624c9188ed2425fa09568ed1e443.zip
opensim-SC_OLD-bbc7b5b84720624c9188ed2425fa09568ed1e443.tar.gz
opensim-SC_OLD-bbc7b5b84720624c9188ed2425fa09568ed1e443.tar.bz2
opensim-SC_OLD-bbc7b5b84720624c9188ed2425fa09568ed1e443.tar.xz
Added temporary fix for the sqlite datastore exception in windows .Net, Added a Try catch block around "shapeDa.Fill(ds.Tables["primshapes"]);" line. Seems if the database file is empty (ie opensim has just created it or nothing has been stored in it yet.) then the exception will be fired and catch, then opensim can continue and have no problems (it will still save prims fine), then on next restart if the database file has entries in it, the exception will no longer be thrown.
-rw-r--r--OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs13
1 files changed, 11 insertions, 2 deletions
diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs
index 440ca3a..7d45a30 100644
--- a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs
+++ b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs
@@ -57,14 +57,23 @@ namespace OpenSim.DataStore.MonoSqliteStorage
57 // TODO: see if the linkage actually holds. 57 // TODO: see if the linkage actually holds.
58 // primDa.FillSchema(ds, SchemaType.Source, "PrimSchema"); 58 // primDa.FillSchema(ds, SchemaType.Source, "PrimSchema");
59 TestTables(conn); 59 TestTables(conn);
60 60
61 ds.Tables.Add(createPrimTable()); 61 ds.Tables.Add(createPrimTable());
62 primDa.Fill(ds.Tables["prims"]); 62 primDa.Fill(ds.Tables["prims"]);
63 setupPrimCommands(primDa, conn); 63 setupPrimCommands(primDa, conn);
64 MainLog.Instance.Verbose("DATASTORE", "Populated Prim Definitions"); 64 MainLog.Instance.Verbose("DATASTORE", "Populated Prim Definitions");
65 65
66 ds.Tables.Add(createShapeTable()); 66 ds.Tables.Add(createShapeTable());
67 shapeDa.Fill(ds.Tables["primshapes"]); 67
68 try
69 {
70 shapeDa.Fill(ds.Tables["primshapes"]);
71 }
72 catch (Exception)
73 {
74 MainLog.Instance.Verbose("DATASTORE", "Caught fill error on primshapes table");
75 }
76
68 setupShapeCommands(shapeDa, conn); 77 setupShapeCommands(shapeDa, conn);
69 MainLog.Instance.Verbose("DATASTORE", "Populated Prim Shapes"); 78 MainLog.Instance.Verbose("DATASTORE", "Populated Prim Shapes");
70 79