aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite
diff options
context:
space:
mode:
authorSean Dague2008-10-30 12:56:10 +0000
committerSean Dague2008-10-30 12:56:10 +0000
commit9e353d5713e116e0ea1243df7db085bfba08d6e9 (patch)
tree2e414d5f9010987ca3c67d04929cb00205cb6bd8 /OpenSim/Data/SQLite
parentMid-work, trying to fix region part insertion and retrieval (diff)
downloadopensim-SC_OLD-9e353d5713e116e0ea1243df7db085bfba08d6e9.zip
opensim-SC_OLD-9e353d5713e116e0ea1243df7db085bfba08d6e9.tar.gz
opensim-SC_OLD-9e353d5713e116e0ea1243df7db085bfba08d6e9.tar.bz2
opensim-SC_OLD-9e353d5713e116e0ea1243df7db085bfba08d6e9.tar.xz
- Includes consistency test for new and updated objects, as
some fixes in MySQL and SQLite From: Arthur Rodrigo S Valadares <arthursv@linux.vnet.ibm.com>
Diffstat (limited to 'OpenSim/Data/SQLite')
-rw-r--r--OpenSim/Data/SQLite/SQLiteRegionData.cs17
1 files changed, 4 insertions, 13 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs
index 9ddab55..93d9406 100644
--- a/OpenSim/Data/SQLite/SQLiteRegionData.cs
+++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs
@@ -438,11 +438,10 @@ namespace OpenSim.Data.SQLite
438 } 438 }
439 group.AddPart(prim); 439 group.AddPart(prim);
440 group.RootPart = prim; 440 group.RootPart = prim;
441 Console.WriteLine("The Object UUID is {0}",prim.UUID);
442 createdObjects.Add(group.UUID, group); 441 createdObjects.Add(group.UUID, group);
443 retvals.Add(group); 442 retvals.Add(group);
443 LoadItems(prim);
444 } 444 }
445 LoadItems(prim);
446 } 445 }
447 catch (Exception e) 446 catch (Exception e)
448 { 447 {
@@ -477,10 +476,9 @@ namespace OpenSim.Data.SQLite
477 "[REGION DB]: No shape found for prim in storage, so setting default box shape"); 476 "[REGION DB]: No shape found for prim in storage, so setting default box shape");
478 prim.Shape = PrimitiveBaseShape.Default; 477 prim.Shape = PrimitiveBaseShape.Default;
479 } 478 }
480 Console.WriteLine("Version2: The Object UUID is {0}",prim.UUID);
481 createdObjects[new UUID(objID)].AddPart(prim); 479 createdObjects[new UUID(objID)].AddPart(prim);
480 LoadItems(prim);
482 } 481 }
483 LoadItems(prim);
484 } 482 }
485 catch (Exception e) 483 catch (Exception e)
486 { 484 {
@@ -504,20 +502,13 @@ namespace OpenSim.Data.SQLite
504 { 502 {
505 //m_log.DebugFormat("[DATASTORE]: Loading inventory for {0}, {1}", prim.Name, prim.UUID); 503 //m_log.DebugFormat("[DATASTORE]: Loading inventory for {0}, {1}", prim.Name, prim.UUID);
506 504
507 DataTable dbItems = ds.Tables["primitems"]; 505 DataTable dbItems = ds.Tables["primitems"];
508 //return; POINT OF FAILURE!!! BELOW THIS LINE FAILS
509 Console.WriteLine("dbItems: {0} and the prim is: {1}, UUID {2}",dbItems,prim.Name,prim.UUID);
510 String sql = String.Format("primID = '{0}'", prim.UUID.ToString()); 506 String sql = String.Format("primID = '{0}'", prim.UUID.ToString());
511 //string sql = "primID = '" + prim.UUID.ToString() + "'";
512 DataRow[] dbItemRows = dbItems.Select(sql); 507 DataRow[] dbItemRows = dbItems.Select(sql);
513 Console.WriteLine("dbItemRows Length: {0}",dbItemRows.Length);
514 if (dbItemRows.Length == 0)
515 return;
516 IList<TaskInventoryItem> inventory = new List<TaskInventoryItem>(); 508 IList<TaskInventoryItem> inventory = new List<TaskInventoryItem>();
517 509
518 foreach (DataRow row in dbItemRows) 510 foreach (DataRow row in dbItemRows)
519 { 511 {
520 Console.WriteLine("Inside the foreach");
521 TaskInventoryItem item = buildItem(row); 512 TaskInventoryItem item = buildItem(row);
522 inventory.Add(item); 513 inventory.Add(item);
523 514
@@ -1194,7 +1185,7 @@ namespace OpenSim.Data.SQLite
1194 Convert.ToSingle( 1185 Convert.ToSingle(
1195 row["SitTargetOrientW"])); 1186 row["SitTargetOrientW"]));
1196 1187
1197 prim.Color = Color.FromArgb(Convert.ToInt32(row["ColorR"]), Convert.ToInt32(row["ColorB"]), Convert.ToInt32(row["ColorG"])); 1188 prim.Color = Color.FromArgb(Convert.ToInt32(row["ColorR"]), Convert.ToInt32(row["ColorG"]), Convert.ToInt32(row["ColorB"]));
1198 1189
1199 prim.ClickAction = Convert.ToByte(row["ClickAction"]); 1190 prim.ClickAction = Convert.ToByte(row["ClickAction"]);
1200 prim.PayPrice[0] = Convert.ToInt32(row["PayPrice"]); 1191 prim.PayPrice[0] = Convert.ToInt32(row["PayPrice"]);