MySQL: Skip editing generated columns
This commit is contained in:
parent
92d443dac0
commit
00d36efcf1
|
@ -555,6 +555,7 @@ if (!defined("DRIVER")) {
|
||||||
"privileges" => array_flip(preg_split('~, *~', $row["Privileges"])),
|
"privileges" => array_flip(preg_split('~, *~', $row["Privileges"])),
|
||||||
"comment" => $row["Comment"],
|
"comment" => $row["Comment"],
|
||||||
"primary" => ($row["Key"] == "PRI"),
|
"primary" => ($row["Key"] == "PRI"),
|
||||||
|
"generated" => preg_match('~ GENERATED$~', $row["Extra"]),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return $return;
|
return $return;
|
||||||
|
|
|
@ -4,7 +4,7 @@ $fields = fields($TABLE);
|
||||||
$where = (isset($_GET["select"]) ? ($_POST["check"] && count($_POST["check"]) == 1 ? where_check($_POST["check"][0], $fields) : "") : where($_GET, $fields));
|
$where = (isset($_GET["select"]) ? ($_POST["check"] && count($_POST["check"]) == 1 ? where_check($_POST["check"][0], $fields) : "") : where($_GET, $fields));
|
||||||
$update = (isset($_GET["select"]) ? $_POST["edit"] : $where);
|
$update = (isset($_GET["select"]) ? $_POST["edit"] : $where);
|
||||||
foreach ($fields as $name => $field) {
|
foreach ($fields as $name => $field) {
|
||||||
if (!isset($field["privileges"][$update ? "update" : "insert"]) || $adminer->fieldName($field) == "") {
|
if (!isset($field["privileges"][$update ? "update" : "insert"]) || $adminer->fieldName($field) == "" || $field["generated"]) {
|
||||||
unset($fields[$name]);
|
unset($fields[$name]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
Adminer 4.7.3-dev:
|
||||||
|
MySQL: Skip editing generated columns
|
||||||
|
|
||||||
Adminer 4.7.2 (released 2019-07-18):
|
Adminer 4.7.2 (released 2019-07-18):
|
||||||
Do not attempt logging in without password (bug #676)
|
Do not attempt logging in without password (bug #676)
|
||||||
Stretch footer over the whole table width (bug #624)
|
Stretch footer over the whole table width (bug #624)
|
||||||
|
|
Loading…
Reference in a new issue