From b3e9dd4fc26d772ba61a0751347caf1daf2dd39f Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 16 Apr 2010 15:10:57 -0700 Subject: Bug fix in SQLite/SQLiteUserAccountData.cs: Missing'(' in one of the SQL statements. --- OpenSim/Data/SQLite/SQLiteUserAccountData.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Data/SQLite') diff --git a/OpenSim/Data/SQLite/SQLiteUserAccountData.cs b/OpenSim/Data/SQLite/SQLiteUserAccountData.cs index 50e8c23..67cf716 100644 --- a/OpenSim/Data/SQLite/SQLiteUserAccountData.cs +++ b/OpenSim/Data/SQLite/SQLiteUserAccountData.cs @@ -66,7 +66,7 @@ namespace OpenSim.Data.SQLite if (words.Length == 1) { - cmd.CommandText = String.Format("select * from {0} where ScopeID='{1}' or ScopeID='00000000-0000-0000-0000-000000000000') and (FirstName like '{2}%' or LastName like '{2}%')", + cmd.CommandText = String.Format("select * from {0} where (ScopeID='{1}' or ScopeID='00000000-0000-0000-0000-000000000000') and (FirstName like '{2}%' or LastName like '{2}%')", m_Realm, scopeID.ToString(), words[0]); } else -- cgit v1.1 From 2597a3406c10de6898f1a66e469c3656aa294f43 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 16 Apr 2010 17:43:15 -0700 Subject: Bug fix: UserAccounts in SQLite was missing the primary key constraint. --- OpenSim/Data/SQLite/Resources/001_UserAccount.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Data/SQLite') diff --git a/OpenSim/Data/SQLite/Resources/001_UserAccount.sql b/OpenSim/Data/SQLite/Resources/001_UserAccount.sql index f9bf24c..c38d9a7 100644 --- a/OpenSim/Data/SQLite/Resources/001_UserAccount.sql +++ b/OpenSim/Data/SQLite/Resources/001_UserAccount.sql @@ -2,7 +2,7 @@ -- useraccounts table CREATE TABLE UserAccounts ( - PrincipalID CHAR(36) NOT NULL, + PrincipalID CHAR(36) primary key, ScopeID CHAR(36) NOT NULL, FirstName VARCHAR(64) NOT NULL, LastName VARCHAR(64) NOT NULL, -- cgit v1.1 From 4e1cbd1bf3f2a7d4e3dd8861e196820f35cddec9 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 16 Apr 2010 18:04:20 -0700 Subject: One more bug fix in sqlite sql statements. --- OpenSim/Data/SQLite/SQLiteAuthenticationData.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Data/SQLite') diff --git a/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs b/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs index 2c28375..aa10734 100644 --- a/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs +++ b/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs @@ -235,7 +235,7 @@ namespace OpenSim.Data.SQLite if (System.Environment.TickCount - m_LastExpire > 30000) DoExpire(); - SqliteCommand cmd = new SqliteCommand("update tokens set validity = datetime('now, 'localtime', '+" + lifetime.ToString() + + SqliteCommand cmd = new SqliteCommand("update tokens set validity = datetime('now', 'localtime', '+" + lifetime.ToString() + " minutes') where UUID = '" + principalID.ToString() + "' and token = '" + token + "' and validity > datetime('now', 'localtime')"); if (ExecuteNonQuery(cmd, m_Connection) > 0) -- cgit v1.1