aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite/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/SQLite/SQLiteAuthenticationData.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/SQLiteAuthenticationData.cs')
-rw-r--r--OpenSim/Data/SQLite/SQLiteAuthenticationData.cs23
1 files changed, 9 insertions, 14 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs b/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs
index aa10734..086ac0a 100644
--- a/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs
+++ b/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs
@@ -31,7 +31,7 @@ using System.Collections.Generic;
31using System.Data; 31using System.Data;
32using OpenMetaverse; 32using OpenMetaverse;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using Mono.Data.SqliteClient; 34using Mono.Data.Sqlite;
35 35
36namespace OpenSim.Data.SQLite 36namespace OpenSim.Data.SQLite
37{ 37{
@@ -56,13 +56,8 @@ namespace OpenSim.Data.SQLite
56 m_Connection = new SqliteConnection(connectionString); 56 m_Connection = new SqliteConnection(connectionString);
57 m_Connection.Open(); 57 m_Connection.Open();
58 58
59 using (SqliteConnection dbcon = (SqliteConnection)((ICloneable)m_Connection).Clone()) 59 Migration m = new Migration(m_Connection, GetType().Assembly, "AuthStore");
60 { 60 m.Update();
61 dbcon.Open();
62 Migration m = new Migration(dbcon, GetType().Assembly, "AuthStore");
63 m.Update();
64 dbcon.Close();
65 }
66 61
67 m_initialized = true; 62 m_initialized = true;
68 } 63 }
@@ -113,7 +108,7 @@ namespace OpenSim.Data.SQLite
113 } 108 }
114 finally 109 finally
115 { 110 {
116 CloseCommand(cmd); 111 //CloseCommand(cmd);
117 } 112 }
118 113
119 return null; 114 return null;
@@ -156,14 +151,14 @@ namespace OpenSim.Data.SQLite
156 { 151 {
157 if (ExecuteNonQuery(cmd, m_Connection) < 1) 152 if (ExecuteNonQuery(cmd, m_Connection) < 1)
158 { 153 {
159 CloseCommand(cmd); 154 //CloseCommand(cmd);
160 return false; 155 return false;
161 } 156 }
162 } 157 }
163 catch (Exception e) 158 catch (Exception e)
164 { 159 {
165 Console.WriteLine(e.ToString()); 160 Console.WriteLine(e.ToString());
166 CloseCommand(cmd); 161 //CloseCommand(cmd);
167 return false; 162 return false;
168 } 163 }
169 } 164 }
@@ -184,19 +179,19 @@ namespace OpenSim.Data.SQLite
184 { 179 {
185 if (ExecuteNonQuery(cmd, m_Connection) < 1) 180 if (ExecuteNonQuery(cmd, m_Connection) < 1)
186 { 181 {
187 CloseCommand(cmd); 182 //CloseCommand(cmd);
188 return false; 183 return false;
189 } 184 }
190 } 185 }
191 catch (Exception e) 186 catch (Exception e)
192 { 187 {
193 Console.WriteLine(e.ToString()); 188 Console.WriteLine(e.ToString());
194 CloseCommand(cmd); 189 //CloseCommand(cmd);
195 return false; 190 return false;
196 } 191 }
197 } 192 }
198 193
199 CloseCommand(cmd); 194 //CloseCommand(cmd);
200 195
201 return true; 196 return true;
202 } 197 }