Fix for duplicates in all alias list query
authorKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Tue, 2 Dec 2014 16:28:24 +0000 (17:28 +0100)
committerMaciej J. Karpiuk <m.karpiuk2@samsung.com>
Tue, 17 Feb 2015 10:18:55 +0000 (11:18 +0100)
commitf6b96b1fd1ec8844a35bf1cffb4c8c0b2c6e3de5
treec8995d549f373665993fb42dcf3922e286da4f30
parent8eb1be0f8624c1382f95026a2135206cecb7ee4c
Fix for duplicates in all alias list query

[Issue#] N/A
[Feature/Bug] N/A
[Problem] DBperfGetAliasList fails
[Cause] DB_CMD_NAME_SELECT_BY_TYPE_AND_PERMISSION query is incorrect. When
listing objects accessible by given label it will produce one result for every
owned object times the number of accessors allowed.

Example:
Label L1 is owner of object (L1 N1)
Labels L2 and L3 have read permission to (L1 N1)
Listing all aliases accessible by L1 will produce:
L1 N1 (access by L2)
L1 N1 (access by L3)

[Solution] Add GROUP BY clause clause to get rid of duplicated objects

[Verification] ckm-tests-internall succeeds

Change-Id: I63f0d576750038e0abc1d7d41921e05d87cadfe4
src/manager/service/db-crypto.cpp