List:Commits« Previous MessageNext Message »
From:Tor Didriksen Date:January 25 2012 3:07pm
Subject:bzr push into mysql-trunk branch (tor.didriksen:3785 to 3786)
View as plain text  
 3786 Tor Didriksen	2012-01-25 [merge]
      merge 5.5 => trunk

    modified:
      sql/item.cc
 3785 Ole John Aske	2012-01-25
      Fix for bug#13531865 TEST_IF_SKIP_SORT_ORDER() INCORRECTLY SKIP FILESORT IF 'TYPE' IS REF_OR_NULL
            
      Introduce the function is_ref_or_null_optimized() which is used by test_if_subkey()
      in order to avoid changing to an index requiring 'ref_or_null' access as we can
      never skip sort order for such an index. 
     @ mysql-test/include/order_by.inc
        Added testcase: REF_OR_NULL should never be selected as access 'type' when filesort is skipped by an ordered index.
     @ mysql-test/r/order_by_icp_mrr.result
        corrected testcase: As 'ref_or_null' can't skip filesort, use 'ref' access as choosen by condition optimizer.
     @ mysql-test/r/order_by_none.result
        corrected testcase: As 'ref_or_null' can't skip filesort, use 'ref' access as choosen by condition optimizer.

    modified:
      mysql-test/include/order_by.inc
      mysql-test/r/order_by_icp_mrr.result
      mysql-test/r/order_by_none.result
      sql/sql_select.cc
=== modified file 'sql/item.cc'
--- a/sql/item.cc	2012-01-25 09:57:22 +0000
+++ b/sql/item.cc	2012-01-25 15:06:20 +0000
@@ -8260,10 +8260,15 @@ int stored_field_cmp_to_item(THD *thd, F
     field_val= field->val_decimal(&field_buf);
     return my_decimal_cmp(item_val, field_val);
   }
-  double result= item->val_real();
+  /*
+    The patch for Bug#13463415 started using this function for comparing
+    BIGINTs. That uncovered a bug in Visual Studio 32bit optimized mode.
+    Prefixing the auto variables with volatile fixes the problem....
+  */
+  volatile double result= item->val_real();
   if (item->null_value)
     return 0;
-  double field_result= field->val_real();
+  volatile double field_result= field->val_real();
   if (field_result < result)
     return -1;
   else if (field_result > result)

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (tor.didriksen:3785 to 3786) Tor Didriksen25 Jan