N_SE-33706:fix db query fail
authorMinsoo Kim <minnsoo.kim@samsung.com>
Fri, 12 Apr 2013 04:40:30 +0000 (13:40 +0900)
committerMinsoo Kim <minnsoo.kim@samsung.com>
Fri, 12 Apr 2013 04:40:30 +0000 (13:40 +0900)
email-common-use/include/email-types.h
email-core/email-storage/email-storage.c
email-daemon/email-daemon-mail.c
packaging/email-service.spec

index 8659284..6edf1eb 100755 (executable)
@@ -780,8 +780,8 @@ typedef enum
        EMAIL_SORT_ATTACHMENT_LOW,
        EMAIL_SORT_FAVORITE_HIGH,
        EMAIL_SORT_FAVORITE_LOW,
-       EMAIL_SORT_MAILBOX_NAME_HIGH,
-       EMAIL_SORT_MAILBOX_NAME_LOW,
+       EMAIL_SORT_MAILBOX_ID_HIGH,
+       EMAIL_SORT_MAILBOX_ID_LOW,
        EMAIL_SORT_FLAGGED_FLAG_HIGH,
        EMAIL_SORT_FLAGGED_FLAG_LOW,
        EMAIL_SORT_SEEN_FLAG_HIGH,
index 844153e..099fcd0 100755 (executable)
@@ -3222,8 +3222,12 @@ static int _write_conditional_clause_for_getting_mail_list(int account_id, int m
                         " ORDER BY attachment_count ASC, date_time DESC",   /* case EMAIL_SORT_ATTACHMENT_LOW: */
                         " ORDER BY lock_status DESC, date_time DESC",     /* case EMAIL_SORT_FAVORITE_HIGH: */
                         " ORDER BY lock_status ASC, date_time DESC",           /* case EMAIL_SORT_FAVORITE_LOW: */
-                        " ORDER BY mailbox_name DESC, date_time DESC",   /* case EMAIL_SORT_MAILBOX_NAME_HIGH: */
-                        " ORDER BY mailbox_name ASC, date_time DESC"           /* case EMAIL_SORT_MAILBOX_NAME_LOW: */
+                        " ORDER BY mailbox_id DESC, date_time DESC",     /* case EMAIL_SORT_MAILBOX_ID_HIGH: */
+                        " ORDER BY mailbox_id ASC, date_time DESC",            /* case EMAIL_SORT_MAILBOX_ID_LOW: */
+                        " ORDER BY flags_flagged_field DESC, date_time DESC",  /* case EMAIL_SORT_FLAGGED_FLAG_HIGH: */
+                        " ORDER BY flags_flagged_field ASC, date_time DESC",   /* case EMAIL_SORT_FLAGGED_FLAG_LOW: */
+                        " ORDER BY flags_seen_field DESC, date_time DESC",     /* case EMAIL_SORT_SEEN_FLAG_HIGH: */
+                        " ORDER BY flags_seen_field ASC, date_time DESC"       /* case EMAIL_SORT_SEEN_FLAG_LOW: */
                         };
 
        if (sorting < EMAIL_SORT_END && sorting >= 0)
index 1deb058..f390266 100755 (executable)
@@ -1332,7 +1332,7 @@ INTERNAL_FUNC int emdaemon_delete_mail_thread(int thread_id, int delete_always_f
        int mailbox_id, *mail_id_list = NULL, result_count = 0, i;
        email_mail_list_item_t *mail_list = NULL;
 
-       if (!emstorage_get_mail_list(0, 0, NULL, thread_id, -1, -1, 0, NULL, EMAIL_SORT_MAILBOX_NAME_HIGH, true, &mail_list, &result_count, &err) || !mail_list || !result_count) {
+       if (!emstorage_get_mail_list(0, 0, NULL, thread_id, -1, -1, 0, NULL, EMAIL_SORT_MAILBOX_ID_HIGH, true, &mail_list, &result_count, &err) || !mail_list || !result_count) {
                EM_DEBUG_EXCEPTION("emstorage_get_mail_list failed [%d]", err);
 
                goto FINISH_OFF;
@@ -1383,7 +1383,7 @@ INTERNAL_FUNC int emdaemon_modify_seen_flag_of_thread(int thread_id, int seen_fl
        int account_id, *mail_id_list = NULL, result_count = 0, i;
        email_mail_list_item_t *mail_list = NULL;
 
-       if (!emstorage_get_mail_list(0, 0, NULL, thread_id, -1, -1, 0, NULL, EMAIL_SORT_MAILBOX_NAME_HIGH, true, &mail_list, &result_count, &err) || !mail_list || !result_count) {
+       if (!emstorage_get_mail_list(0, 0, NULL, thread_id, -1, -1, 0, NULL, EMAIL_SORT_MAILBOX_ID_HIGH, true, &mail_list, &result_count, &err) || !mail_list || !result_count) {
                EM_DEBUG_EXCEPTION("emstorage_get_mail_list failed [%d]", err);
 
                goto FINISH_OFF;
index 9287c9d..7c194c3 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       email-service
 Summary:    E-mail Framework Middleware package
-Version:    0.10.95
+Version:    0.10.96
 Release:    1
 Group:      System/Libraries
 License:    TBD