bug 1926357, last part of the fix

This commit is contained in:
Marc Delisle
2008-04-06 12:52:53 +00:00
parent 5e3d688591
commit e8c15e7e85
3 changed files with 9 additions and 1 deletions

View File

@@ -66,7 +66,7 @@ danbarry
thanks to Tony Marston - tonymarston
- bug #1918531 [compatibility] Navigation isn't w3.org valid
thanks to Michael Keck - mkkeck
- bug #1926357 [data] BIT defaults displayed incorrectly (todo: export?)
- bug #1926357 [data] BIT defaults displayed incorrectly
- patch #1930057 [auth] colon in password prevents HTTP login on CGI/IIS,
thanks to Jürgen Wind - windkiel
- patch #1929553 [lang] Don't output BOM character in Swedish language file,

View File

@@ -499,6 +499,7 @@ function PMA_DBI_get_fields_meta($result)
// https://sf.net/tracker/?func=detail&aid=1532111&group_id=23067&atid=377408
//$typeAr[MYSQLI_TYPE_CHAR] = 'string';
$typeAr[MYSQLI_TYPE_GEOMETRY] = 'unknown';
$typeAr[MYSQLI_TYPE_BIT] = 'bit';
$fields = mysqli_fetch_fields($result);

View File

@@ -488,6 +488,10 @@ function PMA_getTableDef($db, $table, $crlf, $error_url, $show_dates = false)
// results below. Nonetheless, we got 2 user reports about this
// (see bug 1562533) so I remove the unbuffered mode.
//$result = PMA_DBI_query('SHOW CREATE TABLE ' . PMA_backquote($db) . '.' . PMA_backquote($table), null, PMA_DBI_QUERY_UNBUFFERED);
//
// Note: SHOW CREATE TABLE, at least in MySQL 5.1.23, does not
// produce a displayable result for the default value of a BIT
// field, nor does the mysqldump command. See MySQL bug 35796
$result = PMA_DBI_query('SHOW CREATE TABLE ' . PMA_backquote($db) . '.' . PMA_backquote($table));
if ($result != FALSE && ($row = PMA_DBI_fetch_row($result))) {
$create_query = $row[1];
@@ -900,6 +904,9 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query)
} else {
$values[] = '0x' . bin2hex($row[$j]);
}
// detection of 'bit' works only on mysqli extension
} elseif ($fields_meta[$j]->type == 'bit') {
$values[] = "b'" . PMA_sqlAddslashes(PMA_printable_bit_value($row[$j], $fields_meta[$j]->length)) . "'";
// something else -> treat as a string
} else {
$values[] = '\'' . str_replace($search, $replace, PMA_sqlAddslashes($row[$j])) . '\'';