MySQL 8.4.3
Source Code Documentation
dd_table.h File Reference
#include <sys/types.h>
#include <memory>
#include <string>
#include "my_inttypes.h"
#include "sql/dd/result_type.h"
#include "sql/dd/string_type.h"
#include "sql/dd/types/column.h"
#include "sql/handler.h"
#include "sql/sql_alter.h"

Go to the source code of this file.

Namespaces

namespace  dd
 The version of the current data dictionary table definitions.
 
namespace  dd::cache
 

Typedefs

using Sql_check_constraint_spec_list = Mem_root_array< Sql_check_constraint_spec * >
 
using dd::Encrypt_result = ResultType< bool >
 

Functions

std::unique_ptr< dd::Tabledd::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. More...
 
std::unique_ptr< dd::Tabledd::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. More...
 
std::unique_ptr< dd::Tabledd::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. More...
 
bool dd::drop_table (THD *thd, const char *schema_name, const char *name, const dd::Table &table_def)
 
bool dd::table_exists (dd::cache::Dictionary_client *client, const char *schema_name, const char *name, bool *exists)
 Check if a table or view exists. More...
 
bool dd::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. More...
 
bool dd::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. More...
 
bool dd::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. More...
 
bool dd::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. More...
 
template<typename T >
bool dd::table_storage_engine (THD *thd, const T *obj, handlerton **hton)
 Get the storage engine handlerton for the given table or tablespace. More...
 
bool dd::recreate_table (THD *thd, const char *schema_name, const char *table_name)
 Regenerate a metadata locked table. More...
 
dd::String_type dd::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. More...
 
dd::enum_column_types dd::get_new_field_type (enum_field_types type)
 Convert to and from new enum types in DD framework to current MySQL server enum types. More...
 
bool dd::fix_row_type (THD *thd, dd::Table *table, row_type correct_row_type)
 Update row format for the table with the value value supplied by caller function. More...
 
bool dd::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. More...
 
dd::String_type dd::get_sql_type_by_create_field (TABLE *table, const Create_field &field)
 Function returns string representing column type by Create_field. More...
 
bool dd::get_field_numeric_scale (const Create_field *field, uint *scale)
 Helper method to get numeric scale for types using Create_field type object. More...
 
bool dd::get_field_numeric_precision (const Create_field *field, uint *numeric_precision)
 Helper method to get numeric precision for types using Create_field type object. More...
 
bool dd::get_field_datetime_precision (const Create_field *field, uint *datetime_precision)
 Helper method to get datetime precision for types using Create_field type object. More...
 
bool dd::is_encrypted (const String_type &type)
 
bool dd::is_encrypted (const LEX_STRING &type)
 
Encrypt_result dd::is_tablespace_encrypted (THD *thd, const Table &t, bool *is_general_tablespace)
 Predicate to determine if a table resides in an encrypted tablespace. More...
 
Encrypt_result dd::is_tablespace_encrypted (THD *thd, const HA_CREATE_INFO *ci, bool *is_general_tablespace)
 Predicate to determine if a table resides in an encrypted tablespace and if it a general tablespace. More...
 
bool dd::has_primary_key (const Table &t)
 Predicate which indicates if the table has real (non-hidden) primary key. More...
 
bool dd::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. More...
 
bool dd::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. More...
 
bool dd::uses_general_tablespace (const Table &t)
 Check if table uses general tablespace. More...
 
bool dd::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. More...
 
bool dd::get_implicit_tablespace_options (THD *thd, const Table *table, ulonglong *autoextend_size)
 Get the autoextend_size option value for implicit tablespaces. More...
 
bool dd::check_non_standard_key_exists_in_fk (THD *thd, const Table *table)
 Validate if table uses foreign keys referring to proper index. More...
 

Variables

static const char dd::FIELD_NAME_SEPARATOR_CHAR = ';'
 
static const char dd::CHECK_CONSTRAINT_NAME_SUBSTR [] = "_chk_"
 

Typedef Documentation

◆ Sql_check_constraint_spec_list