MySQL 8.4.3
Source Code Documentation
sql_do.h
Go to the documentation of this file.
1/* Copyright (c) 2006, 2024, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is designed to work with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have either included with
13 the program or referenced in the documentation.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef SQL_DO_INCLUDED
25#define SQL_DO_INCLUDED
26
27#include <sys/types.h>
28
29#include "my_sqlcommand.h"
30#include "sql/query_result.h"
31#include "sql/sql_select.h"
32
33class Item;
34class THD;
35template <class T>
36class List;
37
38class Sql_cmd_do final : public Sql_cmd_select {
39 public:
40 explicit Sql_cmd_do(Query_result *result_arg) : Sql_cmd_select(result_arg) {}
41
42 enum_sql_command sql_command_code() const override { return SQLCOM_DO; }
43
45 THD *) const override {
46 return nullptr;
47 }
48};
49
50class Query_result_do final : public Query_result {
51 public:
54 uint) override {
55 return false;
56 }
57 bool send_data(THD *thd, const mem_root_deque<Item *> &items) override;
58 bool send_eof(THD *thd) override;
59 bool check_supports_cursor() const override { return false; }
60 void abort_result_set(THD *) override {}
61 void cleanup() override {}
62};
63
64#endif /* SQL_DO_INCLUDED */
Base class that is used to represent any kind of expression in a relational query.
Definition: item.h:936
Definition: sql_list.h:467
Definition: sql_do.h:50
void cleanup() override
Cleanup after this execution.
Definition: sql_do.h:61
bool send_result_set_metadata(THD *, const mem_root_deque< Item * > &, uint) override
Definition: sql_do.h:53
bool send_data(THD *thd, const mem_root_deque< Item * > &items) override
Definition: sql_do.cc:37
void abort_result_set(THD *) override
Definition: sql_do.h:60
Query_result_do()
Definition: sql_do.h:52
bool check_supports_cursor() const override
Check if this query result set supports cursors.
Definition: sql_do.h:59
bool send_eof(THD *thd) override
Definition: sql_do.cc:51
Definition: query_result.h:58
Definition: sql_do.h:38
const MYSQL_LEX_CSTRING * eligible_secondary_storage_engine(THD *) const override
Is this statement of a type and on a form that makes it eligible for execution in a secondary storage...
Definition: sql_do.h:44
Sql_cmd_do(Query_result *result_arg)
Definition: sql_do.h:40
enum_sql_command sql_command_code() const override
Return the command code for this statement.
Definition: sql_do.h:42
Definition: sql_select.h:76
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
enum_sql_command
Definition: my_sqlcommand.h:46
@ SQLCOM_DO
Definition: my_sqlcommand.h:124
Definition: mysql_lex_string.h:40