diff --git a/CHANGELOG b/CHANGELOG index 98999d755..41e9d6acf 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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) diff --git a/lib/sequel/adapters/shared/mysql.rb b/lib/sequel/adapters/shared/mysql.rb index 966d8e1e8..57414faa4 100644 --- a/lib/sequel/adapters/shared/mysql.rb +++ b/lib/sequel/adapters/shared/mysql.rb @@ -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