Browsing by tag sometimes shows items with alternative tag

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Browsing by tag sometimes shows items with alternative tag

meku
I am seeing some inconsistent behaviour when browsing items by Tags.

Selecting a single tag (A) in the tree shows all items with tag (A) but also unrelated items with tag (B).  So far I have only discovered this happening for a few specific tags, but it continues happening after restarting Digikam.

If I use the Search for tag (A) then it shows the expected results, it's only within the Tag browser that this issue is occurring.

Using Digikam 5.7 appbundle with mysql.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Browsing by tag sometimes shows items with alternative tag

Mario Frank
Hi Meku,

can you check the following?

In menu View: is the option "include tag tree" (I do not know how it is
called exactly in the English version, I have the German one)

checked? If yes, images with subtags are also shown in the browser and
may have tag B.

Otherwise, do you have experience with MySQL queries?

Cheers,

Mario


Am 08.08.2017 um 14:46 schrieb meku:

> I am seeing some inconsistent behaviour when browsing items by Tags.
>
> Selecting a single tag (A) in the tree shows all items with tag (A)
> but also unrelated items with tag (B).  So far I have only discovered
> this happening for a few specific tags, but it continues happening
> after restarting Digikam.
>
> If I use the Search for tag (A) then it shows the expected results,
> it's only within the Tag browser that this issue is occurring.
>
> Using Digikam 5.7 appbundle with mysql.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Browsing by tag sometimes shows items with alternative tag

meku
Hi Mario,

Yes, disabling "Include Tag Sub-Tree" hides the unexpected items.

Tag B is not a child of Tag A and the unexpected items do not have Tag A or any of A's child tags.

I can work with mysql queries.

On 8 August 2017 at 22:55, Mario Frank <[hidden email]> wrote:
Hi Meku,

can you check the following?

In menu View: is the option "include tag tree" (I do not know how it is
called exactly in the English version, I have the German one)

checked? If yes, images with subtags are also shown in the browser and
may have tag B.

Otherwise, do you have experience with MySQL queries?

Cheers,

Mario


Am 08.08.2017 um 14:46 schrieb meku:
> I am seeing some inconsistent behaviour when browsing items by Tags.
>
> Selecting a single tag (A) in the tree shows all items with tag (A)
> but also unrelated items with tag (B).  So far I have only discovered
> this happening for a few specific tags, but it continues happening
> after restarting Digikam.
>
> If I use the Search for tag (A) then it shows the expected results,
> it's only within the Tag browser that this issue is occurring.
>
> Using Digikam 5.7 appbundle with mysql.


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Browsing by tag sometimes shows items with alternative tag

AndriusWild
In reply to this post by meku
Hello, Are you talking about JPEGs or RAW files? How do you write metadata - database only, sidecars only, jpeg files itselves only, everywhere? Do you use any other software for managing your pictures right now or have you used one in past?

If these are jpegs and you do write metadata in them you can try reading metadata pressing Ctrl Shift M in digikam or using another software (e.g. exiftool) and see if the word matching your tag A is written into any metadata fields of the files with tag B you mentioned below.
I suspect that the keyword might show up in one of the following categories (exif, iptc, xmp, Microsoft)


Sent from my Samsung Galaxy smartphone.

-------- Original message --------
From: meku <[hidden email]>
Date: 2017-08-08 7:10 AM (GMT-07:00)
To: digiKam - Home Manage your photographs as a professional with the power of open source <[hidden email]>
Subject: Re: Browsing by tag sometimes shows items with alternative tag

Hi Mario,

Yes, disabling "Include Tag Sub-Tree" hides the unexpected items.

Tag B is not a child of Tag A and the unexpected items do not have Tag A or any of A's child tags.

I can work with mysql queries.

On 8 August 2017 at 22:55, Mario Frank <[hidden email]> wrote:
Hi Meku,

can you check the following?

In menu View: is the option "include tag tree" (I do not know how it is
called exactly in the English version, I have the German one)

checked? If yes, images with subtags are also shown in the browser and
may have tag B.

Otherwise, do you have experience with MySQL queries?

Cheers,

Mario


Am 08.08.2017 um 14:46 schrieb meku:
> I am seeing some inconsistent behaviour when browsing items by Tags.
>
> Selecting a single tag (A) in the tree shows all items with tag (A)
> but also unrelated items with tag (B).  So far I have only discovered
> this happening for a few specific tags, but it continues happening
> after restarting Digikam.
>
> If I use the Search for tag (A) then it shows the expected results,
> it's only within the Tag browser that this issue is occurring.
>
> Using Digikam 5.7 appbundle with mysql.


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Browsing by tag sometimes shows items with alternative tag

