merge 5.5 -> 10.0-base

This commit is contained in:
unknown 2013-09-25 21:07:06 +03:00
commit 9d83468e78
42 changed files with 279 additions and 203 deletions

View file

@ -942,7 +942,7 @@ void Item_func_monthname::fix_length_and_dec()
collation.set(cs, DERIVATION_COERCIBLE, repertoire);
decimals=0;
max_length= locale->max_month_name_length * collation.collation->mbmaxlen;
set_persist_maybe_null(1);
maybe_null=1;
}
@ -1089,7 +1089,7 @@ void Item_func_dayname::fix_length_and_dec()
collation.set(cs, DERIVATION_COERCIBLE, repertoire);
decimals=0;
max_length= locale->max_day_name_length * collation.collation->mbmaxlen;
set_persist_maybe_null(1);
maybe_null=1;
}
@ -1451,7 +1451,7 @@ void Item_temporal_func::fix_length_and_dec()
We set maybe_null to 1 as default as any bad argument with date or
time can get us to return NULL.
*/
set_persist_maybe_null(1);
maybe_null= 1;
max_length= mysql_temporal_int_part_length(field_type());
if (decimals)
{
@ -1521,7 +1521,7 @@ void Item_func_curdate::fix_length_and_dec()
ltime.hour= ltime.minute= ltime.second= 0;
ltime.time_type= MYSQL_TIMESTAMP_DATE;
Item_datefunc::fix_length_and_dec();
set_persist_maybe_null(0);
maybe_null= false;
}
/**
@ -1760,7 +1760,7 @@ void Item_func_date_format::fix_length_and_dec()
collation.collation->mbmaxlen;
set_if_smaller(max_length,MAX_BLOB_WIDTH);
}
set_persist_maybe_null(1); // If wrong date
maybe_null=1; // If wrong date
}
@ -2123,7 +2123,7 @@ void Item_extract::print(String *str, enum_query_type query_type)
void Item_extract::fix_length_and_dec()
{
set_persist_maybe_null(1); // If wrong date
maybe_null=1; // If wrong date
switch (int_type) {
case INTERVAL_YEAR: max_length=4; date_value=1; break;
case INTERVAL_YEAR_MONTH: max_length=6; date_value=1; break;