MySQL 8.3.0
Source Code Documentation
sql_import.h
Go to the documentation of this file.
1/* Copyright (c) 2016, 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_IMPORT_INCLUDED
24#define SQL_IMPORT_INCLUDED
25
26#include "lex_string.h"
27#include "my_sqlcommand.h"
28#include "sql/mem_root_array.h"
29#include "sql/sql_cmd.h" // Sql_cmd
30
31class THD;
32
33/**
34 @file sql/sql_import.h Declaration of command class for the IMPORT TABLES
35 command.
36 */
37
38/**
39 Command class for the IMPORT command.
40 */
44
45 public:
46 /**
47 Called by sql_yacc.yy.
48
49 @param patterns - Mem_root_array_YY of all the sdi file patterns
50 provided as arguments.
51 */
53
54 /**
55 Import tables from SDI files or patterns provided to constructor.
56 @param thd - thread handle
57 @retval true on error
58 @retval false otherwise
59 */
60 bool execute(THD *thd) override;
61
62 /**
63 Provide access to the command code enum value.
64 @return command code enum value
65 */
66 enum_sql_command sql_command_code() const override;
67};
68#endif /* !SQL_IMPORT_INCLUDED */
A typesafe replacement for DYNAMIC_ARRAY.
Definition: mem_root_array.h:60
Command class for the IMPORT command.
Definition: sql_import.h:41
enum_sql_command sql_command_code() const override
Provide access to the command code enum value.
Definition: sql_import.cc:207
Mem_root_array_YY< LEX_STRING > Sdi_patterns_type
Definition: sql_import.h:42
bool execute(THD *thd) override
Import tables from SDI files or patterns provided to constructor.
Definition: sql_import.cc:64
Sql_cmd_import_table(const Sdi_patterns_type &patterns)
Called by sql_yacc.yy.
Definition: sql_import.cc:60
const Sdi_patterns_type m_sdi_patterns
Definition: sql_import.h:43
Representation of an SQL command.
Definition: sql_cmd.h:82
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:35
enum_sql_command
Definition: my_sqlcommand.h:45
Representation of an SQL command.