Mario Frank
In reply to this post by meku

Hi Meku,

this is odd, as when the disabling solves the problem, the unexpected items must have

a tag that is a child tag of A. At least for sanity reasons.

The source code itself looks good. Gilles, can you take a look at the definition of

getItemIDsInTagRecursive in the dbconfig? For me, it looks correct, too.

Can you send a screenshot or something like this?

Cheers,
Mario

Am 08.08.2017 um 15:10 schrieb meku:
Hi Mario,

Yes, disabling "Include Tag Sub-Tree" hides the unexpected items.

Tag B is not a child of Tag A and the unexpected items do not have Tag A or any of A's child tags.

I can work with mysql queries.

On 8 August 2017 at 22:55, Mario Frank <[hidden email]> wrote:
Hi Meku,

can you check the following?

In menu View: is the option "include tag tree" (I do not know how it is
called exactly in the English version, I have the German one)

checked? If yes, images with subtags are also shown in the browser and
may have tag B.

Otherwise, do you have experience with MySQL queries?

Cheers,

Mario


Am 08.08.2017 um 14:46 schrieb meku:
> I am seeing some inconsistent behaviour when browsing items by Tags.
>
> Selecting a single tag (A) in the tree shows all items with tag (A)
> but also unrelated items with tag (B).  So far I have only discovered
> this happening for a few specific tags, but it continues happening
> after restarting Digikam.
>
> If I use the Search for tag (A) then it shows the expected results,
> it's only within the Tag browser that this issue is occurring.
>
> Using Digikam 5.7 appbundle with mysql.



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Browsing by tag sometimes shows items with alternative tag

meku
Studying the database there appears to be some inconsistent data in the Tags table causing this.

Tag B probably used to be a child of Tag A, but some time ago Tag B was moved to the root.

Tag B's 'pid' is '0' because it a child of the root node, but the 'lft' and 'rgt' fields have not been updated so still fall within the range of Tag A's 'lft' and 'rgt'.

If browsing using Tags with "Include Tag Sub-Tree" enabled relies on the 'lft' and 'rgt' fields then it would explain the inconsistent behaviour I'm seeing - and it appears it only happens to Tags that have been moved in the hierarchy.

Is this a bug, and is there a mysql query to repair it?



On 8 August 2017 at 23:45, Mario Frank <[hidden email]> wrote:

Hi Meku,

this is odd, as when the disabling solves the problem, the unexpected items must have

a tag that is a child tag of A. At least for sanity reasons.

The source code itself looks good. Gilles, can you take a look at the definition of

getItemIDsInTagRecursive in the dbconfig? For me, it looks correct, too.

Can you send a screenshot or something like this?

Cheers,
Mario


Am 08.08.2017 um 15:10 schrieb meku:
Hi Mario,

Yes, disabling "Include Tag Sub-Tree" hides the unexpected items.

Tag B is not a child of Tag A and the unexpected items do not have Tag A or any of A's child tags.

I can work with mysql queries.

On 8 August 2017 at 22:55, Mario Frank <[hidden email]> wrote:
Hi Meku,

can you check the following?

In menu View: is the option "include tag tree" (I do not know how it is
called exactly in the English version, I have the German one)

checked? If yes, images with subtags are also shown in the browser and
may have tag B.

Otherwise, do you have experience with MySQL queries?

Cheers,

Mario


Am 08.08.2017 um 14:46 schrieb meku:
> I am seeing some inconsistent behaviour when browsing items by Tags.
>
> Selecting a single tag (A) in the tree shows all items with tag (A)
> but also unrelated items with tag (B).  So far I have only discovered
> this happening for a few specific tags, but it continues happening
> after restarting Digikam.
>
> If I use the Search for tag (A) then it shows the expected results,
> it's only within the Tag browser that this issue is occurring.
>
> Using Digikam 5.7 appbundle with mysql.




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Browsing by tag sometimes shows items with alternative tag

Mario Frank
In reply to this post by Mario Frank

Hey Meku,

I think this is a bug. But I

1) do not have a MySQL (and currently not the possibility to create one) to test and confirm

2) Thus also cannot fix the problem shorthand.

I opened a bugzilla entry with your and mine findings here:

https://bugs.kde.org/show_bug.cgi?id=383326

I hope one of the other devs can fix it faster than I.

Best,

Mario


"Am 09.08.2017 um 14:36 schrieb meku:
Studying the database there appears to be some inconsistent data in the Tags table causing this.

Tag B probably used to be a child of Tag A, but some time ago Tag B was moved to the root.

