mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Manual merge from mysql-trunk-merge.
Conflicts: - extra/comp_err.c - mysql-test/collections/default.experimental - mysql-test/r/archive.result - mysql-test/r/select.result - mysql-test/suite/binlog/r/binlog_unsafe.result - mysql-test/suite/binlog/t/binlog_unsafe.test - mysql-test/suite/rpl/t/disabled.def - mysql-test/t/archive.test - mysql-test/t/select.test - sql/item.cc - sql/item.h - sql/item_timefunc.cc - sql/sql_base.cc - sql/sql_delete.cc - sql/sql_load.cc - sql/sql_partition.cc - sql/sql_table.cc - storage/innobase/handler/ha_innodb.cc - vio/vio.c
This commit is contained in:
53
sql/table.h
53
sql/table.h
@ -288,6 +288,36 @@ typedef enum enum_table_category TABLE_CATEGORY;
|
||||
TABLE_CATEGORY get_table_category(const LEX_STRING *db,
|
||||
const LEX_STRING *name);
|
||||
|
||||
|
||||
typedef struct st_table_field_type
|
||||
{
|
||||
LEX_STRING name;
|
||||
LEX_STRING type;
|
||||
LEX_STRING cset;
|
||||
} TABLE_FIELD_TYPE;
|
||||
|
||||
|
||||
typedef struct st_table_field_def
|
||||
{
|
||||
uint count;
|
||||
const TABLE_FIELD_TYPE *field;
|
||||
} TABLE_FIELD_DEF;
|
||||
|
||||
|
||||
class Table_check_intact
|
||||
{
|
||||
protected:
|
||||
virtual void report_error(uint code, const char *fmt, ...)= 0;
|
||||
|
||||
public:
|
||||
Table_check_intact() {}
|
||||
virtual ~Table_check_intact() {}
|
||||
|
||||
/** Checks whether a table is intact. */
|
||||
bool check(TABLE *table, const TABLE_FIELD_DEF *table_def);
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
This structure is shared between different table objects. There is one
|
||||
instance of table share per one table in the database.
|
||||
@ -420,6 +450,18 @@ struct TABLE_SHARE
|
||||
handlerton *default_part_db_type;
|
||||
#endif
|
||||
|
||||
/**
|
||||
Cache the checked structure of this table.
|
||||
|
||||
The pointer data is used to describe the structure that
|
||||
a instance of the table must have. Each element of the
|
||||
array specifies a field that must exist on the table.
|
||||
|
||||
The pointer is cached in order to perform the check only
|
||||
once -- when the table is loaded from the disk.
|
||||
*/
|
||||
const TABLE_FIELD_DEF *table_field_def_cache;
|
||||
|
||||
/** place to store storage engine specific data */
|
||||
void *ha_data;
|
||||
void (*ha_data_destroy)(void *); /* An optional destructor for ha_data */
|
||||
@ -1626,17 +1668,6 @@ typedef struct st_open_table_list{
|
||||
uint32 in_use,locked;
|
||||
} OPEN_TABLE_LIST;
|
||||
|
||||
typedef struct st_table_field_w_type
|
||||
{
|
||||
LEX_STRING name;
|
||||
LEX_STRING type;
|
||||
LEX_STRING cset;
|
||||
} TABLE_FIELD_W_TYPE;
|
||||
|
||||
|
||||
my_bool
|
||||
table_check_intact(TABLE *table, const uint table_f_count,
|
||||
const TABLE_FIELD_W_TYPE *table_def);
|
||||
|
||||
static inline my_bitmap_map *tmp_use_all_columns(TABLE *table,
|
||||
MY_BITMAP *bitmap)
|
||||
|
Reference in New Issue
Block a user