From d9c061cdc95fa1e760076c82d5fa4d611fb5ace2 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Mon, 2 Aug 2004 01:05:39 +0000 Subject: [PATCH] bug 994942 --- ChangeLog | 2 ++ libraries/export/sql.php | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ba7e91e75..95f340860 100755 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,8 @@ $Source$ * tbl_move_copy.php: bug 995098, cannot copy table data only * libraries/dbi/mysqli.dbi.lib.php: use faster AND comparison for flags, as suggested by Michal + * libraries/export/sql.php: workaround for datetime export because + mysqli under MySQL 4.1.3 reports a datetime as binary 2004-07-31 Alexander M. Turek * tbl_change.php, tbl_replace.php, libraries/relation.lib.php: Small diff --git a/libraries/export/sql.php b/libraries/export/sql.php index a0cc47de8..e2b91142a 100644 --- a/libraries/export/sql.php +++ b/libraries/export/sql.php @@ -553,7 +553,9 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) } elseif ($fields_meta[$j]->numeric) { $values[] = $row[$j]; // a binary field - } else if (stristr($field_flags[$j], 'BINARY') && isset($GLOBALS['hexforbinary'])) { + // 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') { $values[] = '0x' . bin2hex($row[$j]); // something else -> treat as a string } else {