Tag B's 'pid' is '0' because it a child of the root node, but the 'lft' and 'rgt' fields have not been updated so still fall within the range of Tag A's 'lft' and 'rgt'.

If browsing using Tags with "Include Tag Sub-Tree" enabled relies on the 'lft' and 'rgt' fields then it would explain the inconsistent behaviour I'm seeing - and it appears it only happens to Tags that have been moved in the hierarchy.

Is this a bug, and is there a mysql query to repair it?"

Am 08.08.2017 um 15:45 schrieb Mario Frank:

Hi Meku,

this is odd, as when the disabling solves the problem, the unexpected items must have

a tag that is a child tag of A. At least for sanity reasons.

The source code itself looks good. Gilles, can you take a look at the definition of

getItemIDsInTagRecursive in the dbconfig? For me, it looks correct, too.

Can you send a screenshot or something like this?

Cheers,
Mario

Am 08.08.2017 um 15:10 schrieb meku:
Hi Mario,

Yes, disabling "Include Tag Sub-Tree" hides the unexpected items.

Tag B is not a child of Tag A and the unexpected items do not have Tag A or any of A's child tags.

I can work with mysql queries.

On 8 August 2017 at 22:55, Mario Frank <[hidden email]> wrote:
Hi Meku,

can you check the following?

In menu View: is the option "include tag tree" (I do not know how it is
called exactly in the English version, I have the German one)

checked? If yes, images with subtags are also shown in the browser and
may have tag B.

Otherwise, do you have experience with MySQL queries?

Cheers,

Mario


Am 08.08.2017 um 14:46 schrieb meku:
> I am seeing some inconsistent behaviour when browsing items by Tags.
>
> Selecting a single tag (A) in the tree shows all items with tag (A)
> but also unrelated items with tag (B).  So far I have only discovered
> this happening for a few specific tags, but it continues happening
> after restarting Digikam.
>
> If I use the Search for tag (A) then it shows the expected results,
> it's only within the Tag browser that this issue is occurring.
>
> Using Digikam 5.7 appbundle with mysql.




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Browsing by tag sometimes shows items with alternative tag

Gilles Caulier-4
Mario,

You can ask to Swati. She improve the Mysql dtatabase backend/schema
while summer 2016, and i'm sure that she review this kind of problem
already. She has also certainly a Mysql DB reday to test.

Gilles

2017-08-09 20:07 GMT+02:00 Mario Frank <[hidden email]>:

> Hey Meku,
>
> I think this is a bug. But I
>
> 1) do not have a MySQL (and currently not the possibility to create one) to
> test and confirm
>
> 2) Thus also cannot fix the problem shorthand.
>
> I opened a bugzilla entry with your and mine findings here:
>
> https://bugs.kde.org/show_bug.cgi?id=383326
>
> I hope one of the other devs can fix it faster than I.
>
> Best,
>
> Mario
>
>
> "Am 09.08.2017 um 14:36 schrieb meku:
> Studying the database there appears to be some inconsistent data in the Tags
> table causing this.
>
> Tag B probably used to be a child of Tag A, but some time ago Tag B was
> moved to the root.
>
> Tag B's 'pid' is '0' because it a child of the root node, but the 'lft' and
> 'rgt' fields have not been updated so still fall within the range of Tag A's
> 'lft' and 'rgt'.
>
> If browsing using Tags with "Include Tag Sub-Tree" enabled relies on the
> 'lft' and 'rgt' fields then it would explain the inconsistent behaviour I'm
> seeing - and it appears it only happens to Tags that have been moved in the
> hierarchy.
>
> Is this a bug, and is there a mysql query to repair it?"
>
> Am 08.08.2017 um 15:45 schrieb Mario Frank:
>
> Hi Meku,
>
> this is odd, as when the disabling solves the problem, the unexpected items
> must have
>
> a tag that is a child tag of A. At least for sanity reasons.
>
> The source code itself looks good. Gilles, can you take a look at the
> definition of
>
> getItemIDsInTagRecursive in the dbconfig? For me, it looks correct, too.
>
> Can you send a screenshot or something like this?
>
> Cheers,
> Mario
>
> Am 08.08.2017 um 15:10 schrieb meku:
>
> Hi Mario,
>
> Yes, disabling "Include Tag Sub-Tree" hides the unexpected items.
>
> Tag B is not a child of Tag A and the unexpected items do not have Tag A or
> any of A's child tags.
>
> I can work with mysql queries.
>
> On 8 August 2017 at 22:55, Mario Frank <[hidden email]> wrote:
>>
>> Hi Meku,
>>
>> can you check the following?
>>
>> In menu View: is the option "include tag tree" (I do not know how it is
>> called exactly in the English version, I have the German one)
>>
>> checked? If yes, images with subtags are also shown in the browser and
>> may have tag B.
>>
>> Otherwise, do you have experience with MySQL queries?
>>
>> Cheers,
>>
>> Mario
>>
>>
>> Am 08.08.2017 um 14:46 schrieb meku:
>> > I am seeing some inconsistent behaviour when browsing items by Tags.
>> >
>> > Selecting a single tag (A) in the tree shows all items with tag (A)
>> > but also unrelated items with tag (B).  So far I have only discovered
>> > this happening for a few specific tags, but it continues happening
>> > after restarting Digikam.
>> >
>> > If I use the Search for tag (A) then it shows the expected results,
>> > it's only within the Tag browser that this issue is occurring.
>> >
>> > Using Digikam 5.7 appbundle with mysql.
>>
>
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Browsing by tag sometimes shows items with alternative tag

