MySQL 8.0.40
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 return nullptr;
46 }
47};
48
49class Query_result_do final : public Query_result {
50 public:
53 uint) override {
54 return false;
55 }
56 bool send_data(THD *thd, const mem_root_deque<Item *> &items) override;
57 bool send_eof(THD *thd) override;
58 bool check_supports_cursor() const override { return false; }
59 void abort_result_set(THD *) override {}
60 void cleanup() override {}
61};
62
63#endif /* SQL_DO_INCLUDED */
Base class that is used to represent any kind of expression in a relational query.
Definition: item.h:853
Definition: sql_list.h:434
Definition: sql_do.h:49
void cleanup() override
Cleanup after this execution.
Definition: sql_do.h:60
bool send_result_set_metadata(THD *, const mem_root_deque< Item * > &, uint) override
Definition: sql_do.h:52
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:59
Query_result_do()
Definition: sql_do.h:51
bool check_supports_cursor() const override
Check if this query result set supports cursors.
Definition: sql_do.h:58
bool send_eof(THD *thd) override
Definition: sql_do.cc:51
Definition: query_result.h:54
Definition: sql_do.h:38
Sql_cmd_do(Query_result *result_arg)
Definition: sql_do.h:40
const MYSQL_LEX_CSTRING * eligible_secondary_storage_engine() 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
enum_sql_command sql_command_code() const override
Return the command code for this statement.
Definition: sql_do.h:42
Definition: sql_select.h:74
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:34
A (partial) implementation of std::deque allocating its blocks on a MEM_ROOT.
Definition: mem_root_deque.h:110
enum_sql_command
Definition: my_sqlcommand.h:46
@ SQLCOM_DO
Definition: my_sqlcommand.h:124
Definition: mysql_lex_string.h:40
unsigned int uint
Definition: uca9-dump.cc:75