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