1 /* Copyright (c) 2015, 2021, 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_CMD_DML_INCLUDED
24 #define SQL_CMD_DML_INCLUDED
25 
26 #include "sql_cmd.h"
27 
28 
29 class Sql_cmd_dml : public Sql_cmd
30 {
31 public:
32   /**
33     Validate PS and do name resolution:
34 
35     * Check ACLs
36     * Open tables
37     * Prepare the query when needed (resolve names etc)
38 
39     @see check_prepared_statement()
40 
41     @param thd the current thread.
42 
43     @retval false on success.
44     @retval true on error
45   */
46   virtual bool prepared_statement_test(THD *thd)= 0;
47 
48   /**
49     Command-specific resolving (doesn't include LEX::prepare())
50 
51     @see select_like_stmt_test()
52 
53     @param thd  Current THD.
54 
55     @retval false on success.
56     @retval true on error
57   */
58   virtual bool prepare(THD *thd)= 0;
59 };
60 
61 #endif /* SQL_CMD_DML_INCLUDED */
62