bug #1910621 [display] part 1: do not display a TEXT utf8_bin as BLOB (fixed for mysqli extension only)

This commit is contained in:
Marc Delisle
2008-04-28 16:47:31 +00:00
parent cce08fc068
commit c8cfea6fd9
2 changed files with 8 additions and 2 deletions

View File

@@ -54,6 +54,8 @@ danbarry
2.11.7.0 (not yet released)
- bug #1908719 [interface] New field cannot be auto-increment and primary key
- [dbi] Incorrect interpretation for some mysqli field flags
- bug #1910621 [display] part 1: do not display a TEXT utf8_bin as BLOB
(fixed for mysqli extension only)
2.11.6.0 (not yet released)
- bug #1903724 [interface] Displaying of very large queries in error message

View File

@@ -564,7 +564,6 @@ function PMA_DBI_field_name($result, $i)
* @uses MYSQLI_TIMESTAMP_FLAG
* @uses MYSQLI_AUTO_INCREMENT_FLAG
* @uses MYSQLI_TYPE_ENUM
* @uses MYSQLI_BINARY_FLAG
* @uses MYSQLI_ZEROFILL_FLAG
* @uses MYSQLI_UNSIGNED_FLAG
* @uses MYSQLI_BLOB_FLAG
@@ -584,6 +583,7 @@ function PMA_DBI_field_flags($result, $i)
define('MYSQLI_ENUM_FLAG', 256); // see MySQL source include/mysql_com.h
}
$f = mysqli_fetch_field_direct($result, $i);
$charsetnr = $f->charsetnr;
$f = $f->flags;
$flags = '';
if ($f & MYSQLI_UNIQUE_KEY_FLAG) { $flags .= 'unique ';}
@@ -593,7 +593,11 @@ function PMA_DBI_field_flags($result, $i)
if ($f & MYSQLI_TIMESTAMP_FLAG) { $flags .= 'timestamp ';}
if ($f & MYSQLI_AUTO_INCREMENT_FLAG) { $flags .= 'auto_increment ';}
if ($f & MYSQLI_ENUM_FLAG) { $flags .= 'enum ';}
if ($f & MYSQLI_BINARY_FLAG) { $flags .= 'binary ';}
// See http://dev.mysql.com/doc/refman/6.0/en/c-api-datatypes.html:
// to determine the data type, we should not use MYSQLI_BINARY_FLAG
// the binary flag but instead the charsetnr member of the MYSQL_FIELD
// structure. Unfortunately there is no equivalent in the mysql extension.
if (63 == $charsetnr) { $flags .= 'binary ';}
if ($f & MYSQLI_ZEROFILL_FLAG) { $flags .= 'zerofill ';}
if ($f & MYSQLI_UNSIGNED_FLAG) { $flags .= 'unsigned ';}
if ($f & MYSQLI_BLOB_FLAG) { $flags .= 'blob ';}