Skip to content

Commit

Permalink
Remove use of volatile in stored_field_cmp_to_item
Browse files Browse the repository at this point in the history
This was added in c796415 but would hurt all other compilers
because of Visual Studio. Hopefully this has been fixed now.

Signed-off-by: Daniel Black <daniel@linux.vnet.ibm.com>
  • Loading branch information
grooverdan authored and cvicentiu committed Dec 5, 2017
1 parent b8d1398 commit 7603463
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions sql/item.cc
Expand Up @@ -8924,15 +8924,10 @@ int stored_field_cmp_to_item(THD *thd, Field *field, Item *item)
}
return my_time_compare(&field_time, &item_time);
}
/*
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();
double result= item->val_real();
if (item->null_value)
return 0;
volatile double field_result= field->val_real();
double field_result= field->val_real();
if (field_result < result)
return -1;
else if (field_result > result)
Expand Down

0 comments on commit 7603463

Please sign in to comment.