diff options
author | Sean Dague | 2008-04-24 15:23:49 +0000 |
---|---|---|
committer | Sean Dague | 2008-04-24 15:23:49 +0000 |
commit | c6f6218f60db023fb4c124039fd9551bc4754b13 (patch) | |
tree | 734ebdae66f0402c6eaa5ce39f7535814d59adc4 | |
parent | * Patch from Melanie. Mantis: 1040. Thanks Melanie! (diff) | |
download | opensim-SC_OLD-c6f6218f60db023fb4c124039fd9551bc4754b13.zip opensim-SC_OLD-c6f6218f60db023fb4c124039fd9551bc4754b13.tar.gz opensim-SC_OLD-c6f6218f60db023fb4c124039fd9551bc4754b13.tar.bz2 opensim-SC_OLD-c6f6218f60db023fb4c124039fd9551bc4754b13.tar.xz |
in theory, let you pass the mysql connection string into the
mysql manager class. This could use some testing of inventory
and asset services. Once this is prooved out, I'll do it for
mssql as well.
-rw-r--r-- | OpenSim/Data/MySQL/MySQLAssetData.cs | 8 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/MySQLManager.cs | 16 |
2 files changed, 21 insertions, 3 deletions
diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs index b6545d7..b4a9191 100644 --- a/OpenSim/Data/MySQL/MySQLAssetData.cs +++ b/OpenSim/Data/MySQL/MySQLAssetData.cs | |||
@@ -174,7 +174,13 @@ namespace OpenSim.Data.MySQL | |||
174 | { | 174 | { |
175 | // TODO: This will let you pass in the connect string in | 175 | // TODO: This will let you pass in the connect string in |
176 | // the config, though someone will need to write that. | 176 | // the config, though someone will need to write that. |
177 | Initialise(); | 177 | if (connect == String.Empty) { |
178 | // This is old seperate config file | ||
179 | Initialise(); | ||
180 | } else { | ||
181 | _dbConnection = new MySQLManager(connect); | ||
182 | TestTables(); | ||
183 | } | ||
178 | } | 184 | } |
179 | 185 | ||
180 | override public void Initialise() | 186 | override public void Initialise() |
diff --git a/OpenSim/Data/MySQL/MySQLManager.cs b/OpenSim/Data/MySQL/MySQLManager.cs index 1e7038f..d522b78 100644 --- a/OpenSim/Data/MySQL/MySQLManager.cs +++ b/OpenSim/Data/MySQL/MySQLManager.cs | |||
@@ -65,10 +65,22 @@ namespace OpenSim.Data.MySQL | |||
65 | public MySQLManager(string hostname, string database, string username, string password, string cpooling, | 65 | public MySQLManager(string hostname, string database, string username, string password, string cpooling, |
66 | string port) | 66 | string port) |
67 | { | 67 | { |
68 | string s = "Server=" + hostname + ";Port=" + port + ";Database=" + database + ";User ID=" + | ||
69 | username + ";Password=" + password + ";Pooling=" + cpooling + ";"; | ||
70 | |||
71 | Initialise(s); | ||
72 | } | ||
73 | |||
74 | public MySQLManager(String connect) | ||
75 | { | ||
76 | Initialise(connect); | ||
77 | } | ||
78 | |||
79 | public void Initialise(String connect) | ||
80 | { | ||
68 | try | 81 | try |
69 | { | 82 | { |
70 | connectionString = "Server=" + hostname + ";Port=" + port + ";Database=" + database + ";User ID=" + | 83 | connectionString = connect; |
71 | username + ";Password=" + password + ";Pooling=" + cpooling + ";"; | ||
72 | dbcon = new MySqlConnection(connectionString); | 84 | dbcon = new MySqlConnection(connectionString); |
73 | 85 | ||
74 | try | 86 | try |