Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Error when 2+ images are uploaded with same tag #147

Open
DakuTree opened this Issue · 1 comment

2 participants

@DakuTree
Collaborator
Internal Error
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'anytag' for key 'tag'
Query: INSERT INTO tags(tag) VALUES (:tag)

Keep having this error occur when two files are uploaded at same time with each sharing a tag.
Example: 'Image1: "blah" & Image2: "blah" uploaded at same time, error occurs.'
Example: 'Image1: "blah" & Image2: "notblah" uploaded at same time, no error.'
Example: 'Image1: "blah notblah" & Image2: "notblah moo" uploaded at same time, error occurs.'

@HungryFeline

By the way: The problem still exists. If you're working with the bookmarklet, it happens a lot if you accidentally click it twice. Also the script exits after the message which leaves the transloaded file in the tempfolder.

@HungryFeline HungryFeline referenced this issue from a commit
HungryFeline Fix for #147
From the MySQL manual: "If you use the IGNORE keyword, errors that occur while executing the INSERT statement are ignored. For example, without IGNORE, a row that duplicates an existing UNIQUE index or PRIMARY KEY value in the table causes a duplicate-key error and the statement is aborted. With IGNORE, the row still is not inserted, but no error occurs. Ignored errors may generate warnings instead, although duplicate-key errors do not."

*** NOT TESTED WITH PGSQL ***
44a52ef
@DakuTree DakuTree added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.