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.
This commit is contained in:
Charles Krinke
2008-07-03 22:30:16 +00:00
parent af82b1e710
commit 7fea52be35
3 changed files with 107 additions and 36 deletions

View File

@@ -162,6 +162,8 @@ namespace OpenSim.Data.MySQL
AssetBase asset = null;
lock (_dbConnection)
{
_dbConnection.CheckConnection();
MySqlCommand cmd =
new MySqlCommand(
"SELECT name, description, assetType, local, temporary, data FROM assets WHERE id=?id",
@@ -213,6 +215,8 @@ namespace OpenSim.Data.MySQL
return;
}
_dbConnection.CheckConnection();
MySqlCommand cmd =
new MySqlCommand(
"REPLACE INTO assets(id, name, description, assetType, local, temporary, data)" +
@@ -266,6 +270,8 @@ namespace OpenSim.Data.MySQL
lock (_dbConnection)
{
_dbConnection.CheckConnection();
MySqlCommand cmd =
new MySqlCommand(
"SELECT id FROM assets WHERE id=?id",