From 6d482de7b8fd79333f3cdce1794e3f69c24600eb Mon Sep 17 00:00:00 2001 From: William Desportes Date: Fri, 20 Jan 2023 20:18:55 +0400 Subject: [PATCH] Add back UUID and UUID_SHORT to functions on MySQL and all MariaDB versions Ref: https://github.com/phpmyadmin/phpmyadmin/pull/17767 It was a mistake to remove the UUID functions, they are not the UUID type Signed-off-by: William Desportes --- libraries/classes/Query/Compatibility.php | 1 + libraries/classes/Types.php | 9 --------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/libraries/classes/Query/Compatibility.php b/libraries/classes/Query/Compatibility.php index b671029222..5b80d52894 100644 --- a/libraries/classes/Query/Compatibility.php +++ b/libraries/classes/Query/Compatibility.php @@ -207,6 +207,7 @@ class Compatibility */ public static function isUUIDSupported(DatabaseInterface $dbi): bool { + // @see: https://mariadb.com/kb/en/mariadb-1070-release-notes/#uuid return $dbi->isMariaDB() && $dbi->getVersion() >= 100700; // 10.7.0 } diff --git a/libraries/classes/Types.php b/libraries/classes/Types.php index ab15d7a7ed..1ebc27930c 100644 --- a/libraries/classes/Types.php +++ b/libraries/classes/Types.php @@ -529,7 +529,6 @@ class Types { $isMariaDB = $this->dbi->isMariaDB(); $serverVersion = $this->dbi->getVersion(); - $isUUIDSupported = Compatibility::isUUIDSupported($this->dbi); switch ($class) { case 'CHAR': @@ -574,10 +573,6 @@ class Types $ret = array_diff($ret, ['INET6_NTOA']); } - if (! $isUUIDSupported) { - $ret = array_diff($ret, ['UUID']); - } - return array_values($ret); case 'DATE': @@ -659,10 +654,6 @@ class Types $ret = array_diff($ret, ['INET6_ATON']); } - if (! $isUUIDSupported) { - $ret = array_diff($ret, ['UUID_SHORT']); - } - return array_values($ret); case 'SPATIAL':