aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs
diff options
context:
space:
mode:
authorAdam Frisby2007-05-28 23:32:05 +0000
committerAdam Frisby2007-05-28 23:32:05 +0000
commit82ab883ea279150645b7e76ae761a45cb02ac907 (patch)
treeb52de04103307daa1e3d25b8a5f8c97d7a401940 /OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs
parentDB4o is re-tah-ded. (Changed default DB provider to MySQL) (diff)
downloadopensim-SC_OLD-82ab883ea279150645b7e76ae761a45cb02ac907.zip
opensim-SC_OLD-82ab883ea279150645b7e76ae761a45cb02ac907.tar.gz
opensim-SC_OLD-82ab883ea279150645b7e76ae761a45cb02ac907.tar.bz2
opensim-SC_OLD-82ab883ea279150645b7e76ae761a45cb02ac907.tar.xz
* Escaped log messages properly when logging to DB
* World map textures are now checked against DBNull before returning * MySQL now informs when it gets a connection * "Fastmode" support added to world map queries (MySQL-only), disabled by default.
Diffstat (limited to 'OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs')
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs14
1 files changed, 12 insertions, 2 deletions
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs b/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs
index 1f7413f..aee18b9 100644
--- a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs
+++ b/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs
@@ -33,6 +33,8 @@ namespace OpenGrid.Framework.Data.MySQL
33 dbcon = new MySqlConnection(connectionString); 33 dbcon = new MySqlConnection(connectionString);
34 34
35 dbcon.Open(); 35 dbcon.Open();
36
37 System.Console.WriteLine("MySQL connection established");
36 } 38 }
37 catch (Exception e) 39 catch (Exception e)
38 { 40 {
@@ -120,7 +122,15 @@ namespace OpenGrid.Framework.Data.MySQL
120 retval.regionUserSendKey = (string)reader["regionUserSendKey"]; 122 retval.regionUserSendKey = (string)reader["regionUserSendKey"];
121 123
122 // World Map Addition 124 // World Map Addition
123 retval.regionMapTextureID = new libsecondlife.LLUUID((string)reader["regionMapTexture"]); 125 string tempRegionMap = reader["regionMapTexture"].ToString();
126 if (tempRegionMap != "")
127 {
128 retval.regionMapTextureID = new libsecondlife.LLUUID(tempRegionMap);
129 }
130 else
131 {
132 retval.regionMapTextureID = new libsecondlife.LLUUID();
133 }
124 } 134 }
125 else 135 else
126 { 136 {
@@ -209,7 +219,7 @@ namespace OpenGrid.Framework.Data.MySQL
209 219
210 public bool insertLogRow(string serverDaemon, string target, string methodCall, string arguments, int priority, string logMessage) 220 public bool insertLogRow(string serverDaemon, string target, string methodCall, string arguments, int priority, string logMessage)
211 { 221 {
212 string sql = "INSERT INTO logs (target, server, method, arguments, priority, message) VALUES ("; 222 string sql = "INSERT INTO logs (`target`, `server`, `method`, `arguments`, `priority`, `message`) VALUES ";
213 sql += "(?target, ?server, ?method, ?arguments, ?priority, ?message)"; 223 sql += "(?target, ?server, ?method, ?arguments, ?priority, ?message)";
214 224
215 Dictionary<string, string> parameters = new Dictionary<string, string>(); 225 Dictionary<string, string> parameters = new Dictionary<string, string>();