aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Data.MySQL
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.MySQL
parent*Added event called after any movement is handled (OnClientMovement) - will b... (diff)
downloadopensim-SC-be2ad79e52efb5eb543057e8e73fa601d0b91c87.zip
opensim-SC-be2ad79e52efb5eb543057e8e73fa601d0b91c87.tar.gz
opensim-SC-be2ad79e52efb5eb543057e8e73fa601d0b91c87.tar.bz2
opensim-SC-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.MySQL')
-rw-r--r--OpenSim/Framework/Data.MySQL/MySQLGridData.cs4
-rw-r--r--OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs42
-rw-r--r--OpenSim/Framework/Data.MySQL/MySQLManager.cs10
-rw-r--r--OpenSim/Framework/Data.MySQL/MySQLUserData.cs4
4 files changed, 30 insertions, 30 deletions
diff --git a/OpenSim/Framework/Data.MySQL/MySQLGridData.cs b/OpenSim/Framework/Data.MySQL/MySQLGridData.cs
index ac3d849..7843562 100644
--- a/OpenSim/Framework/Data.MySQL/MySQLGridData.cs
+++ b/OpenSim/Framework/Data.MySQL/MySQLGridData.cs
@@ -304,7 +304,7 @@ namespace OpenSim.Framework.Data.MySQL
304 lock (database) 304 lock (database)
305 { 305 {
306 Dictionary<string, string> param = new Dictionary<string, string>(); 306 Dictionary<string, string> param = new Dictionary<string, string>();
307 param["?uuid"] = uuid.ToStringHyphenated(); 307 param["?uuid"] = uuid.ToString();
308 308
309 IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = ?uuid", param); 309 IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = ?uuid", param);
310 IDataReader reader = result.ExecuteReader(); 310 IDataReader reader = result.ExecuteReader();
@@ -377,7 +377,7 @@ namespace OpenSim.Framework.Data.MySQL
377 SHA512Managed HashProvider = new SHA512Managed(); 377 SHA512Managed HashProvider = new SHA512Managed();
378 ASCIIEncoding TextProvider = new ASCIIEncoding(); 378 ASCIIEncoding TextProvider = new ASCIIEncoding();
379 379
380 byte[] stream = TextProvider.GetBytes(uuid.ToStringHyphenated() + ":" + handle.ToString() + ":" + challenge); 380 byte[] stream = TextProvider.GetBytes(uuid.ToString() + ":" + handle.ToString() + ":" + challenge);
381 byte[] hash = HashProvider.ComputeHash(stream); 381 byte[] hash = HashProvider.ComputeHash(stream);
382 382
383 return false; 383 return false;
diff --git a/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs b/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs
index 6828f66..ac0877e 100644
--- a/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs
+++ b/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs
@@ -155,7 +155,7 @@ namespace OpenSim.Framework.Data.MySQL
155 MySqlCommand result = 155 MySqlCommand result =
156 new MySqlCommand("SELECT * FROM inventoryitems WHERE parentFolderID = ?uuid", 156 new MySqlCommand("SELECT * FROM inventoryitems WHERE parentFolderID = ?uuid",
157 database.Connection); 157 database.Connection);
158 result.Parameters.AddWithValue("?uuid", folderID.ToStringHyphenated()); 158 result.Parameters.AddWithValue("?uuid", folderID.ToString());
159 MySqlDataReader reader = result.ExecuteReader(); 159 MySqlDataReader reader = result.ExecuteReader();
160 160
161 while (reader.Read()) 161 while (reader.Read())
@@ -190,8 +190,8 @@ namespace OpenSim.Framework.Data.MySQL
190 new MySqlCommand( 190 new MySqlCommand(
191 "SELECT * FROM inventoryfolders WHERE parentFolderID = ?zero AND agentID = ?uuid", 191 "SELECT * FROM inventoryfolders WHERE parentFolderID = ?zero AND agentID = ?uuid",
192 database.Connection); 192 database.Connection);
193 result.Parameters.AddWithValue("?uuid", user.ToStringHyphenated()); 193 result.Parameters.AddWithValue("?uuid", user.ToString());
194 result.Parameters.AddWithValue("?zero", LLUUID.Zero.ToStringHyphenated()); 194 result.Parameters.AddWithValue("?zero", LLUUID.Zero.ToString());
195 MySqlDataReader reader = result.ExecuteReader(); 195 MySqlDataReader reader = result.ExecuteReader();
196 196
197 List<InventoryFolderBase> items = new List<InventoryFolderBase>(); 197 List<InventoryFolderBase> items = new List<InventoryFolderBase>();
@@ -224,8 +224,8 @@ namespace OpenSim.Framework.Data.MySQL
224 new MySqlCommand( 224 new MySqlCommand(
225 "SELECT * FROM inventoryfolders WHERE parentFolderID = ?zero AND agentID = ?uuid", 225 "SELECT * FROM inventoryfolders WHERE parentFolderID = ?zero AND agentID = ?uuid",
226 database.Connection); 226 database.Connection);
227 result.Parameters.AddWithValue("?uuid", user.ToStringHyphenated()); 227 result.Parameters.AddWithValue("?uuid", user.ToString());
228 result.Parameters.AddWithValue("?zero", LLUUID.Zero.ToStringHyphenated()); 228 result.Parameters.AddWithValue("?zero", LLUUID.Zero.ToString());
229 229
230 MySqlDataReader reader = result.ExecuteReader(); 230 MySqlDataReader reader = result.ExecuteReader();
231 231
@@ -275,7 +275,7 @@ namespace OpenSim.Framework.Data.MySQL
275 MySqlCommand result = 275 MySqlCommand result =
276 new MySqlCommand("SELECT * FROM inventoryfolders WHERE parentFolderID = ?uuid", 276 new MySqlCommand("SELECT * FROM inventoryfolders WHERE parentFolderID = ?uuid",
277 database.Connection); 277 database.Connection);
278 result.Parameters.AddWithValue("?uuid", parentID.ToStringHyphenated()); 278 result.Parameters.AddWithValue("?uuid", parentID.ToString());
279 MySqlDataReader reader = result.ExecuteReader(); 279 MySqlDataReader reader = result.ExecuteReader();
280 280
281 List<InventoryFolderBase> items = new List<InventoryFolderBase>(); 281 List<InventoryFolderBase> items = new List<InventoryFolderBase>();
@@ -346,7 +346,7 @@ namespace OpenSim.Framework.Data.MySQL
346 346
347 MySqlCommand result = 347 MySqlCommand result =
348 new MySqlCommand("SELECT * FROM inventoryitems WHERE inventoryID = ?uuid", database.Connection); 348 new MySqlCommand("SELECT * FROM inventoryitems WHERE inventoryID = ?uuid", database.Connection);
349 result.Parameters.AddWithValue("?uuid", itemID.ToStringHyphenated()); 349 result.Parameters.AddWithValue("?uuid", itemID.ToString());
350 MySqlDataReader reader = result.ExecuteReader(); 350 MySqlDataReader reader = result.ExecuteReader();
351 351
352 InventoryItemBase item = null; 352 InventoryItemBase item = null;
@@ -407,7 +407,7 @@ namespace OpenSim.Framework.Data.MySQL
407 { 407 {
408 MySqlCommand result = 408 MySqlCommand result =
409 new MySqlCommand("SELECT * FROM inventoryfolders WHERE folderID = ?uuid", database.Connection); 409 new MySqlCommand("SELECT * FROM inventoryfolders WHERE folderID = ?uuid", database.Connection);
410 result.Parameters.AddWithValue("?uuid", folderID.ToStringHyphenated()); 410 result.Parameters.AddWithValue("?uuid", folderID.ToString());
411 MySqlDataReader reader = result.ExecuteReader(); 411 MySqlDataReader reader = result.ExecuteReader();
412 412
413 reader.Read(); 413 reader.Read();
@@ -440,18 +440,18 @@ namespace OpenSim.Framework.Data.MySQL
440 try 440 try
441 { 441 {
442 MySqlCommand result = new MySqlCommand(sql, database.Connection); 442 MySqlCommand result = new MySqlCommand(sql, database.Connection);
443 result.Parameters.AddWithValue("?inventoryID", item.inventoryID.ToStringHyphenated()); 443 result.Parameters.AddWithValue("?inventoryID", item.inventoryID.ToString());
444 result.Parameters.AddWithValue("?assetID", item.assetID.ToStringHyphenated()); 444 result.Parameters.AddWithValue("?assetID", item.assetID.ToString());
445 result.Parameters.AddWithValue("?assetType", item.assetType.ToString()); 445 result.Parameters.AddWithValue("?assetType", item.assetType.ToString());
446 result.Parameters.AddWithValue("?parentFolderID", item.parentFolderID.ToStringHyphenated()); 446 result.Parameters.AddWithValue("?parentFolderID", item.parentFolderID.ToString());
447 result.Parameters.AddWithValue("?avatarID", item.avatarID.ToStringHyphenated()); 447 result.Parameters.AddWithValue("?avatarID", item.avatarID.ToString());
448 result.Parameters.AddWithValue("?inventoryName", item.inventoryName); 448 result.Parameters.AddWithValue("?inventoryName", item.inventoryName);
449 result.Parameters.AddWithValue("?inventoryDescription", item.inventoryDescription); 449 result.Parameters.AddWithValue("?inventoryDescription", item.inventoryDescription);
450 result.Parameters.AddWithValue("?inventoryNextPermissions", item.inventoryNextPermissions.ToString()); 450 result.Parameters.AddWithValue("?inventoryNextPermissions", item.inventoryNextPermissions.ToString());
451 result.Parameters.AddWithValue("?inventoryCurrentPermissions", 451 result.Parameters.AddWithValue("?inventoryCurrentPermissions",
452 item.inventoryCurrentPermissions.ToString()); 452 item.inventoryCurrentPermissions.ToString());
453 result.Parameters.AddWithValue("?invType", item.invType); 453 result.Parameters.AddWithValue("?invType", item.invType);
454 result.Parameters.AddWithValue("?creatorID", item.creatorsID.ToStringHyphenated()); 454 result.Parameters.AddWithValue("?creatorID", item.creatorsID.ToString());
455 result.Parameters.AddWithValue("?inventoryBasePermissions", item.inventoryBasePermissions); 455 result.Parameters.AddWithValue("?inventoryBasePermissions", item.inventoryBasePermissions);
456 result.Parameters.AddWithValue("?inventoryEveryOnePermissions", item.inventoryEveryOnePermissions); 456 result.Parameters.AddWithValue("?inventoryEveryOnePermissions", item.inventoryEveryOnePermissions);
457 result.ExecuteNonQuery(); 457 result.ExecuteNonQuery();
@@ -482,7 +482,7 @@ namespace OpenSim.Framework.Data.MySQL
482 { 482 {
483 MySqlCommand cmd = 483 MySqlCommand cmd =
484 new MySqlCommand("DELETE FROM inventoryitems WHERE inventoryID=?uuid", database.Connection); 484 new MySqlCommand("DELETE FROM inventoryitems WHERE inventoryID=?uuid", database.Connection);
485 cmd.Parameters.AddWithValue("?uuid", itemID.ToStringHyphenated()); 485 cmd.Parameters.AddWithValue("?uuid", itemID.ToString());
486 cmd.ExecuteNonQuery(); 486 cmd.ExecuteNonQuery();
487 } 487 }
488 catch (MySqlException e) 488 catch (MySqlException e)
@@ -503,9 +503,9 @@ namespace OpenSim.Framework.Data.MySQL
503 sql += "(?folderID, ?agentID, ?parentFolderID, ?folderName, ?type, ?version)"; 503 sql += "(?folderID, ?agentID, ?parentFolderID, ?folderName, ?type, ?version)";
504 504
505 MySqlCommand cmd = new MySqlCommand(sql, database.Connection); 505 MySqlCommand cmd = new MySqlCommand(sql, database.Connection);
506 cmd.Parameters.AddWithValue("?folderID", folder.folderID.ToStringHyphenated()); 506 cmd.Parameters.AddWithValue("?folderID", folder.folderID.ToString());
507 cmd.Parameters.AddWithValue("?agentID", folder.agentID.ToStringHyphenated()); 507 cmd.Parameters.AddWithValue("?agentID", folder.agentID.ToString());
508 cmd.Parameters.AddWithValue("?parentFolderID", folder.parentID.ToStringHyphenated()); 508 cmd.Parameters.AddWithValue("?parentFolderID", folder.parentID.ToString());
509 cmd.Parameters.AddWithValue("?folderName", folder.name); 509 cmd.Parameters.AddWithValue("?folderName", folder.name);
510 cmd.Parameters.AddWithValue("?type", (short) folder.type); 510 cmd.Parameters.AddWithValue("?type", (short) folder.type);
511 cmd.Parameters.AddWithValue("?version", folder.version); 511 cmd.Parameters.AddWithValue("?version", folder.version);
@@ -538,8 +538,8 @@ namespace OpenSim.Framework.Data.MySQL
538 "UPDATE inventoryfolders SET parentFolderID=?parentFolderID WHERE folderID=?folderID"; 538 "UPDATE inventoryfolders SET parentFolderID=?parentFolderID WHERE folderID=?folderID";
539 539
540 MySqlCommand cmd = new MySqlCommand(sql, database.Connection); 540 MySqlCommand cmd = new MySqlCommand(sql, database.Connection);
541 cmd.Parameters.AddWithValue("?folderID", folder.folderID.ToStringHyphenated()); 541 cmd.Parameters.AddWithValue("?folderID", folder.folderID.ToString());
542 cmd.Parameters.AddWithValue("?parentFolderID", folder.parentID.ToStringHyphenated()); 542 cmd.Parameters.AddWithValue("?parentFolderID", folder.parentID.ToString());
543 543
544 544
545 try 545 try
@@ -587,7 +587,7 @@ namespace OpenSim.Framework.Data.MySQL
587 { 587 {
588 MySqlCommand cmd = 588 MySqlCommand cmd =
589 new MySqlCommand("DELETE FROM inventoryfolders WHERE folderID=?uuid", database.Connection); 589 new MySqlCommand("DELETE FROM inventoryfolders WHERE folderID=?uuid", database.Connection);
590 cmd.Parameters.AddWithValue("?uuid", folderID.ToStringHyphenated()); 590 cmd.Parameters.AddWithValue("?uuid", folderID.ToString());
591 cmd.ExecuteNonQuery(); 591 cmd.ExecuteNonQuery();
592 } 592 }
593 catch (MySqlException e) 593 catch (MySqlException e)
@@ -603,7 +603,7 @@ namespace OpenSim.Framework.Data.MySQL
603 { 603 {
604 MySqlCommand cmd = 604 MySqlCommand cmd =
605 new MySqlCommand("DELETE FROM inventoryitems WHERE parentFolderID=?uuid", database.Connection); 605 new MySqlCommand("DELETE FROM inventoryitems WHERE parentFolderID=?uuid", database.Connection);
606 cmd.Parameters.AddWithValue("?uuid", folderID.ToStringHyphenated()); 606 cmd.Parameters.AddWithValue("?uuid", folderID.ToString());
607 cmd.ExecuteNonQuery(); 607 cmd.ExecuteNonQuery();
608 } 608 }
609 catch (MySqlException e) 609 catch (MySqlException e)
diff --git a/OpenSim/Framework/Data.MySQL/MySQLManager.cs b/OpenSim/Framework/Data.MySQL/MySQLManager.cs
index bd5f811..d652db8 100644
--- a/OpenSim/Framework/Data.MySQL/MySQLManager.cs
+++ b/OpenSim/Framework/Data.MySQL/MySQLManager.cs
@@ -549,7 +549,7 @@ namespace OpenSim.Framework.Data.MySQL
549 sql += "?profileFirstText, ?profileImage, ?profileFirstImage)"; 549 sql += "?profileFirstText, ?profileImage, ?profileFirstImage)";
550 550
551 Dictionary<string, string> parameters = new Dictionary<string, string>(); 551 Dictionary<string, string> parameters = new Dictionary<string, string>();
552 parameters["?UUID"] = uuid.ToStringHyphenated(); 552 parameters["?UUID"] = uuid.ToString();
553 parameters["?username"] = username.ToString(); 553 parameters["?username"] = username.ToString();
554 parameters["?lastname"] = lastname.ToString(); 554 parameters["?lastname"] = lastname.ToString();
555 parameters["?passwordHash"] = passwordHash.ToString(); 555 parameters["?passwordHash"] = passwordHash.ToString();
@@ -569,8 +569,8 @@ namespace OpenSim.Framework.Data.MySQL
569 parameters["?profileWantDoMask"] = "0"; 569 parameters["?profileWantDoMask"] = "0";
570 parameters["?profileAboutText"] = ""; 570 parameters["?profileAboutText"] = "";
571 parameters["?profileFirstText"] = ""; 571 parameters["?profileFirstText"] = "";
572 parameters["?profileImage"] = LLUUID.Zero.ToStringHyphenated(); 572 parameters["?profileImage"] = LLUUID.Zero.ToString();
573 parameters["?profileFirstImage"] = LLUUID.Zero.ToStringHyphenated(); 573 parameters["?profileFirstImage"] = LLUUID.Zero.ToString();
574 574
575 bool returnval = false; 575 bool returnval = false;
576 576
@@ -618,7 +618,7 @@ namespace OpenSim.Framework.Data.MySQL
618 618
619 parameters["?regionHandle"] = regiondata.regionHandle.ToString(); 619 parameters["?regionHandle"] = regiondata.regionHandle.ToString();
620 parameters["?regionName"] = regiondata.regionName.ToString(); 620 parameters["?regionName"] = regiondata.regionName.ToString();
621 parameters["?uuid"] = regiondata.UUID.ToStringHyphenated(); 621 parameters["?uuid"] = regiondata.UUID.ToString();
622 parameters["?regionRecvKey"] = regiondata.regionRecvKey.ToString(); 622 parameters["?regionRecvKey"] = regiondata.regionRecvKey.ToString();
623 parameters["?regionSecret"] = regiondata.regionSecret.ToString(); 623 parameters["?regionSecret"] = regiondata.regionSecret.ToString();
624 parameters["?regionSendKey"] = regiondata.regionSendKey.ToString(); 624 parameters["?regionSendKey"] = regiondata.regionSendKey.ToString();
@@ -639,7 +639,7 @@ namespace OpenSim.Framework.Data.MySQL
639 parameters["?regionUserURI"] = regiondata.regionUserURI.ToString(); 639 parameters["?regionUserURI"] = regiondata.regionUserURI.ToString();
640 parameters["?regionUserRecvKey"] = regiondata.regionUserRecvKey.ToString(); 640 parameters["?regionUserRecvKey"] = regiondata.regionUserRecvKey.ToString();
641 parameters["?regionUserSendKey"] = regiondata.regionUserSendKey.ToString(); 641 parameters["?regionUserSendKey"] = regiondata.regionUserSendKey.ToString();
642 parameters["?regionMapTexture"] = regiondata.regionMapTextureID.ToStringHyphenated(); 642 parameters["?regionMapTexture"] = regiondata.regionMapTextureID.ToString();
643 parameters["?serverHttpPort"] = regiondata.httpPort.ToString(); 643 parameters["?serverHttpPort"] = regiondata.httpPort.ToString();
644 parameters["?serverRemotingPort"] = regiondata.remotingPort.ToString(); 644 parameters["?serverRemotingPort"] = regiondata.remotingPort.ToString();
645 645
diff --git a/OpenSim/Framework/Data.MySQL/MySQLUserData.cs b/OpenSim/Framework/Data.MySQL/MySQLUserData.cs
index 05e5127..4b86d80 100644
--- a/OpenSim/Framework/Data.MySQL/MySQLUserData.cs
+++ b/OpenSim/Framework/Data.MySQL/MySQLUserData.cs
@@ -237,7 +237,7 @@ namespace OpenSim.Framework.Data.MySQL
237 lock (database) 237 lock (database)
238 { 238 {
239 Dictionary<string, string> param = new Dictionary<string, string>(); 239 Dictionary<string, string> param = new Dictionary<string, string>();
240 param["?uuid"] = uuid.ToStringHyphenated(); 240 param["?uuid"] = uuid.ToString();
241 241
242 IDbCommand result = database.Query("SELECT * FROM users WHERE UUID = ?uuid", param); 242 IDbCommand result = database.Query("SELECT * FROM users WHERE UUID = ?uuid", param);
243 IDataReader reader = result.ExecuteReader(); 243 IDataReader reader = result.ExecuteReader();
@@ -292,7 +292,7 @@ namespace OpenSim.Framework.Data.MySQL
292 lock (database) 292 lock (database)
293 { 293 {
294 Dictionary<string, string> param = new Dictionary<string, string>(); 294 Dictionary<string, string> param = new Dictionary<string, string>();
295 param["?uuid"] = uuid.ToStringHyphenated(); 295 param["?uuid"] = uuid.ToString();
296 296
297 IDbCommand result = database.Query("SELECT * FROM agents WHERE UUID = ?uuid", param); 297 IDbCommand result = database.Query("SELECT * FROM agents WHERE UUID = ?uuid", param);
298 IDataReader reader = result.ExecuteReader(); 298 IDataReader reader = result.ExecuteReader();