mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
This is a HACK! Downright nasty. For some reason, the devs of the mysql
connector have decided that their vision of timeouts is the only valid one. This uses reflection to show them the finger. Please test.
This commit is contained in:
@@ -66,6 +66,12 @@ namespace OpenSim.Data.MySQL
|
||||
return;
|
||||
}
|
||||
|
||||
MySqlConnection c = (MySqlConnection)conn;
|
||||
|
||||
Type tc = c.GetType();
|
||||
MethodInfo miSetCommandTimeout = tc.GetMethod("SetCommandTimeout", BindingFlags.NonPublic | BindingFlags.Instance);
|
||||
MethodInfo miClearCommandTimeout = tc.GetMethod("ClearCommandTimeout", BindingFlags.NonPublic | BindingFlags.Instance);
|
||||
miSetCommandTimeout.Invoke(c, new Object[] { 2147483 }); // INT_MAX / 1000;
|
||||
MySqlScript scr = new MySqlScript((MySqlConnection)conn);
|
||||
{
|
||||
foreach (string sql in script)
|
||||
@@ -78,6 +84,7 @@ namespace OpenSim.Data.MySQL
|
||||
scr.Execute();
|
||||
}
|
||||
}
|
||||
miClearCommandTimeout.Invoke(c, new Object[] { });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user