MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Alexey Kopytov Date:September 9 2010 2:44pm
Subject:bzr commit into mysql-5.1-bugteam branch (Alexey.Kopytov:3504)
Bug#54190
View as plain text  
#At file:///data/src/bzr/bugteam/mysql-5.1-bugteam/ based on revid:alexey.kopytov@stripped

 3504 Alexey Kopytov	2010-09-09
      Addendum patch for bug #54190.
      
      The patch caused some test failures when merged to 5.5 because,
      unlike 5.1, it utilizes Item_cache_row to actually cache row
      values. The problem was that Item_cache_row::bring_value()
      essentially did nothing. In particular, it did not update its
      null_value, so all Item_cache_row objects were always having
      their null_values set to TRUE. This went unnoticed previously,
      but now when Arg_comparator::compare_row() actually depends on
      the row's null_value to evaluate the comparison, the problem
      has surfaced.
      
      Fixed by calling the underlying item's bring_value() and
      updating null_value in Item_cache_row::bring_value().
      
      Since the problem also exists in 5.1 code (albeit hidden, since
      the relevant code is not used anywhere), the addendum patch is
      against 5.1.

    modified:
      sql/item.cc
=== modified file 'sql/item.cc'
--- a/sql/item.cc	2010-07-20 18:07:36 +0000
+++ b/sql/item.cc	2010-09-09 14:44:53 +0000
@@ -7404,9 +7404,12 @@ bool Item_cache_row::null_inside()
 
 void Item_cache_row::bring_value()
 {
+  if (!example)
+    return;
+  example->bring_value();
+  null_value= example->null_value;
   for (uint i= 0; i < item_count; i++)
     values[i]->bring_value();
-  return;
 }
 
 


Attachment: [text/bzr-bundle] bzr/alexey.kopytov@sun.com-20100909144453-iv2v3a2j0uwxlxmn.bundle
Thread
bzr commit into mysql-5.1-bugteam branch (Alexey.Kopytov:3504)Bug#54190Alexey Kopytov9 Sep