diff --git a/ChangeLog b/ChangeLog index afeef65b6..d2e33ee2f 100755 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,8 @@ $Source$ 2004-10-11 Marc Delisle * 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ř * tbl_query_box.php: Don't try to replace %t and %f when table name is empty. diff --git a/libraries/export/sql.php b/libraries/export/sql.php index b09ade4fb..d159a0572 100644 --- a/libraries/export/sql.php +++ b/libraries/export/sql.php @@ -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[] = '\'\'';