aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs
diff options
context:
space:
mode:
authorJeff Ames2007-12-20 05:43:02 +0000
committerJeff Ames2007-12-20 05:43:02 +0000
commitbe2ad79e52efb5eb543057e8e73fa601d0b91c87 (patch)
tree688a11b5737835b3cd46b2beaf01c6e9d23ace09 /OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs
parent*Added event called after any movement is handled (OnClientMovement) - will b... (diff)
downloadopensim-SC_OLD-be2ad79e52efb5eb543057e8e73fa601d0b91c87.zip
opensim-SC_OLD-be2ad79e52efb5eb543057e8e73fa601d0b91c87.tar.gz
opensim-SC_OLD-be2ad79e52efb5eb543057e8e73fa601d0b91c87.tar.bz2
opensim-SC_OLD-be2ad79e52efb5eb543057e8e73fa601d0b91c87.tar.xz
Added patch from Johan. First attempt to solve the LibSL.Packet GC problem. Works with LibSL rev>1532
Diffstat (limited to 'OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs')
-rw-r--r--OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs56
1 files changed, 28 insertions, 28 deletions
diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs b/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs
index 69b53a3..3461474 100644
--- a/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs
+++ b/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs
@@ -141,7 +141,7 @@ namespace OpenSim.Framework.Data.MSSQL
141 List<InventoryItemBase> items = new List<InventoryItemBase>(); 141 List<InventoryItemBase> items = new List<InventoryItemBase>();
142 142
143 Dictionary<string, string> param = new Dictionary<string, string>(); 143 Dictionary<string, string> param = new Dictionary<string, string>();
144 param["parentFolderID"] = folderID.ToStringHyphenated(); 144 param["parentFolderID"] = folderID.ToString();
145 145
146 IDbCommand result = database.Query("SELECT * FROM inventoryitems WHERE parentFolderID = @parentFolderID", param); 146 IDbCommand result = database.Query("SELECT * FROM inventoryitems WHERE parentFolderID = @parentFolderID", param);
147 IDataReader reader = result.ExecuteReader(); 147 IDataReader reader = result.ExecuteReader();
@@ -176,8 +176,8 @@ namespace OpenSim.Framework.Data.MSSQL
176 { 176 {
177 177
178 Dictionary<string, string> param = new Dictionary<string, string>(); 178 Dictionary<string, string> param = new Dictionary<string, string>();
179 param["uuid"] = user.ToStringHyphenated(); 179 param["uuid"] = user.ToString();
180 param["zero"] = LLUUID.Zero.ToStringHyphenated(); 180 param["zero"] = LLUUID.Zero.ToString();
181 181
182 IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = @zero AND agentID = @uuid", param); 182 IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = @zero AND agentID = @uuid", param);
183 IDataReader reader = result.ExecuteReader(); 183 IDataReader reader = result.ExecuteReader();
@@ -209,8 +209,8 @@ namespace OpenSim.Framework.Data.MSSQL
209 lock (database) 209 lock (database)
210 { 210 {
211 Dictionary<string, string> param = new Dictionary<string, string>(); 211 Dictionary<string, string> param = new Dictionary<string, string>();
212 param["uuid"] = user.ToStringHyphenated(); 212 param["uuid"] = user.ToString();
213 param["zero"] = LLUUID.Zero.ToStringHyphenated(); 213 param["zero"] = LLUUID.Zero.ToString();
214 214
215 IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = @zero AND agentID = @uuid", param); 215 IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = @zero AND agentID = @uuid", param);
216 IDataReader reader = result.ExecuteReader(); 216 IDataReader reader = result.ExecuteReader();
@@ -256,7 +256,7 @@ namespace OpenSim.Framework.Data.MSSQL
256 lock (database) 256 lock (database)
257 { 257 {
258 Dictionary<string, string> param = new Dictionary<string, string>(); 258 Dictionary<string, string> param = new Dictionary<string, string>();
259 param["parentFolderID"] = parentID.ToStringHyphenated(); 259 param["parentFolderID"] = parentID.ToString();
260 260
261 261
262 IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = @parentFolderID", param); 262 IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = @parentFolderID", param);
@@ -328,7 +328,7 @@ namespace OpenSim.Framework.Data.MSSQL
328 lock (database) 328 lock (database)
329 { 329 {
330 Dictionary<string, string> param = new Dictionary<string, string>(); 330 Dictionary<string, string> param = new Dictionary<string, string>();
331 param["inventoryID"] = itemID.ToStringHyphenated(); 331 param["inventoryID"] = itemID.ToString();
332 332
333 IDbCommand result = database.Query("SELECT * FROM inventoryitems WHERE inventoryID = @inventoryID", param); 333 IDbCommand result = database.Query("SELECT * FROM inventoryitems WHERE inventoryID = @inventoryID", param);
334 IDataReader reader = result.ExecuteReader(); 334 IDataReader reader = result.ExecuteReader();
@@ -390,7 +390,7 @@ namespace OpenSim.Framework.Data.MSSQL
390 lock (database) 390 lock (database)
391 { 391 {
392 Dictionary<string, string> param = new Dictionary<string,string>(); 392 Dictionary<string, string> param = new Dictionary<string,string>();
393 param["uuid"] = folderID.ToStringHyphenated(); 393 param["uuid"] = folderID.ToString();
394 394
395 IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE folderID = @uuid", param); 395 IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE folderID = @uuid", param);
396 IDataReader reader = result.ExecuteReader(); 396 IDataReader reader = result.ExecuteReader();
@@ -424,17 +424,17 @@ namespace OpenSim.Framework.Data.MSSQL
424 try 424 try
425 { 425 {
426 Dictionary<string, string> param = new Dictionary<string, string>(); 426 Dictionary<string, string> param = new Dictionary<string, string>();
427 param["inventoryID"] = item.inventoryID.ToStringHyphenated(); 427 param["inventoryID"] = item.inventoryID.ToString();
428 param["assetID"] = item.assetID.ToStringHyphenated(); 428 param["assetID"] = item.assetID.ToString();
429 param["assetType"] = item.assetType.ToString(); 429 param["assetType"] = item.assetType.ToString();
430 param["parentFolderID"] = item.parentFolderID.ToStringHyphenated(); 430 param["parentFolderID"] = item.parentFolderID.ToString();
431 param["avatarID"] = item.avatarID.ToStringHyphenated(); 431 param["avatarID"] = item.avatarID.ToString();
432 param["inventoryName"] = item.inventoryName; 432 param["inventoryName"] = item.inventoryName;
433 param["inventoryDescription"] = item.inventoryDescription; 433 param["inventoryDescription"] = item.inventoryDescription;
434 param["inventoryNextPermissions"] = item.inventoryNextPermissions.ToString(); 434 param["inventoryNextPermissions"] = item.inventoryNextPermissions.ToString();
435 param["inventoryCurrentPermissions"] = item.inventoryCurrentPermissions.ToString(); 435 param["inventoryCurrentPermissions"] = item.inventoryCurrentPermissions.ToString();
436 param["invType"] = Convert.ToString(item.invType); 436 param["invType"] = Convert.ToString(item.invType);
437 param["creatorID"] = item.creatorsID.ToStringHyphenated(); 437 param["creatorID"] = item.creatorsID.ToString();
438 param["inventoryBasePermissions"] = Convert.ToString(item.inventoryBasePermissions); 438 param["inventoryBasePermissions"] = Convert.ToString(item.inventoryBasePermissions);
439 param["inventoryEveryOnePermissions"] = Convert.ToString(item.inventoryEveryOnePermissions); 439 param["inventoryEveryOnePermissions"] = Convert.ToString(item.inventoryEveryOnePermissions);
440 440
@@ -469,7 +469,7 @@ namespace OpenSim.Framework.Data.MSSQL
469 "inventoryBasePermissions = @inventoryBasePermissions" + 469 "inventoryBasePermissions = @inventoryBasePermissions" +
470 "inventoryEveryOnePermissions = @inventoryEveryOnePermissions) where " + 470 "inventoryEveryOnePermissions = @inventoryEveryOnePermissions) where " +
471 "invenoryID = @keyInventoryID;", database.getConnection()); 471 "invenoryID = @keyInventoryID;", database.getConnection());
472 SqlParameter param1 = new SqlParameter("@inventoryID", item.inventoryID.ToStringHyphenated()); 472 SqlParameter param1 = new SqlParameter("@inventoryID", item.inventoryID.ToString());
473 SqlParameter param2 = new SqlParameter("@assetID", item.assetID); 473 SqlParameter param2 = new SqlParameter("@assetID", item.assetID);
474 SqlParameter param3 = new SqlParameter("@assetType", item.assetType); 474 SqlParameter param3 = new SqlParameter("@assetType", item.assetType);
475 SqlParameter param4 = new SqlParameter("@parentFolderID", item.parentFolderID); 475 SqlParameter param4 = new SqlParameter("@parentFolderID", item.parentFolderID);
@@ -482,7 +482,7 @@ namespace OpenSim.Framework.Data.MSSQL
482 SqlParameter param11 = new SqlParameter("@creatorID", item.creatorsID); 482 SqlParameter param11 = new SqlParameter("@creatorID", item.creatorsID);
483 SqlParameter param12 = new SqlParameter("@inventoryBasePermissions", item.inventoryBasePermissions); 483 SqlParameter param12 = new SqlParameter("@inventoryBasePermissions", item.inventoryBasePermissions);
484 SqlParameter param13 = new SqlParameter("@inventoryEveryOnePermissions", item.inventoryEveryOnePermissions); 484 SqlParameter param13 = new SqlParameter("@inventoryEveryOnePermissions", item.inventoryEveryOnePermissions);
485 SqlParameter param14 = new SqlParameter("@keyInventoryID", item.inventoryID.ToStringHyphenated()); 485 SqlParameter param14 = new SqlParameter("@keyInventoryID", item.inventoryID.ToString());
486 command.Parameters.Add(param1); 486 command.Parameters.Add(param1);
487 command.Parameters.Add(param2); 487 command.Parameters.Add(param2);
488 command.Parameters.Add(param3); 488 command.Parameters.Add(param3);
@@ -518,7 +518,7 @@ namespace OpenSim.Framework.Data.MSSQL
518 try 518 try
519 { 519 {
520 Dictionary<string, string> param = new Dictionary<string, string>(); 520 Dictionary<string, string> param = new Dictionary<string, string>();
521 param["uuid"] = itemID.ToStringHyphenated(); 521 param["uuid"] = itemID.ToString();
522 522
523 IDbCommand cmd = database.Query("DELETE FROM inventoryitems WHERE inventoryID=@uuid", param); 523 IDbCommand cmd = database.Query("DELETE FROM inventoryitems WHERE inventoryID=@uuid", param);
524 cmd.ExecuteNonQuery(); 524 cmd.ExecuteNonQuery();
@@ -544,9 +544,9 @@ namespace OpenSim.Framework.Data.MSSQL
544 544
545 545
546 Dictionary<string, string> param = new Dictionary<string, string>(); 546 Dictionary<string, string> param = new Dictionary<string, string>();
547 param["folderID"] = folder.folderID.ToStringHyphenated(); 547 param["folderID"] = folder.folderID.ToString();
548 param["agentID"] = folder.agentID.ToStringHyphenated(); 548 param["agentID"] = folder.agentID.ToString();
549 param["parentFolderID"] = folder.parentID.ToStringHyphenated(); 549 param["parentFolderID"] = folder.parentID.ToString();
550 param["folderName"] = folder.name; 550 param["folderName"] = folder.name;
551 param["type"] = Convert.ToString(folder.type); 551 param["type"] = Convert.ToString(folder.type);
552 param["version"] = Convert.ToString(folder.version); 552 param["version"] = Convert.ToString(folder.version);
@@ -577,13 +577,13 @@ namespace OpenSim.Framework.Data.MSSQL
577 "type = @type," + 577 "type = @type," +
578 "version = @version where " + 578 "version = @version where " +
579 "folderID = @keyFolderID;", database.getConnection()); 579 "folderID = @keyFolderID;", database.getConnection());
580 SqlParameter param1 = new SqlParameter("@folderID", folder.folderID.ToStringHyphenated()); 580 SqlParameter param1 = new SqlParameter("@folderID", folder.folderID.ToString());
581 SqlParameter param2 = new SqlParameter("@agentID", folder.agentID.ToStringHyphenated()); 581 SqlParameter param2 = new SqlParameter("@agentID", folder.agentID.ToString());
582 SqlParameter param3 = new SqlParameter("@parentFolderID", folder.parentID.ToStringHyphenated()); 582 SqlParameter param3 = new SqlParameter("@parentFolderID", folder.parentID.ToString());
583 SqlParameter param4 = new SqlParameter("@folderName", folder.name); 583 SqlParameter param4 = new SqlParameter("@folderName", folder.name);
584 SqlParameter param5 = new SqlParameter("@type", folder.type); 584 SqlParameter param5 = new SqlParameter("@type", folder.type);
585 SqlParameter param6 = new SqlParameter("@version", folder.version); 585 SqlParameter param6 = new SqlParameter("@version", folder.version);
586 SqlParameter param7 = new SqlParameter("@keyFolderID", folder.folderID.ToStringHyphenated()); 586 SqlParameter param7 = new SqlParameter("@keyFolderID", folder.folderID.ToString());
587 command.Parameters.Add(param1); 587 command.Parameters.Add(param1);
588 command.Parameters.Add(param2); 588 command.Parameters.Add(param2);
589 command.Parameters.Add(param3); 589 command.Parameters.Add(param3);
@@ -614,9 +614,9 @@ namespace OpenSim.Framework.Data.MSSQL
614 SqlCommand command = new SqlCommand("UPDATE inventoryfolders set folderID = @folderID, " + 614 SqlCommand command = new SqlCommand("UPDATE inventoryfolders set folderID = @folderID, " +
615 "parentFolderID = @parentFolderID," + 615 "parentFolderID = @parentFolderID," +
616 "folderID = @keyFolderID;", database.getConnection()); 616 "folderID = @keyFolderID;", database.getConnection());
617 SqlParameter param1 = new SqlParameter("@folderID", folder.folderID.ToStringHyphenated()); 617 SqlParameter param1 = new SqlParameter("@folderID", folder.folderID.ToString());
618 SqlParameter param2 = new SqlParameter("@parentFolderID", folder.parentID.ToStringHyphenated()); 618 SqlParameter param2 = new SqlParameter("@parentFolderID", folder.parentID.ToString());
619 SqlParameter param3 = new SqlParameter("@keyFolderID", folder.folderID.ToStringHyphenated()); 619 SqlParameter param3 = new SqlParameter("@keyFolderID", folder.folderID.ToString());
620 command.Parameters.Add(param1); 620 command.Parameters.Add(param1);
621 command.Parameters.Add(param2); 621 command.Parameters.Add(param2);
622 command.Parameters.Add(param3); 622 command.Parameters.Add(param3);
@@ -667,7 +667,7 @@ namespace OpenSim.Framework.Data.MSSQL
667 try 667 try
668 { 668 {
669 Dictionary<string, string> param = new Dictionary<string, string>(); 669 Dictionary<string, string> param = new Dictionary<string, string>();
670 param["folderID"] = folderID.ToStringHyphenated(); 670 param["folderID"] = folderID.ToString();
671 671
672 IDbCommand cmd = database.Query("DELETE FROM inventoryfolders WHERE folderID=@folderID", param); 672 IDbCommand cmd = database.Query("DELETE FROM inventoryfolders WHERE folderID=@folderID", param);
673 cmd.ExecuteNonQuery(); 673 cmd.ExecuteNonQuery();
@@ -686,7 +686,7 @@ namespace OpenSim.Framework.Data.MSSQL
686 try 686 try
687 { 687 {
688 Dictionary<string, string> param = new Dictionary<string, string>(); 688 Dictionary<string, string> param = new Dictionary<string, string>();
689 param["parentFolderID"] = folderID.ToStringHyphenated(); 689 param["parentFolderID"] = folderID.ToString();
690 690
691 691
692 IDbCommand cmd = database.Query("DELETE FROM inventoryitems WHERE parentFolderID=@parentFolderID", param); 692 IDbCommand cmd = database.Query("DELETE FROM inventoryitems WHERE parentFolderID=@parentFolderID", param);