MySQL  8.0.27
Source Code Documentation
com_data.h
Go to the documentation of this file.
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 #ifndef PLUGIN_PROTOCOL_INCLUDED
23 #define PLUGIN_PROTOCOL_INCLUDED
24 
25 #ifndef MYSQL_ABI_CHECK
26 #include "field_types.h" /* enum_field_types */
27 #include "mysql_com.h" /* mysql_enum_shutdown_level */
28 #endif
29 
30 /**
31  @file include/mysql/com_data.h
32  Definition of COM_DATA to be used with the Command service as data input
33  structure.
34 */
35 
37  const char *db_name;
38  unsigned long length;
39 };
40 
42  unsigned char options;
43 };
44 
45 struct COM_KILL_DATA {
46  unsigned long id;
47 };
48 
50  unsigned int opt_command;
51 };
52 
53 struct PS_PARAM {
54  unsigned char null_bit;
56  unsigned char unsigned_type;
57  const unsigned char *value;
58  unsigned long length;
59  const unsigned char *name;
60  unsigned long name_length;
61 };
62 
64  unsigned long stmt_id;
65  /** This holds the flags, as defined in @ref enum_cursor_type */
66  unsigned long open_cursor;
68  unsigned long parameter_count;
69  unsigned char has_new_types;
70 };
71 
73  unsigned long stmt_id;
74  unsigned long num_rows;
75 };
76 
78  unsigned long stmt_id;
79  unsigned int param_number;
80  unsigned char *longdata;
81  unsigned long length;
82 };
83 
85  const char *query;
86  unsigned int length;
87 };
88 
90  unsigned int stmt_id;
91 };
92 
94  unsigned int stmt_id;
95 };
96 
98  const char *query;
99  unsigned int length;
101  unsigned long parameter_count;
102 };
103 
105  unsigned char *table_name;
106  unsigned int table_name_length;
107  const unsigned char *query;
108  unsigned int query_length;
109 };
110 
111 union COM_DATA {
124 };
125 
126 #endif /* PLUGIN_PROTOCOL_INCLUDED */
This file contains the field type.
enum_field_types
Column types for MySQL.
Definition: field_types.h:57
Common definition between mysql server & client.
Definition: com_data.h:104
unsigned int table_name_length
Definition: com_data.h:106
const unsigned char * query
Definition: com_data.h:107
unsigned int query_length
Definition: com_data.h:108
unsigned char * table_name
Definition: com_data.h:105
Definition: com_data.h:36
unsigned long length
Definition: com_data.h:38
const char * db_name
Definition: com_data.h:37
Definition: com_data.h:45
unsigned long id
Definition: com_data.h:46
Definition: com_data.h:97
const char * query
Definition: com_data.h:98
unsigned long parameter_count
Definition: com_data.h:101
PS_PARAM * parameters
Definition: com_data.h:100
unsigned int length
Definition: com_data.h:99
Definition: com_data.h:41
unsigned char options
Definition: com_data.h:42
Definition: com_data.h:49
unsigned int opt_command
Definition: com_data.h:50
Definition: com_data.h:89
unsigned int stmt_id
Definition: com_data.h:90
Definition: com_data.h:63
unsigned long parameter_count
Definition: com_data.h:68
unsigned char has_new_types
Definition: com_data.h:69
unsigned long open_cursor
This holds the flags, as defined in enum_cursor_type.
Definition: com_data.h:66
PS_PARAM * parameters
Definition: com_data.h:67
unsigned long stmt_id
Definition: com_data.h:64
Definition: com_data.h:72
unsigned long num_rows
Definition: com_data.h:74
unsigned long stmt_id
Definition: com_data.h:73
Definition: com_data.h:84
const char * query
Definition: com_data.h:85
unsigned int length
Definition: com_data.h:86
Definition: com_data.h:93
unsigned int stmt_id
Definition: com_data.h:94
Definition: com_data.h:77
unsigned long stmt_id
Definition: com_data.h:78
unsigned long length
Definition: com_data.h:81
unsigned int param_number
Definition: com_data.h:79
unsigned char * longdata
Definition: com_data.h:80
Definition: com_data.h:53
enum enum_field_types type
Definition: com_data.h:55
const unsigned char * name
Definition: com_data.h:59
const unsigned char * value
Definition: com_data.h:57
unsigned char null_bit
Definition: com_data.h:54
unsigned char unsigned_type
Definition: com_data.h:56
unsigned long length
Definition: com_data.h:58
unsigned long name_length
Definition: com_data.h:60
Definition: com_data.h:111
COM_STMT_EXECUTE_DATA com_stmt_execute
Definition: com_data.h:116
COM_INIT_DB_DATA com_init_db
Definition: com_data.h:112
COM_STMT_CLOSE_DATA com_stmt_close
Definition: com_data.h:120
COM_STMT_PREPARE_DATA com_stmt_prepare
Definition: com_data.h:119
COM_SET_OPTION_DATA com_set_option
Definition: com_data.h:115
COM_STMT_SEND_LONG_DATA_DATA com_stmt_send_long_data
Definition: com_data.h:118
COM_QUERY_DATA com_query
Definition: com_data.h:122
COM_KILL_DATA com_kill
Definition: com_data.h:114
COM_FIELD_LIST_DATA com_field_list
Definition: com_data.h:123
COM_STMT_FETCH_DATA com_stmt_fetch
Definition: com_data.h:117
COM_STMT_RESET_DATA com_stmt_reset
Definition: com_data.h:121
COM_REFRESH_DATA com_refresh
Definition: com_data.h:113