Skip to content

Commit

Permalink
fix: Improve detection of MariaDB when linking against MySQL libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed Oct 8, 2023
1 parent 85bb668 commit 607db4d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion R/dbConnect_MariaDBDriver.R
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,15 @@ dbConnect_MariaDBDriver <- function(
info <- connection_info(ptr)

if (is.null(mysql)) {
mysql <- (info$db.version.int < 100000)
if (info$db.version.int >= 100000) {
mysql <- FALSE
} else if (grepl("^5[.][0-9]+[.][0-9]+-.*mariadb", info$db.version, ignore.case = TRUE)) {
# MariaDB built against MySQL libraries will report a 5.x version number
# https://github.com/OpenNebula/one/issues/3924
mysql <- FALSE
} else {
mysql <- TRUE
}
}

if (isTRUE(mysql)) {
Expand Down

0 comments on commit 607db4d

Please sign in to comment.