aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Data/SQLite/Resources/RegionStore.migrations57
-rw-r--r--OpenSim/Data/SQLite/SQLiteRegionData.cs66
-rw-r--r--OpenSim/Data/Tests/Resources/TestDataConnections.ini2
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneBase.cs4
4 files changed, 44 insertions, 85 deletions
diff --git a/OpenSim/Data/SQLite/Resources/RegionStore.migrations b/OpenSim/Data/SQLite/Resources/RegionStore.migrations
index c47a85d..c461bf0 100644
--- a/OpenSim/Data/SQLite/Resources/RegionStore.migrations
+++ b/OpenSim/Data/SQLite/Resources/RegionStore.migrations
@@ -1,4 +1,4 @@
1:VERSION 1 1:VERSION 1
2 2
3BEGIN TRANSACTION; 3BEGIN TRANSACTION;
4 4
@@ -219,59 +219,6 @@ COMMIT;
219 219
220BEGIN TRANSACTION; 220BEGIN TRANSACTION;
221 221
222CREATE TABLE estate_groups (
223 EstateID int(10) NOT NULL,
224 uuid char(36) NOT NULL
225);
226
227CREATE TABLE estate_managers (
228 EstateID int(10) NOT NULL,
229 uuid char(36) NOT NULL
230);
231
232CREATE TABLE estate_map (
233 RegionID char(36) NOT NULL default '00000000-0000-0000-0000-000000000000',
234 EstateID int(11) NOT NULL
235);
236
237CREATE TABLE estate_settings (
238 EstateID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
239 EstateName varchar(64) default NULL,
240 AbuseEmailToEstateOwner tinyint(4) NOT NULL,
241 DenyAnonymous tinyint(4) NOT NULL,
242 ResetHomeOnTeleport tinyint(4) NOT NULL,
243 FixedSun tinyint(4) NOT NULL,
244 DenyTransacted tinyint(4) NOT NULL,
245 BlockDwell tinyint(4) NOT NULL,
246 DenyIdentified tinyint(4) NOT NULL,
247 AllowVoice tinyint(4) NOT NULL,
248 UseGlobalTime tinyint(4) NOT NULL,
249 PricePerMeter int(11) NOT NULL,
250 TaxFree tinyint(4) NOT NULL,
251 AllowDirectTeleport tinyint(4) NOT NULL,
252 RedirectGridX int(11) NOT NULL,
253 RedirectGridY int(11) NOT NULL,
254 ParentEstateID int(10) NOT NULL,
255 SunPosition double NOT NULL,
256 EstateSkipScripts tinyint(4) NOT NULL,
257 BillableFactor float NOT NULL,
258 PublicAccess tinyint(4) NOT NULL
259);
260insert into estate_settings (EstateID,EstateName,AbuseEmailToEstateOwner,DenyAnonymous,ResetHomeOnTeleport,FixedSun,DenyTransacted,BlockDwell,DenyIdentified,AllowVoice,UseGlobalTime,PricePerMeter,TaxFree,AllowDirectTeleport,RedirectGridX,RedirectGridY,ParentEstateID,SunPosition,PublicAccess,EstateSkipScripts,BillableFactor) values ( 99, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
261delete from estate_settings;
262CREATE TABLE estate_users (
263 EstateID int(10) NOT NULL,
264 uuid char(36) NOT NULL
265);
266
267CREATE TABLE estateban (
268 EstateID int(10) NOT NULL,
269 bannedUUID varchar(36) NOT NULL,
270 bannedIp varchar(16) NOT NULL,
271 bannedIpHostMask varchar(16) NOT NULL,
272 bannedNameMask varchar(64) default NULL
273);
274
275drop table regionsettings; 222drop table regionsettings;
276CREATE TABLE regionsettings ( 223CREATE TABLE regionsettings (
277 regionUUID char(36) NOT NULL, 224 regionUUID char(36) NOT NULL,
@@ -307,7 +254,7 @@ CREATE TABLE regionsettings (
307 fixed_sun int(11) NOT NULL, 254 fixed_sun int(11) NOT NULL,
308 sun_position float NOT NULL, 255 sun_position float NOT NULL,
309 covenant char(36) default NULL, 256 covenant char(36) default NULL,
310 Sandbox tinyint(4) NOT NULL, 257 sandbox tinyint(4) NOT NULL,
311 PRIMARY KEY (regionUUID) 258 PRIMARY KEY (regionUUID)
312); 259);
313 260
diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs
index 85703dc..81d0ac4 100644
--- a/OpenSim/Data/SQLite/SQLiteRegionData.cs
+++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs
@@ -93,7 +93,7 @@ namespace OpenSim.Data.SQLite
93 93
94 ds = new DataSet("Region"); 94 ds = new DataSet("Region");
95 95
96 m_log.Info("[REGION DB]: Sqlite - connecting: " + connectionString); 96 m_log.Info("[SQLITE REGION DB]: Sqlite - connecting: " + connectionString);
97 m_conn = new SqliteConnection(m_connectionString); 97 m_conn = new SqliteConnection(m_connectionString);
98 m_conn.Open(); 98 m_conn.Open();
99 99
@@ -156,7 +156,7 @@ namespace OpenSim.Data.SQLite
156 } 156 }
157 catch (Exception) 157 catch (Exception)
158 { 158 {
159 m_log.Info("[REGION DB]: Caught fill error on prims table"); 159 m_log.Info("[SQLITE REGION DB]: Caught fill error on prims table");
160 } 160 }
161 161
162 try 162 try
@@ -165,16 +165,25 @@ namespace OpenSim.Data.SQLite
165 } 165 }
166 catch (Exception) 166 catch (Exception)
167 { 167 {
168 m_log.Info("[REGION DB]: Caught fill error on primshapes table"); 168 m_log.Info("[SQLITE REGION DB]: Caught fill error on primshapes table");
169 } 169 }
170 170
171 try 171 try
172 { 172 {
173 itemsDa.Fill(ds.Tables["primitems"]);
174 }
175 catch (Exception)
176 {
177 m_log.Info("[SQLITE REGION DB]: Caught fill error on primitems table");
178 }
179
180 try
181 {
173 terrainDa.Fill(ds.Tables["terrain"]); 182 terrainDa.Fill(ds.Tables["terrain"]);
174 } 183 }
175 catch (Exception) 184 catch (Exception)
176 { 185 {
177 m_log.Info("[REGION DB]: Caught fill error on terrain table"); 186 m_log.Info("[SQLITE REGION DB]: Caught fill error on terrain table");
178 } 187 }
179 188
180 try 189 try
@@ -183,7 +192,7 @@ namespace OpenSim.Data.SQLite
183 } 192 }
184 catch (Exception) 193 catch (Exception)
185 { 194 {
186 m_log.Info("[REGION DB]: Caught fill error on land table"); 195 m_log.Info("[SQLITE REGION DB]: Caught fill error on land table");
187 } 196 }
188 197
189 try 198 try
@@ -192,7 +201,7 @@ namespace OpenSim.Data.SQLite
192 } 201 }
193 catch (Exception) 202 catch (Exception)
194 { 203 {
195 m_log.Info("[REGION DB]: Caught fill error on landaccesslist table"); 204 m_log.Info("[SQLITE REGION DB]: Caught fill error on landaccesslist table");
196 } 205 }
197 206
198 try 207 try
@@ -201,7 +210,7 @@ namespace OpenSim.Data.SQLite
201 } 210 }
202 catch (Exception) 211 catch (Exception)
203 { 212 {
204 m_log.Info("[REGION DB]: Caught fill error on regionsettings table"); 213 m_log.Info("[SQLITE REGION DB]: Caught fill error on regionsettings table");
205 } 214 }
206 215
207 // We have to create a data set mapping for every table, otherwise the IDataAdaptor.Update() will not populate rows with values! 216 // We have to create a data set mapping for every table, otherwise the IDataAdaptor.Update() will not populate rows with values!
@@ -434,7 +443,7 @@ namespace OpenSim.Data.SQLite
434 lock (ds) 443 lock (ds)
435 { 444 {
436 DataRow[] primsForRegion = prims.Select(byRegion); 445 DataRow[] primsForRegion = prims.Select(byRegion);
437 m_log.Info("[REGION DB]: Loaded " + primsForRegion.Length + " prims for region: " + regionUUID); 446// m_log.Info("[SQLITE REGION DB]: Loaded " + primsForRegion.Length + " prims for region: " + regionUUID);
438 447
439 // First, create all groups 448 // First, create all groups
440 foreach (DataRow primRow in primsForRegion) 449 foreach (DataRow primRow in primsForRegion)
@@ -456,8 +465,8 @@ namespace OpenSim.Data.SQLite
456 } 465 }
457 else 466 else
458 { 467 {
459 m_log.Info( 468 m_log.Warn(
460 "[REGION DB]: No shape found for prim in storage, so setting default box shape"); 469 "[SQLITE REGION DB]: No shape found for prim in storage, so setting default box shape");
461 prim.Shape = PrimitiveBaseShape.Default; 470 prim.Shape = PrimitiveBaseShape.Default;
462 } 471 }
463 472
@@ -469,11 +478,11 @@ namespace OpenSim.Data.SQLite
469 } 478 }
470 catch (Exception e) 479 catch (Exception e)
471 { 480 {
472 m_log.Error("[REGION DB]: Failed create prim object in new group, exception and data follows"); 481 m_log.Error("[SQLITE REGION DB]: Failed create prim object in new group, exception and data follows");
473 m_log.Info("[REGION DB]: " + e.ToString()); 482 m_log.Error("[SQLITE REGION DB]: ", e);
474 foreach (DataColumn col in prims.Columns) 483 foreach (DataColumn col in prims.Columns)
475 { 484 {
476 m_log.Info("[REGION DB]: Col: " + col.ColumnName + " => " + primRow[col]); 485 m_log.Error("[SQLITE REGION DB]: Col: " + col.ColumnName + " => " + primRow[col]);
477 } 486 }
478 } 487 }
479 } 488 }
@@ -498,7 +507,7 @@ namespace OpenSim.Data.SQLite
498 else 507 else
499 { 508 {
500 m_log.Warn( 509 m_log.Warn(
501 "[REGION DB]: No shape found for prim in storage, so setting default box shape"); 510 "[SQLITE REGION DB]: No shape found for prim in storage, so setting default box shape");
502 prim.Shape = PrimitiveBaseShape.Default; 511 prim.Shape = PrimitiveBaseShape.Default;
503 } 512 }
504 513
@@ -508,11 +517,11 @@ namespace OpenSim.Data.SQLite
508 } 517 }
509 catch (Exception e) 518 catch (Exception e)
510 { 519 {
511 m_log.Error("[REGION DB]: Failed create prim object in group, exception and data follows"); 520 m_log.Error("[SQLITE REGION DB]: Failed create prim object in group, exception and data follows");
512 m_log.Info("[REGION DB]: " + e.ToString()); 521 m_log.Error("[SQLITE REGION DB]: ", e);
513 foreach (DataColumn col in prims.Columns) 522 foreach (DataColumn col in prims.Columns)
514 { 523 {
515 m_log.Info("[REGION DB]: Col: " + col.ColumnName + " => " + primRow[col]); 524 m_log.Error("[SQLITE REGION DB]: Col: " + col.ColumnName + " => " + primRow[col]);
516 } 525 }
517 } 526 }
518 } 527 }
@@ -525,20 +534,23 @@ namespace OpenSim.Data.SQLite
525 /// </summary> 534 /// </summary>
526 /// <param name="prim">the prim</param> 535 /// <param name="prim">the prim</param>
527 private void LoadItems(SceneObjectPart prim) 536 private void LoadItems(SceneObjectPart prim)
528 { 537 {
529 //m_log.DebugFormat("[DATASTORE]: Loading inventory for {0}, {1}", prim.Name, prim.UUID); 538// m_log.DebugFormat("[SQLITE REGION DB]: Loading inventory for {0} {1}", prim.Name, prim.UUID);
530 539
531 DataTable dbItems = ds.Tables["primitems"]; 540 DataTable dbItems = ds.Tables["primitems"];
532 String sql = String.Format("primID = '{0}'", prim.UUID.ToString()); 541 String sql = String.Format("primID = '{0}'", prim.UUID.ToString());
533 DataRow[] dbItemRows = dbItems.Select(sql); 542 DataRow[] dbItemRows = dbItems.Select(sql);
534 IList<TaskInventoryItem> inventory = new List<TaskInventoryItem>(); 543 IList<TaskInventoryItem> inventory = new List<TaskInventoryItem>();
535 544
545// m_log.DebugFormat(
546// "[SQLITE REGION DB]: Found {0} items for {1} {2}", dbItemRows.Length, prim.Name, prim.UUID);
547
536 foreach (DataRow row in dbItemRows) 548 foreach (DataRow row in dbItemRows)
537 { 549 {
538 TaskInventoryItem item = buildItem(row); 550 TaskInventoryItem item = buildItem(row);
539 inventory.Add(item); 551 inventory.Add(item);
540 552
541 //m_log.DebugFormat("[DATASTORE]: Restored item {0}, {1}", item.Name, item.ItemID); 553// m_log.DebugFormat("[SQLITE REGION DB]: Restored item {0} {1}", item.Name, item.ItemID);
542 } 554 }
543 555
544 prim.Inventory.RestoreInventoryItems(inventory); 556 prim.Inventory.RestoreInventoryItems(inventory);
@@ -574,7 +586,7 @@ namespace OpenSim.Data.SQLite
574 586
575 // the following is an work around for .NET. The perf 587 // the following is an work around for .NET. The perf
576 // issues associated with it aren't as bad as you think. 588 // issues associated with it aren't as bad as you think.
577 m_log.Info("[REGION DB]: Storing terrain revision r" + revision.ToString()); 589 m_log.Debug("[SQLITE REGION DB]: Storing terrain revision r" + revision.ToString());
578 String sql = "insert into terrain(RegionUUID, Revision, Heightfield)" + 590 String sql = "insert into terrain(RegionUUID, Revision, Heightfield)" +
579 " values(:RegionUUID, :Revision, :Heightfield)"; 591 " values(:RegionUUID, :Revision, :Heightfield)";
580 592
@@ -630,11 +642,11 @@ namespace OpenSim.Data.SQLite
630 } 642 }
631 else 643 else
632 { 644 {
633 m_log.Info("[REGION DB]: No terrain found for region"); 645 m_log.Warn("[SQLITE REGION DB]: No terrain found for region");
634 return null; 646 return null;
635 } 647 }
636 648
637 m_log.Info("[REGION DB]: Loaded terrain revision r" + rev.ToString()); 649 m_log.Debug("[SQLITE REGION DB]: Loaded terrain revision r" + rev.ToString());
638 } 650 }
639 } 651 }
640 return terret; 652 return terret;
@@ -1417,7 +1429,7 @@ namespace OpenSim.Data.SQLite
1417 } 1429 }
1418 catch (InvalidCastException) 1430 catch (InvalidCastException)
1419 { 1431 {
1420 m_log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.Name); 1432 m_log.ErrorFormat("[SQLITE REGION DB]: unable to get parcel telehub settings for {1}", newData.Name);
1421 newData.UserLocation = Vector3.Zero; 1433 newData.UserLocation = Vector3.Zero;
1422 newData.UserLookAt = Vector3.Zero; 1434 newData.UserLookAt = Vector3.Zero;
1423 } 1435 }
@@ -1926,7 +1938,7 @@ namespace OpenSim.Data.SQLite
1926 /// <param name="items"></param> 1938 /// <param name="items"></param>
1927 public void StorePrimInventory(UUID primID, ICollection<TaskInventoryItem> items) 1939 public void StorePrimInventory(UUID primID, ICollection<TaskInventoryItem> items)
1928 { 1940 {
1929 //m_log.InfoFormat("[REGION DB]: Entered StorePrimInventory with prim ID {0}", primID); 1941// m_log.DebugFormat("[SQLITE REGION DB]: Entered StorePrimInventory with prim ID {0}", primID);
1930 1942
1931 DataTable dbItems = ds.Tables["primitems"]; 1943 DataTable dbItems = ds.Tables["primitems"];
1932 1944
diff --git a/OpenSim/Data/Tests/Resources/TestDataConnections.ini b/OpenSim/Data/Tests/Resources/TestDataConnections.ini
index 5e68ab0..7b55467 100644
--- a/OpenSim/Data/Tests/Resources/TestDataConnections.ini
+++ b/OpenSim/Data/Tests/Resources/TestDataConnections.ini
@@ -21,4 +21,4 @@
21[TestConnections] 21[TestConnections]
22MySqlConnection="Server=localhost;Port=3306;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;" 22MySqlConnection="Server=localhost;Port=3306;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;"
23SqlConnection="Server=.\SQL2008;Database=opensim-nunit;Trusted_Connection=True;" 23SqlConnection="Server=.\SQL2008;Database=opensim-nunit;Trusted_Connection=True;"
24SqliteConnection="" \ No newline at end of file 24SqliteConnection="URI=file:opensim-nunit.db,version=3" \ No newline at end of file
diff --git a/OpenSim/Region/Framework/Scenes/SceneBase.cs b/OpenSim/Region/Framework/Scenes/SceneBase.cs
index ee17fbf..f8591ba 100644
--- a/OpenSim/Region/Framework/Scenes/SceneBase.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneBase.cs
@@ -267,7 +267,7 @@ namespace OpenSim.Region.Framework.Scenes
267 } 267 }
268 catch (Exception e) 268 catch (Exception e)
269 { 269 {
270 m_log.Error("[SCENE]: SceneBase.cs: Close() - Failed with exception " + e.ToString()); 270 m_log.Error(string.Format("[SCENE]: SceneBase.cs: Close() - Failed with exception ", e));
271 } 271 }
272 } 272 }
273 273
@@ -376,7 +376,7 @@ namespace OpenSim.Region.Framework.Scenes
376 /// <param name="mod"></param> 376 /// <param name="mod"></param>
377 public void RegisterModuleInterface<M>(M mod) 377 public void RegisterModuleInterface<M>(M mod)
378 { 378 {
379 m_log.DebugFormat("[SCENE BASE]: Registering interface {0}", typeof(M)); 379// m_log.DebugFormat("[SCENE BASE]: Registering interface {0}", typeof(M));
380 380
381 List<Object> l = null; 381 List<Object> l = null;
382 if (!ModuleInterfaces.TryGetValue(typeof(M), out l)) 382 if (!ModuleInterfaces.TryGetValue(typeof(M), out l))