Skip to content

Commit

Permalink
Simplify supports_skip_locked? in shared MySQL adapter
Browse files Browse the repository at this point in the history
Also, update CHANGELOG.
  • Loading branch information
jeremyevans committed Apr 5, 2024
1 parent 917d0e6 commit 2dd31a7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
=== master

* Support Dataset#skip_locked on MariaDB 10.6+ (simi) (#2150)

* Avoid allocating datasets in cases where the returned dataset would be the same as the receiver (jeremyevans)

* Add provenance dataset extension, which includes comments in queries showing how and where the dataset was built (jeremyevans)
Expand Down
2 changes: 1 addition & 1 deletion lib/sequel/adapters/shared/mysql.rb
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,7 @@ def supports_returning?(type)

# MySQL 8+ and MariaDB 10.6+ support SKIP LOCKED.
def supports_skip_locked?
(!db.mariadb? && db.server_version >= 80000) || (db.mariadb? && db.server_version >= 100600)
db.server_version >= (db.mariadb? ? 100600 : 80000)
end

# Check the database setting for whether fractional timestamps
Expand Down

0 comments on commit 2dd31a7

Please sign in to comment.