summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2012-02-06 18:24:51 +0200
committerGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2012-02-06 18:24:51 +0200
commit145043fd69edfcb81faf5aed2f0f6af6fce56e77 (patch)
treee6b5bfa6ab416bf84f4d296d6f3006feec3d40cd /sql
parent04c5e5211e781401a8ac88ba08531b736add4177 (diff)
parent17afdb9051aef9e819fd72a6e4f3daa89d96d384 (diff)
downloadmariadb-git-145043fd69edfcb81faf5aed2f0f6af6fce56e77.tar.gz
merged mysql-5.1->mysql-5.1-security
Diffstat (limited to 'sql')
-rw-r--r--sql/item.cc4
-rw-r--r--sql/item_timefunc.cc2
2 files changed, 3 insertions, 3 deletions
diff --git a/sql/item.cc b/sql/item.cc
index 930c5d7426e..f4eb418b700 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -7006,7 +7006,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
@@ -7018,7 +7018,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)
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index 31474f1d6ca..83b0b7cdebc 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -2646,7 +2646,7 @@ String *Item_time_typecast::val_str(String *str)
bool Item_date_typecast::get_date(MYSQL_TIME *ltime, uint fuzzy_date)
{
- bool res= get_arg0_date(ltime, fuzzy_date);
+ bool res= get_arg0_date(ltime, TIME_FUZZY_DATE);
ltime->hour= ltime->minute= ltime->second= ltime->second_part= 0;
ltime->time_type= MYSQL_TIMESTAMP_DATE;
return res;