Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Negative EXIF ratings cause DB malfunction #409

Closed
desertwitch opened this issue Jan 18, 2022 · 2 comments
Closed

Negative EXIF ratings cause DB malfunction #409

desertwitch opened this issue Jan 18, 2022 · 2 comments

Comments

@desertwitch
Copy link
Contributor

desertwitch commented Jan 18, 2022

Negative EXIF ratings such as -1, which are used by few rare clients for marking images for deletion, cause folder indexing queries to fail because tinyint database field does not tolerate negative values, only positive values from 0 to 255. As part of this problem the image with negative EXIF rating and all following images of that folder are not indexed into the DB.

driverError: Error: ER_WARN_DATA_OUT_OF_RANGE: Out of range value for column 'metadataRating' at row 1

  • Solution A: Change field type in database from tinyint (1 byte) to smallint (2 byte) to allow negative ratings too and stay true to actual rating of image.
  • Solution B: Always override negative ratings to 0 because negative ratings are useless, not staying true to actual rating of image - see my pull request.
@bpatrik
Copy link
Owner

bpatrik commented Jan 18, 2022 via email

@desertwitch
Copy link
Contributor Author

fixed #410

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants