MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
table_session_connect.h
1 /* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
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 as published by
5  the Free Software Foundation; version 2 of the License.
6 
7  This program is distributed in the hope that it will be useful,
8  but WITHOUT ANY WARRANTY; without even the implied warranty of
9  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  GNU General Public License for more details.
11 
12  You should have received a copy of the GNU General Public License
13  along with this program; if not, write to the Free Software Foundation,
14  51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
15 
16 #ifndef TABLE_SESSION_CONNECT_H
17 #define TABLE_SESSION_CONNECT_H
18 
19 #include "pfs_column_types.h"
20 #include "cursor_by_thread_connect_attr.h"
21 #include "table_helper.h"
22 
23 #define MAX_ATTR_NAME_CHARS 32
24 #define MAX_ATTR_VALUE_CHARS 1024
25 #define MAX_UTF8_BYTES 6
26 
28 enum field_offsets {
29  FO_PROCESS_ID,
30  FO_ATTR_NAME,
31  FO_ATTR_VALUE,
32  FO_ORDINAL_POSITION
33 };
34 
40 {
42  ulong m_process_id;
44  char m_attr_name[MAX_ATTR_NAME_CHARS * MAX_UTF8_BYTES];
48  char m_attr_value[MAX_ATTR_VALUE_CHARS * MAX_UTF8_BYTES];
53 };
54 
56 {
57 protected:
59 
60 public:
62  {}
63 
64 protected:
65  virtual void make_row(PFS_thread *pfs, uint ordinal);
66  virtual bool thread_fits(PFS_thread *thread);
67  virtual int read_row_values(TABLE *table, unsigned char *buf,
68  Field **fields, bool read_all);
69 protected:
74 };
75 
77 #endif