summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
authorpekka@mysql.com <>2005-04-01 10:13:37 +0200
committerpekka@mysql.com <>2005-04-01 10:13:37 +0200
commit5b9bd8c0c8ec48f54459b5025fe42dbce261645b (patch)
tree748a9a8f5a64181143501a3ccc782f1dfa1af35f /sql/item_cmpfunc.cc
parent45a79c9056437dedd7334afee422566f68df4991 (diff)
parent7ace3f136264fbc7de3e50e047ad5f88653c6c3c (diff)
downloadmariadb-git-5b9bd8c0c8ec48f54459b5025fe42dbce261645b.tar.gz
Merge
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r--sql/item_cmpfunc.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index ddb116f548a..66354560756 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -432,10 +432,16 @@ int Arg_comparator::compare_e_binary_string()
int Arg_comparator::compare_real()
{
- double val1= (*a)->val_real();
+ /*
+ Fix yet another manifestation of Bug#2338. 'Volatile' will instruct
+ gcc to flush double values out of 80-bit Intel FPU registers before
+ performing the comparison.
+ */
+ volatile double val1, val2;
+ val1= (*a)->val_real();
if (!(*a)->null_value)
{
- double val2= (*b)->val_real();
+ val2= (*b)->val_real();
if (!(*b)->null_value)
{
owner->null_value= 0;