24#ifndef DD_TABLE_INCLUDED
25#define DD_TABLE_INCLUDED
61class Dictionary_client;
393 uint *numeric_precision);
407 uint *datetime_precision);
431 bool *found_tablespace);
435 bool *found_tablespace);
457 size_t table_name_length,
459 size_t cc_name_length);
494 const char *orig_table_name,
496 const bool is_upgrade);
enum_enable_or_disable
Definition: sql_alter.h:348
Create_field is a description a field/column that may or may not exists in a table.
Definition: create_field.h:51
Definition: sql_list.h:434
Class to represent the check constraint specifications obtained from the SQL statement parse.
Definition: sql_check_constraint.h:43
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:34
Abstract base class for tables and views.
Definition: abstract_table.h:69
Definition: foreign_key.h:47
Definition: dictionary_client.h:149
The handler class is the interface for dynamically loadable storage engines.
Definition: handler.h:4414
A table definition from the master.
Definition: rpl_utility.h:248
enum_field_types
Column types for MySQL.
Definition: field_types.h:53
static uint keys
Definition: hp_test2.cc:46
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:56
uint32_t uint32
Definition: my_inttypes.h:67
borrowable::session_track::Schema< true > Schema
Definition: classic_protocol_session_track.h:277
constexpr value_type is_unsigned
Definition: classic_protocol_constants.h:273
The version of the current data dictionary table definitions.
Definition: dictionary_client.h:43
void warn_on_deprecated_prefix_key_partition(THD *thd, const char *schema_name, const char *orig_table_name, const Table *table, const bool is_upgrade)
Throw deprecation warnings if table uses prefix keys in the partitioning function.
Definition: dd_table.cc:2971
dd::String_type get_sql_type_by_create_field(TABLE *table, const Create_field &field)
Function returns string representing column type by Create_field.
Definition: dd_table.cc:234
bool fill_dd_columns_from_create_fields(THD *thd, dd::Abstract_table *tab_obj, const List< Create_field > &create_fields, handler *file)
Add column objects to dd::Abstract_table according to list of Create_field objects.
Definition: dd_table.cc:495
bool table_legacy_db_type(THD *thd, const char *schema_name, const char *table_name, enum legacy_db_type *db_type)
Get the legacy db type from the options of the given table.
Definition: dd_table.cc:2558
bool table_storage_engine(THD *thd, const T *obj, handlerton **hton)
Get the storage engine handlerton for the given table or tablespace.
Definition: dd_table.cc:2605
bool uses_general_tablespace(const Table &t)
Check if table uses general tablespace.
Definition: dd_table.cc:2957
bool fix_row_type(THD *thd, dd::Table *table_def, row_type correct_row_type)
Update row format for the table with the value value supplied by caller function.
Definition: dd_table.cc:2693
std::unique_ptr< dd::Table > create_dd_user_table(THD *thd, const dd::Schema &sch_obj, const dd::String_type &table_name, HA_CREATE_INFO *create_info, const List< Create_field > &create_fields, const KEY *keyinfo, uint keys, Alter_info::enum_enable_or_disable keys_onoff, const FOREIGN_KEY *fk_keyinfo, uint fk_keys, const Sql_check_constraint_spec_list *check_cons_spec, handler *file)
Prepares a dd::Table object from mysql_prepare_create_table() output and return it to the caller.
Definition: dd_table.cc:2373
static const char CHECK_CONSTRAINT_NAME_SUBSTR[]
Definition: dd_table.h:65
bool table_exists(dd::cache::Dictionary_client *client, const char *schema_name, const char *name, bool *exists)
Check if a table or view exists.
Definition: dd_table.cc:2448
enum_column_types
Definition: column.h:53
bool rename_check_constraints(const char *old_table_name, dd::Table *new_tab)
Rename generated check constraint names to match the new name of the table.
Definition: dd_table.cc:2834
bool get_field_numeric_precision(const Create_field *field, uint *numeric_precision)
Helper method to get numeric precision for types using Create_field type object.
Definition: dd_table.cc:403
bool is_generated_check_constraint_name(const char *table_name, size_t table_name_length, const char *cc_name, size_t cc_name_length)
Check if name of check constraint is generated one.
Definition: dd_table.cc:2822
static const char FIELD_NAME_SEPARATOR_CHAR
Definition: dd_table.h:64
dd::String_type get_sql_type_by_field_info(THD *thd, enum_field_types field_type, uint32 field_length, uint32 decimals, bool maybe_null, bool is_unsigned, const CHARSET_INFO *field_charset)
Function returns string representing column type by ST_FIELD_INFO.
Definition: dd_table.cc:2672
bool recreate_table(THD *thd, const char *schema_name, const char *table_name)
Regenerate a metadata locked table.
Definition: dd_table.cc:2630
bool invalid_tablespace_usage(THD *thd, const dd::String_type &schema_name, const dd::String_type &table_name, const HA_CREATE_INFO *create_info)
Checking if the table is being created in a restricted tablespace.
Definition: dd_table.cc:1897
bool get_field_numeric_scale(const Create_field *field, uint *scale)
Helper method to get numeric scale for types using Create_field type object.
Definition: dd_table.cc:370
bool is_encrypted(const String_type &type)
Definition: dd_table.h:421
bool get_field_datetime_precision(const Create_field *field, uint *datetime_precision)
Helper method to get datetime precision for types using Create_field type object.
Definition: dd_table.cc:454
Char_string_template< String_type_allocator > String_type
Definition: string_type.h:51
dd::enum_column_types get_new_field_type(enum_field_types type)
Convert to and from new enum types in DD framework to current MySQL server enum types.
Definition: dd_table.cc:120
Encrypt_result is_tablespace_encrypted(THD *thd, const Table &t, bool *is_general_tablespace)
Predicate to determine if a table resides in an encrypted tablespace.
Definition: dd_table.cc:2781
bool drop_table(THD *thd, const char *schema_name, const char *name, const dd::Table &table_def)
Definition: dd_table.cc:2442
std::unique_ptr< dd::Table > create_table(THD *thd, const dd::Schema &sch_obj, const dd::String_type &table_name, HA_CREATE_INFO *create_info, const List< Create_field > &create_fields, const KEY *keyinfo, uint keys, Alter_info::enum_enable_or_disable keys_onoff, const FOREIGN_KEY *fk_keyinfo, uint fk_keys, const Sql_check_constraint_spec_list *check_cons_spec, handler *file)
Prepares a dd::Table object from mysql_prepare_create_table() output and return it to the caller.
Definition: dd_table.cc:2402
bool is_generated_foreign_key_name(const char *table_name, size_t table_name_length, handlerton *hton, const dd::Foreign_key &fk)
Check if foreign key name is generated one.
Definition: dd_table.cc:2465
bool get_implicit_tablespace_options(THD *thd, const Table *table, ulonglong *autoextend_size)
Get the autoextend_size option value for implicit tablespaces.
Definition: dd_table.cc:3073
bool rename_foreign_keys(THD *thd, const char *old_db, const char *old_table_name, handlerton *hton, const char *new_db, dd::Table *new_tab)
Rename foreign keys which have generated names to match the new name of the table.
Definition: dd_table.cc:2496
bool has_primary_key(const Table &t)
Predicate which indicates if the table has real (non-hidden) primary key.
Definition: dd_table.cc:2815
std::unique_ptr< dd::Table > create_tmp_table(THD *thd, const dd::Schema &sch_obj, const dd::String_type &table_name, HA_CREATE_INFO *create_info, const List< Create_field > &create_fields, const KEY *keyinfo, uint keys, Alter_info::enum_enable_or_disable keys_onoff, const Sql_check_constraint_spec_list *check_cons_spec, handler *file)
Prepares a dd::Table object for a temporary table from mysql_prepare_create_table() output.
Definition: dd_table.cc:2422
const char * table_name
Definition: rules_table_service.cc:56
static int exists(node_address *name, node_list const *nodes, u_int with_uid)
Definition: node_list.cc:106
required string type
Definition: replication_group_member_actions.proto:34
row_type
Definition: handler.h:676
legacy_db_type
Definition: handler.h:640
case opt name
Definition: sslopt-case.h:33
Definition: m_ctype.h:385
Struct to hold information about the table that should be created.
Definition: handler.h:3045
Definition: mysql_lex_string.h:35
Template for structs to hold results from functions.
Definition: result_type.h:33
handlerton is a singleton structure - one instance per storage engine - to provide access to storage ...
Definition: handler.h:2622
unsigned int uint
Definition: uca9-dump.cc:75