diff options
author | onefang | 2019-09-11 16:36:50 +1000 |
---|---|---|
committer | onefang | 2019-09-11 16:36:50 +1000 |
commit | 50cd1ffd32f69228e566f2b0b89f86ea0d9fe489 (patch) | |
tree | 52f2ab0c04f1a5d7d6ac5dc872981b4b156447e7 /OpenSim/Data/PGSQL/PGSQLXInventoryData.cs | |
parent | Renamed branch to SledjChisl. (diff) | |
parent | Bump to release flavour, build 0. (diff) | |
download | opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.zip opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.gz opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.bz2 opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.xz |
Merge branch 'SledjChisl'
Diffstat (limited to 'OpenSim/Data/PGSQL/PGSQLXInventoryData.cs')
-rw-r--r-- | OpenSim/Data/PGSQL/PGSQLXInventoryData.cs | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/OpenSim/Data/PGSQL/PGSQLXInventoryData.cs b/OpenSim/Data/PGSQL/PGSQLXInventoryData.cs index a22b882..4c10ac9 100644 --- a/OpenSim/Data/PGSQL/PGSQLXInventoryData.cs +++ b/OpenSim/Data/PGSQL/PGSQLXInventoryData.cs | |||
@@ -174,7 +174,9 @@ namespace OpenSim.Data.PGSQL | |||
174 | { | 174 | { |
175 | using (NpgsqlCommand cmd = new NpgsqlCommand()) | 175 | using (NpgsqlCommand cmd = new NpgsqlCommand()) |
176 | { | 176 | { |
177 | cmd.CommandText = String.Format(@"select * from inventoryitems where ""avatarID"" = :uuid and ""assetType"" = :type and ""flags"" = 1", m_Realm); | 177 | // cmd.CommandText = String.Format(@"select * from inventoryitems where ""avatarID"" = :uuid and ""assetType"" = :type and ""flags"" = 1", m_Realm); |
178 | |||
179 | cmd.CommandText = String.Format(@"select * from inventoryitems where ""avatarID"" = :uuid and ""assetType"" = :type and ""flags"" = 1"); | ||
178 | 180 | ||
179 | UUID princID = UUID.Zero; | 181 | UUID princID = UUID.Zero; |
180 | UUID.TryParse(principalID, out princID); | 182 | UUID.TryParse(principalID, out princID); |
@@ -194,11 +196,18 @@ namespace OpenSim.Data.PGSQL | |||
194 | { | 196 | { |
195 | using (NpgsqlCommand cmd = new NpgsqlCommand()) | 197 | using (NpgsqlCommand cmd = new NpgsqlCommand()) |
196 | { | 198 | { |
197 | cmd.CommandText = String.Format(@"select bit_or(""inventoryCurrentPermissions"") as ""inventoryCurrentPermissions"" | 199 | /* |
198 | from inventoryitems | 200 | cmd.CommandText = String.Format(@"select bit_or(""inventoryCurrentPermissions"") as ""inventoryCurrentPermissions"" |
199 | where ""avatarID"" = :PrincipalID | 201 | from inventoryitems |
200 | and ""assetID"" = :AssetID | 202 | where ""avatarID"" = :PrincipalID |
203 | and ""assetID"" = :AssetID | ||
201 | group by ""assetID"" ", m_Realm); | 204 | group by ""assetID"" ", m_Realm); |
205 | */ | ||
206 | cmd.CommandText = String.Format(@"select bit_or(""inventoryCurrentPermissions"") as ""inventoryCurrentPermissions"" | ||
207 | from inventoryitems | ||
208 | where ""avatarID""::uuid = :PrincipalID | ||
209 | and ""assetID""::uuid = :AssetID | ||
210 | group by ""assetID"" "); | ||
202 | 211 | ||
203 | cmd.Parameters.Add(m_database.CreateParameter("PrincipalID", principalID)); | 212 | cmd.Parameters.Add(m_database.CreateParameter("PrincipalID", principalID)); |
204 | cmd.Parameters.Add(m_database.CreateParameter("AssetID", assetID)); | 213 | cmd.Parameters.Add(m_database.CreateParameter("AssetID", assetID)); |