diff options
Diffstat (limited to 'sql/table.h')
-rw-r--r-- | sql/table.h | 82 |
1 files changed, 34 insertions, 48 deletions
diff --git a/sql/table.h b/sql/table.h index 7236fb91b0f..1720a212a1f 100644 --- a/sql/table.h +++ b/sql/table.h @@ -395,28 +395,6 @@ enum enum_table_category TABLE_CATEGORY_SYSTEM=3, /** - Information schema tables. - These tables are an interface provided by the system - to inspect the system metadata. - These tables do *not* honor: - - LOCK TABLE t FOR READ/WRITE - - FLUSH TABLES WITH READ LOCK - - SET GLOBAL READ_ONLY = ON - as there is no point in locking explicitly - an INFORMATION_SCHEMA table. - Nothing is directly written to information schema tables. - Note that this value is not used currently, - since information schema tables are not shared, - but implemented as session specific temporary tables. - */ - /* - TODO: Fixing the performance issues of I_S will lead - to I_S tables in the table cache, which should use - this table type. - */ - TABLE_CATEGORY_INFORMATION=4, - - /** Log tables. These tables are an interface provided by the system to inspect the system logs. @@ -436,7 +414,33 @@ enum enum_table_category The server implementation perform writes. Log tables are cached in the table cache. */ - TABLE_CATEGORY_LOG=5, + TABLE_CATEGORY_LOG=4, + + /* + Types below are read only tables, not affected by FLUSH TABLES or + MDL locks. + */ + /** + Information schema tables. + These tables are an interface provided by the system + to inspect the system metadata. + These tables do *not* honor: + - LOCK TABLE t FOR READ/WRITE + - FLUSH TABLES WITH READ LOCK + - SET GLOBAL READ_ONLY = ON + as there is no point in locking explicitly + an INFORMATION_SCHEMA table. + Nothing is directly written to information schema tables. + Note that this value is not used currently, + since information schema tables are not shared, + but implemented as session specific temporary tables. + */ + /* + TODO: Fixing the performance issues of I_S will lead + to I_S tables in the table cache, which should use + this table type. + */ + TABLE_CATEGORY_INFORMATION=5, /** Performance schema tables. @@ -460,6 +464,7 @@ enum enum_table_category */ TABLE_CATEGORY_PERFORMANCE=6 }; + typedef enum enum_table_category TABLE_CATEGORY; TABLE_CATEGORY get_table_category(const LEX_CSTRING *db, @@ -727,6 +732,7 @@ struct TABLE_SHARE bool null_field_first; bool system; /* Set if system table (one record) */ bool not_usable_by_query_cache; + bool online_backup; /* Set if on-line backup supported */ bool no_replicate; bool crashed; bool is_view; @@ -1155,8 +1161,6 @@ public: MY_BITMAP cond_set; /* used to mark fields from sargable conditions*/ /* Active column sets */ MY_BITMAP *read_set, *write_set, *rpl_write_set; - /* Set if using virtual fields */ - MY_BITMAP *vcol_set, *def_vcol_set; /* On INSERT: fields that the user specified a value for */ MY_BITMAP has_value_set; @@ -1377,7 +1381,9 @@ public: void mark_columns_needed_for_delete(void); void mark_columns_needed_for_insert(void); void mark_columns_per_binlog_row_image(void); - bool mark_virtual_col(Field *field); + inline bool mark_column_with_deps(Field *field); + inline bool mark_virtual_column_with_deps(Field *field); + inline void mark_virtual_column_deps(Field *field); bool mark_virtual_columns_for_write(bool insert_fl); bool check_virtual_columns_marked_for_read(); bool check_virtual_columns_marked_for_write(); @@ -1399,39 +1405,21 @@ public: if (file) file->column_bitmaps_signal(); } - inline void column_bitmaps_set(MY_BITMAP *read_set_arg, - MY_BITMAP *write_set_arg, - MY_BITMAP *vcol_set_arg) - { - read_set= read_set_arg; - write_set= write_set_arg; - vcol_set= vcol_set_arg; - if (file) - file->column_bitmaps_signal(); - } inline void column_bitmaps_set_no_signal(MY_BITMAP *read_set_arg, MY_BITMAP *write_set_arg) { read_set= read_set_arg; write_set= write_set_arg; } - inline void column_bitmaps_set_no_signal(MY_BITMAP *read_set_arg, - MY_BITMAP *write_set_arg, - MY_BITMAP *vcol_set_arg) - { - read_set= read_set_arg; - write_set= write_set_arg; - vcol_set= vcol_set_arg; - } inline void use_all_columns() { column_bitmaps_set(&s->all_set, &s->all_set); } + inline void use_all_stored_columns(); inline void default_column_bitmaps() { read_set= &def_read_set; write_set= &def_write_set; - vcol_set= def_vcol_set; /* Note that this may be 0 */ rpl_write_set= 0; } /** Should this instance of the table be reopened? */ @@ -2611,8 +2599,6 @@ struct TABLE_LIST return false; } void set_lock_type(THD* thd, enum thr_lock_type lock); - void check_pushable_cond_for_table(Item *cond); - Item *build_pushable_cond_for_table(THD *thd, Item *cond); void remove_join_columns() { @@ -2966,7 +2952,7 @@ extern LEX_CSTRING INFORMATION_SCHEMA_NAME; extern LEX_CSTRING MYSQL_SCHEMA_NAME; /* table names */ -extern LEX_CSTRING MYSQL_USER_NAME, MYSQL_DB_NAME, MYSQL_PROC_NAME; +extern LEX_CSTRING MYSQL_PROC_NAME; inline bool is_infoschema_db(const LEX_CSTRING *name) { |