Commit ac61a575 authored by Vicențiu Ciorbaru's avatar Vicențiu Ciorbaru

Revert "Remove use of volatile in stored_field_cmp_to_item"

This reverts commit 7603463a.

The commit itself is fine, however when disabling volatile, compiler
optimizations mess up our double results due to precision differences.
Revert the patch till a proper solution is found.
parent 7603463a
......@@ -8924,10 +8924,15 @@ int stored_field_cmp_to_item(THD *thd, Field *field, Item *item)
}
return my_time_compare(&field_time, &item_time);
}
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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment