From a49827a0849e1028ff21e22171a20273e1918414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 6 Dec 2005 14:10:37 +0000 Subject: [PATCH] Do not add BINARY types multiple times (bug #1374457). --- ChangeLog | 2 ++ libraries/database_interface.lib.php | 6 ++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index a22765ebb..abed501a3 100755 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,8 @@ $Source$ 2005-12-06 Michal Čihař * libraries/config.default.php: Modify default export configuration (RFE #1373891). + * libraries/database_interface.lib.php: Do not add BINARY types multiple + times (bug #1374457). 2005-12-06 Sebastian Mendel * libraries/common.lib.php: wrong quote diff --git a/libraries/database_interface.lib.php b/libraries/database_interface.lib.php index f1f245b1d..845f31b69 100644 --- a/libraries/database_interface.lib.php +++ b/libraries/database_interface.lib.php @@ -572,12 +572,10 @@ function PMA_DBI_postConnect($link, $is_controluser = FALSE) { $charset_connection = PMA_DBI_get_variable('character_set_connection', PMA_DBI_GETVAR_SESSION, $link); } - // Add some field types to the list - // (we pass twice here; feel free to code something better :) - if (!defined('PMA_ADDED_FIELD_TYPES')) { + // Add some field types to the list, this needs to be done once per session! + if ($GLOBALS['cfg']['ColumnTypes'][count($GLOBALS['cfg']['ColumnTypes']) - 1] != 'VARBINARY') { $GLOBALS['cfg']['ColumnTypes'][] = 'BINARY'; $GLOBALS['cfg']['ColumnTypes'][] = 'VARBINARY'; - define('PMA_ADDED_FIELD_TYPES',1); } } else {