* Fixes SQLite load crash.

* added primary key to regionsettings table in the cached table
* initialized the data adapter.
* Still untested fully, so watch out!
0.6.0-stable
Teravus Ovares 2008-09-13 21:01:21 +00:00
parent 9b9f1bc191
commit e8d51b76fe
1 changed files with 3 additions and 2 deletions

View File

@ -119,7 +119,7 @@ namespace OpenSim.Data.SQLite
landAccessListDa = new SqliteDataAdapter(landAccessListSelectCmd); landAccessListDa = new SqliteDataAdapter(landAccessListSelectCmd);
SqliteCommand regionSettingsSelectCmd = new SqliteCommand(regionSettingsSelect, m_conn); SqliteCommand regionSettingsSelectCmd = new SqliteCommand(regionSettingsSelect, m_conn);
regionSettingsDa = new SqliteDataAdapter(regionSettingsSelectCmd);
// This actually does the roll forward assembly stuff // This actually does the roll forward assembly stuff
Assembly assem = GetType().Assembly; Assembly assem = GetType().Assembly;
Migration m = new Migration(m_conn, assem, "RegionStore"); Migration m = new Migration(m_conn, assem, "RegionStore");
@ -148,6 +148,7 @@ namespace OpenSim.Data.SQLite
setupLandAccessCommands(landAccessListDa, m_conn); setupLandAccessCommands(landAccessListDa, m_conn);
ds.Tables.Add(createRegionSettingsTable()); ds.Tables.Add(createRegionSettingsTable());
setupRegionSettingsCommands(regionSettingsDa, m_conn); setupRegionSettingsCommands(regionSettingsDa, m_conn);
// WORKAROUND: This is a work around for sqlite on // WORKAROUND: This is a work around for sqlite on
@ -963,7 +964,7 @@ namespace OpenSim.Data.SQLite
createCol(regionsettings, "fixed_sun", typeof (Int32)); createCol(regionsettings, "fixed_sun", typeof (Int32));
createCol(regionsettings, "sun_position", typeof (Double)); createCol(regionsettings, "sun_position", typeof (Double));
createCol(regionsettings, "covenant", typeof(String)); createCol(regionsettings, "covenant", typeof(String));
regionsettings.PrimaryKey = new DataColumn[] { regionsettings.Columns["regionUUID"] };
return regionsettings; return regionsettings;
} }