summaryrefslogtreecommitdiff
path: root/sql/item.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item.cc')
-rw-r--r--sql/item.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/item.cc b/sql/item.cc
index 23294a6dbeb..55c32ea8f41 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2000, 2011, Oracle and/or its affiliates.
+ Copyright (c) 2000, 2012, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -7040,7 +7040,7 @@ int stored_field_cmp_to_item(THD *thd, Field *field, Item *item)
return my_time_compare(&field_time, &item_time);
}
- return stringcmp(field_result, item_result);
+ return sortcmp(field_result, item_result, field->charset());
}
if (res_type == INT_RESULT)
return 0; // Both are of type int
@@ -7052,7 +7052,7 @@ int stored_field_cmp_to_item(THD *thd, Field *field, Item *item)
if (item->null_value)
return 0;
field_val= field->val_decimal(&field_buf);
- return my_decimal_cmp(item_val, field_val);
+ return my_decimal_cmp(field_val, item_val);
}
double result= item->val_real();
if (item->null_value)