AndriusWild
Guys I believe I have experienced this bug too and I do not use mysql (not anymore).
I just got too busy and kind of gave up on the old pics and moved on to the new pictures.

So this might be a general database bug not just a mysql related one.

Best regards,

On Wed, Aug 9, 2017 at 12:17 PM, Gilles Caulier <[hidden email]> wrote:
Mario,

You can ask to Swati. She improve the Mysql dtatabase backend/schema
while summer 2016, and i'm sure that she review this kind of problem
already. She has also certainly a Mysql DB reday to test.

Gilles

2017-08-09 20:07 GMT+02:00 Mario Frank <[hidden email]>:
> Hey Meku,
>
> I think this is a bug. But I
>
> 1) do not have a MySQL (and currently not the possibility to create one) to
> test and confirm
>
> 2) Thus also cannot fix the problem shorthand.
>
> I opened a bugzilla entry with your and mine findings here:
>
> https://bugs.kde.org/show_bug.cgi?id=383326
>
> I hope one of the other devs can fix it faster than I.
>
> Best,
>
> Mario
>
>
> "Am 09.08.2017 um 14:36 schrieb meku:
> Studying the database there appears to be some inconsistent data in the Tags
> table causing this.
>
> Tag B probably used to be a child of Tag A, but some time ago Tag B was
> moved to the root.
>
> Tag B's 'pid' is '0' because it a child of the root node, but the 'lft' and
> 'rgt' fields have not been updated so still fall within the range of Tag A's
> 'lft' and 'rgt'.
>
> If browsing using Tags with "Include Tag Sub-Tree" enabled relies on the
> 'lft' and 'rgt' fields then it would explain the inconsistent behaviour I'm
> seeing - and it appears it only happens to Tags that have been moved in the
> hierarchy.
>
> Is this a bug, and is there a mysql query to repair it?"
>
> Am 08.08.2017 um 15:45 schrieb Mario Frank:
>
> Hi Meku,
>
> this is odd, as when the disabling solves the problem, the unexpected items
> must have
>
> a tag that is a child tag of A. At least for sanity reasons.
>
> The source code itself looks good. Gilles, can you take a look at the
> definition of
>
> getItemIDsInTagRecursive in the dbconfig? For me, it looks correct, too.
>
> Can you send a screenshot or something like this?
>
> Cheers,
> Mario
>
> Am 08.08.2017 um 15:10 schrieb meku:
>
> Hi Mario,
>
> Yes, disabling "Include Tag Sub-Tree" hides the unexpected items.
>
> Tag B is not a child of Tag A and the unexpected items do not have Tag A or
> any of A's child tags.
>
> I can work with mysql queries.
>
> On 8 August 2017 at 22:55, Mario Frank <[hidden email]> wrote:
>>
>> Hi Meku,
>>
>> can you check the following?
>>
>> In menu View: is the option "include tag tree" (I do not know how it is
>> called exactly in the English version, I have the German one)
>>
>> checked? If yes, images with subtags are also shown in the browser and
>> may have tag B.
>>
>> Otherwise, do you have experience with MySQL queries?
>>
>> Cheers,
>>
>> Mario
>>
>>
>> Am 08.08.2017 um 14:46 schrieb meku:
>> > I am seeing some inconsistent behaviour when browsing items by Tags.
>> >
>> > Selecting a single tag (A) in the tree shows all items with tag (A)
>> > but also unrelated items with tag (B).  So far I have only discovered
>> > this happening for a few specific tags, but it continues happening
>> > after restarting Digikam.
>> >
>> > If I use the Search for tag (A) then it shows the expected results,
>> > it's only within the Tag browser that this issue is occurring.
>> >
>> > Using Digikam 5.7 appbundle with mysql.
>>
>
>
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Browsing by tag sometimes shows items with alternative tag

