1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Revert "MDEV-20342 Turn Field::flags from a member to a method"

This reverts commit e86010f909.

Reverting on Monty's request, as this change makes merging
things from 10.5 to 10.2 much harder.
This commit is contained in:
Alexander Barkov
2019-08-14 20:27:00 +04:00
parent e86010f909
commit afe6eb499d
59 changed files with 453 additions and 489 deletions

View File

@ -317,8 +317,7 @@ static int check_insert_fields(THD *thd, TABLE_LIST *table_list,
static bool has_no_default_value(THD *thd, Field *field, TABLE_LIST *table_list)
{
if ((field->flags() & NO_DEFAULT_VALUE_FLAG) &&
field->real_type() != MYSQL_TYPE_ENUM)
if ((field->flags & NO_DEFAULT_VALUE_FLAG) && field->real_type() != MYSQL_TYPE_ENUM)
{
bool view= false;
if (table_list)
@ -3228,7 +3227,7 @@ static void unlink_blobs(TABLE *table)
{
for (Field **ptr=table->field ; *ptr ; ptr++)
{
if ((*ptr)->flags() & BLOB_FLAG)
if ((*ptr)->flags & BLOB_FLAG)
((Field_blob *) (*ptr))->clear_temporary();
}
}
@ -3239,7 +3238,7 @@ static void free_delayed_insert_blobs(TABLE *table)
{
for (Field **ptr=table->field ; *ptr ; ptr++)
{
if ((*ptr)->flags() & BLOB_FLAG)
if ((*ptr)->flags & BLOB_FLAG)
((Field_blob *) *ptr)->free();
}
}
@ -3251,7 +3250,7 @@ static void set_delayed_insert_blobs(TABLE *table)
{
for (Field **ptr=table->field ; *ptr ; ptr++)
{
if ((*ptr)->flags() & BLOB_FLAG)
if ((*ptr)->flags & BLOB_FLAG)
{
Field_blob *blob= ((Field_blob *) *ptr);
uchar *data= blob->get_ptr();
@ -4238,7 +4237,7 @@ TABLE *select_create::create_table_from_items(THD *thd, List<Item> *items,
DBUG_RETURN(NULL);
if (item->maybe_null)
cr_field->clear_flags(NOT_NULL_FLAG);
cr_field->flags &= ~NOT_NULL_FLAG;
alter_info->create_list.push_back(cr_field, thd->mem_root);
}