1/* Copyright (c) 2015, 2024, Oracle and/or its affiliates.
2
3This program is free software; you can redistribute it and/or modify
4it under the terms of the GNU General Public License, version 2.0,
5as published by the Free Software Foundation.
6
7This program is designed to work with certain software (including
8but not limited to OpenSSL) that is licensed under separate terms,
9as designated in a particular file or component or in included license
10documentation. The authors of MySQL hereby grant you an additional
11permission to link the program and your derivative works with the
12separately licensed software that they have either included with
13the program or referenced in the documentation.
14
15Without limiting anything contained in the foregoing, this file,
16which is part of C Driver for MySQL (Connector/C), is also subject to the
17Universal FOSS Exception, version 1.0, a copy of which can be found at
18http://oss.oracle.com/licenses/universal-foss-exception.
19
20This program is distributed in the hope that it will be useful,
21but WITHOUT ANY WARRANTY; without even the implied warranty of
22MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23GNU General Public License, version 2.0, for more details.
24
25You should have received a copy of the GNU General Public License
26along with this program; if not, write to the Free Software
27Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
28
29#ifndef _mysql_command_h
30#define _mysql_command_h
31
32/**
33 @file include/my_command.h
34*/
35
36/**
37 @enum enum_server_command
38
39 @brief A list of all MySQL protocol commands.
40
41 These are the top level commands the server can receive
42 while it listens for a new command in ::dispatch_command
43
44 @par Warning
45 Add new commands to the end of this list, otherwise old
46 servers won't be able to handle them as 'unsupported'.
47*/
48enum enum_server_command {
49 /**
50 Currently refused by the server. See ::dispatch_command.
51 Also used internally to mark the start of a session.
52 */
53 COM_SLEEP,
54 COM_QUIT, /**< See @ref page_protocol_com_quit */
55 COM_INIT_DB, /**< See @ref page_protocol_com_init_db */
56 COM_QUERY, /**< See @ref page_protocol_com_query */
57 COM_FIELD_LIST, /**< Deprecated. See @ref page_protocol_com_field_list */
58 COM_CREATE_DB, /**< Currently refused by the server. See ::dispatch_command */
59 COM_DROP_DB, /**< Currently refused by the server. See ::dispatch_command */
60 COM_REFRESH, /**< Deprecated. See @ref page_protocol_com_refresh */
61 COM_DEPRECATED_1, /**< Deprecated, used to be COM_SHUTDOWN */
62 COM_STATISTICS, /**< See @ref page_protocol_com_statistics */
63 COM_PROCESS_INFO, /**< Deprecated. See @ref page_protocol_com_process_info */
64 COM_CONNECT, /**< Currently refused by the server. */
65 COM_PROCESS_KILL, /**< Deprecated. See @ref page_protocol_com_process_kill */
66 COM_DEBUG, /**< See @ref page_protocol_com_debug */
67 COM_PING, /**< See @ref page_protocol_com_ping */
68 COM_TIME, /**< Currently refused by the server. */
69 COM_DELAYED_INSERT, /**< Functionality removed. */
70 COM_CHANGE_USER, /**< See @ref page_protocol_com_change_user */
71 COM_BINLOG_DUMP, /**< See @ref page_protocol_com_binlog_dump */
72 COM_TABLE_DUMP,
73 COM_CONNECT_OUT,
74 COM_REGISTER_SLAVE,
75 COM_STMT_PREPARE, /**< See @ref page_protocol_com_stmt_prepare */
76 COM_STMT_EXECUTE, /**< See @ref page_protocol_com_stmt_execute */
77 /** See @ref page_protocol_com_stmt_send_long_data */
78 COM_STMT_SEND_LONG_DATA,
79 COM_STMT_CLOSE, /**< See @ref page_protocol_com_stmt_close */
80 COM_STMT_RESET, /**< See @ref page_protocol_com_stmt_reset */
81 COM_SET_OPTION, /**< See @ref page_protocol_com_set_option */
82 COM_STMT_FETCH, /**< See @ref page_protocol_com_stmt_fetch */
83 /**
84 Currently refused by the server. See ::dispatch_command.
85 Also used internally to mark the session as a "daemon",
86 i.e. non-client THD. Currently the scheduler and the GTID
87 code does use this state.
88 These threads won't be killed by `KILL`
89
90 @sa Event_scheduler::start, ::init_thd, ::kill_one_thread,
91 ::Find_thd_with_id
92 */
93 COM_DAEMON,
94 COM_BINLOG_DUMP_GTID,
95 COM_RESET_CONNECTION, /**< See @ref page_protocol_com_reset_connection */
96 COM_CLONE,
97 COM_SUBSCRIBE_GROUP_REPLICATION_STREAM,
98 /* don't forget to update std::string Command_names::m_names[] in sql_parse.cc
99 */
100
101 /* Must be last */
102 COM_END /**< Not a real command. Refused. */
103};
104
105#endif /* _mysql_command_h */
106

Provided by KDAB

Privacy Policy
Start learning QML with our Intro Training
Find out more

source code of include/mysql/my_command.h