Merge remote-tracking branch 'origin/QA_4_3' into QA_4_3

This commit is contained in:
Weblate 2015-01-27 09:54:52 +01:00
commit 6d14205992
4 changed files with 8 additions and 3 deletions

View File

@ -5,6 +5,7 @@ phpMyAdmin - ChangeLog
- bug #4728 Incorrect headings in routine editor
- bug #4730 Notice while browsing tables when phpmyadmin pma database exists, but not all the tables
- bug #4729 Display original field when using "Relational display column" option and display column is empty
- bug #4734 Default values for binary fields do not support binary values
4.3.8.0 (2015-01-24)
- bug Undefined constant PMA_DRIZZLE

View File

@ -493,6 +493,8 @@ class PMA_Table
$query .= ' DEFAULT \''
. PMA_Util::sqlAddSlashes($default_value) . '\'';
}
} elseif ($type == 'BINARY' || $type == 'VARBINARY') {
$query .= ' DEFAULT 0x' . $default_value;
} else {
$query .= ' DEFAULT \''
. PMA_Util::sqlAddSlashes($default_value) . '\'';

View File

@ -1712,6 +1712,8 @@ function PMA_getSpecialCharsAndBackupFieldForInsertingMode(
|| $trueType == 'time'
) {
$special_chars = PMA_Util::addMicroseconds($column['Default']);
} elseif ($trueType == 'binary' || $trueType == 'varbinary') {
$special_chars = bin2hex($column['Default']);
} else {
$special_chars = htmlspecialchars($column['Default']);
}

View File

@ -1120,11 +1120,11 @@ function PMA_getHtmlForColumnDefault($columnNumber, $ci, $ci_offset, $type_upper
&& isset($columnMeta['Default'])
) {
$columnMeta['Default'] = '';
}
if ($type_upper == 'BIT') {
} elseif ($type_upper == 'BIT') {
$columnMeta['DefaultValue']
= PMA_Util::convertBitDefaultValue($columnMeta['DefaultValue']);
} elseif ($type_upper == 'BINARY' || $type_upper == 'VARBINARY') {
$columnMeta['DefaultValue'] = bin2hex($columnMeta['DefaultValue']);
}
$html = '<select name="field_default_type[' . $columnNumber