aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLAssetData.cs
diff options
context:
space:
mode:
authorCharles Krinke2008-07-03 22:30:16 +0000
committerCharles Krinke2008-07-03 22:30:16 +0000
commit7fea52be3542c1eea884f92ea14285560923e57d (patch)
tree94cfbf76bde53220735e095e77af48e0d4f4ea73 /OpenSim/Data/MySQL/MySQLAssetData.cs
parentMantis#1463. Thank you, Melanie for a patch that addresses: (diff)
downloadopensim-SC_OLD-7fea52be3542c1eea884f92ea14285560923e57d.zip
opensim-SC_OLD-7fea52be3542c1eea884f92ea14285560923e57d.tar.gz
opensim-SC_OLD-7fea52be3542c1eea884f92ea14285560923e57d.tar.bz2
opensim-SC_OLD-7fea52be3542c1eea884f92ea14285560923e57d.tar.xz
Mantis#1661. Thank you kindly, CMickeyb for a patch that:
patch attached to check for timeouts on mysql connections *before* operations occur that are likely to timeout. if timeout occurs or the connections is down, it is reconnected before the operation fails.
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLAssetData.cs')
-rw-r--r--OpenSim/Data/MySQL/MySQLAssetData.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs
index 21d730d..3557243 100644
--- a/OpenSim/Data/MySQL/MySQLAssetData.cs
+++ b/OpenSim/Data/MySQL/MySQLAssetData.cs
@@ -162,6 +162,8 @@ namespace OpenSim.Data.MySQL
162 AssetBase asset = null; 162 AssetBase asset = null;
163 lock (_dbConnection) 163 lock (_dbConnection)
164 { 164 {
165 _dbConnection.CheckConnection();
166
165 MySqlCommand cmd = 167 MySqlCommand cmd =
166 new MySqlCommand( 168 new MySqlCommand(
167 "SELECT name, description, assetType, local, temporary, data FROM assets WHERE id=?id", 169 "SELECT name, description, assetType, local, temporary, data FROM assets WHERE id=?id",
@@ -213,6 +215,8 @@ namespace OpenSim.Data.MySQL
213 return; 215 return;
214 } 216 }
215 217
218 _dbConnection.CheckConnection();
219
216 MySqlCommand cmd = 220 MySqlCommand cmd =
217 new MySqlCommand( 221 new MySqlCommand(
218 "REPLACE INTO assets(id, name, description, assetType, local, temporary, data)" + 222 "REPLACE INTO assets(id, name, description, assetType, local, temporary, data)" +
@@ -266,6 +270,8 @@ namespace OpenSim.Data.MySQL
266 270
267 lock (_dbConnection) 271 lock (_dbConnection)
268 { 272 {
273 _dbConnection.CheckConnection();
274
269 MySqlCommand cmd = 275 MySqlCommand cmd =
270 new MySqlCommand( 276 new MySqlCommand(
271 "SELECT id FROM assets WHERE id=?id", 277 "SELECT id FROM assets WHERE id=?id",