diff options
author | Melanie | 2011-06-20 03:08:56 +0200 |
---|---|---|
committer | Melanie | 2011-06-20 03:08:56 +0200 |
commit | f4f55c4d6bdbe9a86b5343159916977b331fefe0 (patch) | |
tree | 08fb85f2aa0193bf8549e684b98501c2c52faa1a /OpenSim/Data/MySQL | |
parent | Add some flags to control content in search better (diff) | |
parent | Merge branch 'master' into careminster-presence-refactor (diff) | |
download | opensim-SC-f4f55c4d6bdbe9a86b5343159916977b331fefe0.zip opensim-SC-f4f55c4d6bdbe9a86b5343159916977b331fefe0.tar.gz opensim-SC-f4f55c4d6bdbe9a86b5343159916977b331fefe0.tar.bz2 opensim-SC-f4f55c4d6bdbe9a86b5343159916977b331fefe0.tar.xz |
Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Data/MySQL')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLFriendsData.cs | 14 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/Resources/FriendsStore.migrations | 7 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/Resources/RegionStore.migrations | 16 |
3 files changed, 37 insertions, 0 deletions
diff --git a/OpenSim/Data/MySQL/MySQLFriendsData.cs b/OpenSim/Data/MySQL/MySQLFriendsData.cs index 663fad6..130ba5e 100644 --- a/OpenSim/Data/MySQL/MySQLFriendsData.cs +++ b/OpenSim/Data/MySQL/MySQLFriendsData.cs | |||
@@ -44,6 +44,11 @@ namespace OpenSim.Data.MySQL | |||
44 | 44 | ||
45 | public bool Delete(UUID principalID, string friend) | 45 | public bool Delete(UUID principalID, string friend) |
46 | { | 46 | { |
47 | return Delete(principalID.ToString(), friend); | ||
48 | } | ||
49 | |||
50 | public bool Delete(string principalID, string friend) | ||
51 | { | ||
47 | MySqlCommand cmd = new MySqlCommand(); | 52 | MySqlCommand cmd = new MySqlCommand(); |
48 | 53 | ||
49 | cmd.CommandText = String.Format("delete from {0} where PrincipalID = ?PrincipalID and Friend = ?Friend", m_Realm); | 54 | cmd.CommandText = String.Format("delete from {0} where PrincipalID = ?PrincipalID and Friend = ?Friend", m_Realm); |
@@ -64,5 +69,14 @@ namespace OpenSim.Data.MySQL | |||
64 | 69 | ||
65 | return DoQuery(cmd); | 70 | return DoQuery(cmd); |
66 | } | 71 | } |
72 | |||
73 | public FriendsData[] GetFriends(string principalID) | ||
74 | { | ||
75 | MySqlCommand cmd = new MySqlCommand(); | ||
76 | |||
77 | cmd.CommandText = String.Format("select a.*,case when b.Flags is null then -1 else b.Flags end as TheirFlags from {0} as a left join {0} as b on a.PrincipalID = b.Friend and a.Friend = b.PrincipalID where a.PrincipalID LIKE ?PrincipalID", m_Realm); | ||
78 | cmd.Parameters.AddWithValue("?PrincipalID", principalID.ToString() + '%'); | ||
79 | return DoQuery(cmd); | ||
80 | } | ||
67 | } | 81 | } |
68 | } | 82 | } |
diff --git a/OpenSim/Data/MySQL/Resources/FriendsStore.migrations b/OpenSim/Data/MySQL/Resources/FriendsStore.migrations index ce713bd..55d82ec 100644 --- a/OpenSim/Data/MySQL/Resources/FriendsStore.migrations +++ b/OpenSim/Data/MySQL/Resources/FriendsStore.migrations | |||
@@ -21,5 +21,12 @@ INSERT INTO `Friends` SELECT `ownerID`, `friendID`, `friendPerms`, 0 FROM `userf | |||
21 | 21 | ||
22 | COMMIT; | 22 | COMMIT; |
23 | 23 | ||
24 | :VERSION 3 # ------------------------- | ||
24 | 25 | ||
26 | BEGIN; | ||
27 | |||
28 | ALTER TABLE `Friends` MODIFY COLUMN PrincipalID varchar(255) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000'; | ||
29 | ALTER TABLE `Friends` DROP PRIMARY KEY; | ||
30 | ALTER TABLE `Friends` ADD PRIMARY KEY(PrincipalID(36), Friend(36)); | ||
25 | 31 | ||
32 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/RegionStore.migrations b/OpenSim/Data/MySQL/Resources/RegionStore.migrations index 645f4e8..c2b130c 100644 --- a/OpenSim/Data/MySQL/Resources/RegionStore.migrations +++ b/OpenSim/Data/MySQL/Resources/RegionStore.migrations | |||
@@ -826,3 +826,19 @@ ALTER TABLE `prims` MODIFY COLUMN `CreatorID` VARCHAR(255) NOT NULL DEFAULT ''; | |||
826 | ALTER TABLE `primitems` MODIFY COLUMN `CreatorID` VARCHAR(255) NOT NULL DEFAULT ''; | 826 | ALTER TABLE `primitems` MODIFY COLUMN `CreatorID` VARCHAR(255) NOT NULL DEFAULT ''; |
827 | 827 | ||
828 | COMMIT; | 828 | COMMIT; |
829 | |||
830 | :VERSION 38 #--------------------- | ||
831 | |||
832 | BEGIN; | ||
833 | |||
834 | alter table land ENGINE = MyISAM; | ||
835 | alter table landaccesslist ENGINE = MyISAM; | ||
836 | alter table migrations ENGINE = MyISAM; | ||
837 | alter table primitems ENGINE = MyISAM; | ||
838 | alter table prims ENGINE = MyISAM; | ||
839 | alter table primshapes ENGINE = MyISAM; | ||
840 | alter table regionban ENGINE = MyISAM; | ||
841 | alter table regionsettings ENGINE = MyISAM; | ||
842 | alter table terrain ENGINE = MyISAM; | ||
843 | |||
844 | COMMIT; \ No newline at end of file | ||