MySQL 8.3.0
Source Code Documentation
sql_do.h
Go to the documentation of this file.
1/* Copyright (c) 2006, 2023, 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 also distributed 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 included with MySQL.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License, version 2.0, for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22
23#ifndef SQL_DO_INCLUDED
24#define SQL_DO_INCLUDED
25
26#include <sys/types.h>
27
28#include "my_sqlcommand.h"
29#include "sql/query_result.h"
30#include "sql/sql_select.h"
31
32class Item;
33class THD;
34template <class T>
35class List;
36
37class Sql_cmd_do final : public Sql_cmd_select {
38 public:
39 explicit Sql_cmd_do(Query_result *result_arg) : Sql_cmd_select(result_arg) {}
40
41 enum_sql_command sql_command_code() const override { return SQLCOM_DO; }
42
44 THD *) const override {
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:933
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:36
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:50
Definition: query_result.h:57
Definition: sql_do.h:37
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:43
Sql_cmd_do(Query_result *result_arg)
Definition: sql_do.h:39
enum_sql_command sql_command_code() const override
Return the command code for this statement.
Definition: sql_do.h:41
Definition: sql_select.h:75
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:35
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:45
@ SQLCOM_DO
Definition: my_sqlcommand.h:123
Definition: mysql_lex_string.h:39