darktable-org/darktable — pull request #375 by TurboGit (2013-11-26 10:58:12+00:00)
Title: New version of _dt_style_cleanup_multi_instance.

This fixes 2 issues:

- first some SQLite distributions are not compiled to support ORDER BY LIMIT
on an UPDATE statement.

- second, the previous version were not properly working when there was
multiple time the same multi_instance value for a style.

This new version is moving away from an SQL only implementation but will
be in turn easier to understand and maintain. We could revisit this
implementation if SQLite start supporting ROW_NUMBER.