diff options
author | Sean Dague | 2008-03-12 02:48:08 +0000 |
---|---|---|
committer | Sean Dague | 2008-03-12 02:48:08 +0000 |
commit | 163a7cb6c8c849f81d569b561ba92fa63ab37b1c (patch) | |
tree | 715dbcbd2ef9976073c9565807403cfc526e6d69 /OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs | |
parent | Refactor out some duplicate code. (diff) | |
download | opensim-SC-163a7cb6c8c849f81d569b561ba92fa63ab37b1c.zip opensim-SC-163a7cb6c8c849f81d569b561ba92fa63ab37b1c.tar.gz opensim-SC-163a7cb6c8c849f81d569b561ba92fa63ab37b1c.tar.bz2 opensim-SC-163a7cb6c8c849f81d569b561ba92fa63ab37b1c.tar.xz |
better fix for 551, not sure why I missed this earlier
Diffstat (limited to 'OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs')
-rw-r--r-- | OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs | 22 |
1 files changed, 10 insertions, 12 deletions
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 | |||
62 | m_log.Info("[Inventory]: Sqlite - connecting: " + dbfile); | 62 | m_log.Info("[Inventory]: Sqlite - connecting: " + dbfile); |
63 | SqliteConnection conn = new SqliteConnection(connectionString); | 63 | SqliteConnection conn = new SqliteConnection(connectionString); |
64 | 64 | ||
65 | conn.Open(); | ||
66 | |||
65 | TestTables(conn); | 67 | TestTables(conn); |
66 | 68 | ||
67 | SqliteCommand itemsSelectCmd = new SqliteCommand(invItemsSelect, conn); | 69 | SqliteCommand itemsSelectCmd = new SqliteCommand(invItemsSelect, conn); |
@@ -613,18 +615,14 @@ namespace OpenSim.Framework.Data.SQLite | |||
613 | 615 | ||
614 | private void InitDB(SqliteConnection conn) | 616 | private void InitDB(SqliteConnection conn) |
615 | { | 617 | { |
616 | lock (ds) | 618 | string createInventoryItems = defineTable(createInventoryItemsTable()); |
617 | { | 619 | string createInventoryFolders = defineTable(createInventoryFoldersTable()); |
618 | string createInventoryItems = defineTable(createInventoryItemsTable()); | 620 | |
619 | string createInventoryFolders = defineTable(createInventoryFoldersTable()); | 621 | SqliteCommand pcmd = new SqliteCommand(createInventoryItems, conn); |
620 | 622 | SqliteCommand scmd = new SqliteCommand(createInventoryFolders, conn); | |
621 | SqliteCommand pcmd = new SqliteCommand(createInventoryItems, conn); | 623 | |
622 | SqliteCommand scmd = new SqliteCommand(createInventoryFolders, conn); | 624 | pcmd.ExecuteNonQuery(); |
623 | conn.Open(); | 625 | scmd.ExecuteNonQuery(); |
624 | pcmd.ExecuteNonQuery(); | ||
625 | scmd.ExecuteNonQuery(); | ||
626 | conn.Close(); | ||
627 | } | ||
628 | } | 626 | } |
629 | 627 | ||
630 | private bool TestTables(SqliteConnection conn) | 628 | private bool TestTables(SqliteConnection conn) |