Mario Frank

Hey Andrey,

I just tried to reproduce the problem one hour ago with SQLite and could not.

But I got a small MySQL database to work right now and was able to reproduce

the corruption. I even got an error message in the trace:

"

digikam.dbengine: Prepare failed!
digikam.dbengine: Failure executing query:
 "LOCK TABLE Tags WRITE;"
Error messages: "QMYSQL3: Der Befehl konnte nicht initialisiert werden" "This command is not supported in the prepared statement protocol yet" 1295 2

"

So there definitely is a problem and as I see it, this will have not worked for a longer time. Looks like an incomplete migration from dbconfig to source code.

I will try to fix it.

Cheers,

Mario


Am 09.08.2017 um 20:46 schrieb Andrey Goreev:
Guys I believe I have experienced this bug too and I do not use mysql (not anymore).
I just got too busy and kind of gave up on the old pics and moved on to the new pictures.

So this might be a general database bug not just a mysql related one.

Best regards,

On Wed, Aug 9, 2017 at 12:17 PM, Gilles Caulier <[hidden email]> wrote:
Mario,

You can ask to Swati. She improve the Mysql dtatabase backend/schema
while summer 2016, and i'm sure that she review this kind of problem
already. She has also certainly a Mysql DB reday to test.

Gilles

2017-08-09 20:07 GMT+02:00 Mario Frank <[hidden email]>:
> Hey Meku,
>
> I think this is a bug. But I
>
> 1) do not have a MySQL (and currently not the possibility to create one) to
> test and confirm
>
> 2) Thus also cannot fix the problem shorthand.
>
> I opened a bugzilla entry with your and mine findings here:
>
> https://bugs.kde.org/show_bug.cgi?id=383326
>
> I hope one of the other devs can fix it faster than I.
>
> Best,
>
> Mario
>
>
> "Am 09.08.2017 um 14:36 schrieb meku:
> Studying the database there appears to be some inconsistent data in the Tags
> table causing this.
>
> Tag B probably used to be a child of Tag A, but some time ago Tag B was
> moved to the root.
>
> Tag B's 'pid' is '0' because it a child of the root node, but the 'lft' and
> 'rgt' fields have not been updated so still fall within the range of Tag A's
> 'lft' and 'rgt'.
>
> If browsing using Tags with "Include Tag Sub-Tree" enabled relies on the
> 'lft' and 'rgt' fields then it would explain the inconsistent behaviour I'm
> seeing - and it appears it only happens to Tags that have been moved in the
> hierarchy.
>
> Is this a bug, and is there a mysql query to repair it?"
>
> Am 08.08.2017 um 15:45 schrieb Mario Frank:
>
> Hi Meku,
>
> this is odd, as when the disabling solves the problem, the unexpected items
> must have
>
> a tag that is a child tag of A. At least for sanity reasons.
>
> The source code itself looks good. Gilles, can you take a look at the
> definition of
>
> getItemIDsInTagRecursive in the dbconfig? For me, it looks correct, too.
>
> Can you send a screenshot or something like this?
>
> Cheers,
> Mario
>
> Am 08.08.2017 um 15:10 schrieb meku:
>
> Hi Mario,
>
> Yes, disabling "Include Tag Sub-Tree" hides the unexpected items.
>
> Tag B is not a child of Tag A and the unexpected items do not have Tag A or
> any of A's child tags.
>
> I can work with mysql queries.
>
> On 8 August 2017 at 22:55, Mario Frank <[hidden email]> wrote:
>>
>> Hi Meku,
>>
>> can you check the following?
>>
>> In menu View: is the option "include tag tree" (I do not know how it is
>> called exactly in the English version, I have the German one)
>>
>> checked? If yes, images with subtags are also shown in the browser and
>> may have tag B.
>>
>> Otherwise, do you have experience with MySQL queries?
>>
>> Cheers,
>>
>> Mario
>>
>>
>> Am 08.08.2017 um 14:46 schrieb meku:
>> > I am seeing some inconsistent behaviour when browsing items by Tags.
>> >
>> > Selecting a single tag (A) in the tree shows all items with tag (A)
>> > but also unrelated items with tag (B).  So far I have only discovered
>> > this happening for a few specific tags, but it continues happening
>> > after restarting Digikam.
>> >
>> > If I use the Search for tag (A) then it shows the expected results,
>> > it's only within the Tag browser that this issue is occurring.
>> >
>> > Using Digikam 5.7 appbundle with mysql.
>>
>
>
>


Loading...