From 049fc7fef7548c2ba603196937c6dcaf9ff9bf00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 26 Jul 2010 15:51:26 +0200 Subject: [PATCH] bug #3031705 [core] Fix generating condition for real numbers by comparing them to string. --- ChangeLog | 2 ++ libraries/common.lib.php | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5d318214a..748e243d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,8 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA 3.3.6.0 (not yet released) - bug #3033063 [core] Navi gets wrong db name +- bug #3031705 [core] Fix generating condition for real numbers by comparing + them to string. 3.3.5.0 (not yet released) - patch #2932113 [information_schema] Slow export when having lots of diff --git a/libraries/common.lib.php b/libraries/common.lib.php index c62d51885..811859829 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -2025,7 +2025,8 @@ function PMA_getUniqueCondition($handle, $fields_cnt, $fields_meta, $row, $force $condition .= 'IS NULL AND'; } else { // timestamp is numeric on some MySQL 4.1 - if ($meta->numeric && $meta->type != 'timestamp') { + // for real we use CONCAT above and it should compare to string + if ($meta->numeric && $meta->type != 'timestamp' && $meta->type != 'real') { $condition .= '= ' . $row[$i] . ' AND'; } elseif (($meta->type == 'blob' || $meta->type == 'string') // hexify only if this is a true not empty BLOB or a BINARY