Commit 2bce284dd92abeb42e2eeaf5c31f76e31c9c7128

Authored by Silvan Calarco
1 parent ece2fe900b
Exists in master

backend-sqlite3: workaround for duplicated indexs problem

Showing 1 changed file with 7 additions and 7 deletions Side-by-side Diff

src/backend-sqlite3.c
... ... @@ -146,8 +146,8 @@
146 146 }
147 147 sqlite3_bind_text(stmt, 1, fileUser->name, -1, SQLITE_STATIC);
148 148 if (sqlite3_step(stmt) != SQLITE_DONE) {
149   - fprintf(stderr, "ERROR: sqlite3_step: %s (%s)\n", sqlite3_query, sqlite3_errmsg(db));
150   - return 3;
  149 + fprintf(stderr, "WARNING: SQLite: (%s %s) %s; ignoring\n", sqlite3_query,
  150 + fileUser->name, sqlite3_errmsg(db));
151 151 }
152 152 sqlite3_finalize(stmt);
153 153 fileUser = fileUser->next;
154 154  
... ... @@ -157,13 +157,13 @@
157 157 snprintf(sqlite3_query, PATH_MAX, "INSERT INTO filegroups VALUES(%ld,?);",
158 158 fileGroup->id);
159 159 if (sqlite3_prepare_v2(db, sqlite3_query, -1, &stmt, NULL)) {
160   - fprintf(stderr, "ERROR: sqlite3_prepare_v2: %s (%s)\n", sqlite3_errmsg(db), sqlite3_query);
161   - return 1;
  160 + fprintf(stderr, "ERROR: sqlite3_prepare_v2: %s (%s)\n", sqlite3_errmsg(db), sqlite3_query);
  161 + return 1;
162 162 }
163 163 sqlite3_bind_text(stmt, 1, fileGroup->name, -1, SQLITE_STATIC);
164 164 if (sqlite3_step(stmt) != SQLITE_DONE) {
165   - fprintf(stderr, "ERROR: sqlite3_step: %s (%s)\n", sqlite3_query, sqlite3_errmsg(db));
166   - return 3;
  165 + fprintf(stderr, "WARNING: SQLite: (%s %s) %s; ignoring\n", sqlite3_query,
  166 + fileGroup->name, sqlite3_errmsg(db));
167 167 }
168 168 sqlite3_finalize(stmt);
169 169 fileGroup = fileGroup->next;
... ... @@ -241,7 +241,7 @@
241 241 }
242 242 sqlite3_bind_text(stmt, 1, provided->name, -1, SQLITE_STATIC);
243 243 if (sqlite3_step(stmt) != SQLITE_DONE) {
244   - fprintf(stderr, "ERROR: SQLite: (%s %s) %s; ignoring\n", sqlite3_query,
  244 + fprintf(stderr, "WARNING: SQLite: (%s %s) %s; ignoring\n", sqlite3_query,
245 245 provided->name, sqlite3_errmsg(db));
246 246 }
247 247 sqlite3_finalize(stmt);