From e984bfb4c63718d5176b17f6beea46f4512cf304 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 2 Jul 2013 14:31:39 -0700 Subject: This should have a strong effect on the Unknown User issue mantis #6625 --- OpenSim/Data/IGridUserData.cs | 1 + OpenSim/Data/MSSQL/MSSQLGridUserData.cs | 7 ++++++- OpenSim/Data/MySQL/MySQLGridUserData.cs | 7 +++++-- OpenSim/Data/SQLite/SQLiteGridUserData.cs | 4 ++++ 4 files changed, 16 insertions(+), 3 deletions(-) (limited to 'OpenSim/Data') diff --git a/OpenSim/Data/IGridUserData.cs b/OpenSim/Data/IGridUserData.cs index e15a1f8..9afa477 100644 --- a/OpenSim/Data/IGridUserData.cs +++ b/OpenSim/Data/IGridUserData.cs @@ -50,6 +50,7 @@ namespace OpenSim.Data public interface IGridUserData { GridUserData Get(string userID); + GridUserData[] GetAll(string query); bool Store(GridUserData data); } } \ No newline at end of file diff --git a/OpenSim/Data/MSSQL/MSSQLGridUserData.cs b/OpenSim/Data/MSSQL/MSSQLGridUserData.cs index 9e215f9..df73e5b 100644 --- a/OpenSim/Data/MSSQL/MSSQLGridUserData.cs +++ b/OpenSim/Data/MSSQL/MSSQLGridUserData.cs @@ -50,7 +50,7 @@ namespace OpenSim.Data.MSSQL { } - public GridUserData Get(string userID) + public new GridUserData Get(string userID) { GridUserData[] ret = Get("UserID", userID); @@ -60,5 +60,10 @@ namespace OpenSim.Data.MSSQL return ret[0]; } + public GridUserData[] GetAll(string userID) + { + return base.Get("UserID LIKE {0}%", userID); + } + } } diff --git a/OpenSim/Data/MySQL/MySQLGridUserData.cs b/OpenSim/Data/MySQL/MySQLGridUserData.cs index a9ce94d..df1ecc6 100644 --- a/OpenSim/Data/MySQL/MySQLGridUserData.cs +++ b/OpenSim/Data/MySQL/MySQLGridUserData.cs @@ -46,7 +46,7 @@ namespace OpenSim.Data.MySQL public MySQLGridUserData(string connectionString, string realm) : base(connectionString, realm, "GridUserStore") {} - public GridUserData Get(string userID) + public new GridUserData Get(string userID) { GridUserData[] ret = Get("UserID", userID); @@ -56,6 +56,9 @@ namespace OpenSim.Data.MySQL return ret[0]; } - + public GridUserData[] GetAll(string userID) + { + return base.Get("UserID LIKE {0}%", userID); + } } } \ No newline at end of file diff --git a/OpenSim/Data/SQLite/SQLiteGridUserData.cs b/OpenSim/Data/SQLite/SQLiteGridUserData.cs index 1bb5ed8..54cef1a 100644 --- a/OpenSim/Data/SQLite/SQLiteGridUserData.cs +++ b/OpenSim/Data/SQLite/SQLiteGridUserData.cs @@ -56,6 +56,10 @@ namespace OpenSim.Data.SQLite return ret[0]; } + public GridUserData[] GetAll(string userID) + { + return base.Get("UserID LIKE {0}%", userID); + } } } \ No newline at end of file -- cgit v1.1 From 2c05caec7fcf14c7e61c2f66854fc24f06d5b480 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 2 Jul 2013 15:47:02 -0700 Subject: Really make it call the method with the query interface --- OpenSim/Data/MySQL/MySQLGridUserData.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Data') diff --git a/OpenSim/Data/MySQL/MySQLGridUserData.cs b/OpenSim/Data/MySQL/MySQLGridUserData.cs index df1ecc6..f476fd2 100644 --- a/OpenSim/Data/MySQL/MySQLGridUserData.cs +++ b/OpenSim/Data/MySQL/MySQLGridUserData.cs @@ -58,7 +58,7 @@ namespace OpenSim.Data.MySQL public GridUserData[] GetAll(string userID) { - return base.Get("UserID LIKE {0}%", userID); + return base.Get(String.Format("UserID LIKE {0}%", userID)); } } } \ No newline at end of file -- cgit v1.1 From 9725b829d5e476fc6b0894b46520ff1d7aba9936 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 2 Jul 2013 15:48:30 -0700 Subject: Do the same for SQLite and MSSQL --- OpenSim/Data/MSSQL/MSSQLGridUserData.cs | 2 +- OpenSim/Data/SQLite/SQLiteGridUserData.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Data') diff --git a/OpenSim/Data/MSSQL/MSSQLGridUserData.cs b/OpenSim/Data/MSSQL/MSSQLGridUserData.cs index df73e5b..7d10955 100644 --- a/OpenSim/Data/MSSQL/MSSQLGridUserData.cs +++ b/OpenSim/Data/MSSQL/MSSQLGridUserData.cs @@ -62,7 +62,7 @@ namespace OpenSim.Data.MSSQL public GridUserData[] GetAll(string userID) { - return base.Get("UserID LIKE {0}%", userID); + return base.Get(String.Format("UserID LIKE {0}%", userID)); } } diff --git a/OpenSim/Data/SQLite/SQLiteGridUserData.cs b/OpenSim/Data/SQLite/SQLiteGridUserData.cs index 54cef1a..799df91 100644 --- a/OpenSim/Data/SQLite/SQLiteGridUserData.cs +++ b/OpenSim/Data/SQLite/SQLiteGridUserData.cs @@ -58,7 +58,7 @@ namespace OpenSim.Data.SQLite public GridUserData[] GetAll(string userID) { - return base.Get("UserID LIKE {0}%", userID); + return base.Get(String.Format("UserID LIKE {0}%", userID)); } } -- cgit v1.1 From 316e8f92391f561d459bc6240ccd78b0a98c20c6 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 2 Jul 2013 16:10:09 -0700 Subject: Fix SQL statement --- OpenSim/Data/MSSQL/MSSQLGridUserData.cs | 2 +- OpenSim/Data/MySQL/MySQLGridUserData.cs | 2 +- OpenSim/Data/SQLite/SQLiteGridUserData.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Data') diff --git a/OpenSim/Data/MSSQL/MSSQLGridUserData.cs b/OpenSim/Data/MSSQL/MSSQLGridUserData.cs index 7d10955..8ec8d49 100644 --- a/OpenSim/Data/MSSQL/MSSQLGridUserData.cs +++ b/OpenSim/Data/MSSQL/MSSQLGridUserData.cs @@ -62,7 +62,7 @@ namespace OpenSim.Data.MSSQL public GridUserData[] GetAll(string userID) { - return base.Get(String.Format("UserID LIKE {0}%", userID)); + return base.Get(String.Format("UserID LIKE '{0}%'", userID)); } } diff --git a/OpenSim/Data/MySQL/MySQLGridUserData.cs b/OpenSim/Data/MySQL/MySQLGridUserData.cs index f476fd2..00560c1 100644 --- a/OpenSim/Data/MySQL/MySQLGridUserData.cs +++ b/OpenSim/Data/MySQL/MySQLGridUserData.cs @@ -58,7 +58,7 @@ namespace OpenSim.Data.MySQL public GridUserData[] GetAll(string userID) { - return base.Get(String.Format("UserID LIKE {0}%", userID)); + return base.Get(String.Format("UserID LIKE '{0}%'", userID)); } } } \ No newline at end of file diff --git a/OpenSim/Data/SQLite/SQLiteGridUserData.cs b/OpenSim/Data/SQLite/SQLiteGridUserData.cs index 799df91..d8c52f8 100644 --- a/OpenSim/Data/SQLite/SQLiteGridUserData.cs +++ b/OpenSim/Data/SQLite/SQLiteGridUserData.cs @@ -58,7 +58,7 @@ namespace OpenSim.Data.SQLite public GridUserData[] GetAll(string userID) { - return base.Get(String.Format("UserID LIKE {0}%", userID)); + return base.Get(String.Format("UserID LIKE '{0}%'", userID)); } } -- cgit v1.1 From 068a3afad9b585399e5422108f8c5074c9e6b33f Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 4 Jul 2013 09:51:31 -0700 Subject: HG Friends: migration #3 is failing on some installations of MySql. Setting the table to InnoDB seems to fix the problem. --- OpenSim/Data/MySQL/Resources/FriendsStore.migrations | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Data') diff --git a/OpenSim/Data/MySQL/Resources/FriendsStore.migrations b/OpenSim/Data/MySQL/Resources/FriendsStore.migrations index 55d82ec..5faf956 100644 --- a/OpenSim/Data/MySQL/Resources/FriendsStore.migrations +++ b/OpenSim/Data/MySQL/Resources/FriendsStore.migrations @@ -9,7 +9,7 @@ CREATE TABLE `Friends` ( `Offered` VARCHAR(32) NOT NULL DEFAULT 0, PRIMARY KEY(`PrincipalID`, `Friend`), KEY(`PrincipalID`) -); +) ENGINE=InnoDB; COMMIT; -- cgit v1.1