Skip to content

Commit a5b54f7

Browse files
committed
Code cleanups
- Fix long lines to be <= 80 character - Trivial changes (no logic changes)
1 parent 9a60e89 commit a5b54f7

File tree

1 file changed

+21
-17
lines changed

1 file changed

+21
-17
lines changed

sql/item.cc

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4922,16 +4922,17 @@ double Item_copy_string::val_real()
49224922
int err_not_used;
49234923
char *end_not_used;
49244924
return (null_value ? 0.0 :
4925-
str_value.charset()->strntod((char*) str_value.ptr(), str_value.length(),
4925+
str_value.charset()->strntod((char*) str_value.ptr(),
4926+
str_value.length(),
49264927
&end_not_used, &err_not_used));
49274928
}
49284929

49294930
longlong Item_copy_string::val_int()
49304931
{
49314932
int err;
49324933
return null_value ? 0 : str_value.charset()->strntoll(str_value.ptr(),
4933-
str_value.length(), 10, (char**) 0,
4934-
&err);
4934+
str_value.length(), 10,
4935+
(char**) 0, &err);
49354936
}
49364937

49374938

@@ -5032,9 +5033,11 @@ bool Item_ref_null_helper::val_native(THD *thd, Native *to)
50325033
}
50335034

50345035

5035-
bool Item_ref_null_helper::get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
5036+
bool Item_ref_null_helper::get_date(THD *thd, MYSQL_TIME *ltime,
5037+
date_mode_t fuzzydate)
50365038
{
5037-
return (owner->was_null|= null_value= (*ref)->get_date_result(thd, ltime, fuzzydate));
5039+
return (owner->was_null|= null_value= (*ref)->get_date_result(thd, ltime,
5040+
fuzzydate));
50385041
}
50395042

50405043

@@ -5751,7 +5754,8 @@ Item_field::fix_outer_field(THD *thd, Field **from_field, Item **reference)
57515754
Item_ref *rf;
57525755
rf= new (thd->mem_root) Item_ref(thd, context,
57535756
(*from_field)->table->s->db,
5754-
Lex_cstring_strlen((*from_field)->table->alias.c_ptr()),
5757+
Lex_cstring_strlen((*from_field)->
5758+
table->alias.c_ptr()),
57555759
field_name);
57565760
if (!rf)
57575761
return -1;
@@ -5908,8 +5912,9 @@ bool Item_field::fix_fields(THD *thd, Item **reference)
59085912
return TRUE;
59095913

59105914
thd->change_item_tree(reference,
5911-
select->context_analysis_place == IN_GROUP_BY &&
5912-
alias_name_used ? *rf->ref : rf);
5915+
select->context_analysis_place ==
5916+
IN_GROUP_BY &&
5917+
alias_name_used ? *rf->ref : rf);
59135918

59145919
/*
59155920
We can not "move" aggregate function in the place where
@@ -8891,7 +8896,8 @@ bool Item_cache_wrapper::is_null()
88918896
Get the date value of the possibly cached item
88928897
*/
88938898

8894-
bool Item_cache_wrapper::get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
8899+
bool Item_cache_wrapper::get_date(THD *thd, MYSQL_TIME *ltime,
8900+
date_mode_t fuzzydate)
88958901
{
88968902
Item *cached_value;
88978903
DBUG_ENTER("Item_cache_wrapper::get_date");
@@ -9434,7 +9440,8 @@ my_decimal *Item_default_value::val_decimal(my_decimal *decimal_value)
94349440
return Item_field::val_decimal(decimal_value);
94359441
}
94369442

9437-
bool Item_default_value::get_date(THD *thd, MYSQL_TIME *ltime,date_mode_t fuzzydate)
9443+
bool Item_default_value::get_date(THD *thd, MYSQL_TIME *ltime,
9444+
date_mode_t fuzzydate)
94389445
{
94399446
calculate();
94409447
return Item_field::get_date(thd, ltime, fuzzydate);
@@ -9791,8 +9798,8 @@ void Item_cache::store(Item *item)
97919798

97929799
void Item_cache::print(String *str, enum_query_type query_type)
97939800
{
9794-
if (example && // There is a cached item
9795-
(query_type & QT_NO_DATA_EXPANSION)) // Caller is show-create-table
9801+
if (example && // There is a cached item
9802+
(query_type & QT_NO_DATA_EXPANSION)) // Caller is show-create-table
97969803
{
97979804
// Instead of "cache" or the cached value, print the cached item name
97989805
example->print(str, query_type);
@@ -9971,15 +9978,12 @@ Item *Item_cache_temporal::clone_item(THD *thd)
99719978

99729979
Item *Item_cache_temporal::convert_to_basic_const_item(THD *thd)
99739980
{
9974-
Item *new_item;
99759981
DBUG_ASSERT(value_cached || example != 0);
99769982
if (!value_cached)
99779983
cache_value();
99789984
if (null_value)
99799985
return new (thd->mem_root) Item_null(thd);
9980-
else
9981-
return make_literal(thd);
9982-
return new_item;
9986+
return make_literal(thd);
99839987
}
99849988

99859989
Item *Item_cache_datetime::make_literal(THD *thd)
@@ -10281,8 +10285,8 @@ bool Item_cache_row::setup(THD *thd, Item *item)
1028110285
return 1;
1028210286
for (uint i= 0; i < item_count; i++)
1028310287
{
10284-
Item *el= item->element_index(i);
1028510288
Item_cache *tmp;
10289+
Item *el= item->element_index(i);
1028610290
if (!(tmp= values[i]= el->get_cache(thd)))
1028710291
return 1;
1028810292
tmp->setup(thd, el);

0 commit comments

Comments
 (0)