diff options
author | Sean Dague | 2008-05-28 18:12:32 +0000 |
---|---|---|
committer | Sean Dague | 2008-05-28 18:12:32 +0000 |
commit | 11d83cb737ebb12a3e6ae6c63551a0d010b90211 (patch) | |
tree | df8ea9fc80ba896fb528a5fc2af5d94d97f361e6 | |
parent | let Grid Servers specify a connect string in their configuration. (diff) | |
download | opensim-SC-11d83cb737ebb12a3e6ae6c63551a0d010b90211.zip opensim-SC-11d83cb737ebb12a3e6ae6c63551a0d010b90211.tar.gz opensim-SC-11d83cb737ebb12a3e6ae6c63551a0d010b90211.tar.bz2 opensim-SC-11d83cb737ebb12a3e6ae6c63551a0d010b90211.tar.xz |
actually user the database_connect string for mysql.
This means you can run all the OpenSim grid services without
needing a mysql_connection.ini
-rw-r--r-- | OpenSim/Data/InventoryDataBase.cs | 1 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/MSSQLInventoryData.cs | 8 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/MySQLInventoryData.cs | 39 |
3 files changed, 20 insertions, 28 deletions
diff --git a/OpenSim/Data/InventoryDataBase.cs b/OpenSim/Data/InventoryDataBase.cs index 0f4799e..af480b0 100644 --- a/OpenSim/Data/InventoryDataBase.cs +++ b/OpenSim/Data/InventoryDataBase.cs | |||
@@ -29,5 +29,6 @@ namespace OpenSim.Data | |||
29 | { | 29 | { |
30 | public abstract class InventoryDataBase | 30 | public abstract class InventoryDataBase |
31 | { | 31 | { |
32 | public abstract void Initialise(string connect); | ||
32 | } | 33 | } |
33 | } | 34 | } |
diff --git a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs index 69d45f7..0c1c3f1 100644 --- a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs +++ b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs | |||
@@ -48,17 +48,9 @@ namespace OpenSim.Data.MSSQL | |||
48 | /// </summary> | 48 | /// </summary> |
49 | private MSSQLManager database; | 49 | private MSSQLManager database; |
50 | 50 | ||
51 | /// <summary> | ||
52 | /// Loads and initialises this database plugin | ||
53 | /// </summary> | ||
54 | public void Initialise(string connect) | 51 | public void Initialise(string connect) |
55 | { | 52 | { |
56 | // TODO: actually use the provided connect string | 53 | // TODO: actually use the provided connect string |
57 | Initialise(); | ||
58 | } | ||
59 | |||
60 | public void Initialise() | ||
61 | { | ||
62 | IniFile GridDataMySqlFile = new IniFile("mssql_connection.ini"); | 54 | IniFile GridDataMySqlFile = new IniFile("mssql_connection.ini"); |
63 | string settingDataSource = GridDataMySqlFile.ParseFileReadValue("data_source"); | 55 | string settingDataSource = GridDataMySqlFile.ParseFileReadValue("data_source"); |
64 | string settingInitialCatalog = GridDataMySqlFile.ParseFileReadValue("initial_catalog"); | 56 | string settingInitialCatalog = GridDataMySqlFile.ParseFileReadValue("initial_catalog"); |
diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs index 92b005d..74afe4f 100644 --- a/OpenSim/Data/MySQL/MySQLInventoryData.cs +++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs | |||
@@ -48,28 +48,27 @@ namespace OpenSim.Data.MySQL | |||
48 | /// </summary> | 48 | /// </summary> |
49 | private MySQLManager database; | 49 | private MySQLManager database; |
50 | 50 | ||
51 | /// <summary> | ||
52 | /// Loads and initialises this database plugin | ||
53 | /// </summary> | ||
54 | public void Initialise(string connect) | 51 | public void Initialise(string connect) |
55 | { | 52 | { |
56 | // TODO: actually use the provided connect string | 53 | if(connect != String.Empty) |
57 | Initialise(); | 54 | { |
58 | } | 55 | database = new MySQLManager(connect); |
59 | 56 | } | |
60 | public void Initialise() | 57 | else |
61 | { | 58 | { |
62 | IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini"); | 59 | m_log.Warn("Reverting to deprecated mysql_connection.ini file for connection info"); |
63 | string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname"); | 60 | IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini"); |
64 | string settingDatabase = GridDataMySqlFile.ParseFileReadValue("database"); | 61 | string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname"); |
65 | string settingUsername = GridDataMySqlFile.ParseFileReadValue("username"); | 62 | string settingDatabase = GridDataMySqlFile.ParseFileReadValue("database"); |
66 | string settingPassword = GridDataMySqlFile.ParseFileReadValue("password"); | 63 | string settingUsername = GridDataMySqlFile.ParseFileReadValue("username"); |
67 | string settingPooling = GridDataMySqlFile.ParseFileReadValue("pooling"); | 64 | string settingPassword = GridDataMySqlFile.ParseFileReadValue("password"); |
68 | string settingPort = GridDataMySqlFile.ParseFileReadValue("port"); | 65 | string settingPooling = GridDataMySqlFile.ParseFileReadValue("pooling"); |
69 | 66 | string settingPort = GridDataMySqlFile.ParseFileReadValue("port"); | |
70 | database = | 67 | |
71 | new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling, | 68 | database = |
72 | settingPort); | 69 | new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling, |
70 | settingPort); | ||
71 | } | ||
73 | TestTables(database.Connection); | 72 | TestTables(database.Connection); |
74 | } | 73 | } |
75 | 74 | ||