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 <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2023-01-20 20:18:55 +04:00
parent 7eec8c18cd
commit 6d482de7b8
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889
2 changed files with 1 additions and 9 deletions

View File

@ -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
}

View File

@ -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':