mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
Removed Item::common_flags and replaced it with bit fields
This is to make the Item instances smaller
This commit is contained in:
committed by
Sergei Golubchik
parent
cd1782d26a
commit
00d13069dd
@@ -137,7 +137,7 @@ bool check_duplicate_names(THD *thd, List<Item> &item_list, bool gen_unique_view
|
||||
Item *check;
|
||||
/* treat underlying fields like set by user names */
|
||||
if (item->real_item()->type() == Item::FIELD_ITEM)
|
||||
item->common_flags&= ~IS_AUTO_GENERATED_NAME;
|
||||
item->is_autogenerated_name= 0;
|
||||
itc.rewind();
|
||||
while ((check= itc++) && check != item)
|
||||
{
|
||||
@@ -145,9 +145,9 @@ bool check_duplicate_names(THD *thd, List<Item> &item_list, bool gen_unique_view
|
||||
{
|
||||
if (!gen_unique_view_name)
|
||||
goto err;
|
||||
if (item->is_autogenerated_name())
|
||||
if (item->is_autogenerated_name)
|
||||
make_unique_view_field_name(thd, item, item_list, item);
|
||||
else if (check->is_autogenerated_name())
|
||||
else if (check->is_autogenerated_name)
|
||||
make_unique_view_field_name(thd, check, item_list, item);
|
||||
else
|
||||
goto err;
|
||||
@@ -179,7 +179,7 @@ void make_valid_column_names(THD *thd, List<Item> &item_list)
|
||||
|
||||
for (uint column_no= 1; (item= it++); column_no++)
|
||||
{
|
||||
if (!item->is_autogenerated_name() || !check_column_name(item->name.str))
|
||||
if (!item->is_autogenerated_name || !check_column_name(item->name.str))
|
||||
continue;
|
||||
name_len= my_snprintf(buff, NAME_LEN, "Name_exp_%u", column_no);
|
||||
item->orig_name= item->name.str;
|
||||
@@ -566,7 +566,7 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views,
|
||||
while ((item= it++, name= nm++))
|
||||
{
|
||||
item->set_name(thd, *name);
|
||||
item->common_flags&= ~IS_AUTO_GENERATED_NAME;
|
||||
item->is_autogenerated_name= 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user