MySQL 8.0.30
Source Code Documentation
sql_do.h
Go to the documentation of this file.
1/* Copyright (c) 2006, 2022, 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 return nullptr;
45 }
46};
47
48class Query_result_do final : public Query_result {
49 public:
52 uint) override {
53 return false;
54 }
55 bool send_data(THD *thd, const mem_root_deque<Item *> &items) override;
56 bool send_eof(THD *thd) override;
57 bool check_simple_query_block() const override { return false; }
58 void abort_result_set(THD *) override {}
59 void cleanup(THD *) override {}
60};
61
62#endif /* SQL_DO_INCLUDED */
Base class that is used to represent any kind of expression in a relational query.
Definition: item.h:802
Definition: sql_list.h:433
Definition: sql_do.h:48
bool check_simple_query_block() const override
Check if this query returns a result set and therefore is allowed in cursors and set an error message...
Definition: sql_do.h:57
bool send_result_set_metadata(THD *, const mem_root_deque< Item * > &, uint) override
Definition: sql_do.h:51
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:58
Query_result_do()
Definition: sql_do.h:50
void cleanup(THD *) override
Cleanup after this execution.
Definition: sql_do.h:59
bool send_eof(THD *thd) override
Definition: sql_do.cc:50
Definition: query_result.h:51
Definition: sql_do.h:37
Sql_cmd_do(Query_result *result_arg)
Definition: sql_do.h:39
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:43
enum_sql_command sql_command_code() const override
Return the command code for this statement.
Definition: sql_do.h:41
Definition: sql_select.h:73
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_class.h:922
A (partial) implementation of std::deque allocating its blocks on a MEM_ROOT.
Definition: mem_root_deque.h:109
enum_sql_command
Definition: my_sqlcommand.h:45
@ SQLCOM_DO
Definition: my_sqlcommand.h:123
Definition: mysql_lex_string.h:39
unsigned int uint
Definition: uca-dump.cc:29