24#ifndef DD_TABLE_INCLUDED
25#define DD_TABLE_INCLUDED
62class Dictionary_client;
394 uint *numeric_precision);
408 uint *datetime_precision);
432 bool *found_tablespace);
436 bool *found_tablespace);
458 size_t table_name_length,
460 size_t cc_name_length);
496 const char *orig_table_name,
enum_enable_or_disable
Definition: sql_alter.h:349
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:467
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:36
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:4571
A table definition from the master.
Definition: rpl_utility.h:248
enum_field_types
Column types for MySQL Note: Keep include/mysql/components/services/bits/stored_program_bits....
Definition: field_types.h:55
static uint keys
Definition: hp_test2.cc:49
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:56
uint32_t uint32
Definition: my_inttypes.h:67
static PFS_engine_table_share_proxy table
Definition: pfs.cc:61
borrowable::session_track::Schema< true > Schema
Definition: classic_protocol_session_track.h:288
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
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:238
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:499
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:2568
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:2615
bool uses_general_tablespace(const Table &t)
Check if table uses general tablespace.
Definition: dd_table.cc:2967
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:2703
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:2383
static const char CHECK_CONSTRAINT_NAME_SUBSTR[]
Definition: dd_table.h:66
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:2458
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:2844
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:407
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:2832
static const char FIELD_NAME_SEPARATOR_CHAR
Definition: dd_table.h:65
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:2682
bool recreate_table(THD *thd, const char *schema_name, const char *table_name)
Regenerate a metadata locked table.
Definition: dd_table.cc:2640
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:1907
bool prefix_key_partition_exists(const char *schema_name, const char *orig_table_name, const Table *table, const bool is_upgrade)
Check and give error if table uses prefix keys in the partitioning function.
Definition: dd_table.cc:2981
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:374
bool is_encrypted(const String_type &type)
Definition: dd_table.h:422
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:458
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:124
bool check_non_standard_key_exists_in_fk(THD *thd, const Table *table)
Validate if table uses foreign keys referring to proper index.
Definition: dd_table.cc:3161
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:2791
bool drop_table(THD *thd, const char *schema_name, const char *name, const dd::Table &table_def)
Definition: dd_table.cc:2452
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:2412
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:2475
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:3082
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:2506
bool has_primary_key(const Table &t)
Predicate which indicates if the table has real (non-hidden) primary key.
Definition: dd_table.cc:2825
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:2432
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:684
legacy_db_type
Definition: handler.h:648
case opt name
Definition: sslopt-case.h:29
Definition: m_ctype.h:423
Struct to hold information about the table that should be created.
Definition: handler.h:3202
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:2734