From: Jakub Vrana Date: Tue, 11 Mar 2025 19:25:52 +0000 (+0100) Subject: MySQL: Convert binary default value to hex when editing X-Git-Tag: v5.0.5~59 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=dc2e945aef36d43146630bde6ee5275c2bf8912f;p=adminer.git MySQL: Convert binary default value to hex when editing --- diff --git a/adminer/include/functions.inc.php b/adminer/include/functions.inc.php index aa3dc034..8b3aa84d 100644 --- a/adminer/include/functions.inc.php +++ b/adminer/include/functions.inc.php @@ -1436,6 +1436,9 @@ function edit_form($table, $fields, $row, $update) { if ($field["type"] == "bit" && preg_match("~^b'([01]*)'\$~", $default, $regs)) { $default = $regs[1]; } + if (JUSH == "sql" && preg_match('~binary~', $field["type"])) { + $default = bin2hex($default); // same as UNHEX + } } $value = ($row !== null ? ($row[$name] != "" && JUSH == "sql" && preg_match("~enum|set~", $field["type"]) && is_array($row[$name])