24#ifndef QUERY_RESULT_INCLUDED
25#define QUERY_RESULT_INCLUDED
40#include "mysqld_error.h"
52template <
class Element_type>
212 uint
flags)
override;
266#define ESCAPE_CHARS "ntrb0ZN"
271#define NUMERIC_CHARS ".0123456789e+-"
Kerberos Client Authentication nullptr
Definition: auth_kerberos_client_plugin.cc:247
Base class that is common to all subqueries and subquery predicates.
Definition: item_subselect.h:80
Base class that is used to represent any kind of expression in a relational query.
Definition: item.h:930
Definition: sql_list.h:494
Definition: parse_tree_nodes.h:1351
Definition: query_result.h:315
List< PT_select_var > var_list
Definition: query_result.h:319
bool prepare(THD *thd, const mem_root_deque< Item * > &list, Query_expression *u) override
Perform preparation specific to the query expression or DML statement.
Definition: query_result.cc:999
void cleanup() override
Cleanup after this execution.
Definition: query_result.h:328
bool send_eof(THD *thd) override
Definition: query_result.cc:1048
ha_rows row_count
Definition: query_result.h:316
Query_dumpvar()
Definition: query_result.h:320
bool send_data(THD *thd, const mem_root_deque< Item * > &items) override
Definition: query_result.cc:1016
bool check_supports_cursor() const override
Check if this query result set supports cursors.
Definition: query_result.cc:1011
bool use_protocol_wrapper() const override
An alternative implementation may provide an optimized protocol wrapper for this object.
Definition: query_result.h:333
This class represents a query expression (one query block or several query blocks combined with UNION...
Definition: sql_lex.h:638
Definition: query_result.h:306
Query_result_dump(sql_exchange *ex)
Definition: query_result.h:308
bool send_data(THD *thd, const mem_root_deque< Item * > &items) override
Definition: query_result.cc:968
bool prepare(THD *thd, const mem_root_deque< Item * > &list, Query_expression *u) override
Perform preparation specific to the query expression or DML statement.
Definition: query_result.cc:957
bool start_execution(THD *thd) override
Prepare for execution of the query expression or DML statement.
Definition: query_result.cc:963
Definition: query_result.h:273
bool start_execution(THD *thd) override
Prepare for execution of the query expression or DML statement.
Definition: query_result.cc:643
const CHARSET_INFO * write_cs
Definition: query_result.h:296
bool is_unsafe_field_sep
Definition: query_result.h:294
bool prepare(THD *thd, const mem_root_deque< Item * > &list, Query_expression *u) override
Perform preparation specific to the query expression or DML statement.
Definition: query_result.cc:556
void cleanup() override
Cleanup after this execution.
Definition: query_result.cc:948
int field_sep_char
Definition: query_result.h:275
bool fixed_row_size
Definition: query_result.h:295
int escape_char
Definition: query_result.h:275
bool send_data(THD *thd, const mem_root_deque< Item * > &items) override
Definition: query_result.cc:654
size_t field_term_length
Definition: query_result.h:274
int line_sep_char
Definition: query_result.h:275
Query_result_export(sql_exchange *ex)
Definition: query_result.h:298
bool is_ambiguous_field_sep
Definition: query_result.h:282
bool is_ambiguous_field_term
Definition: query_result.h:288
int field_term_char
Definition: query_result.h:276
Definition: query_result.h:191
Query_result_interceptor()
Definition: query_result.h:193
bool send_result_set_metadata(THD *, const mem_root_deque< Item * > &, uint) override
Definition: query_result.h:195
uint field_count(const mem_root_deque< Item * > &) const override
Definition: query_result.h:194
Definition: query_result.h:201
void cleanup() override
Cleanup after this execution.
Definition: query_result.h:217
bool is_result_set_started
True if we have sent result set metadata to the client.
Definition: query_result.h:207
bool use_protocol_adapter() const override
An alternative implementation may provide an optimized protocol adapter for this object.
Definition: query_result.h:222
Query_result_send()
Definition: query_result.h:210
bool check_supports_cursor() const override
Check if this query result set supports cursors.
Definition: query_result.h:215
bool send_data(THD *thd, const mem_root_deque< Item * > &items) override
Definition: query_result.cc:99
void abort_result_set(THD *thd) override
Definition: query_result.cc:80
bool send_result_set_metadata(THD *thd, const mem_root_deque< Item * > &list, uint flags) override
Definition: query_result.cc:72
bool send_eof(THD *thd) override
Definition: query_result.cc:114
Base class for result from a subquery.
Definition: query_result.h:340
bool send_eof(THD *) override
Definition: query_result.h:348
Query_result_subquery(Item_subselect *item_arg)
Definition: query_result.h:345
bool send_data(THD *thd, const mem_root_deque< Item * > &items) override=0
Item_subselect * item
Definition: query_result.h:342
Definition: query_result.h:227
bool needs_file_privilege() const override
Definition: query_result.h:242
IO_CACHE cache
Definition: query_result.h:231
bool check_supports_cursor() const override
Check if this query result set supports cursors.
Definition: query_result.cc:435
sql_exchange * exchange
Definition: query_result.h:229
char path[FN_REFLEN]
Definition: query_result.h:233
Query_result_to_file(sql_exchange *ex)
Definition: query_result.h:236
File file
Definition: query_result.h:230
void cleanup() override
Cleanup after this execution.
Definition: query_result.cc:451
~Query_result_to_file() override
Definition: query_result.h:240
ha_rows row_count
Definition: query_result.h:232
bool send_eof(THD *thd) override
Definition: query_result.cc:440
Definition: query_result.h:248
Query_result_to_object_store(sql_exchange *ex)
Definition: query_result.h:253
sql_exchange * get_sql_exchange()
Definition: query_result.h:263
void cleanup() override
Reset the number of affected rows.
Definition: query_result.cc:478
bool export_result_to_object_storage() const override
Returns true if the data has to be exported to object store.
Definition: query_result.h:261
bool send_data(THD *, const mem_root_deque< Item * > &) override
Definition: query_result.h:256
sql_exchange * exchange
Definition: query_result.h:250
bool use_protocol_adapter() const override
Definition: query_result.h:262
bool send_eof(THD *thd) override
Returns true incase of an error.
Definition: query_result.cc:469
Definition: query_result.h:60
virtual Server_side_cursor * cursor() const
Definition: query_result.h:176
Query_result()
Definition: query_result.h:76
virtual bool send_eof(THD *thd)=0
virtual bool send_result_set_metadata(THD *thd, const mem_root_deque< Item * > &list, uint flags)=0
virtual bool send_data(THD *thd, const mem_root_deque< Item * > &items)=0
virtual bool change_query_result(THD *, Query_result *)
Change wrapped Query_result.
Definition: query_result.h:97
virtual bool need_explain_interceptor() const
Definition: query_result.h:99
virtual bool prepare(THD *, const mem_root_deque< Item * > &, Query_expression *u)
Perform preparation specific to the query expression or DML statement.
Definition: query_result.h:106
double estimated_cost
Cost to execute the subquery which produces this result.
Definition: query_result.h:74
ha_rows estimated_rowcount
Number of records estimated in this result.
Definition: query_result.h:69
virtual void cleanup()
Cleanup after this execution.
Definition: query_result.h:159
virtual bool use_protocol_wrapper() const
Definition: query_result.h:170
virtual bool reset()
Cleanup after one execution of the unit, to be ready for a next execution inside the same statement.
Definition: query_result.h:151
virtual bool export_result_to_object_storage() const
Returns true if the data has to be exported to object store.
Definition: query_result.h:84
virtual bool check_supports_cursor() const
Check if this query result set supports cursors.
Definition: query_result.h:141
virtual uint field_count(const mem_root_deque< Item * > &fields) const
Definition: query_result.cc:68
virtual void abort_result_set(THD *)
Definition: query_result.h:145
virtual Table_ref * get_create_table() const
Definition: query_result.h:182
virtual bool use_protocol_adapter() const
Definition: query_result.h:165
virtual bool create_table_for_query_block(THD *)
Create table, only needed to support CREATE TABLE ... SELECT.
Definition: query_result.h:124
Query_expression * unit
Definition: query_result.h:62
virtual ~Query_result()=default
virtual bool needs_file_privilege() const
Definition: query_result.h:79
virtual void set_limit(ha_rows)
Only overridden (and non-empty) for Query_result_union, q.v.
Definition: query_result.h:173
virtual bool start_execution(THD *)
Prepare for execution of the query expression or DML statement.
Definition: query_result.h:121
Common base class for n-ary set operations, including unary.
Definition: query_term.h:555
Server_side_cursor – an interface for materialized implementation of cursors.
Definition: sql_cursor.h:51
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
A (partial) implementation of std::deque allocating its blocks on a MEM_ROOT.
Definition: mem_root_deque.h:111
Definition: sql_exchange.h:192
#define L
Definition: ctype-tis620.cc:74
void my_error(int nr, myf MyFlags,...)
Fill in and print a previously registered error message.
Definition: my_error.cc:216
static int flags[50]
Definition: hp_test1.cc:40
A better implementation of the UNIX ctype(3) library.
This file includes constants used by all storage engines.
my_off_t ha_rows
Definition: my_base.h:1141
Some integer typedefs for easier portability.
#define MYF(v)
Definition: my_inttypes.h:97
Common #defines and includes for file and socket I/O.
#define FN_REFLEN
Definition: my_io.h:87
Types to make file and socket I/O compatible.
int File
Definition: my_io_bits.h:51
Common header for many mysys elements.
std::list< T, ut::allocator< T > > list
Specialization of list which uses ut_allocator.
Definition: ut0new.h:2880
Definition: m_ctype.h:421