aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie2010-06-19 22:48:43 +0100
committerMelanie2010-06-19 22:48:43 +0100
commit8643db3ef0c4dca709d85fc37240a18fd9049520 (patch)
tree2f1813c50906690a704798b2c8c4873aa4b55266
parentBug fix: wrong name of requester in local friendship offer. (diff)
downloadopensim-SC-8643db3ef0c4dca709d85fc37240a18fd9049520.zip
opensim-SC-8643db3ef0c4dca709d85fc37240a18fd9049520.tar.gz
opensim-SC-8643db3ef0c4dca709d85fc37240a18fd9049520.tar.bz2
opensim-SC-8643db3ef0c4dca709d85fc37240a18fd9049520.tar.xz
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.
-rw-r--r--OpenSim/Data/MySQL/MySQLMigrations.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/OpenSim/Data/MySQL/MySQLMigrations.cs b/OpenSim/Data/MySQL/MySQLMigrations.cs
index 81a0e83..b6f714c 100644
--- a/OpenSim/Data/MySQL/MySQLMigrations.cs
+++ b/OpenSim/Data/MySQL/MySQLMigrations.cs
@@ -66,6 +66,12 @@ namespace OpenSim.Data.MySQL
66 return; 66 return;
67 } 67 }
68 68
69 MySqlConnection c = (MySqlConnection)conn;
70
71 Type tc = c.GetType();
72 MethodInfo miSetCommandTimeout = tc.GetMethod("SetCommandTimeout", BindingFlags.NonPublic | BindingFlags.Instance);
73 MethodInfo miClearCommandTimeout = tc.GetMethod("ClearCommandTimeout", BindingFlags.NonPublic | BindingFlags.Instance);
74 miSetCommandTimeout.Invoke(c, new Object[] { 2147483 }); // INT_MAX / 1000;
69 MySqlScript scr = new MySqlScript((MySqlConnection)conn); 75 MySqlScript scr = new MySqlScript((MySqlConnection)conn);
70 { 76 {
71 foreach (string sql in script) 77 foreach (string sql in script)
@@ -78,6 +84,7 @@ namespace OpenSim.Data.MySQL
78 scr.Execute(); 84 scr.Execute();
79 } 85 }
80 } 86 }
87 miClearCommandTimeout.Invoke(c, new Object[] { });
81 } 88 }
82 } 89 }
83} 90}