Skip to content

Commit

Permalink
Merge pull request #17383 from zisoft/sql-tags
Browse files Browse the repository at this point in the history
fix sql statements for table selected_images
  • Loading branch information
TurboGit authored Aug 28, 2024
2 parents 5db19d4 + ccae5fd commit a03a2d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/common/tags.c
Original file line number Diff line number Diff line change
Expand Up @@ -1171,7 +1171,7 @@ uint32_t dt_tag_get_suggestions(GList **result)
" LEFT JOIN ("
" SELECT tagid, COUNT(imgid) AS count2"
" FROM main.tagged_images"
" WHERE imgid IN main.selected_images"
" WHERE imgid IN (SELECT imgid FROM main.selected_images)"
" GROUP BY tagid) AS at"
" ON at.tagid = S.tagid"
" WHERE S.tagid NOT IN memory.darktable_tags"
Expand Down
2 changes: 1 addition & 1 deletion src/dtgtk/thumbnail.c
Original file line number Diff line number Diff line change
Expand Up @@ -1046,7 +1046,7 @@ static gboolean _event_grouping_release(GtkWidget *widget,
sqlite3_stmt *stmt;
DT_DEBUG_SQLITE3_PREPARE_V2(
dt_database_get(darktable.db),
"INSERT OR IGNORE INTO main.selected_images"
"INSERT OR IGNORE INTO main.selected_images (imgid)"
" SELECT id FROM main.images WHERE group_id = ?1", -1, &stmt,
NULL);
DT_DEBUG_SQLITE3_BIND_INT(stmt, 1, thumb->groupid);
Expand Down

0 comments on commit a03a2d1

Please sign in to comment.