Commit 7603463a authored by Daniel Black's avatar Daniel Black Committed by Vicențiu-Marian Ciorbaru

Remove use of volatile in stored_field_cmp_to_item

This was added in c7964159 but would hurt all other compilers
because of Visual Studio. Hopefully this has been fixed now.
Signed-off-by: default avatarDaniel Black <daniel@linux.vnet.ibm.com>
parent b8d1398b
...@@ -8924,15 +8924,10 @@ int stored_field_cmp_to_item(THD *thd, Field *field, Item *item) ...@@ -8924,15 +8924,10 @@ int stored_field_cmp_to_item(THD *thd, Field *field, Item *item)
} }
return my_time_compare(&field_time, &item_time); 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) if (item->null_value)
return 0; return 0;
volatile double field_result= field->val_real(); double field_result= field->val_real();
if (field_result < result) if (field_result < result)
return -1; return -1;
else if (field_result > result) 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