Skip to content

Commit

Permalink
Merge branch 'QA_4_7'
Browse files Browse the repository at this point in the history
  • Loading branch information
nijel committed Mar 20, 2017
2 parents 1584708 + 211541f commit 2c48b61
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ phpMyAdmin - ChangeLog
- issue #12660 Delete only phpMyAdmin cookies on upgrade
- issue #13088 Fixed editing of rows with text primary key
- issue #13092 Do not try to sync favorite tables if configuration storage is not enabled
- issue #13105 Fixed changing attribute for virtual field

4.6.6 (2017-01-23)
- issue #12759 Fix Notice regarding 'Undefined index: old_usergroup'
Expand Down
22 changes: 11 additions & 11 deletions libraries/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -371,21 +371,21 @@ static function generateFieldSpec($name, $type, $length = '',
// so we can't just convert it to integer
$query .= '(' . $length . ')';
}
if ($attribute != '') {
$query .= ' ' . $attribute;

if ($is_timestamp
&& preg_match('/TIMESTAMP/i', $attribute)
&& strlen($length) !== 0
&& $length !== 0
) {
$query .= '(' . $length . ')';
}
}

if ($virtuality) {
$query .= ' AS (' . $expression . ') ' . $virtuality;
} else {
if ($attribute != '') {
$query .= ' ' . $attribute;

if ($is_timestamp
&& preg_match('/TIMESTAMP/i', $attribute)
&& strlen($length) !== 0
&& $length !== 0
) {
$query .= '(' . $length . ')';
}
}

$matches = preg_match(
'@^(TINYTEXT|TEXT|MEDIUMTEXT|LONGTEXT|VARCHAR|CHAR|ENUM|SET)$@i',
Expand Down

0 comments on commit 2c48b61

Please sign in to comment.