MySQL 8.3.0
Source Code Documentation
PT_create_table_stmt Class Referencefinal

Top-level node for the CREATE TABLE statement. More...

#include <parse_tree_nodes.h>

Inheritance diagram for PT_create_table_stmt:
[legend]

Public Member Functions

 PT_create_table_stmt (const POS &pos, MEM_ROOT *mem_root, bool is_temporary, bool only_if_not_exists, Table_ident *table_name, const Mem_root_array< PT_table_element * > *opt_table_element_list, const Mem_root_array< PT_create_table_option * > *opt_create_table_options, PT_partition *opt_partitioning, On_duplicate on_duplicate, PT_query_expression_body *opt_query_expression)
 
 PT_create_table_stmt (const POS &pos, MEM_ROOT *mem_root, bool is_temporary, bool only_if_not_exists, Table_ident *table_name, Table_ident *opt_like_clause)
 
Sql_cmdmake_cmd (THD *thd) override
 
- Public Member Functions inherited from PT_table_ddl_stmt_base
 PT_table_ddl_stmt_base (const POS &pos, MEM_ROOT *mem_root)
 
 ~PT_table_ddl_stmt_base () override=0
 
- Public Member Functions inherited from Parse_tree_root
virtual std::string get_printable_parse_tree (THD *thd)
 

Private Attributes

bool is_temporary
 
bool only_if_not_exists
 
Table_identtable_name
 
const Mem_root_array< PT_table_element * > * opt_table_element_list
 
const Mem_root_array< PT_create_table_option * > * opt_create_table_options
 
PT_partitionopt_partitioning
 
On_duplicate on_duplicate
 
PT_query_expression_bodyopt_query_expression
 
Table_identopt_like_clause
 
HA_CREATE_INFO m_create_info
 

Additional Inherited Members

- Public Attributes inherited from Parse_tree_root
POS m_pos
 Textual location of a token just parsed. More...
 
- Protected Member Functions inherited from Parse_tree_root
 Parse_tree_root ()=default
 
 Parse_tree_root (const POS &pos)
 
virtual ~Parse_tree_root ()=default
 
- Protected Attributes inherited from PT_table_ddl_stmt_base
Alter_info m_alter_info
 

Detailed Description

Top-level node for the CREATE TABLE statement.

Constructor & Destructor Documentation

◆ PT_create_table_stmt() [1/2]

PT_create_table_stmt::PT_create_table_stmt ( const POS pos,
MEM_ROOT mem_root,
bool  is_temporary,
bool  only_if_not_exists,
Table_ident table_name,
const Mem_root_array< PT_table_element * > *  opt_table_element_list,
const Mem_root_array< PT_create_table_option * > *  opt_create_table_options,
PT_partition opt_partitioning,
On_duplicate  on_duplicate,
PT_query_expression_body opt_query_expression 
)
inline
Parameters
posPosition of this clause in the SQL statement.
mem_rootMEM_ROOT to use for allocation
is_temporaryTrue if CREATE TEMPORARY TABLE
only_if_not_existsTrue if CREATE TABLE ... IF NOT EXISTS
table_nameCREATE TABLE ... <table name>
opt_table_element_listNULL or a list of table column and constraint definitions.
opt_create_table_optionsNULL or a list of table options.
opt_partitioningNULL or the PARTITION BY clause.
on_duplicateDUPLICATE, IGNORE or fail with an error on data duplication errors (relevant for CREATE TABLE ... SELECT statements).
opt_query_expressionNULL or the SELECT clause.

◆ PT_create_table_stmt() [2/2]

PT_create_table_stmt::PT_create_table_stmt ( const POS pos,
MEM_ROOT mem_root,
bool  is_temporary,
bool  only_if_not_exists,
Table_ident table_name,
Table_ident opt_like_clause 
)
inline
Parameters
posPosition of this clause in the SQL statement.
mem_rootMEM_ROOT to use for allocation
is_temporaryTrue if CREATE TEMPORARY TABLE.
only_if_not_existsTrue if CREATE TABLE ... IF NOT EXISTS.
table_nameCREATE TABLE ... <table name>.
opt_like_clauseNULL or the LIKE <table name> clause.

Member Function Documentation

◆ make_cmd()

Sql_cmd * PT_create_table_stmt::make_cmd ( THD thd)
overridevirtual

Implements Parse_tree_root.

Member Data Documentation

◆ is_temporary

bool PT_create_table_stmt::is_temporary
private

◆ m_create_info

HA_CREATE_INFO PT_create_table_stmt::m_create_info
private

◆ on_duplicate

On_duplicate PT_create_table_stmt::on_duplicate
private

◆ only_if_not_exists

bool PT_create_table_stmt::only_if_not_exists
private

◆ opt_create_table_options

const Mem_root_array<PT_create_table_option *>* PT_create_table_stmt::opt_create_table_options
private

◆ opt_like_clause

Table_ident* PT_create_table_stmt::opt_like_clause
private

◆ opt_partitioning

PT_partition* PT_create_table_stmt::opt_partitioning
private

◆ opt_query_expression

PT_query_expression_body* PT_create_table_stmt::opt_query_expression
private

◆ opt_table_element_list

const Mem_root_array<PT_table_element *>* PT_create_table_stmt::opt_table_element_list
private

◆ table_name

Table_ident* PT_create_table_stmt::table_name
private

The documentation for this class was generated from the following files: