[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_3_5RC1-5939-gbcc372b

Michal Čihař nijel at users.sourceforge.net
Mon Jul 26 15:52:25 CEST 2010


The branch, master has been updated
       via  bcc372b5c5118493d78818011ef0ec3a273b4821 (commit)
       via  049fc7fef7548c2ba603196937c6dcaf9ff9bf00 (commit)
       via  83d458aa05286397198bcd0674eeeb610849ef5a (commit)
      from  15dfc4879ec8f8273bdec711597e118bd938653c (commit)


- Log -----------------------------------------------------------------
commit bcc372b5c5118493d78818011ef0ec3a273b4821
Merge: 15dfc4879ec8f8273bdec711597e118bd938653c 049fc7fef7548c2ba603196937c6dcaf9ff9bf00
Author: Michal Čihař <mcihar at novell.com>
Date:   Mon Jul 26 15:51:48 2010 +0200

    Merge branch 'QA_3_3'

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                        |    3 ++-
 libraries/common.lib.php         |    3 ++-
 libraries/dbi/mysqli.dbi.lib.php |    4 ++--
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index dfdf92f..3adda53 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -97,8 +97,9 @@ $Id$
 - [interface] Better formatting for SQL validator results.
 
 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
+- 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 1010b2c..86e49a9 100644
--- a/libraries/common.lib.php
+++ b/libraries/common.lib.php
@@ -2105,7 +2105,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
diff --git a/libraries/dbi/mysqli.dbi.lib.php b/libraries/dbi/mysqli.dbi.lib.php
index de90cac..ad6d545 100644
--- a/libraries/dbi/mysqli.dbi.lib.php
+++ b/libraries/dbi/mysqli.dbi.lib.php
@@ -488,8 +488,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';


hooks/post-receive
-- 
phpMyAdmin




More information about the Git mailing list