From: Date: April 21 2006 8:48am Subject: bk commit into 4.1 tree (ramil:1.2461) BUG#17896 List-Archive: http://lists.mysql.com/commits/5251 X-Bug: 17896 Message-Id: <200604210648.k3L6m5Np012617@myoffice.izhnet.ru> Below is the list of changes that have just been committed into a local 4.1 repository of ram. When ram does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet 1.2461 06/04/21 11:48:00 ramil@stripped +1 -0 Bug #17896: MIN of CASE WHEN returns non-minimum value! - after review fixes sql/item_cmpfunc.cc 1.207 06/04/21 11:47:53 ramil@stripped +5 -1 Bug #17896: MIN of CASE WHEN returns non-minimum value! - after review fixes. # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: ramil # Host: myoffice.izhnet.ru # Root: /usr/home/ram/work/4.1.b17896 --- 1.206/sql/item_cmpfunc.cc 2006-03-06 16:38:28 +04:00 +++ 1.207/sql/item_cmpfunc.cc 2006-04-21 11:47:53 +05:00 @@ -39,19 +39,23 @@ static void agg_result_type(Item_result { Item **item, **item_end; - /* Note: NULL items don't affect the result type */ *type= STRING_RESULT; /* Skip beginning NULL items */ for (item= items, item_end= item + nitems; item < item_end; item++) + { if ((*item)->type() != Item::NULL_ITEM) { *type= (*item)->result_type(); item++; break; } + } + /* Combine result types. Note: NULL items don't affect the result */ for (; item < item_end; item++) + { if ((*item)->type() != Item::NULL_ITEM) *type= item_store_type(type[0], (*item)->result_type()); + } } static void agg_cmp_type(Item_result *type, Item **items, uint nitems)