diff options
author | Alexander Barkov <bar@mariadb.com> | 2019-08-14 20:27:00 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2019-08-14 20:27:00 +0400 |
commit | afe6eb499d7d5d9b4ba9de5746e78b43f25e31a4 (patch) | |
tree | 8755d77c5aca99ddc5bafc874e5f550be85e6f45 /sql/sql_insert.cc | |
parent | e86010f909fb6b8c4ffd9d6df92991ac079e67e7 (diff) | |
download | mariadb-git-afe6eb499d7d5d9b4ba9de5746e78b43f25e31a4.tar.gz |
Revert "MDEV-20342 Turn Field::flags from a member to a method"
This reverts commit e86010f909fb6b8c4ffd9d6df92991ac079e67e7.
Reverting on Monty's request, as this change makes merging
things from 10.5 to 10.2 much harder.
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r-- | sql/sql_insert.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 22373e232f0..7d399464e4c 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -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); } |