Skip to content

Purge: SQL error is displayed when the photo ID of a file is missing #2540

Closed

Description

@centralhardware

1. What is not working as documented?

sql error in log

ERRO[2022-07-22T14:46:13Z] files: Error 1052: Column 'photo_uid' in where clause is ambiguous (regenerate photo_taken_at)

2. How can we reproduce it?

Steps to reproduce the behavior:

run purge command

3. What behavior do you expect?

no sql error

4. What could be the cause of your problem?

5. Can you provide us with example files for testing, error logs, or screenshots?

https://gist.github.com/centralhardware/db6dfd610500784a8ea3c9ed9e333a06

6. Which software versions do you use?

(a) PhotoPrism Architecture & Build Number: lastest docker - 220629-5d7448d2-Linux-AMD64

(b) Database Type & Version: Version: '10.7.4-MariaDB-1:10.7.4+maria~focal'

7. On what kind of device is PhotoPrism installed?

8. Do you use a Reverse Proxy, Firewall, VPN, or CDN?

If yes, please specify type and version. You can skip this if you are reporting a completely unrelated issue.

Activity

  1. lastzero commented on Jul 22, 2022

    @lastzero
    Member

    In fact, this should never happen, since it means that the numeric photo ID is 0. It was implemented only as a theoretical case. Any idea how the index could have been corrupted? I don't see this when running purge. You will get a fix for this particular situation shortly.

  2. changed the title [-]purge: sql error[/-] [+]Purge: SQL error is displayed when the photo ID of a file is missing[/+] on Jul 22, 2022
  3. self-assigned this
    on Jul 22, 2022
  4. lastzero commented on Jul 22, 2022

    @lastzero
    Member

    Started a new preview build, which is available shortly. Happy testing! 🤗

  5. lastzero commented on Jul 22, 2022

    @lastzero
    Member

    Never mind, I found it: func SetPhotoPrimary(photoUID, fileUID string) in internal/query/files.go. Good catch!

  6. centralhardware commented on Jul 23, 2022

    @centralhardware
    Author

    can't reproduce, thanks

  7. added
    testedChanges have been tested successfully
    and removed
    please-testReady for manual testing & feedback
    on Jul 23, 2022
  8. moved this to Released 🌈 in Roadmap 🚀✨on Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

releasedAvailable in a stable releasetestedChanges have been tested successfully

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions