28#ifndef SQL_CMD_INCLUDED
29#define SQL_CMD_INCLUDED
Prepared_statement: a statement that can contain placeholders.
Definition: sql_prepare.h:345
Abstract base class for traversing the Query_block tree.
Definition: select_lex_visitor.h:39
Representation of an SQL command.
Definition: sql_cmd.h:81
bool m_part_of_sp
Owning prepared statement, NULL if non-prep.
Definition: sql_cmd.h:260
virtual bool prepare(THD *)
Prepare this SQL statement.
Definition: sql_cmd.h:118
void use_secondary_storage_engine(const handlerton *hton)
Mark the current statement as using a secondary storage engine.
Definition: sql_cmd.h:210
virtual bool execute(THD *thd)=0
Execute this SQL statement.
const handlerton * m_secondary_engine
The secondary storage engine to use for execution of this statement, if any, or nullptr if the primar...
Definition: sql_cmd.h:281
void set_as_part_of_sp()
Mark statement as part of procedure.
Definition: sql_cmd.h:154
bool using_secondary_storage_engine() const
Is this statement using a secondary storage engine?
Definition: sql_cmd.h:223
void operator=(Sql_cmd &)
virtual enum enum_sql_cmd_type sql_cmd_type() const
Definition: sql_cmd.h:162
virtual void cleanup(THD *)
Command-specific reinitialization before execution of prepared statement.
Definition: sql_cmd.h:139
virtual const MYSQL_LEX_CSTRING * eligible_secondary_storage_engine() const
Is this statement of a type and on a form that makes it eligible for execution in a secondary storage...
Definition: sql_cmd.h:184
bool is_optional_transform_prepared()
Definition: sql_cmd.h:238
bool m_prepared_with_optional_transform
Keeps track of whether the statement was prepared optional transformation.
Definition: sql_cmd.h:274
bool is_part_of_sp() const
Definition: sql_cmd.h:159
Sql_cmd()
Definition: sql_cmd.h:243
bool is_regular() const
Definition: sql_cmd.h:106
virtual ~Sql_cmd()
Definition: sql_cmd.h:245
void set_prepared()
Set this statement as prepared.
Definition: sql_cmd.h:256
virtual bool is_single_table_plan() const
Definition: sql_cmd.h:167
Prepared_statement * owner() const
Get the owning prepared statement.
Definition: sql_cmd.h:148
bool m_secondary_engine_enabled
True when statement has been prepared.
Definition: sql_cmd.h:268
virtual bool accept(THD *, Select_lex_visitor *)
Definition: sql_cmd.h:174
void disable_secondary_storage_engine()
Disable use of secondary storage engines in this statement.
Definition: sql_cmd.h:193
bool is_prepared() const
Definition: sql_cmd.h:109
const handlerton * secondary_engine() const
Get the handlerton of the secondary engine that is used for executing this statement,...
Definition: sql_cmd.h:232
virtual enum_sql_command sql_command_code() const =0
Return the command code for this statement.
void set_optional_transform_prepared(bool value)
Definition: sql_cmd.h:234
bool needs_explicit_preparation() const
Definition: sql_cmd.h:99
bool m_prepared
True when statement is part of stored proc.
Definition: sql_cmd.h:261
bool secondary_storage_engine_disabled() const
Has use of secondary storage engines been disabled for this statement?
Definition: sql_cmd.h:201
Prepared_statement * m_owner
Definition: sql_cmd.h:259
void set_owner(Prepared_statement *stmt)
Set the owning prepared statement.
Definition: sql_cmd.h:142
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:33
Fido Client Authentication nullptr
Definition: fido_client_plugin.cc:221
enum_sql_command
Definition: my_sqlcommand.h:45
Visitor interface for parse trees.
enum_sql_cmd_type
What type of Sql_cmd we're dealing with (DML, DDL, other).
Definition: sql_cmd.h:52
@ SQL_CMD_DDL
Definition: sql_cmd.h:54
@ SQL_CMD_OTHER
Definition: sql_cmd.h:56
@ SQL_CMD_UNDETERMINED
Definition: sql_cmd.h:53
@ SQL_CMD_DML
Definition: sql_cmd.h:55
Definition: mysql_lex_string.h:39
Definition: mysql_lex_string.h:34
handlerton is a singleton structure - one instance per storage engine - to provide access to storage ...
Definition: handler.h:2661