merge from 5.1

This commit is contained in:
Guilhem Bichot 2012-01-26 10:38:28 +01:00
commit 95646db77b
3 changed files with 195 additions and 2 deletions

View file

@ -7449,7 +7449,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
@ -7461,7 +7461,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);
}
/*
The patch for Bug#13463415 started using this function for comparing