backend-sqlite3: workaround for duplicated indexs problem

This commit is contained in:
Silvan Calarco 2020-10-01 11:09:59 +02:00
parent ece2fe900b
commit 2bce284dd9

View File

@ -146,8 +146,8 @@ int generateSQLite_files(struct configTag* ct, sqlite3 *db, int arch) {
} }
sqlite3_bind_text(stmt, 1, fileUser->name, -1, SQLITE_STATIC); sqlite3_bind_text(stmt, 1, fileUser->name, -1, SQLITE_STATIC);
if (sqlite3_step(stmt) != SQLITE_DONE) { if (sqlite3_step(stmt) != SQLITE_DONE) {
fprintf(stderr, "ERROR: sqlite3_step: %s (%s)\n", sqlite3_query, sqlite3_errmsg(db)); fprintf(stderr, "WARNING: SQLite: (%s %s) %s; ignoring\n", sqlite3_query,
return 3; fileUser->name, sqlite3_errmsg(db));
} }
sqlite3_finalize(stmt); sqlite3_finalize(stmt);
fileUser = fileUser->next; fileUser = fileUser->next;
@ -162,8 +162,8 @@ int generateSQLite_files(struct configTag* ct, sqlite3 *db, int arch) {
} }
sqlite3_bind_text(stmt, 1, fileGroup->name, -1, SQLITE_STATIC); sqlite3_bind_text(stmt, 1, fileGroup->name, -1, SQLITE_STATIC);
if (sqlite3_step(stmt) != SQLITE_DONE) { if (sqlite3_step(stmt) != SQLITE_DONE) {
fprintf(stderr, "ERROR: sqlite3_step: %s (%s)\n", sqlite3_query, sqlite3_errmsg(db)); fprintf(stderr, "WARNING: SQLite: (%s %s) %s; ignoring\n", sqlite3_query,
return 3; fileGroup->name, sqlite3_errmsg(db));
} }
sqlite3_finalize(stmt); sqlite3_finalize(stmt);
fileGroup = fileGroup->next; fileGroup = fileGroup->next;
@ -241,7 +241,7 @@ int generateSQLite_provided(struct configTag* ct, sqlite3 *db, int arch) {
} }
sqlite3_bind_text(stmt, 1, provided->name, -1, SQLITE_STATIC); sqlite3_bind_text(stmt, 1, provided->name, -1, SQLITE_STATIC);
if (sqlite3_step(stmt) != SQLITE_DONE) { if (sqlite3_step(stmt) != SQLITE_DONE) {
fprintf(stderr, "ERROR: SQLite: (%s %s) %s; ignoring\n", sqlite3_query, fprintf(stderr, "WARNING: SQLite: (%s %s) %s; ignoring\n", sqlite3_query,
provided->name, sqlite3_errmsg(db)); provided->name, sqlite3_errmsg(db));
} }
sqlite3_finalize(stmt); sqlite3_finalize(stmt);