Commit a5b54f78 authored by Monty's avatar Monty

Code cleanups

- Fix long lines to be <= 80 character
- Trivial changes (no logic changes)
parent 9a60e89a
......@@ -4922,7 +4922,8 @@ double Item_copy_string::val_real()
int err_not_used;
char *end_not_used;
return (null_value ? 0.0 :
str_value.charset()->strntod((char*) str_value.ptr(), str_value.length(),
str_value.charset()->strntod((char*) str_value.ptr(),
str_value.length(),
&end_not_used, &err_not_used));
}
......@@ -4930,8 +4931,8 @@ longlong Item_copy_string::val_int()
{
int err;
return null_value ? 0 : str_value.charset()->strntoll(str_value.ptr(),
str_value.length(), 10, (char**) 0,
&err);
str_value.length(), 10,
(char**) 0, &err);
}
......@@ -5032,9 +5033,11 @@ bool Item_ref_null_helper::val_native(THD *thd, Native *to)
}
bool Item_ref_null_helper::get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
bool Item_ref_null_helper::get_date(THD *thd, MYSQL_TIME *ltime,
date_mode_t fuzzydate)
{
return (owner->was_null|= null_value= (*ref)->get_date_result(thd, ltime, fuzzydate));
return (owner->was_null|= null_value= (*ref)->get_date_result(thd, ltime,
fuzzydate));
}
......@@ -5751,7 +5754,8 @@ Item_field::fix_outer_field(THD *thd, Field **from_field, Item **reference)
Item_ref *rf;
rf= new (thd->mem_root) Item_ref(thd, context,
(*from_field)->table->s->db,
Lex_cstring_strlen((*from_field)->table->alias.c_ptr()),
Lex_cstring_strlen((*from_field)->
table->alias.c_ptr()),
field_name);
if (!rf)
return -1;
......@@ -5908,7 +5912,8 @@ bool Item_field::fix_fields(THD *thd, Item **reference)
return TRUE;
thd->change_item_tree(reference,
select->context_analysis_place == IN_GROUP_BY &&
select->context_analysis_place ==
IN_GROUP_BY &&
alias_name_used ? *rf->ref : rf);
/*
......@@ -8891,7 +8896,8 @@ bool Item_cache_wrapper::is_null()
Get the date value of the possibly cached item
*/
bool Item_cache_wrapper::get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
bool Item_cache_wrapper::get_date(THD *thd, MYSQL_TIME *ltime,
date_mode_t fuzzydate)
{
Item *cached_value;
DBUG_ENTER("Item_cache_wrapper::get_date");
......@@ -9434,7 +9440,8 @@ my_decimal *Item_default_value::val_decimal(my_decimal *decimal_value)
return Item_field::val_decimal(decimal_value);
}
bool Item_default_value::get_date(THD *thd, MYSQL_TIME *ltime,date_mode_t fuzzydate)
bool Item_default_value::get_date(THD *thd, MYSQL_TIME *ltime,
date_mode_t fuzzydate)
{
calculate();
return Item_field::get_date(thd, ltime, fuzzydate);
......@@ -9971,15 +9978,12 @@ Item *Item_cache_temporal::clone_item(THD *thd)
Item *Item_cache_temporal::convert_to_basic_const_item(THD *thd)
{
Item *new_item;
DBUG_ASSERT(value_cached || example != 0);
if (!value_cached)
cache_value();
if (null_value)
return new (thd->mem_root) Item_null(thd);
else
return make_literal(thd);
return new_item;
}
Item *Item_cache_datetime::make_literal(THD *thd)
......@@ -10281,8 +10285,8 @@ bool Item_cache_row::setup(THD *thd, Item *item)
return 1;
for (uint i= 0; i < item_count; i++)
{
Item *el= item->element_index(i);
Item_cache *tmp;
Item *el= item->element_index(i);
if (!(tmp= values[i]= el->get_cache(thd)))
return 1;
tmp->setup(thd, el);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment