From 163a7cb6c8c849f81d569b561ba92fa63ab37b1c Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Wed, 12 Mar 2008 02:48:08 +0000 Subject: better fix for 551, not sure why I missed this earlier --- .../Framework/Data.SQLite/SQLiteInventoryStore.cs | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs b/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs index 8ecdc04..32e6ef0 100644 --- a/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs +++ b/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs @@ -62,6 +62,8 @@ namespace OpenSim.Framework.Data.SQLite m_log.Info("[Inventory]: Sqlite - connecting: " + dbfile); SqliteConnection conn = new SqliteConnection(connectionString); + conn.Open(); + TestTables(conn); SqliteCommand itemsSelectCmd = new SqliteCommand(invItemsSelect, conn); @@ -613,18 +615,14 @@ namespace OpenSim.Framework.Data.SQLite private void InitDB(SqliteConnection conn) { - lock (ds) - { - string createInventoryItems = defineTable(createInventoryItemsTable()); - string createInventoryFolders = defineTable(createInventoryFoldersTable()); - - SqliteCommand pcmd = new SqliteCommand(createInventoryItems, conn); - SqliteCommand scmd = new SqliteCommand(createInventoryFolders, conn); - conn.Open(); - pcmd.ExecuteNonQuery(); - scmd.ExecuteNonQuery(); - conn.Close(); - } + string createInventoryItems = defineTable(createInventoryItemsTable()); + string createInventoryFolders = defineTable(createInventoryFoldersTable()); + + SqliteCommand pcmd = new SqliteCommand(createInventoryItems, conn); + SqliteCommand scmd = new SqliteCommand(createInventoryFolders, conn); + + pcmd.ExecuteNonQuery(); + scmd.ExecuteNonQuery(); } private bool TestTables(SqliteConnection conn) -- cgit v1.1