MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Georgi Kodinov Date:December 15 2009 8:55am
Subject:bzr commit into mysql-5.1 branch (joro:3242) Bug#49489
View as plain text  
#At file:///Users/kgeorge/mysql/work/merge-5.1-pe-stage/ based on revid:joro@stripped

 3242 Georgi Kodinov	2009-12-15
      Bug#49489: Uninitialized cache led to a wrong result.
      
      Merge the fix from 5.1-bugteam to 5.1-main

    modified:
      mysql-test/r/select.result
      mysql-test/t/select.test
      sql/item_cmpfunc.cc
=== modified file 'mysql-test/r/select.result'
--- a/mysql-test/r/select.result	2009-12-08 09:26:11 +0000
+++ b/mysql-test/r/select.result	2009-12-15 08:54:53 +0000
@@ -4609,4 +4609,14 @@ HAVING v <= 't' 
 ORDER BY pk;
 v
 DROP TABLE t1;
+#
+# Bug#49489 Uninitialized cache led to a wrong result.
+#
+CREATE TABLE t1(c1 DOUBLE(5,4));
+INSERT INTO t1 VALUES (9.1234);
+SELECT * FROM t1 WHERE c1 < 9.12345;
+c1
+9.1234
+DROP TABLE t1;
+# End of test for bug#49489.
 End of 5.1 tests

=== modified file 'mysql-test/t/select.test'
--- a/mysql-test/t/select.test	2009-12-08 09:26:11 +0000
+++ b/mysql-test/t/select.test	2009-12-15 08:54:53 +0000
@@ -3964,4 +3964,13 @@ ORDER BY pk;
 
 DROP TABLE t1;
 
+--echo #
+--echo # Bug#49489 Uninitialized cache led to a wrong result.
+--echo #
+CREATE TABLE t1(c1 DOUBLE(5,4));
+INSERT INTO t1 VALUES (9.1234);
+SELECT * FROM t1 WHERE c1 < 9.12345;
+DROP TABLE t1;
+--echo # End of test for bug#49489.
+
 --echo End of 5.1 tests

=== modified file 'sql/item_cmpfunc.cc'
--- a/sql/item_cmpfunc.cc	2009-12-15 08:37:10 +0000
+++ b/sql/item_cmpfunc.cc	2009-12-15 08:54:53 +0000
@@ -1031,7 +1031,7 @@ Item** Arg_comparator::cache_converted_c
       (*value)->const_item() && type != (*value)->result_type())
   {
     Item_cache *cache= Item_cache::get_cache(*value, type);
-    cache->store(*value);
+    cache->setup(*value);
     *cache_item= cache;
     return cache_item;
   }


Attachment: [text/bzr-bundle] bzr/joro@sun.com-20091215085453-zrmxqdap0ezzxfqn.bundle
Thread
bzr commit into mysql-5.1 branch (joro:3242) Bug#49489Georgi Kodinov15 Dec