Skip to content

Commit

Permalink
query.empty() shouldn't add LIMIT 1 if query is marked as forUpdate() #…
Browse files Browse the repository at this point in the history
  • Loading branch information
Tapac committed Dec 14, 2019
1 parent f09852e commit b7e6111
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ open class Query(set: FieldSet, where: Op<Boolean>?): SizedIterable<ResultRow>,
override fun empty(): Boolean {
val oldLimit = limit
try {
if (isForUpdate())
if (!isForUpdate())
limit = 1
return !transaction.exec(this)!!.next()
} finally {
Expand Down

0 comments on commit b7e6111

Please sign in to comment.