Merge #16211 - Fix #16076 Cannot edit or export TIMESTAMP column with default CURRENT_TIMESTAMP in MySQL >= 8.0.13

Pull-request: #16211
Fix: #16076

Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2020-06-22 19:58:09 +02:00
commit 92e15366b9
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889
2 changed files with 2 additions and 2 deletions

View File

@ -1670,7 +1670,7 @@ class InsertEdit
$readOnly
);
if (preg_match('/(VIRTUAL|PERSISTENT|GENERATED)/', $column['Extra']) && $column['Extra'] !== 'DEFAULT_GENERATED') {
if (preg_match('/(VIRTUAL|PERSISTENT|GENERATED)/', $column['Extra']) && strpos($column['Extra'], 'DEFAULT_GENERATED') === false) {
$html_output .= '<input type="hidden" name="virtual'
. $column_name_appendix . '" value="1">';
}

View File

@ -1810,7 +1810,7 @@ class Table
if ((
strpos($column['Extra'], 'GENERATED') === false
&& strpos($column['Extra'], 'VIRTUAL') === false
) || $column['Extra'] === 'DEFAULT_GENERATED') {
) || strpos($column['Extra'], 'DEFAULT_GENERATED') !== false) {
$ret[] = $value;
}
}