- use sqlite3_open_v2 instead of db_util_open
db_util_open has create option
Change-Id: I9d1fd772fc3c592a56e59c8a1d98237104219cee
Signed-off-by: Myungki Lee <mk5004.lee@samsung.com>
int ret = 0;
sqlite3 *db = 0;
- ret = db_util_open(dbfile, &db, 0);
+ ret = access(dbfile, R_OK | W_OK);
+ if (ret != 0) {
+ set_last_result(NOTIFICATION_ERROR_FROM_DB);
+ return NULL;
+ }
+
+ ret = sqlite3_open_v2(dbfile, &db, SQLITE_OPEN_READWRITE, NULL);
if (ret != SQLITE_OK) {
/* LCOV_EXCL_START */
if (ret == SQLITE_PERM)
if (argc > 2)
uid = (uid_t)atoi(argv[2]);
+
ret = notification_setting_refresh_setting_table(uid);
if (ret != NOTIFICATION_ERROR_NONE) {
_E("notification setting table refresh fail.");