@@ -413,11 +413,12 @@ Item::Item(THD *thd):
413413 name(null_clex_str), orig_name(0 ), is_expensive_cache(-1 )
414414{
415415 DBUG_ASSERT (thd);
416- common_flags= IS_AUTO_GENERATED_NAME;
417- marker= 0 ;
418416 maybe_null= with_window_func= with_field= in_rollup= with_param= 0 ;
417+ is_in_with_cycle= 0 ;
419418 fixed= 1 ; // Simple Item's doesn't have to be fixed
419+ is_autogenerated_name= 1 ;
420420 null_value= 0 ;
421+ marker= 0 ;
421422
422423 /* Initially this item is not attached to any JOIN_TAB. */
423424 join_tab_idx= MAX_TABLES;
@@ -447,10 +448,12 @@ Item::Item():
447448 name(null_clex_str), orig_name(0 ), is_expensive_cache(-1 )
448449{
449450 DBUG_ASSERT (my_progname == NULL ); // before main()
450- common_flags= IS_AUTO_GENERATED_NAME;
451- marker= 0 ;
452451 maybe_null= with_window_func= with_field= in_rollup= with_param= 0 ;
453- fixed= 1 ;
452+ is_in_with_cycle= 0 ;
453+ fixed= 1 ; // Simple Item's doesn't have to be fixed
454+ is_autogenerated_name= 1 ;
455+ null_value= 0 ;
456+ marker= 0 ;
454457 join_tab_idx= MAX_TABLES;
455458}
456459
@@ -481,10 +484,11 @@ Item::Item(THD *thd, Item *item):
481484 with_param(item->with_param),
482485 with_window_func(item->with_window_func),
483486 with_field(item->with_field),
487+ is_autogenerated_name(item->is_autogenerated_name),
488+ is_in_with_cycle(item->is_in_with_cycle),
484489 marker(item->marker),
485490 null_value(item->null_value),
486491 is_expensive_cache(-1 ),
487- common_flags(item->common_flags),
488492 join_tab_idx(item->join_tab_idx)
489493{
490494 next= thd->free_list ;// Put in free list
@@ -1164,7 +1168,7 @@ void Item::set_name(THD *thd, const char *str, size_t length, CHARSET_INFO *cs)
11641168 str++;
11651169 }
11661170 }
1167- if (str != str_start && !is_autogenerated_name () )
1171+ if (str != str_start && !is_autogenerated_name)
11681172 {
11691173 char buff[SAFE_NAME_LEN];
11701174
@@ -5227,7 +5231,7 @@ static Item** find_field_in_group_list(Item *find_item, ORDER *group_list)
52275231
52285232 /* SELECT list element with explicit alias */
52295233 if ((*(cur_group->item ))->name .str && !table_name.str &&
5230- !(*(cur_group->item ))->is_autogenerated_name () &&
5234+ !(*(cur_group->item ))->is_autogenerated_name &&
52315235 !lex_string_cmp (system_charset_info,
52325236 &(*(cur_group->item ))->name , &field_name))
52335237 {
0 commit comments