Bug 355893 - MYSQL : Agnostic on unix filenames (upper ne lower), creates rename problems
Summary: MYSQL : Agnostic on unix filenames (upper ne lower), creates rename problems
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Database-Mysql (show other bugs)
Version: 4.14.0
Platform: openSUSE Linux
: NOR critical
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-25 14:48 UTC by Gerard Dirkse
Modified: 2016-07-03 08:42 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.0.0
Sentry Crash Report:


Attachments
digikam1.2 initial list of files picture view (163.67 KB, image/jpeg)
2015-11-25 14:51 UTC, Gerard Dirkse
Details
digikambug1.1 (141.98 KB, image/jpeg)
2015-11-25 14:52 UTC, Gerard Dirkse
Details
digikam1.3 (161.53 KB, image/jpeg)
2015-11-25 14:54 UTC, Gerard Dirkse
Details
digikambug1.4 (151.12 KB, image/jpeg)
2015-11-25 14:55 UTC, Gerard Dirkse
Details
digikambug1.5 (158.24 KB, image/jpeg)
2015-11-25 14:56 UTC, Gerard Dirkse
Details
digikam1.dbg (3.21 KB, text/plain)
2015-11-25 14:56 UTC, Gerard Dirkse
Details
digikam2.dbg (110.00 KB, text/plain)
2015-11-25 14:57 UTC, Gerard Dirkse
Details
digikam1.log (872.05 KB, text/plain)
2015-11-25 14:57 UTC, Gerard Dirkse
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gerard Dirkse 2015-11-25 14:48:55 UTC
Trying to reproduce bug reported in 324134 and create documentation for that. Using a test directory I copied 4 existing pictures in it,  left one as is(1), one suffix was changed (uppercase, 2), one renamed entirely (3), last (4) renamed as previous but difference in capitalisation (digikambug1.1 and digikambug1.2).  On opening digikam, only 1,2 and 4 were shown/recognised (digikambug1.3). The advanced rename was done (digikambug1.4), result was both as expected (reproduce 32414) where 4 disappeared (and 2 surprisingly not),  and unexpected because 3 reappeared (digikambug1.5).

In digkam1.dbg and digikam2.dbg is the output from traces as set by kdebugdialog. In digikam1.log is the mysql log from executed statements.

Reproducible: Always

Steps to Reproduce:
Refer to description

Actual Results:  
As described

Expected Results:  
1) Digikam should have recognised the 4 initial pictures in the album.
2) On rename all 4 pictures should still be there.

As highlighted in 324134, you can recover the apparent lost images by running fixing (?) queries against the database.
Comment 1 Gerard Dirkse 2015-11-25 14:51:02 UTC
Created attachment 95732 [details]
digikam1.2 initial list of files picture view

This is the contents of the test directory.
Comment 2 Gerard Dirkse 2015-11-25 14:52:38 UTC
Created attachment 95733 [details]
digikambug1.1

Initial file list
Comment 3 Gerard Dirkse 2015-11-25 14:54:37 UTC
Created attachment 95734 [details]
digikam1.3

Digikams initial view of the album, one is missing.
Comment 4 Gerard Dirkse 2015-11-25 14:55:20 UTC
Created attachment 95735 [details]
digikambug1.4

Rename the pictures
Comment 5 Gerard Dirkse 2015-11-25 14:56:10 UTC
Created attachment 95736 [details]
digikambug1.5

Result of rename, one disappeared, one missing showed up
Comment 6 Gerard Dirkse 2015-11-25 14:56:47 UTC
Created attachment 95737 [details]
digikam1.dbg

Debug log 1 from kdebugdialog
Comment 7 Gerard Dirkse 2015-11-25 14:57:24 UTC
Created attachment 95738 [details]
digikam2.dbg

digikam debug log 2 from kdebugdialog.
Comment 8 Gerard Dirkse 2015-11-25 14:57:54 UTC
Created attachment 95739 [details]
digikam1.log

MYSQL log from this test run.
Comment 9 Richard Mortimer 2015-11-26 14:32:25 UTC
We need to make sure that the MySQL schema for text fields specifies a collation value that compares strings in a case sensitive manner.

Useful background information at http://dev.mysql.com/doc/refman/5.7/en/case-sensitivity.html

I suspect that we should be using the utf8_bin collation.

http://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html
Comment 10 swatilodha27 2016-07-03 08:02:08 UTC
 MySQL has been made case sensitive. It now uses utf8_bin collation.

Try digiKam 5.0.0 version.
Comment 11 swatilodha27 2016-07-03 08:42:57 UTC
This file is closed now. Feel free to reopen, with necessary updates, if you still face the issue.