Revert "Remove use of volatile in stored_field_cmp_to_item"
This reverts commit 7603463a46b288c1b5630348e36c622e4c2abb09. 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.
This commit is contained in:
parent
7603463a46
commit
ac61a575df
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user