From 83d458aa05286397198bcd0674eeeb610849ef5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 26 Jul 2010 15:45:36 +0200 Subject: [PATCH 1/2] Revert "bug #3031705 [core] Do not use CONCAT for DECIMAL fields." This reverts commit ef500cd23fd863e62bf810537776b45a4ed76c34. We probably need to use CONCAT still, just the other side should be converted to string as well. --- ChangeLog | 1 - libraries/dbi/mysqli.dbi.lib.php | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index d7cb453b0..5d318214a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,7 +6,6 @@ $Id$ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyAdmin/ChangeLog $ 3.3.6.0 (not yet released) -- bug #3031705 [core] Do not use CONCAT for DECIMAL fields. - bug #3033063 [core] Navi gets wrong db name 3.3.5.0 (not yet released) diff --git a/libraries/dbi/mysqli.dbi.lib.php b/libraries/dbi/mysqli.dbi.lib.php index fd35eb4a9..913bce627 100644 --- a/libraries/dbi/mysqli.dbi.lib.php +++ b/libraries/dbi/mysqli.dbi.lib.php @@ -493,8 +493,8 @@ function PMA_DBI_get_fields_meta($result) { // Build an associative array for a type look up $typeAr = array(); - $typeAr[MYSQLI_TYPE_DECIMAL] = 'decimal'; - $typeAr[MYSQLI_TYPE_NEWDECIMAL] = 'decimal'; + $typeAr[MYSQLI_TYPE_DECIMAL] = 'real'; + $typeAr[MYSQLI_TYPE_NEWDECIMAL] = 'real'; $typeAr[MYSQLI_TYPE_BIT] = 'int'; $typeAr[MYSQLI_TYPE_TINY] = 'int'; $typeAr[MYSQLI_TYPE_SHORT] = 'int'; 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 2/2] 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