From d448add28e369b05eb5e6edd9a821e2aad4f2d38 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Wed, 29 May 2013 17:23:35 -0400 Subject: [PATCH] bug #3579 NOW() function incorrectly selected (partial regression) --- ChangeLog | 1 + libraries/Util.class.php | 6 +----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index b3ade7e50e..dd68d236da 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,7 @@ phpMyAdmin - ChangeLog - bug #3912 Exporting row selection, resulted by ORDER BY query - bug #3957 Cookies must be enabled past this point - bug #3956 "Browse foreign values" search filter / page selector not working +- bug #3579 NOW() function incorrectly selected (partial regression) 4.0.2.0 (2013-05-24) - bug #3902 Cannot browse when table name contains keyword "call" diff --git a/libraries/Util.class.php b/libraries/Util.class.php index 0c844946cc..3468776a44 100644 --- a/libraries/Util.class.php +++ b/libraries/Util.class.php @@ -3743,6 +3743,7 @@ class PMA_Util // and the column does not have the // ON UPDATE DEFAULT TIMESTAMP attribute. if (($field['True_Type'] == 'timestamp') + && $field['first_timestamp'] && empty($field['Default']) && empty($data) && ! isset($analyzed_sql_field_array['on_update_current_timestamp']) @@ -3751,11 +3752,6 @@ class PMA_Util $default_function = $cfg['DefaultFunctions']['first_timestamp']; } - // Default for first timestamp field - if ($field['first_timestamp']) { - $default_function = $cfg['DefaultFunctions']['first_timestamp']; - } - // For primary keys of type char(36) or varchar(36) UUID if the default // function // Only applies to insert mode, as it would silently trash data on updates.