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:
parent
7eec8c18cd
commit
6d482de7b8
@ -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
|
||||
}
|
||||
|
||||
|
||||
@ -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':
|
||||
|
||||
Loading…
Reference in New Issue
Block a user