mirror of
https://github.com/opensim/opensim.git
synced 2026-05-15 11:25:39 +08:00
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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user