aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data
diff options
context:
space:
mode:
authorUbitUmarov2017-05-06 01:25:54 +0100
committerUbitUmarov2017-05-06 01:25:54 +0100
commitd9038e650a8cbacc3463c6989b5af1e8429a1e8b (patch)
tree5d1b31679650853bf9710c96dcda6bd0f45096aa /OpenSim/Data
parent revert to older CSJ2K.dll since new seems have issues on linux with existent... (diff)
downloadopensim-SC-d9038e650a8cbacc3463c6989b5af1e8429a1e8b.zip
opensim-SC-d9038e650a8cbacc3463c6989b5af1e8429a1e8b.tar.gz
opensim-SC-d9038e650a8cbacc3463c6989b5af1e8429a1e8b.tar.bz2
opensim-SC-d9038e650a8cbacc3463c6989b5af1e8429a1e8b.tar.xz
MySQLConnector is not a MS product
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/MySQL/MySQLAssetData.cs7
-rw-r--r--OpenSim/Data/MySQL/MySQLAuthenticationData.cs2
-rw-r--r--OpenSim/Data/MySQL/MySQLEstateData.cs11
-rw-r--r--OpenSim/Data/MySQL/MySQLFSAssetData.cs11
-rw-r--r--OpenSim/Data/MySQL/MySQLFramework.cs9
-rw-r--r--OpenSim/Data/MySQL/MySQLGenericTableHandler.cs12
-rw-r--r--OpenSim/Data/MySQL/MySQLInventoryData.cs15
-rw-r--r--OpenSim/Data/MySQL/MySQLRegionData.cs3
-rw-r--r--OpenSim/Data/MySQL/MySQLSimulationData.cs30
-rw-r--r--OpenSim/Data/MySQL/MySQLUserProfilesData.cs16
-rw-r--r--OpenSim/Data/MySQL/MySQLXAssetData.cs7
-rw-r--r--OpenSim/Data/MySQL/MySQLXInventoryData.cs1
12 files changed, 110 insertions, 14 deletions
diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs
index f16cd91..27cc0ba 100644
--- a/OpenSim/Data/MySQL/MySQLAssetData.cs
+++ b/OpenSim/Data/MySQL/MySQLAssetData.cs
@@ -75,6 +75,7 @@ namespace OpenSim.Data.MySQL
75 dbcon.Open(); 75 dbcon.Open();
76 Migration m = new Migration(dbcon, Assembly, "AssetStore"); 76 Migration m = new Migration(dbcon, Assembly, "AssetStore");
77 m.Update(); 77 m.Update();
78 dbcon.Close();
78 } 79 }
79 } 80 }
80 81
@@ -144,6 +145,7 @@ namespace OpenSim.Data.MySQL
144 string.Format("[ASSETS DB]: MySql failure fetching asset {0}. Exception ", assetID), e); 145 string.Format("[ASSETS DB]: MySql failure fetching asset {0}. Exception ", assetID), e);
145 } 146 }
146 } 147 }
148 dbcon.Close();
147 } 149 }
148 150
149 return asset; 151 return asset;
@@ -209,6 +211,7 @@ namespace OpenSim.Data.MySQL
209 return false; 211 return false;
210 } 212 }
211 } 213 }
214 dbcon.Close();
212 } 215 }
213 } 216 }
214 217
@@ -238,6 +241,7 @@ namespace OpenSim.Data.MySQL
238 e); 241 e);
239 } 242 }
240 } 243 }
244 dbcon.Close();
241 } 245 }
242 } 246 }
243 247
@@ -270,6 +274,7 @@ namespace OpenSim.Data.MySQL
270 } 274 }
271 } 275 }
272 } 276 }
277 dbcon.Close();
273 } 278 }
274 279
275 bool[] results = new bool[uuids.Length]; 280 bool[] results = new bool[uuids.Length];
@@ -334,6 +339,7 @@ namespace OpenSim.Data.MySQL
334 e); 339 e);
335 } 340 }
336 } 341 }
342 dbcon.Close();
337 } 343 }
338 344
339 return retList; 345 return retList;
@@ -350,6 +356,7 @@ namespace OpenSim.Data.MySQL
350 cmd.Parameters.AddWithValue("?id", id); 356 cmd.Parameters.AddWithValue("?id", id);
351 cmd.ExecuteNonQuery(); 357 cmd.ExecuteNonQuery();
352 } 358 }
359 dbcon.Close();
353 } 360 }
354 361
355 return true; 362 return true;
diff --git a/OpenSim/Data/MySQL/MySQLAuthenticationData.cs b/OpenSim/Data/MySQL/MySQLAuthenticationData.cs
index af6be75..5030c1d 100644
--- a/OpenSim/Data/MySQL/MySQLAuthenticationData.cs
+++ b/OpenSim/Data/MySQL/MySQLAuthenticationData.cs
@@ -59,6 +59,7 @@ namespace OpenSim.Data.MySQL
59 dbcon.Open(); 59 dbcon.Open();
60 Migration m = new Migration(dbcon, Assembly, "AuthStore"); 60 Migration m = new Migration(dbcon, Assembly, "AuthStore");
61 m.Update(); 61 m.Update();
62 dbcon.Close();
62 } 63 }
63 } 64 }
64 65
@@ -99,6 +100,7 @@ namespace OpenSim.Data.MySQL
99 return null; 100 return null;
100 } 101 }
101 } 102 }
103 dbcon.Close();
102 } 104 }
103 } 105 }
104 106
diff --git a/OpenSim/Data/MySQL/MySQLEstateData.cs b/OpenSim/Data/MySQL/MySQLEstateData.cs
index a5c8d24..12593f6 100644
--- a/OpenSim/Data/MySQL/MySQLEstateData.cs
+++ b/OpenSim/Data/MySQL/MySQLEstateData.cs
@@ -171,12 +171,13 @@ namespace OpenSim.Data.MySQL
171 } 171 }
172 } 172 }
173 } 173 }
174
175 if (!found && create) 174 if (!found && create)
176 { 175 {
177 DoCreate(es); 176 DoCreate(es);
178 LinkRegion(regionID, (int)es.EstateID); 177 LinkRegion(regionID, (int)es.EstateID);
179 } 178 }
179 cmd.Connection = null;
180 dbcon.Close();
180 } 181 }
181 182
182 LoadBanList(es); 183 LoadBanList(es);
@@ -231,6 +232,7 @@ namespace OpenSim.Data.MySQL
231 232
232 es.Save(); 233 es.Save();
233 } 234 }
235 dbcon.Close();
234 } 236 }
235 } 237 }
236 238
@@ -263,6 +265,7 @@ namespace OpenSim.Data.MySQL
263 265
264 cmd.ExecuteNonQuery(); 266 cmd.ExecuteNonQuery();
265 } 267 }
268 dbcon.Close();
266 } 269 }
267 270
268 SaveBanList(es); 271 SaveBanList(es);
@@ -300,6 +303,7 @@ namespace OpenSim.Data.MySQL
300 } 303 }
301 } 304 }
302 } 305 }
306 dbcon.Close();
303 } 307 }
304 } 308 }
305 309
@@ -329,6 +333,7 @@ namespace OpenSim.Data.MySQL
329 cmd.Parameters.Clear(); 333 cmd.Parameters.Clear();
330 } 334 }
331 } 335 }
336 dbcon.Close();
332 } 337 }
333 } 338 }
334 339
@@ -358,6 +363,7 @@ namespace OpenSim.Data.MySQL
358 cmd.Parameters.Clear(); 363 cmd.Parameters.Clear();
359 } 364 }
360 } 365 }
366 dbcon.Close();
361 } 367 }
362 } 368 }
363 369
@@ -383,6 +389,7 @@ namespace OpenSim.Data.MySQL
383 } 389 }
384 } 390 }
385 } 391 }
392 dbcon.Close();
386 } 393 }
387 394
388 return uuids.ToArray(); 395 return uuids.ToArray();
@@ -437,7 +444,6 @@ namespace OpenSim.Data.MySQL
437 reader.Close(); 444 reader.Close();
438 } 445 }
439 } 446 }
440
441 dbcon.Close(); 447 dbcon.Close();
442 } 448 }
443 449
@@ -466,7 +472,6 @@ namespace OpenSim.Data.MySQL
466 reader.Close(); 472 reader.Close();
467 } 473 }
468 } 474 }
469
470 dbcon.Close(); 475 dbcon.Close();
471 } 476 }
472 477
diff --git a/OpenSim/Data/MySQL/MySQLFSAssetData.cs b/OpenSim/Data/MySQL/MySQLFSAssetData.cs
index 2837ce3..0918596 100644
--- a/OpenSim/Data/MySQL/MySQLFSAssetData.cs
+++ b/OpenSim/Data/MySQL/MySQLFSAssetData.cs
@@ -121,9 +121,13 @@ namespace OpenSim.Data.MySQL
121 } 121 }
122 catch (MySqlException e) 122 catch (MySqlException e)
123 { 123 {
124 cmd.Connection = null;
125 conn.Close();
124 m_log.ErrorFormat("[FSASSETS]: Query {0} failed with {1}", cmd.CommandText, e.ToString()); 126 m_log.ErrorFormat("[FSASSETS]: Query {0} failed with {1}", cmd.CommandText, e.ToString());
125 return false; 127 return false;
126 } 128 }
129 cmd.Connection = null;
130 conn.Close();
127 } 131 }
128 132
129 return true; 133 return true;
@@ -175,7 +179,7 @@ namespace OpenSim.Data.MySQL
175 UpdateAccessTime(id, AccessTime); 179 UpdateAccessTime(id, AccessTime);
176 } 180 }
177 } 181 }
178 182 conn.Close();
179 } 183 }
180 184
181 return meta; 185 return meta;
@@ -206,6 +210,7 @@ namespace OpenSim.Data.MySQL
206 cmd.Parameters.AddWithValue("?id", AssetID); 210 cmd.Parameters.AddWithValue("?id", AssetID);
207 cmd.ExecuteNonQuery(); 211 cmd.ExecuteNonQuery();
208 } 212 }
213 conn.Close();
209 } 214 }
210 } 215 }
211 216
@@ -299,6 +304,7 @@ namespace OpenSim.Data.MySQL
299 } 304 }
300 } 305 }
301 } 306 }
307 conn.Close();
302 } 308 }
303 309
304 for (int i = 0; i < uuids.Length; i++) 310 for (int i = 0; i < uuids.Length; i++)
@@ -333,6 +339,7 @@ namespace OpenSim.Data.MySQL
333 count = Convert.ToInt32(reader["count"]); 339 count = Convert.ToInt32(reader["count"]);
334 } 340 }
335 } 341 }
342 conn.Close();
336 } 343 }
337 344
338 return count; 345 return count;
@@ -413,8 +420,8 @@ namespace OpenSim.Data.MySQL
413 imported++; 420 imported++;
414 } 421 }
415 } 422 }
416
417 } 423 }
424 importConn.Close();
418 } 425 }
419 426
420 MainConsole.Instance.Output(String.Format("Import done, {0} assets imported", imported)); 427 MainConsole.Instance.Output(String.Format("Import done, {0} assets imported", imported));
diff --git a/OpenSim/Data/MySQL/MySQLFramework.cs b/OpenSim/Data/MySQL/MySQLFramework.cs
index 93662db..98106f0 100644
--- a/OpenSim/Data/MySQL/MySQLFramework.cs
+++ b/OpenSim/Data/MySQL/MySQLFramework.cs
@@ -74,7 +74,9 @@ namespace OpenSim.Data.MySQL
74 using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) 74 using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
75 { 75 {
76 dbcon.Open(); 76 dbcon.Open();
77 return ExecuteNonQueryWithConnection(cmd, dbcon); 77 int ret = ExecuteNonQueryWithConnection(cmd, dbcon);
78 dbcon.Close();
79 return ret;
78 } 80 }
79 } 81 }
80 else 82 else
@@ -97,12 +99,15 @@ namespace OpenSim.Data.MySQL
97 99
98 try 100 try
99 { 101 {
100 return cmd.ExecuteNonQuery(); 102 int ret = cmd.ExecuteNonQuery();
103 cmd.Connection = null;
104 return ret;
101 } 105 }
102 catch (Exception e) 106 catch (Exception e)
103 { 107 {
104 m_log.Error(e.Message, e); 108 m_log.Error(e.Message, e);
105 m_log.Error(Environment.StackTrace.ToString()); 109 m_log.Error(Environment.StackTrace.ToString());
110 cmd.Connection = null;
106 return 0; 111 return 0;
107 } 112 }
108 } 113 }
diff --git a/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs b/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs
index bd8bbd5..9bd3c0c 100644
--- a/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs
+++ b/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs
@@ -160,8 +160,9 @@ namespace OpenSim.Data.MySQL
160 using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) 160 using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
161 { 161 {
162 dbcon.Open(); 162 dbcon.Open();
163 163 T[] ret = DoQueryWithConnection(cmd, dbcon);
164 return DoQueryWithConnection(cmd, dbcon); 164 dbcon.Close();
165 return ret;
165 } 166 }
166 } 167 }
167 else 168 else
@@ -243,7 +244,7 @@ namespace OpenSim.Data.MySQL
243 result.Add(row); 244 result.Add(row);
244 } 245 }
245 } 246 }
246 247 cmd.Connection = null;
247 return result.ToArray(); 248 return result.ToArray();
248 } 249 }
249 250
@@ -402,7 +403,10 @@ namespace OpenSim.Data.MySQL
402 dbcon.Open(); 403 dbcon.Open();
403 cmd.Connection = dbcon; 404 cmd.Connection = dbcon;
404 405
405 return cmd.ExecuteScalar(); 406 Object ret = cmd.ExecuteScalar();
407 cmd.Connection = null;
408 dbcon.Close();
409 return ret;
406 } 410 }
407 } 411 }
408 else 412 else
diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs
index 382d4a5..3216544 100644
--- a/OpenSim/Data/MySQL/MySQLInventoryData.cs
+++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs
@@ -78,6 +78,7 @@ namespace OpenSim.Data.MySQL
78 dbcon.Open(); 78 dbcon.Open();
79 Migration m = new Migration(dbcon, assem, "InventoryStore"); 79 Migration m = new Migration(dbcon, assem, "InventoryStore");
80 m.Update(); 80 m.Update();
81 dbcon.Close();
81 } 82 }
82 } 83 }
83 84
@@ -133,6 +134,7 @@ namespace OpenSim.Data.MySQL
133 return items; 134 return items;
134 } 135 }
135 } 136 }
137 dbcon.Close();
136 } 138 }
137 } 139 }
138 } 140 }
@@ -173,6 +175,7 @@ namespace OpenSim.Data.MySQL
173 return items; 175 return items;
174 } 176 }
175 } 177 }
178 dbcon.Close();
176 } 179 }
177 } 180 }
178 } 181 }
@@ -224,6 +227,7 @@ namespace OpenSim.Data.MySQL
224 return rootFolder; 227 return rootFolder;
225 } 228 }
226 } 229 }
230 dbcon.Close();
227 } 231 }
228 } 232 }
229 } 233 }
@@ -264,6 +268,7 @@ namespace OpenSim.Data.MySQL
264 return items; 268 return items;
265 } 269 }
266 } 270 }
271 dbcon.Close();
267 } 272 }
268 } 273 }
269 } 274 }
@@ -355,6 +360,7 @@ namespace OpenSim.Data.MySQL
355 return item; 360 return item;
356 } 361 }
357 } 362 }
363 dbcon.Close();
358 } 364 }
359 } 365 }
360 } 366 }
@@ -420,6 +426,7 @@ namespace OpenSim.Data.MySQL
420 return folder; 426 return folder;
421 } 427 }
422 } 428 }
429 dbcon.Close();
423 } 430 }
424 } 431 }
425 } 432 }
@@ -497,6 +504,8 @@ namespace OpenSim.Data.MySQL
497 result.Dispose(); 504 result.Dispose();
498 } 505 }
499 506
507 dbcon.Close();
508
500 using (MySqlCommand result = new MySqlCommand("update inventoryfolders set version=version+1 where folderID = ?folderID", dbcon)) 509 using (MySqlCommand result = new MySqlCommand("update inventoryfolders set version=version+1 where folderID = ?folderID", dbcon))
501 { 510 {
502 result.Parameters.AddWithValue("?folderID", item.Folder.ToString()); 511 result.Parameters.AddWithValue("?folderID", item.Folder.ToString());
@@ -540,6 +549,7 @@ namespace OpenSim.Data.MySQL
540 lock (m_dbLock) 549 lock (m_dbLock)
541 cmd.ExecuteNonQuery(); 550 cmd.ExecuteNonQuery();
542 } 551 }
552 dbcon.Close();
543 } 553 }
544 } 554 }
545 catch (MySqlException e) 555 catch (MySqlException e)
@@ -600,6 +610,7 @@ namespace OpenSim.Data.MySQL
600 m_log.Error(e.ToString()); 610 m_log.Error(e.ToString());
601 } 611 }
602 } 612 }
613 dbcon.Close();
603 } 614 }
604 } 615 }
605 616
@@ -643,6 +654,7 @@ namespace OpenSim.Data.MySQL
643 m_log.Error(e.ToString()); 654 m_log.Error(e.ToString());
644 } 655 }
645 } 656 }
657 dbcon.Close();
646 } 658 }
647 } 659 }
648 660
@@ -806,6 +818,7 @@ namespace OpenSim.Data.MySQL
806 lock (m_dbLock) 818 lock (m_dbLock)
807 cmd.ExecuteNonQuery(); 819 cmd.ExecuteNonQuery();
808 } 820 }
821 dbcon.Close();
809 } 822 }
810 } 823 }
811 catch (MySqlException e) 824 catch (MySqlException e)
@@ -833,6 +846,7 @@ namespace OpenSim.Data.MySQL
833 lock (m_dbLock) 846 lock (m_dbLock)
834 cmd.ExecuteNonQuery(); 847 cmd.ExecuteNonQuery();
835 } 848 }
849 dbcon.Close();
836 } 850 }
837 } 851 }
838 catch (MySqlException e) 852 catch (MySqlException e)
@@ -889,6 +903,7 @@ namespace OpenSim.Data.MySQL
889 return list; 903 return list;
890 } 904 }
891 } 905 }
906 dbcon.Close();
892 } 907 }
893 } 908 }
894 catch (Exception e) 909 catch (Exception e)
diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs
index 0e55285..46df421 100644
--- a/OpenSim/Data/MySQL/MySQLRegionData.cs
+++ b/OpenSim/Data/MySQL/MySQLRegionData.cs
@@ -60,6 +60,7 @@ namespace OpenSim.Data.MySQL
60 dbcon.Open(); 60 dbcon.Open();
61 Migration m = new Migration(dbcon, Assembly, "GridStore"); 61 Migration m = new Migration(dbcon, Assembly, "GridStore");
62 m.Update(); 62 m.Update();
63 dbcon.Close();
63 } 64 }
64 } 65 }
65 66
@@ -260,6 +261,8 @@ namespace OpenSim.Data.MySQL
260 retList.Add(ret); 261 retList.Add(ret);
261 } 262 }
262 } 263 }
264 cmd.Connection = null;
265 dbcon.Close();
263 } 266 }
264 267
265 return retList; 268 return retList;
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs
index 5740b91..8d1a4a5 100644
--- a/OpenSim/Data/MySQL/MySQLSimulationData.cs
+++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs
@@ -88,6 +88,7 @@ namespace OpenSim.Data.MySQL
88 // 88 //
89 Migration m = new Migration(dbcon, Assembly, "RegionStore"); 89 Migration m = new Migration(dbcon, Assembly, "RegionStore");
90 m.Update(); 90 m.Update();
91 dbcon.Close();
91 } 92 }
92 } 93 }
93 94
@@ -334,6 +335,7 @@ namespace OpenSim.Data.MySQL
334 335
335 ExecuteNonQuery(cmd); 336 ExecuteNonQuery(cmd);
336 } 337 }
338 dbcon.Close();
337 } 339 }
338 } 340 }
339 } 341 }
@@ -372,6 +374,7 @@ namespace OpenSim.Data.MySQL
372 374
373 ExecuteNonQuery(cmd); 375 ExecuteNonQuery(cmd);
374 } 376 }
377 dbcon.Close();
375 } 378 }
376 } 379 }
377 } 380 }
@@ -411,6 +414,7 @@ namespace OpenSim.Data.MySQL
411 414
412 ExecuteNonQuery(cmd); 415 ExecuteNonQuery(cmd);
413 } 416 }
417 dbcon.Close();
414 } 418 }
415 } 419 }
416 } 420 }
@@ -460,6 +464,7 @@ namespace OpenSim.Data.MySQL
460 } 464 }
461 } 465 }
462 } 466 }
467 dbcon.Close();
463 } 468 }
464 } 469 }
465 470
@@ -535,6 +540,7 @@ namespace OpenSim.Data.MySQL
535 } 540 }
536 } 541 }
537 } 542 }
543 dbcon.Close();
538 } 544 }
539 } 545 }
540 546
@@ -580,6 +586,7 @@ namespace OpenSim.Data.MySQL
580 } 586 }
581 } 587 }
582 } 588 }
589 dbcon.Close();
583 } 590 }
584 591
585 prim.Inventory.RestoreInventoryItems(inventory); 592 prim.Inventory.RestoreInventoryItems(inventory);
@@ -634,6 +641,7 @@ namespace OpenSim.Data.MySQL
634 } 641 }
635 } 642 }
636 } 643 }
644 dbcon.Close();
637 } 645 }
638 } 646 }
639 }); 647 });
@@ -681,6 +689,7 @@ namespace OpenSim.Data.MySQL
681 } 689 }
682 } 690 }
683 } 691 }
692 dbcon.Close();
684 } 693 }
685 } 694 }
686 }); 695 });
@@ -727,6 +736,7 @@ namespace OpenSim.Data.MySQL
727 } 736 }
728 } 737 }
729 } 738 }
739 dbcon.Close();
730 } 740 }
731 } 741 }
732 742
@@ -762,6 +772,7 @@ namespace OpenSim.Data.MySQL
762 } 772 }
763 } 773 }
764 } 774 }
775 dbcon.Close();
765 } 776 }
766 } 777 }
767 778
@@ -783,6 +794,7 @@ namespace OpenSim.Data.MySQL
783 794
784 ExecuteNonQuery(cmd); 795 ExecuteNonQuery(cmd);
785 } 796 }
797 dbcon.Close();
786 } 798 }
787 } 799 }
788 } 800 }
@@ -842,6 +854,7 @@ namespace OpenSim.Data.MySQL
842 cmd.Parameters.Clear(); 854 cmd.Parameters.Clear();
843 } 855 }
844 } 856 }
857 dbcon.Close();
845 } 858 }
846 } 859 }
847 } 860 }
@@ -939,6 +952,7 @@ namespace OpenSim.Data.MySQL
939 nWP.valid = true; 952 nWP.valid = true;
940 } 953 }
941 } 954 }
955 dbcon.Close();
942 } 956 }
943 957
944 return nWP; 958 return nWP;
@@ -976,6 +990,7 @@ namespace OpenSim.Data.MySQL
976 } 990 }
977 } 991 }
978 } 992 }
993 dbcon.Close();
979 } 994 }
980 } 995 }
981 996
@@ -1084,6 +1099,7 @@ namespace OpenSim.Data.MySQL
1084 1099
1085 ExecuteNonQuery(cmd); 1100 ExecuteNonQuery(cmd);
1086 } 1101 }
1102 dbcon.Close();
1087 } 1103 }
1088 } 1104 }
1089 1105
@@ -1099,6 +1115,7 @@ namespace OpenSim.Data.MySQL
1099 cmd.Parameters.AddWithValue("?regionID", regionID.ToString()); 1115 cmd.Parameters.AddWithValue("?regionID", regionID.ToString());
1100 ExecuteNonQuery(cmd); 1116 ExecuteNonQuery(cmd);
1101 } 1117 }
1118 dbcon.Close();
1102 } 1119 }
1103 } 1120 }
1104 1121
@@ -1127,6 +1144,7 @@ namespace OpenSim.Data.MySQL
1127 return Convert.ToString(result["llsd_settings"]); 1144 return Convert.ToString(result["llsd_settings"]);
1128 } 1145 }
1129 } 1146 }
1147 dbcon.Close();
1130 } 1148 }
1131 } 1149 }
1132 1150
@@ -1145,6 +1163,7 @@ namespace OpenSim.Data.MySQL
1145 1163
1146 ExecuteNonQuery(cmd); 1164 ExecuteNonQuery(cmd);
1147 } 1165 }
1166 dbcon.Close();
1148 } 1167 }
1149 } 1168 }
1150 1169
@@ -1160,6 +1179,7 @@ namespace OpenSim.Data.MySQL
1160 cmd.Parameters.AddWithValue("?region_id", regionUUID.ToString()); 1179 cmd.Parameters.AddWithValue("?region_id", regionUUID.ToString());
1161 ExecuteNonQuery(cmd); 1180 ExecuteNonQuery(cmd);
1162 } 1181 }
1182 dbcon.Close();
1163 } 1183 }
1164 } 1184 }
1165 #endregion 1185 #endregion
@@ -1212,7 +1232,7 @@ namespace OpenSim.Data.MySQL
1212 FillRegionSettingsCommand(cmd, rs); 1232 FillRegionSettingsCommand(cmd, rs);
1213 ExecuteNonQuery(cmd); 1233 ExecuteNonQuery(cmd);
1214 } 1234 }
1215 1235 dbcon.Close();
1216 SaveSpawnPoints(rs); 1236 SaveSpawnPoints(rs);
1217 } 1237 }
1218 } 1238 }
@@ -1259,6 +1279,7 @@ namespace OpenSim.Data.MySQL
1259 } 1279 }
1260 } 1280 }
1261 } 1281 }
1282 dbcon.Close();
1262 } 1283 }
1263 } 1284 }
1264 1285
@@ -2123,6 +2144,7 @@ namespace OpenSim.Data.MySQL
2123 ExecuteNonQuery(cmd); 2144 ExecuteNonQuery(cmd);
2124 } 2145 }
2125 } 2146 }
2147 dbcon.Close();
2126 } 2148 }
2127 } 2149 }
2128 } 2150 }
@@ -2152,6 +2174,7 @@ namespace OpenSim.Data.MySQL
2152 } 2174 }
2153 } 2175 }
2154 } 2176 }
2177 dbcon.Close();
2155 } 2178 }
2156 } 2179 }
2157 2180
@@ -2187,6 +2210,7 @@ namespace OpenSim.Data.MySQL
2187 } 2210 }
2188 } 2211 }
2189 } 2212 }
2213 dbcon.Close();
2190 } 2214 }
2191 } 2215 }
2192 } 2216 }
@@ -2221,6 +2245,7 @@ namespace OpenSim.Data.MySQL
2221 cmd.Parameters.Clear(); 2245 cmd.Parameters.Clear();
2222 } 2246 }
2223 } 2247 }
2248 dbcon.Close();
2224 } 2249 }
2225 } 2250 }
2226 } 2251 }
@@ -2240,6 +2265,7 @@ namespace OpenSim.Data.MySQL
2240 2265
2241 cmd.ExecuteNonQuery(); 2266 cmd.ExecuteNonQuery();
2242 } 2267 }
2268 dbcon.Close();
2243 } 2269 }
2244 } 2270 }
2245 2271
@@ -2257,6 +2283,7 @@ namespace OpenSim.Data.MySQL
2257 2283
2258 cmd.ExecuteNonQuery(); 2284 cmd.ExecuteNonQuery();
2259 } 2285 }
2286 dbcon.Close();
2260 } 2287 }
2261 } 2288 }
2262 2289
@@ -2280,6 +2307,7 @@ namespace OpenSim.Data.MySQL
2280 } 2307 }
2281 } 2308 }
2282 } 2309 }
2310 dbcon.Close();
2283 } 2311 }
2284 2312
2285 return ret; 2313 return ret;
diff --git a/OpenSim/Data/MySQL/MySQLUserProfilesData.cs b/OpenSim/Data/MySQL/MySQLUserProfilesData.cs
index 8af2a3e..dfc3711 100644
--- a/OpenSim/Data/MySQL/MySQLUserProfilesData.cs
+++ b/OpenSim/Data/MySQL/MySQLUserProfilesData.cs
@@ -69,6 +69,7 @@ namespace OpenSim.Data.MySQL
69 69
70 Migration m = new Migration(dbcon, Assembly, "UserProfiles"); 70 Migration m = new Migration(dbcon, Assembly, "UserProfiles");
71 m.Update(); 71 m.Update();
72 dbcon.Close();
72 } 73 }
73 } 74 }
74 #endregion Member Functions 75 #endregion Member Functions
@@ -121,6 +122,7 @@ namespace OpenSim.Data.MySQL
121 } 122 }
122 } 123 }
123 } 124 }
125 dbcon.Close();
124 } 126 }
125 return data; 127 return data;
126 } 128 }
@@ -228,6 +230,7 @@ namespace OpenSim.Data.MySQL
228 230
229 cmd.ExecuteNonQuery(); 231 cmd.ExecuteNonQuery();
230 } 232 }
233 dbcon.Close();
231 } 234 }
232 } 235 }
233 catch (Exception e) 236 catch (Exception e)
@@ -258,6 +261,7 @@ namespace OpenSim.Data.MySQL
258 cmd.Parameters.AddWithValue("?recordId", recordId.ToString()); 261 cmd.Parameters.AddWithValue("?recordId", recordId.ToString());
259 cmd.ExecuteNonQuery(); 262 cmd.ExecuteNonQuery();
260 } 263 }
264 dbcon.Close();
261 } 265 }
262 } 266 }
263 catch (Exception e) 267 catch (Exception e)
@@ -352,6 +356,7 @@ namespace OpenSim.Data.MySQL
352 } 356 }
353 } 357 }
354 } 358 }
359 dbcon.Close();
355 } 360 }
356 } 361 }
357 catch (Exception e) 362 catch (Exception e)
@@ -474,6 +479,7 @@ namespace OpenSim.Data.MySQL
474 479
475 cmd.ExecuteNonQuery(); 480 cmd.ExecuteNonQuery();
476 } 481 }
482 dbcon.Close();
477 } 483 }
478 } 484 }
479 catch (Exception e) 485 catch (Exception e)
@@ -504,6 +510,7 @@ namespace OpenSim.Data.MySQL
504 510
505 cmd.ExecuteNonQuery(); 511 cmd.ExecuteNonQuery();
506 } 512 }
513 dbcon.Close();
507 } 514 }
508 } 515 }
509 catch (Exception e) 516 catch (Exception e)
@@ -548,6 +555,7 @@ namespace OpenSim.Data.MySQL
548 } 555 }
549 } 556 }
550 } 557 }
558 dbcon.Close();
551 } 559 }
552 } 560 }
553 catch (Exception e) 561 catch (Exception e)
@@ -596,6 +604,7 @@ namespace OpenSim.Data.MySQL
596 604
597 cmd.ExecuteNonQuery(); 605 cmd.ExecuteNonQuery();
598 } 606 }
607 dbcon.Close();
599 } 608 }
600 } 609 }
601 catch (Exception e) 610 catch (Exception e)
@@ -719,6 +728,7 @@ namespace OpenSim.Data.MySQL
719 } 728 }
720 } 729 }
721 } 730 }
731 dbcon.Close();
722 } 732 }
723 } 733 }
724 catch (Exception e) 734 catch (Exception e)
@@ -759,6 +769,7 @@ namespace OpenSim.Data.MySQL
759 769
760 cmd.ExecuteNonQuery(); 770 cmd.ExecuteNonQuery();
761 } 771 }
772 dbcon.Close();
762 } 773 }
763 } 774 }
764 catch (Exception e) 775 catch (Exception e)
@@ -884,6 +895,7 @@ namespace OpenSim.Data.MySQL
884 } 895 }
885 } 896 }
886 } 897 }
898 dbcon.Close();
887 } 899 }
888 } 900 }
889 catch (Exception e) 901 catch (Exception e)
@@ -939,6 +951,7 @@ namespace OpenSim.Data.MySQL
939 } 951 }
940 } 952 }
941 } 953 }
954 dbcon.Close();
942 } 955 }
943 } 956 }
944 catch (Exception e) 957 catch (Exception e)
@@ -975,6 +988,7 @@ namespace OpenSim.Data.MySQL
975 988
976 cmd.ExecuteNonQuery(); 989 cmd.ExecuteNonQuery();
977 } 990 }
991 dbcon.Close();
978 } 992 }
979 } 993 }
980 catch (Exception e) 994 catch (Exception e)
@@ -1035,6 +1049,7 @@ namespace OpenSim.Data.MySQL
1035 } 1049 }
1036 } 1050 }
1037 } 1051 }
1052 dbcon.Close();
1038 } 1053 }
1039 } 1054 }
1040 catch (Exception e) 1055 catch (Exception e)
@@ -1072,6 +1087,7 @@ namespace OpenSim.Data.MySQL
1072 1087
1073 cmd.ExecuteNonQuery(); 1088 cmd.ExecuteNonQuery();
1074 } 1089 }
1090 dbcon.Close();
1075 } 1091 }
1076 } 1092 }
1077 catch (Exception e) 1093 catch (Exception e)
diff --git a/OpenSim/Data/MySQL/MySQLXAssetData.cs b/OpenSim/Data/MySQL/MySQLXAssetData.cs
index 2c6acde..2ef7f8f 100644
--- a/OpenSim/Data/MySQL/MySQLXAssetData.cs
+++ b/OpenSim/Data/MySQL/MySQLXAssetData.cs
@@ -97,6 +97,7 @@ namespace OpenSim.Data.MySQL
97 dbcon.Open(); 97 dbcon.Open();
98 Migration m = new Migration(dbcon, Assembly, "XAssetStore"); 98 Migration m = new Migration(dbcon, Assembly, "XAssetStore");
99 m.Update(); 99 m.Update();
100 dbcon.Close();
100 } 101 }
101 } 102 }
102 103
@@ -184,6 +185,7 @@ namespace OpenSim.Data.MySQL
184 m_log.Error(string.Format("[MYSQL XASSET DATA]: Failure fetching asset {0}", assetID), e); 185 m_log.Error(string.Format("[MYSQL XASSET DATA]: Failure fetching asset {0}", assetID), e);
185 } 186 }
186 } 187 }
188 dbcon.Close();
187 } 189 }
188 190
189 return asset; 191 return asset;
@@ -303,6 +305,7 @@ namespace OpenSim.Data.MySQL
303 305
304 transaction.Commit(); 306 transaction.Commit();
305 } 307 }
308 dbcon.Close();
306 } 309 }
307 } 310 }
308 311
@@ -344,6 +347,7 @@ namespace OpenSim.Data.MySQL
344 "[XASSET MYSQL DB]: Failure updating access_time for asset {0} with name {1}", 347 "[XASSET MYSQL DB]: Failure updating access_time for asset {0} with name {1}",
345 assetMetadata.ID, assetMetadata.Name); 348 assetMetadata.ID, assetMetadata.Name);
346 } 349 }
350 dbcon.Close();
347 } 351 }
348 } 352 }
349 353
@@ -474,6 +478,7 @@ namespace OpenSim.Data.MySQL
474 m_log.Error("[XASSETS DB]: MySql failure fetching asset set" + Environment.NewLine + e.ToString()); 478 m_log.Error("[XASSETS DB]: MySql failure fetching asset set" + Environment.NewLine + e.ToString());
475 } 479 }
476 } 480 }
481 dbcon.Close();
477 } 482 }
478 483
479 return retList; 484 return retList;
@@ -492,9 +497,9 @@ namespace OpenSim.Data.MySQL
492 cmd.Parameters.AddWithValue("?ID", id); 497 cmd.Parameters.AddWithValue("?ID", id);
493 cmd.ExecuteNonQuery(); 498 cmd.ExecuteNonQuery();
494 } 499 }
495
496 // TODO: How do we deal with data from deleted assets? Probably not easily reapable unless we 500 // TODO: How do we deal with data from deleted assets? Probably not easily reapable unless we
497 // keep a reference count (?) 501 // keep a reference count (?)
502 dbcon.Close();
498 } 503 }
499 504
500 return true; 505 return true;
diff --git a/OpenSim/Data/MySQL/MySQLXInventoryData.cs b/OpenSim/Data/MySQL/MySQLXInventoryData.cs
index 4e41fec..5019994 100644
--- a/OpenSim/Data/MySQL/MySQLXInventoryData.cs
+++ b/OpenSim/Data/MySQL/MySQLXInventoryData.cs
@@ -328,7 +328,6 @@ namespace OpenSim.Data.MySQL
328 { 328 {
329 return false; 329 return false;
330 } 330 }
331 cmd.Dispose();
332 } 331 }
333 332
334 dbcon.Close(); 333 dbcon.Close();