diff options
author | evgen@moonbone.local <> | 2006-08-23 01:03:28 +0400 |
---|---|---|
committer | evgen@moonbone.local <> | 2006-08-23 01:03:28 +0400 |
commit | 44cad14bf488bd3afdc11c30dea715dc63eaabd9 (patch) | |
tree | 7c1a1020bdab14e6eeffc149cd1864bece92c32c /sql/item.cc | |
parent | f0edc9084dcd280e5e23c9b49d40e13caaa9f62d (diff) | |
download | mariadb-git-44cad14bf488bd3afdc11c30dea715dc63eaabd9.tar.gz |
item_cmpfunc.cc, item.cc:
Additional fix for bug #21475
item_func.h, item_func.cc:
Additional fix for bug#16861
Diffstat (limited to 'sql/item.cc')
-rw-r--r-- | sql/item.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/item.cc b/sql/item.cc index 73f2f5790a1..96b20d0f0bb 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -305,6 +305,7 @@ Item::Item(): maybe_null=null_value=with_sum_func=unsigned_flag=0; decimals= 0; max_length= 0; with_subselect= 0; + cmp_context= (Item_result)-1; /* Put item in free list so that we can free all items at end */ THD *thd= current_thd; @@ -343,7 +344,8 @@ Item::Item(THD *thd, Item *item): unsigned_flag(item->unsigned_flag), with_sum_func(item->with_sum_func), fixed(item->fixed), - collation(item->collation) + collation(item->collation), + cmp_context(item->cmp_context) { next= thd->free_list; // Put in free list thd->free_list= this; @@ -3788,7 +3790,8 @@ Item *Item_field::equal_fields_propagator(byte *arg) The same problem occurs when comparing a DATE/TIME field with a DATE/TIME represented as an int and as a string. */ - if (!item || item->cmp_context != cmp_context) + if (!item || + (cmp_context != (Item_result)-1 && item->cmp_context != cmp_context)) item= this; return item; } |