Commit 5b716bc2 authored by Sergei Golubchik's avatar Sergei Golubchik

cleanup: reorder TABLE members

parent 0ed291e6
...@@ -1518,7 +1518,7 @@ bool mysql_prepare_insert(THD *thd, TABLE_LIST *table_list, ...@@ -1518,7 +1518,7 @@ bool mysql_prepare_insert(THD *thd, TABLE_LIST *table_list,
if (!table) if (!table)
table= table_list->table; table= table_list->table;
if (table->s->virtual_stored_fields) if (table->s->has_virtual_stored_fields)
thd->lex->unit.insert_table_with_stored_vcol= table; thd->lex->unit.insert_table_with_stored_vcol= table;
if (!select_insert) if (!select_insert)
......
...@@ -410,7 +410,7 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, ...@@ -410,7 +410,7 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
table->prepare_triggers_for_insert_stmt_or_event(); table->prepare_triggers_for_insert_stmt_or_event();
table->mark_columns_needed_for_insert(); table->mark_columns_needed_for_insert();
if (table->s->virtual_stored_fields) if (table->s->has_virtual_stored_fields)
thd->lex->unit.insert_table_with_stored_vcol= table; thd->lex->unit.insert_table_with_stored_vcol= table;
uint tot_length=0; uint tot_length=0;
......
...@@ -2233,7 +2233,7 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write, ...@@ -2233,7 +2233,7 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
DBUG_ASSERT(!reg_field->vcol_info); DBUG_ASSERT(!reg_field->vcol_info);
reg_field->vcol_info= vcol_info; reg_field->vcol_info= vcol_info;
share->virtual_fields++; share->virtual_fields++;
share->virtual_stored_fields= true; // For insert/load data share->has_virtual_stored_fields=true; // For insert/load data
break; break;
case 2: // Default expression case 2: // Default expression
vcol_info->stored_in_db= 1; vcol_info->stored_in_db= 1;
......
...@@ -644,17 +644,22 @@ struct TABLE_SHARE ...@@ -644,17 +644,22 @@ struct TABLE_SHARE
the record then this value is 0. the record then this value is 0.
*/ */
uint null_bytes_for_compare; uint null_bytes_for_compare;
uint fields; /* Number of fields */ uint fields; /* number of fields */
/* Number of stored fields, generated-only virtual fields are not included */ uint stored_fields; /* number of stored fields, purely virtual not included */
uint stored_fields; uint virtual_fields; /* number of purely virtual fields */
uint null_fields; /* number of null fields */
uint blob_fields; /* number of blob fields */
uint varchar_fields; /* number of varchar fields */
uint default_fields; /* number of default fields */
uint default_expressions;
uint table_check_constraints, field_check_constraints;
uint rec_buff_length; /* Size of table->record[] buffer */ uint rec_buff_length; /* Size of table->record[] buffer */
uint keys, key_parts; uint keys, key_parts;
uint ext_key_parts; /* Total number of key parts in extended keys */ uint ext_key_parts; /* Total number of key parts in extended keys */
uint max_key_length, max_unique_length, total_key_length; uint max_key_length, max_unique_length, total_key_length;
uint uniques; /* Number of UNIQUE index */ uint uniques; /* Number of UNIQUE index */
uint null_fields; /* number of null fields */
uint blob_fields; /* number of blob fields */
uint varchar_fields; /* number of varchar fields */
uint db_create_options; /* Create options from database */ uint db_create_options; /* Create options from database */
uint db_options_in_use; /* Options in use */ uint db_options_in_use; /* Options in use */
uint db_record_offset; /* if HA_REC_IN_SEQ */ uint db_record_offset; /* if HA_REC_IN_SEQ */
...@@ -668,10 +673,7 @@ struct TABLE_SHARE ...@@ -668,10 +673,7 @@ struct TABLE_SHARE
uint open_errno; /* error from open_table_def() */ uint open_errno; /* error from open_table_def() */
uint column_bitmap_size; uint column_bitmap_size;
uchar frm_version; uchar frm_version;
uint virtual_fields;
uint default_expressions;
uint table_check_constraints, field_check_constraints;
uint default_fields; /* Number of default fields */
bool use_ext_keys; /* Extended keys can be used */ bool use_ext_keys; /* Extended keys can be used */
bool null_field_first; bool null_field_first;
bool system; /* Set if system table (one record) */ bool system; /* Set if system table (one record) */
...@@ -682,7 +684,7 @@ struct TABLE_SHARE ...@@ -682,7 +684,7 @@ struct TABLE_SHARE
bool table_creation_was_logged; bool table_creation_was_logged;
bool non_determinstic_insert; bool non_determinstic_insert;
bool vcols_need_refixing; bool vcols_need_refixing;
bool virtual_stored_fields; bool has_virtual_stored_fields;
bool check_set_initialized; bool check_set_initialized;
bool has_update_default_function; bool has_update_default_function;
ulong table_map_id; /* for row-based replication */ ulong table_map_id; /* for row-based replication */
...@@ -1029,7 +1031,6 @@ struct TABLE ...@@ -1029,7 +1031,6 @@ struct TABLE
uint32 instance; /** Table cache instance this TABLE is belonging to */ uint32 instance; /** Table cache instance this TABLE is belonging to */
THD *in_use; /* Which thread uses this */ THD *in_use; /* Which thread uses this */
Field **field; /* Pointer to fields */
uchar *record[2]; /* Pointer to records */ uchar *record[2]; /* Pointer to records */
uchar *write_row_record; /* Used as optimisation in uchar *write_row_record; /* Used as optimisation in
...@@ -1059,11 +1060,11 @@ struct TABLE ...@@ -1059,11 +1060,11 @@ struct TABLE
key_map keys_in_use_for_order_by; key_map keys_in_use_for_order_by;
KEY *key_info; /* data of keys in database */ KEY *key_info; /* data of keys in database */
Field **field; /* Pointer to fields */
Field **vfield; /* Pointer to virtual fields*/
Field **default_field; /* Fields with non-constant DEFAULT */
Field *next_number_field; /* Set if next_number is activated */ Field *next_number_field; /* Set if next_number is activated */
Field *found_next_number_field; /* Set on open */ Field *found_next_number_field; /* Set on open */
Field **vfield; /* Pointer to virtual fields*/
/* Fields that are updated automatically on INSERT or UPDATE. */
Field **default_field;
Virtual_column_info **check_constraints; Virtual_column_info **check_constraints;
/* Table's triggers, 0 if there are no of them */ /* Table's triggers, 0 if there are no of them */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment