Merge 10.2 into 10.3

main.derived_cond_pushdown: Move all 10.3 tests to the end,
trim trailing white space, and add an "End of 10.3 tests" marker.
Add --sorted_result to tests where the ordering is not deterministic.

main.win_percentile: Add --sorted_result to tests where the
ordering is no longer deterministic.
This commit is contained in:
Marko Mäkelä 2018-11-06 09:40:39 +02:00
commit df563e0c03
375 changed files with 27579 additions and 14574 deletions

View file

@ -4272,12 +4272,21 @@ bool Item_func_in::value_list_convert_const_to_int(THD *thd)
if (field_item->field_type() == MYSQL_TYPE_LONGLONG ||
field_item->field_type() == MYSQL_TYPE_YEAR)
{
bool all_converted= TRUE;
bool all_converted= true;
Item **arg, **arg_end;
for (arg=args+1, arg_end=args+arg_count; arg != arg_end ; arg++)
{
if (!convert_const_to_int(thd, field_item, &arg[0]))
all_converted= FALSE;
/*
Explicit NULLs should not affect data cmp_type resolution:
- we ignore NULLs when calling collect_cmp_type()
- we ignore NULLs here
So this expression:
year_column IN (DATE'2001-01-01', NULL)
switches from TIME_RESULT to INT_RESULT.
*/
if (arg[0]->type() != Item::NULL_ITEM &&
!convert_const_to_int(thd, field_item, &arg[0]))
all_converted= false;
}
if (all_converted)
m_comparator.set_handler(&type_handler_longlong);