my_command.h 4.3 KB

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