MySQL  8.0.19
Source Code Documentation
sql_do.h
Go to the documentation of this file.
1 /* Copyright (c) 2006, 2019, Oracle and/or its affiliates. All rights reserved.
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 
32 class Item;
33 class THD;
34 template <class T>
35 class List;
36 
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 
49  public:
52  return false;
53  }
54  bool send_data(THD *thd, List<Item> &items) override;
55  bool send_eof(THD *thd) override;
56  bool check_simple_select() const override { return false; }
57  void abort_result_set(THD *) override {}
58  void cleanup(THD *) override {}
59 };
60 
61 #endif /* SQL_DO_INCLUDED */
MYSQL_LEX_CSTRING
Definition: mysql_lex_string.h:39
Item
Definition: item.h:665
THD
Definition: sql_class.h:764
Sql_cmd_do::Sql_cmd_do
Sql_cmd_do(Query_result *result_arg)
Definition: sql_do.h:39
Query_result_do::cleanup
void cleanup(THD *) override
Cleanup after this execution.
Definition: sql_do.h:58
SQLCOM_DO
@ SQLCOM_DO
Definition: my_sqlcommand.h:123
my_sqlcommand.h
Query_result
Definition: query_result.h:48
query_result.h
Query_result_do::Query_result_do
Query_result_do()
Definition: sql_do.h:50
Query_result_do::send_data
bool send_data(THD *thd, List< Item > &items) override
Definition: sql_do.cc:35
enum_sql_command
enum_sql_command
Definition: my_sqlcommand.h:45
sql_select.h
Query_result_do
Definition: sql_do.h:48
uint
unsigned int uint
Definition: uca-dump.cc:29
Query_result_do::abort_result_set
void abort_result_set(THD *) override
Definition: sql_do.h:57
Query_result_do::send_result_set_metadata
bool send_result_set_metadata(THD *, List< Item > &, uint) override
Definition: sql_do.h:51
Sql_cmd_select
Definition: sql_select.h:69
Sql_cmd_do
Definition: sql_do.h:37
Query_result_do::check_simple_select
bool check_simple_select() 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:56
Sql_cmd_do::sql_command_code
enum_sql_command sql_command_code() const override
Return the command code for this statement.
Definition: sql_do.h:41
items
Definition: items.h:34
Query_result_do::send_eof
bool send_eof(THD *thd) override
Definition: sql_do.cc:50
List
Definition: aggregate_check.h:523
final
#define final(a, b, c)
Definition: hash.c:109
Sql_cmd_do::eligible_secondary_storage_engine
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