Summary: | Search problem for not tagged or commented images. | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Werner (flixor) <werner> |
Component: | Searches-Advanced | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | caulier.gilles |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 0.9.0 | |
Sentry Crash Report: |
Description
Werner (flixor)
2006-01-19 20:33:18 UTC
I confirm but the bug is not really as describe If the table ImageProperties is empty nothing is found.... I think a left join should be better. For example I put a rating on a picture then the ImageProperties get one entry, and the I can find it for digikam 0.8.1 on kubuntu kde 3.5 I have reproduced this bug, using digiKam 0.8.1. I have triend to search with a keyword present in most names of my images ('2006' because I have some photos that are named 2006*.jpg) and the search won't find any photos After, I've added a comment 'test' to one photo, and search for this keyword in the search tool. The photo was instantly found ! SVN commit 505430 by toma: I'm very sorry I made the search as good as useless in 0.8.1. I hope this fixes this issue (thanks for the hint Maxime). Can anyone fonfirm that? BUG: 120479,120775 M +4 -4 digikamsearch.cpp --- branches/stable/extragear/graphics/digikam/kioslave/digikamsearch.cpp #505429:505430 @@ -136,7 +136,7 @@ // query head sqlQuery = "SELECT Images.id, Images.name, Images.dirid, Images.datetime, Albums.url " - "FROM Images, Albums, ImageProperties " + "FROM Images, Albums LEFT JOIN ImageProperties ON Images.id = Imageproperties.imageid " "WHERE ( "; // query body @@ -144,7 +144,7 @@ // query tail sqlQuery += " ) "; - sqlQuery += " AND (Albums.id=Images.dirid) AND (Images.id = ImageProperties.imageid); "; + sqlQuery += " AND (Albums.id=Images.dirid); "; QStringList values; QString errMsg; @@ -240,7 +240,7 @@ // query head sqlQuery = "SELECT Albums.url||'/'||Images.name " - "FROM Images, Albums, ImageProperties " + "FROM Images, Albums LEFT JOIN ImageProperties on Images.id = ImageProperties.imageid " "WHERE ( "; // query body @@ -248,7 +248,7 @@ // query tail sqlQuery += " ) "; - sqlQuery += " AND (Albums.id=Images.dirid) AND (Images.id = ImageProperties.imageid) "; + sqlQuery += " AND (Albums.id=Images.dirid) "; sqlQuery += " LIMIT 500;"; QStringList values; SVN commit 505437 by toma: forwardport SVN commit 505430 by toma: I'm very sorry I made the search as good as useless in 0.8.1. I hope this fixes this issue (thanks for the hint Maxime). CCBUG: 120479,120775 M +4 -4 digikamsearch.cpp --- trunk/extragear/graphics/digikam/kioslave/digikamsearch.cpp #505436:505437 @@ -136,7 +136,7 @@ // query head sqlQuery = "SELECT Images.id, Images.name, Images.dirid, Images.datetime, Albums.url " - "FROM Images, Albums, ImageProperties " + "FROM Images, Albums LEFT JOIN ImageProperties ON Images.id = Imageproperties.imageid " "WHERE ( "; // query body @@ -144,7 +144,7 @@ // query tail sqlQuery += " ) "; - sqlQuery += " AND (Albums.id=Images.dirid) AND (Images.id = ImageProperties.imageid); "; + sqlQuery += " AND (Albums.id=Images.dirid); "; QStringList values; QString errMsg; @@ -240,7 +240,7 @@ // query head sqlQuery = "SELECT Albums.url||'/'||Images.name " - "FROM Images, Albums, ImageProperties " + "FROM Images, Albums LEFT JOIN ImageProperties on Images.id = ImageProperties.imageid " "WHERE ( "; // query body @@ -248,7 +248,7 @@ // query tail sqlQuery += " ) "; - sqlQuery += " AND (Albums.id=Images.dirid) AND (Images.id = ImageProperties.imageid) "; + sqlQuery += " AND (Albums.id=Images.dirid) "; sqlQuery += " LIMIT 500;"; QStringList values; Tom, I have tested your SVN commits : quick and advanced searches work fine now. Thank you for the fix. --- Tung. |