aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLiteLegacy/SQLiteAuthenticationData.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/SQLiteLegacy/SQLiteAuthenticationData.cs
parentMake SQLiteNG the default since it actually does work with Mono 2.4 on Linux. (diff)
downloadopensim-SC-cc67de5b86ebcebadbe2ea46872a0dc63d99cae7.zip
opensim-SC-cc67de5b86ebcebadbe2ea46872a0dc63d99cae7.tar.gz
opensim-SC-cc67de5b86ebcebadbe2ea46872a0dc63d99cae7.tar.bz2
opensim-SC-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 '')
-rw-r--r--OpenSim/Data/SQLiteLegacy/SQLiteAuthenticationData.cs (renamed from OpenSim/Data/SQLiteNG/SQLiteAuthenticationData.cs)25
1 files changed, 15 insertions, 10 deletions
diff --git a/OpenSim/Data/SQLiteNG/SQLiteAuthenticationData.cs b/OpenSim/Data/SQLiteLegacy/SQLiteAuthenticationData.cs
index 4a5dc2e..c64830a 100644
--- a/OpenSim/Data/SQLiteNG/SQLiteAuthenticationData.cs
+++ b/OpenSim/Data/SQLiteLegacy/SQLiteAuthenticationData.cs
@@ -31,9 +31,9 @@ using System.Collections.Generic;
31using System.Data; 31using System.Data;
32using OpenMetaverse; 32using OpenMetaverse;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using Mono.Data.Sqlite; 34using Mono.Data.SqliteClient;
35 35
36namespace OpenSim.Data.SQLiteNG 36namespace OpenSim.Data.SQLiteLegacy
37{ 37{
38 public class SQLiteAuthenticationData : SQLiteFramework, IAuthenticationData 38 public class SQLiteAuthenticationData : SQLiteFramework, IAuthenticationData
39 { 39 {
@@ -56,8 +56,13 @@ namespace OpenSim.Data.SQLiteNG
56 m_Connection = new SqliteConnection(connectionString); 56 m_Connection = new SqliteConnection(connectionString);
57 m_Connection.Open(); 57 m_Connection.Open();
58 58
59 Migration m = new Migration(m_Connection, GetType().Assembly, "AuthStore"); 59 using (SqliteConnection dbcon = (SqliteConnection)((ICloneable)m_Connection).Clone())
60 m.Update(); 60 {
61 dbcon.Open();
62 Migration m = new Migration(dbcon, GetType().Assembly, "AuthStore");
63 m.Update();
64 dbcon.Close();
65 }
61 66
62 m_initialized = true; 67 m_initialized = true;
63 } 68 }
@@ -108,7 +113,7 @@ namespace OpenSim.Data.SQLiteNG
108 } 113 }
109 finally 114 finally
110 { 115 {
111 //CloseCommand(cmd); 116 CloseCommand(cmd);
112 } 117 }
113 118
114 return null; 119 return null;
@@ -151,14 +156,14 @@ namespace OpenSim.Data.SQLiteNG
151 { 156 {
152 if (ExecuteNonQuery(cmd, m_Connection) < 1) 157 if (ExecuteNonQuery(cmd, m_Connection) < 1)
153 { 158 {
154 //CloseCommand(cmd); 159 CloseCommand(cmd);
155 return false; 160 return false;
156 } 161 }
157 } 162 }
158 catch (Exception e) 163 catch (Exception e)
159 { 164 {
160 Console.WriteLine(e.ToString()); 165 Console.WriteLine(e.ToString());
161 //CloseCommand(cmd); 166 CloseCommand(cmd);
162 return false; 167 return false;
163 } 168 }
164 } 169 }
@@ -179,19 +184,19 @@ namespace OpenSim.Data.SQLiteNG
179 { 184 {
180 if (ExecuteNonQuery(cmd, m_Connection) < 1) 185 if (ExecuteNonQuery(cmd, m_Connection) < 1)
181 { 186 {
182 //CloseCommand(cmd); 187 CloseCommand(cmd);
183 return false; 188 return false;
184 } 189 }
185 } 190 }
186 catch (Exception e) 191 catch (Exception e)
187 { 192 {
188 Console.WriteLine(e.ToString()); 193 Console.WriteLine(e.ToString());
189 //CloseCommand(cmd); 194 CloseCommand(cmd);
190 return false; 195 return false;
191 } 196 }
192 } 197 }
193 198
194 //CloseCommand(cmd); 199 CloseCommand(cmd);
195 200
196 return true; 201 return true;
197 } 202 }