Skip to content

Commit

Permalink
Use insert ignore for MySql
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas-krecan committed Dec 29, 2022
1 parent bd3d1d7 commit 8a4ae7a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class MySqlServerTimeStatementsSource extends SqlStatementsSource {

@Override
String getInsertStatement() {
return "INSERT INTO " + tableName() + "(" + name() + ", " + lockUntil() + ", " + lockedAt() + ", " + lockedBy() + ") VALUES(:name, " + lockAtMostFor + ", " + now + ", :lockedBy)";
return "INSERT IGNORE INTO " + tableName() + "(" + name() + ", " + lockUntil() + ", " + lockedAt() + ", " + lockedBy() + ") VALUES(:name, " + lockAtMostFor + ", " + now + ", :lockedBy)";
}

@Override
Expand Down

0 comments on commit 8a4ae7a

Please sign in to comment.