diff options
author | unknown <evgen@moonbone.local> | 2006-05-30 23:05:34 +0400 |
---|---|---|
committer | unknown <evgen@moonbone.local> | 2006-05-30 23:05:34 +0400 |
commit | 63d6336465c13c010977c04a037468e55b68e9e0 (patch) | |
tree | 2f58dd24d18933491474b13b64665b580da3807a /sql/item_cmpfunc.cc | |
parent | 7b639f05f8916537bf3d6e36c7e07b2e80be8f49 (diff) | |
download | mariadb-git-63d6336465c13c010977c04a037468e55b68e9e0.tar.gz |
item_cmpfunc.cc, func_in.result, multi_update.result:
After merge fix
mysql-test/r/multi_update.result:
After merge fix
mysql-test/r/func_in.result:
After merge fix
sql/item_cmpfunc.cc:
After merge fix
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r-- | sql/item_cmpfunc.cc | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 1701af2325f..cbf77507b84 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -63,6 +63,27 @@ static void agg_result_type(Item_result *type, Item **items, uint nitems) } +/* + Aggregates result types from the array of items. + + SYNOPSIS: + agg_cmp_type() + type [out] the aggregated type + items array of items to aggregate the type from + nitems number of items in the array + + DESCRIPTION + This function aggregates result types from the array of items. Found type + supposed to be used later for comparison of values of these items. + Aggregation itself is performed by the item_cmp_type() function. + + NOTES + Aggregation rules: + If all items are constants the type will be aggregated from all items. + If there are some non-constant items then only types of non-constant + items will be used for aggregation. +*/ + static void agg_cmp_type(THD *thd, Item_result *type, Item **items, uint nitems) { uint i; @@ -89,6 +110,8 @@ static void agg_cmp_type(THD *thd, Item_result *type, Item **items, uint nitems) } else if (is_const) type[0]= item_cmp_type(type[0], items[i]->result_type()); + else if (field && convert_constant_item(thd, field, &items[i])) + type[0]= INT_RESULT; } } |