This commit is contained in:
Marc Delisle
2004-10-11 10:52:22 +00:00
parent 712743d97d
commit fc085a6b91
2 changed files with 10 additions and 2 deletions

View File

@@ -7,6 +7,8 @@ $Source$
2004-10-11 Marc Delisle <lem9@users.sourceforge.net>
* Documentation.html: typos and XHTML validity, thanks to Cedric Corazza
* libraries/export/sql.php: bug #1039639: under mysqli, some field types
were wrongly exported as binary
2004-10-11 Michal Čihař <michal@cihar.com>
* tbl_query_box.php: Don't try to replace %t and %f when table name is empty.

View File

@@ -528,8 +528,14 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query)
$values[] = $row[$j];
// a binary field
// Note: with mysqli, under MySQL 4.1.3, we get the flag
// "binary" for a datetime (I don't know why)
} else if (stristr($field_flags[$j], 'BINARY') && isset($GLOBALS['hexforbinary']) && $fields_meta[$j]->type != 'datetime') {
// "binary" for those field types (I don't know why)
} else if (stristr($field_flags[$j], 'BINARY')
&& isset($GLOBALS['hexforbinary'])
&& $fields_meta[$j]->type != 'datetime'
&& $fields_meta[$j]->type != 'date'
&& $fields_meta[$j]->type != 'time'
&& $fields_meta[$j]->type != 'timestamp'
) {
// empty blobs need to be different, but '0' is also empty :-(
if (empty($row[$j]) && $row[$j] != '0') {
$values[] = '\'\'';