aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-04-30 17:45:00 +0100
committerJustin Clark-Casey (justincc)2010-04-30 17:45:00 +0100
commitcc67de5b86ebcebadbe2ea46872a0dc63d99cae7 (patch)
tree1607da4eee9e63fe45e0abcf05da37ae5e239d70 /OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs
parentMake SQLiteNG the default since it actually does work with Mono 2.4 on Linux. (diff)
downloadopensim-SC_OLD-cc67de5b86ebcebadbe2ea46872a0dc63d99cae7.zip
opensim-SC_OLD-cc67de5b86ebcebadbe2ea46872a0dc63d99cae7.tar.gz
opensim-SC_OLD-cc67de5b86ebcebadbe2ea46872a0dc63d99cae7.tar.bz2
opensim-SC_OLD-cc67de5b86ebcebadbe2ea46872a0dc63d99cae7.tar.xz
rename SQLiteNG to SQLite and SQLite to SQLiteLegacy
this seems the least evil way forward since mono 2.6 and later will see increasing usage, and this only works with what was SQLiteNG MAC USERS WILL NEED TO CHANGE REFERENCES TO "OpenSim.Data.SQLite.dll" to "OpenSim.Data.SQLiteLegacy.dll" in OpenSim.ini and config-include/StandaloneCommon.ini (if using standalone) See the OpenSim.ini.example and StandaloneCommon.ini.example files for more details This commit also temporarily changes unsigned ParentEstateID values in the OpenSim.Data.Tests to signed temporarily, since the new plugin enforces creation of signed fields in the database (which is what the SQL actually specifies). And change data columns in sqlite is a pita.
Diffstat (limited to 'OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs')
-rw-r--r--OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs18
1 files changed, 10 insertions, 8 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs b/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs
index b39bb19..3c70aef 100644
--- a/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs
+++ b/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs
@@ -30,7 +30,7 @@ using System.Collections.Generic;
30using System.Data; 30using System.Data;
31using System.Reflection; 31using System.Reflection;
32using log4net; 32using log4net;
33using Mono.Data.SqliteClient; 33using Mono.Data.Sqlite;
34using OpenMetaverse; 34using OpenMetaverse;
35using OpenSim.Framework; 35using OpenSim.Framework;
36using OpenSim.Region.Framework.Interfaces; 36using OpenSim.Region.Framework.Interfaces;
@@ -59,19 +59,21 @@ namespace OpenSim.Data.SQLite
59 if (!m_initialized) 59 if (!m_initialized)
60 { 60 {
61 m_Connection = new SqliteConnection(connectionString); 61 m_Connection = new SqliteConnection(connectionString);
62 Console.WriteLine(string.Format("OPENING CONNECTION FOR {0} USING {1}", storeName, connectionString));
62 m_Connection.Open(); 63 m_Connection.Open();
63 64
64 if (storeName != String.Empty) 65 if (storeName != String.Empty)
65 { 66 {
66 Assembly assem = GetType().Assembly; 67 Assembly assem = GetType().Assembly;
67 SqliteConnection newConnection = 68 //SqliteConnection newConnection =
68 (SqliteConnection)((ICloneable)m_Connection).Clone(); 69 // (SqliteConnection)((ICloneable)m_Connection).Clone();
69 newConnection.Open(); 70 //newConnection.Open();
70 71
71 Migration m = new Migration(newConnection, assem, storeName); 72 //Migration m = new Migration(newConnection, assem, storeName);
73 Migration m = new Migration(m_Connection, assem, storeName);
72 m.Update(); 74 m.Update();
73 newConnection.Close(); 75 //newConnection.Close();
74 newConnection.Dispose(); 76 //newConnection.Dispose();
75 } 77 }
76 78
77 m_initialized = true; 79 m_initialized = true;
@@ -197,7 +199,7 @@ namespace OpenSim.Data.SQLite
197 result.Add(row); 199 result.Add(row);
198 } 200 }
199 201
200 CloseCommand(cmd); 202 //CloseCommand(cmd);
201 203
202 return result.ToArray(); 204 return result.ToArray();
203 } 205 }