better fix for 551, not sure why I missed this earlier
parent
6da664edbe
commit
163a7cb6c8
|
@ -62,6 +62,8 @@ namespace OpenSim.Framework.Data.SQLite
|
||||||
m_log.Info("[Inventory]: Sqlite - connecting: " + dbfile);
|
m_log.Info("[Inventory]: Sqlite - connecting: " + dbfile);
|
||||||
SqliteConnection conn = new SqliteConnection(connectionString);
|
SqliteConnection conn = new SqliteConnection(connectionString);
|
||||||
|
|
||||||
|
conn.Open();
|
||||||
|
|
||||||
TestTables(conn);
|
TestTables(conn);
|
||||||
|
|
||||||
SqliteCommand itemsSelectCmd = new SqliteCommand(invItemsSelect, conn);
|
SqliteCommand itemsSelectCmd = new SqliteCommand(invItemsSelect, conn);
|
||||||
|
@ -613,18 +615,14 @@ namespace OpenSim.Framework.Data.SQLite
|
||||||
|
|
||||||
private void InitDB(SqliteConnection conn)
|
private void InitDB(SqliteConnection conn)
|
||||||
{
|
{
|
||||||
lock (ds)
|
string createInventoryItems = defineTable(createInventoryItemsTable());
|
||||||
{
|
string createInventoryFolders = defineTable(createInventoryFoldersTable());
|
||||||
string createInventoryItems = defineTable(createInventoryItemsTable());
|
|
||||||
string createInventoryFolders = defineTable(createInventoryFoldersTable());
|
SqliteCommand pcmd = new SqliteCommand(createInventoryItems, conn);
|
||||||
|
SqliteCommand scmd = new SqliteCommand(createInventoryFolders, conn);
|
||||||
|
|
||||||
SqliteCommand pcmd = new SqliteCommand(createInventoryItems, conn);
|
pcmd.ExecuteNonQuery();
|
||||||
SqliteCommand scmd = new SqliteCommand(createInventoryFolders, conn);
|
scmd.ExecuteNonQuery();
|
||||||
conn.Open();
|
|
||||||
pcmd.ExecuteNonQuery();
|
|
||||||
scmd.ExecuteNonQuery();
|
|
||||||
conn.Close();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool TestTables(SqliteConnection conn)
|
private bool TestTables(SqliteConnection conn)
|
||||||
|
|
Loading…
Reference in New Issue