Project

General

Profile

Bug #9958

Tags with Apostrophes

Added by Steven Fosdick almost 5 years ago. Updated over 4 years ago.

Status:
Fixed
Priority:
Low
Assignee:
Category:
Lighttable
Start date:
05/17/2014
Due date:
% Done:

100%

Affected Version:
git development version
System:
all
bitness:
64-bit
hardware architecture:
amd64/x86

Description

When a tag contains an apostrophe is is not possible to assign it to a picture. Checking the output in the terminal window in which darktable was started shows a syntax error.

My hypothesis is the syntax error is caused because the keyword is put literally into the SQL statement between a pair of single quotes (apostrophes) and thus the apostrophe is seen by the SQL parser as terminating the expression.

I attach a patch to fix this which works by instead binding the keyword to the SQL statement.

I discovered this bug in the GIT version obtained by git clone git://github.com/darktable-org/darktable.git
I am running on Arch Linux but I would expect this bug to apply to any system.

tags.patch Magnifier - Patch (1.18 KB) Steven Fosdick, 05/17/2014 03:48 PM

tags2.patch Magnifier (3.16 KB) Steven Fosdick, 05/17/2014 04:42 PM

History

#1 Updated by Steven Fosdick almost 5 years ago

Ignore the last patch - it forgets to include the '%' characters in the LIKE expression.

I attach a revised patch. This also fixes other cases in the same module where is a string it written into an SQL statement by binding the string instead.

#2 Updated by Roman Lebedev almost 5 years ago

  • Assignee set to Tobias Ellinghaus

houz: since db is mostly your area of expertise, maybe you can take a look?

#3 Updated by Roman Lebedev over 4 years ago

  • Target version set to Candidate for next major release
  • Affected Version changed from git stable branch to git development version
  • Status changed from New to Fixed
  • Assignee changed from Tobias Ellinghaus to Roman Lebedev
  • % Done changed from 0 to 100

Should be fixed now.
Thanks for reporting it.

Also available in: Atom PDF