1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-10 00:28:34 +02:00

MySQL: Display default values of binary columns

This commit is contained in:
Jakub Vrana
2025-03-11 19:25:42 +01:00
parent c082136558
commit c2d29a6937
2 changed files with 6 additions and 0 deletions

View File

@@ -612,6 +612,11 @@ if (!defined('Adminer\DRIVER')) {
return stripslashes(str_replace("''", "'", $match[1]));
}, $default);
}
if (!$maria && preg_match('~binary~', $match_type[1]) && preg_match('~^0x(\w*)$~', $default, $match)) {
$default = preg_replace_callback('~..~', function ($match) {
return chr(hexdec($match[0]));
}, $match[1]);
}
$return[$field] = array(
"field" => $field,
"full_type" => $type,

View File

@@ -1,4 +1,5 @@
Adminer dev:
MySQL: Display default values of binary columns
Adminer 5.0.4 (released 2025-03-11):
Compile: Fix shortening in private methods (regression from 5.0.3)