diff options
author | onefang | 2019-05-19 22:03:18 +1000 |
---|---|---|
committer | onefang | 2019-05-19 22:03:18 +1000 |
commit | 28b3b1c62d9fad9811986aad185121fed3f3b755 (patch) | |
tree | 8e1104af2c9e2beec37e4d0fab2cac84c4e0187e /OpenSim | |
parent | Various database fixups. (diff) | |
download | opensim-SC-28b3b1c62d9fad9811986aad185121fed3f3b755.zip opensim-SC-28b3b1c62d9fad9811986aad185121fed3f3b755.tar.gz opensim-SC-28b3b1c62d9fad9811986aad185121fed3f3b755.tar.bz2 opensim-SC-28b3b1c62d9fad9811986aad185121fed3f3b755.tar.xz |
Move db directory out of tree.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteAssetData.cs | 4 | ||||
-rw-r--r-- | OpenSim/Data/Tests/BasicDataServiceTest.cs | 2 | ||||
-rw-r--r-- | OpenSim/Data/Tests/Resources/TestDataConnections.ini | 4 | ||||
-rw-r--r-- | OpenSim/Framework/Util.cs | 5 | ||||
-rw-r--r-- | OpenSim/Region/OptionalModules/UserStatistics/WebStatsModule.cs | 4 |
5 files changed, 12 insertions, 7 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs index 966d0b8..51d1030 100644 --- a/OpenSim/Data/SQLite/SQLiteAssetData.cs +++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs | |||
@@ -86,7 +86,7 @@ namespace OpenSim.Data.SQLite | |||
86 | 86 | ||
87 | if (dbconnect == string.Empty) | 87 | if (dbconnect == string.Empty) |
88 | { | 88 | { |
89 | dbconnect = "URI=file:Asset.db,version=3"; | 89 | dbconnect = "URI=file:" + Util.dbDir() + "Asset.db,version=3"; |
90 | } | 90 | } |
91 | m_conn = new SqliteConnection(dbconnect); | 91 | m_conn = new SqliteConnection(dbconnect); |
92 | m_conn.Open(); | 92 | m_conn.Open(); |
@@ -360,7 +360,7 @@ namespace OpenSim.Data.SQLite | |||
360 | /// </summary> | 360 | /// </summary> |
361 | override public void Initialise() | 361 | override public void Initialise() |
362 | { | 362 | { |
363 | Initialise("URI=file:Asset.db,version=3"); | 363 | Initialise("URI=file:" + Util.dbDir() + "Asset.db,version=3"); |
364 | } | 364 | } |
365 | 365 | ||
366 | /// <summary> | 366 | /// <summary> |
diff --git a/OpenSim/Data/Tests/BasicDataServiceTest.cs b/OpenSim/Data/Tests/BasicDataServiceTest.cs index 79691e4..580e7aa 100644 --- a/OpenSim/Data/Tests/BasicDataServiceTest.cs +++ b/OpenSim/Data/Tests/BasicDataServiceTest.cs | |||
@@ -106,7 +106,7 @@ namespace OpenSim.Data.Tests | |||
106 | if (String.IsNullOrEmpty(m_connStr)) | 106 | if (String.IsNullOrEmpty(m_connStr)) |
107 | { | 107 | { |
108 | m_file = Path.GetTempFileName() + ".db"; | 108 | m_file = Path.GetTempFileName() + ".db"; |
109 | m_connStr = "URI=file:" + m_file + ",version=3"; | 109 | m_connStr = "URI=file:" + Util.dbDir() + "/" + m_file + ",version=3"; |
110 | } | 110 | } |
111 | } | 111 | } |
112 | 112 | ||
diff --git a/OpenSim/Data/Tests/Resources/TestDataConnections.ini b/OpenSim/Data/Tests/Resources/TestDataConnections.ini index 7b55467..2ddec8b 100644 --- a/OpenSim/Data/Tests/Resources/TestDataConnections.ini +++ b/OpenSim/Data/Tests/Resources/TestDataConnections.ini | |||
@@ -16,9 +16,9 @@ | |||
16 | ; file for the DB. If you want the resulting DB to persist (e.g. for performance testing, | 16 | ; file for the DB. If you want the resulting DB to persist (e.g. for performance testing, |
17 | ; when filling up the tables can take a long time), explicitly specify a conn string like this: | 17 | ; when filling up the tables can take a long time), explicitly specify a conn string like this: |
18 | 18 | ||
19 | ; SqliteConnection="URI=file:<path_to_your_file>,version=3" | 19 | ; SqliteConnection="URI=file:../../db/<path_to_your_file>,version=3" |
20 | 20 | ||
21 | [TestConnections] | 21 | [TestConnections] |
22 | MySqlConnection="Server=localhost;Port=3306;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;" | 22 | MySqlConnection="Server=localhost;Port=3306;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;" |
23 | SqlConnection="Server=.\SQL2008;Database=opensim-nunit;Trusted_Connection=True;" | 23 | SqlConnection="Server=.\SQL2008;Database=opensim-nunit;Trusted_Connection=True;" |
24 | SqliteConnection="URI=file:opensim-nunit.db,version=3" \ No newline at end of file | 24 | SqliteConnection="URI=file:../../db/opensim-nunit.db,version=3" |
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index 7093010..2f65f3c 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs | |||
@@ -1277,6 +1277,11 @@ namespace OpenSim.Framework | |||
1277 | return Path.Combine(configDir(), "inventory"); | 1277 | return Path.Combine(configDir(), "inventory"); |
1278 | } | 1278 | } |
1279 | 1279 | ||
1280 | public static string dbDir() | ||
1281 | { | ||
1282 | return Path.Combine("..", Path.Combine("..", "db")); | ||
1283 | } | ||
1284 | |||
1280 | public static string configDir() | 1285 | public static string configDir() |
1281 | { | 1286 | { |
1282 | return "."; | 1287 | return "."; |
diff --git a/OpenSim/Region/OptionalModules/UserStatistics/WebStatsModule.cs b/OpenSim/Region/OptionalModules/UserStatistics/WebStatsModule.cs index c15b194..f76b057 100644 --- a/OpenSim/Region/OptionalModules/UserStatistics/WebStatsModule.cs +++ b/OpenSim/Region/OptionalModules/UserStatistics/WebStatsModule.cs | |||
@@ -96,7 +96,7 @@ namespace OpenSim.Region.UserStatistics | |||
96 | 96 | ||
97 | //IConfig startupConfig = config.Configs["Startup"]; | 97 | //IConfig startupConfig = config.Configs["Startup"]; |
98 | 98 | ||
99 | dbConn = new SqliteConnection("URI=file:LocalUserStatistics.db,version=3"); | 99 | dbConn = new SqliteConnection("URI=file:" + Util.dbDir() + "/LocalUserStatistics.db,version=3"); |
100 | dbConn.Open(); | 100 | dbConn.Open(); |
101 | CreateTables(dbConn); | 101 | CreateTables(dbConn); |
102 | 102 | ||
@@ -1200,4 +1200,4 @@ VALUES | |||
1200 | m_scriptLinesPerSecond = stats.ExtraStatsBlock[0].StatValue; | 1200 | m_scriptLinesPerSecond = stats.ExtraStatsBlock[0].StatValue; |
1201 | } | 1201 | } |
1202 | } | 1202 | } |
1203 | } \ No newline at end of file | 1203 | } |