limiting query for deleted account information 90/208390/4 accepted/tizen/unified/20190625.051518 submit/tizen/20190624.120945
authorAbhishek Vijay <abhishek.v@samsung.com>
Mon, 24 Jun 2019 03:25:53 +0000 (08:55 +0530)
committerAbhishek Vijay <abhishek.v@samsung.com>
Mon, 24 Jun 2019 07:15:11 +0000 (12:45 +0530)
Change-Id: I737f6b5b18914f252e5d4264ddc798fb9e73f715
Signed-off-by: Abhishek Vijay <abhishek.v@samsung.com>
server/src/account-server-db.c
server/src/account-server.c

index 72a9bc7..6783cba 100644 (file)
@@ -2062,6 +2062,9 @@ int _account_query_account_by_account_id(int pid, uid_t uid, int account_db_id,
 
        ACCOUNT_DEBUG("after _account_query_step returned [%d]", rc);
 
+#ifndef ACCOUNT_QUERY_DELETED_ACCOUNT_INFORMATION
+       ACCOUNT_CATCH_ERROR(rc == SQLITE_ROW, {}, _ACCOUNT_ERROR_RECORD_NOT_FOUND, ("The record isn't found.\n"));
+#else
        /*querying information from deleted_account_table*/
        if (rc != SQLITE_ROW) {
 
@@ -2092,6 +2095,7 @@ int _account_query_account_by_account_id(int pid, uid_t uid, int account_db_id,
                ACCOUNT_DEBUG("getting account info from deleted_account_table");
                *IsDeletedAccount = true;
        }
+#endif
 
        while (rc == SQLITE_ROW) {
                ACCOUNT_DEBUG("before _account_convert_column_to_account");
index 732e840..38c66af 100644 (file)
@@ -1247,8 +1247,8 @@ RETURN:
        }
 
        /*clear deleted account tables*/
-       if (IsDeletedAccount) {
-               _INFO("deleted account info requested");
+       if (1/*IsDeletedAccount*/) {
+               _INFO("clearing deleted account-info tables - account_tbl,capability_tbl,custom_tbl");
                return_code = account_server_empty_deleted_account_info_tables(DEL_ACCOUNT_TBL, DEL_CAPABILITY_TBL, DEL_ACCOUNT_CUSTOM_TBL);
                ACCOUNT_RETURN_VAL((return_code == _ACCOUNT_ERROR_NONE), {}, return_code, ("failed to clear deleted account tables"));
        }