aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/PGSQL/PGSQLXInventoryData.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/PGSQL/PGSQLXInventoryData.cs')
-rw-r--r--OpenSim/Data/PGSQL/PGSQLXInventoryData.cs11
1 files changed, 10 insertions, 1 deletions
diff --git a/OpenSim/Data/PGSQL/PGSQLXInventoryData.cs b/OpenSim/Data/PGSQL/PGSQLXInventoryData.cs
index a22b882..c34a8dc 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 {
199/*
197 cmd.CommandText = String.Format(@"select bit_or(""inventoryCurrentPermissions"") as ""inventoryCurrentPermissions"" 200 cmd.CommandText = String.Format(@"select bit_or(""inventoryCurrentPermissions"") as ""inventoryCurrentPermissions""
198 from inventoryitems 201 from inventoryitems
199 where ""avatarID"" = :PrincipalID 202 where ""avatarID"" = :PrincipalID
200 and ""assetID"" = :AssetID 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"" = :PrincipalID
209 and ""assetID"" = :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));