CUBRID Engine
latest
Main Page
Namespaces
Classes
Files
File List
File Members
connection_defs.h
Go to the documentation of this file.
1
/*
2
* Copyright 2008 Search Solution Corporation
3
* Copyright 2016 CUBRID Corporation
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
16
*
17
*/
18
19
20
/*
21
* connection_defs.h - all the #define, the structure defs and the typedefs
22
* for the client/server implementation
23
*/
24
25
#ifndef _CONNECTION_DEFS_H_
26
#define _CONNECTION_DEFS_H_
27
28
#ident "$Id$"
29
30
#include "
boot.h
"
31
#if defined(SERVER_MODE)
32
#include "
connection_list_sr.h
"
33
#include "
critical_section.h
"
34
#endif
35
#include "
error_manager.h
"
36
#include "
memory_alloc.h
"
37
#include "
porting.h
"
38
#include "
thread_compat.hpp
"
39
40
#if defined(WINDOWS)
41
#include <dos.h>
42
#endif // WINDOWS
43
#include <stdio.h>
44
#if defined(WINDOWS)
45
#include <process.h>
46
#else
47
#include <poll.h>
48
#endif
/* WINDOWS */
49
#if !defined(WINDOWS) && defined(SERVER_MODE)
50
#include <pthread.h>
51
#endif
/* !WINDOWS && SERVER_MODE */
52
53
#if defined (__cplusplus)
54
#include <atomic>
55
#endif // C++
56
57
#define NUM_MASTER_CHANNEL 1
58
59
/*
60
* These are the types of top-level commands sent to the master server
61
* from the client when initiating a connection. They distinguish the
62
* difference between an information connection and a user connection.
63
*/
64
enum
css_command_type
65
{
66
NULL_REQUEST
= 0,
67
INFO_REQUEST
= 1,
/* get runtime info from the master server */
68
DATA_REQUEST
= 2,
/* get data from the database server */
69
SERVER_REQUEST
= 3,
/* let new server attach */
70
UNUSED_REQUEST
= 4,
/* unused request - leave it for compatibility */
71
SERVER_REQUEST_NEW
= 5,
/* new-style server request */
72
MAX_REQUEST
73
};
74
75
/*
76
* These are the responses from the master to a server
77
* when it is trying to connect and register itself.
78
*/
79
enum
css_master_response
80
{
81
SERVER_ALREADY_EXISTS
= 0,
82
SERVER_REQUEST_ACCEPTED
= 1,
83
DRIVER_NOT_FOUND
= 2,
84
SERVER_REQUEST_ACCEPTED_NEW
= 3
85
};
86
87
/*
88
* These are the types of requests sent by the information client to
89
* the master.
90
*/
91
enum
css_client_request
92
{
93
GET_START_TIME
= 1,
94
GET_SERVER_COUNT
= 2,
95
GET_REQUEST_COUNT
= 3,
96
START_MASTER_TRACING
= 4,
97
STOP_MASTER_TRACING
= 5,
98
START_SLAVE_TRACING
= 6,
99
STOP_SLAVE_TRACING
= 7,
100
SET_SERVER_LIMIT
= 8,
101
STOP_SERVER
= 9,
102
START_SERVER
= 10,
103
GET_SERVER_LIST
= 11,
104
KILL_MASTER_SERVER
= 12,
105
KILL_SLAVE_SERVER
= 13,
106
START_SHUTDOWN
= 14,
107
CANCEL_SHUTDOWN
= 15,
108
GET_SHUTDOWN_TIME
= 16,
109
KILL_SERVER_IMMEDIATE
= 17,
110
GET_REPL_LIST
= 20,
/* REPL: get the info. for a process */
111
GET_ALL_LIST
= 21,
/* REPL: get the info. for all processes */
112
GET_REPL_COUNT
= 22,
/* REPL: get the # of repl processes */
113
GET_ALL_COUNT
= 23,
/* REPL: get the # of all processes */
114
KILL_REPL_SERVER
= 24,
/* REPL: kill the repl process */
115
GET_SERVER_HA_MODE
= 25,
/* HA: get server ha mode */
116
GET_HA_NODE_LIST
= 26,
/* HA: get ha node list */
117
GET_HA_NODE_LIST_VERBOSE
= 27,
/* HA: get ha node list verbose */
118
GET_HA_PROCESS_LIST
= 28,
/* HA: get ha process list */
119
GET_HA_PROCESS_LIST_VERBOSE
= 29,
/* HA: get ha process list verbose */
120
DEREGISTER_HA_PROCESS_BY_PID
= 30,
/* HA: deregister ha process by pid */
121
RECONFIG_HEARTBEAT
= 31,
/* HA: reconfigure ha node */
122
DEACTIVATE_HEARTBEAT
= 32,
/* HA: deactivate */
123
ACTIVATE_HEARTBEAT
= 33,
/* HA: activate */
124
KILL_ALL_HA_PROCESS
= 34,
/* HA: kill all ha processes */
125
IS_REGISTERED_HA_PROC
= 35,
/* HA: check registered ha process */
126
DEREGISTER_HA_PROCESS_BY_ARGS
= 36,
/* HA: deregister ha process by args */
127
GET_HA_PING_HOST_INFO
= 37,
/* HA: get ping hosts info */
128
DEACT_STOP_ALL
= 38,
/* HA: prepare for deactivation */
129
DEACT_CONFIRM_STOP_ALL
= 39,
/* HA: confirm preparation for deactiavtion */
130
DEACT_CONFIRM_NO_SERVER
= 40,
/* HA: confirm the completion of deactivation */
131
GET_HA_ADMIN_INFO
= 41,
/* HA: get administrative info */
132
GET_SERVER_STATE
= 42,
/* broker: get the server state */
133
START_HA_UTIL_PROCESS
= 43
/* HA: start ha utility process */
134
};
135
136
/*
137
* These are the types of requests sent between the master and the servers.
138
*/
139
enum
css_server_request
140
{
141
SERVER_START_TRACING
= 1,
142
SERVER_STOP_TRACING
= 2,
143
SERVER_HALT_EXECUTION
= 3,
144
SERVER_RESUME_EXECUTION
= 4,
145
SERVER_START_NEW_CLIENT
= 5,
146
SERVER_START_SHUTDOWN
= 6,
147
SERVER_STOP_SHUTDOWN
= 7,
148
SERVER_SHUTDOWN_IMMEDIATE
= 8,
149
SERVER_GET_HA_MODE
= 9,
150
SERVER_REGISTER_HA_PROCESS
= 10,
151
SERVER_CHANGE_HA_MODE
= 11,
152
SERVER_DEREGISTER_HA_PROCESS
= 12,
153
SERVER_GET_EOF
= 13
154
};
155
typedef
enum
css_server_request
CSS_SERVER_REQUEST
;
156
157
/*
158
* These are the status codes for the connection structure which represent
159
* the state of the connection.
160
*/
161
enum
css_conn_status
162
{
163
CONN_OPEN
= 1,
164
CONN_CLOSED
= 2,
165
CONN_CLOSING
= 3
166
};
167
168
/*
169
* These are the types of fds in the socket queue.
170
*/
171
enum
172
{
173
READ_WRITE
= 0,
174
READ_ONLY
= 1,
175
WRITE_ONLY
= 2
176
};
177
178
/*
179
* These are the types of "packets" that can be sent over the comm interface.
180
*/
181
enum
css_packet_type
182
{
183
COMMAND_TYPE
= 1,
184
DATA_TYPE
= 2,
185
ABORT_TYPE
= 3,
186
CLOSE_TYPE
= 4,
187
ERROR_TYPE
= 5
188
};
189
190
/*
191
* These are the status conditions that can be returned when a client
192
* is trying to get a connection.
193
*/
194
enum
css_status
195
{
196
SERVER_CONNECTED
= 0,
197
SERVER_NOT_FOUND
= 1,
198
SERVER_STARTED
= 2,
199
SERVER_IS_RECOVERING
= 3,
/* not used */
200
SERVER_HAS_SHUT_DOWN
= 4,
/* not used */
201
ERROR_MESSAGE_FROM_MASTER
= 5,
/* an error message is returned */
202
SERVER_CONNECTED_NEW
= 6,
203
SERVER_CLIENTS_EXCEEDED
= 7,
204
SERVER_INACCESSIBLE_IP
= 8,
205
SERVER_HANG
= 9
206
};
207
208
/*
209
* These are the error values returned by the client and server interfaces
210
*/
211
enum
css_error_code
212
{
213
NO_ERRORS
= 1,
214
CONNECTION_CLOSED
= 2,
215
REQUEST_REFUSED
= 3,
216
ERROR_ON_READ
= 4,
217
ERROR_ON_WRITE
= 5,
218
RECORD_TRUNCATED
= 6,
219
ERROR_WHEN_READING_SIZE
= 7,
220
READ_LENGTH_MISMATCH
= 8,
221
ERROR_ON_COMMAND_READ
= 9,
222
NO_DATA_AVAILABLE
= 10,
223
WRONG_PACKET_TYPE
= 11,
224
SERVER_WAS_NOT_FOUND
= 12,
225
SERVER_ABORTED
= 13,
226
INTERRUPTED_READ
= 14,
227
CANT_ALLOC_BUFFER
= 15,
228
OS_ERROR
= 16,
229
TIMEDOUT_ON_QUEUE
= 17,
230
INTERNAL_CSS_ERROR
= 18
231
};
232
233
/*
234
* Server's request_handler status codes.
235
* Assigned to error_p in current socket queue entry.
236
*/
237
enum
css_status_code
238
{
239
CSS_NO_ERRORS
= 0,
240
CSS_UNPLANNED_SHUTDOWN
= 1,
241
CSS_PLANNED_SHUTDOWN
= 2
242
};
243
244
/*
245
* There are the modes to check peer-alive.
246
*/
247
enum
css_check_peer_alive
248
{
249
CSS_CHECK_PEER_ALIVE_NONE
,
250
CSS_CHECK_PEER_ALIVE_SERVER_ONLY
,
251
CSS_CHECK_PEER_ALIVE_CLIENT_ONLY
,
252
CSS_CHECK_PEER_ALIVE_BOTH
253
};
254
#define CHECK_CLIENT_IS_ALIVE() \
255
(prm_get_integer_value (PRM_ID_CHECK_PEER_ALIVE) == CSS_CHECK_PEER_ALIVE_BOTH \
256
|| prm_get_integer_value (PRM_ID_CHECK_PEER_ALIVE) == CSS_CHECK_PEER_ALIVE_SERVER_ONLY)
257
#define CHECK_SERVER_IS_ALIVE() \
258
(prm_get_integer_value (PRM_ID_CHECK_PEER_ALIVE) == CSS_CHECK_PEER_ALIVE_BOTH \
259
|| prm_get_integer_value (PRM_ID_CHECK_PEER_ALIVE) == CSS_CHECK_PEER_ALIVE_CLIENT_ONLY)
260
261
/*
262
* HA mode
263
*/
264
enum
ha_mode
265
{
266
HA_MODE_OFF
= 0,
267
HA_MODE_FAIL_OVER
= 1,
/* unused */
268
HA_MODE_FAIL_BACK
= 2,
269
HA_MODE_LAZY_BACK
= 3,
/* not implemented yet */
270
HA_MODE_ROLE_CHANGE
= 4,
271
HA_MODE_REPLICA
= 5
272
};
273
typedef
enum
ha_mode
HA_MODE
;
274
#define HA_MODE_OFF_STR "off"
275
#define HA_MODE_FAIL_OVER_STR "fail-over"
276
#define HA_MODE_FAIL_BACK_STR "fail-back"
277
#define HA_MODE_LAZY_BACK_STR "lazy-back"
278
#define HA_MODE_ROLE_CHANGE_STR "role-change"
279
#define HA_MODE_REPLICA_STR "replica"
280
#define HA_MODE_ON_STR "on"
281
282
#define HA_GET_MODE() ((HA_MODE) prm_get_integer_value (PRM_ID_HA_MODE))
283
#define HA_DISABLED() (HA_GET_MODE () == HA_MODE_OFF)
284
285
/*
286
* HA server mode
287
*/
288
enum
ha_server_mode
289
{
290
HA_SERVER_MODE_ACTIVE
= 0,
291
HA_SERVER_MODE_STANDBY
= 1,
292
HA_SERVER_MODE_BACKUP
= 2,
293
HA_SERVER_MODE_PRIMARY
= 0,
/* alias of active */
294
HA_SERVER_MODE_SECONDARY
= 1,
/* alias of standby */
295
HA_SERVER_MODE_TERNARY
= 2
/* alias of backup */
296
};
297
typedef
enum
ha_server_mode
HA_SERVER_MODE
;
298
#define HA_SERVER_MODE_ACTIVE_STR "active"
299
#define HA_SERVER_MODE_STANDBY_STR "standby"
300
#define HA_SERVER_MODE_BACKUP_STR "backup"
301
#define HA_SERVER_MODE_PRIMARY_STR "primary"
302
#define HA_SERVER_MODE_SECONDARY_STR "secondary"
303
#define HA_SERVER_MODE_TERNARY_STR "ternary"
304
305
/*
306
* HA log applier state
307
*/
308
enum
ha_log_applier_state
309
{
310
HA_LOG_APPLIER_STATE_NA
= -1,
311
HA_LOG_APPLIER_STATE_UNREGISTERED
= 0,
312
HA_LOG_APPLIER_STATE_RECOVERING
= 1,
313
HA_LOG_APPLIER_STATE_WORKING
= 2,
314
HA_LOG_APPLIER_STATE_DONE
= 3,
315
HA_LOG_APPLIER_STATE_ERROR
= 4
316
};
317
typedef
enum
ha_log_applier_state
HA_LOG_APPLIER_STATE
;
318
#define HA_LOG_APPLIER_STATE_UNREGISTERED_STR "unregistered"
319
#define HA_LOG_APPLIER_STATE_RECOVERING_STR "recovering"
320
#define HA_LOG_APPLIER_STATE_WORKING_STR "working"
321
#define HA_LOG_APPLIER_STATE_DONE_STR "done"
322
#define HA_LOG_APPLIER_STATE_ERROR_STR "error"
323
324
#define HA_CHANGE_MODE_DEFAULT_TIMEOUT_IN_SECS 5
325
#define HA_CHANGE_MODE_IMMEDIATELY 0
326
327
#define HA_DELAY_ERR_CORRECTION 1
328
329
#define HA_REQUEST_SUCCESS "1\0"
330
#define HA_REQUEST_FAILURE "0\0"
331
#define HA_REQUEST_RESULT_SIZE 2
332
333
/*
334
* This constant defines the maximum size of a msg from the master to the
335
* server. Every msg between the master and the server will transmit this
336
* many bytes. A constant msg size is necessary since the protocol does
337
* not pre-send the msg length to the server before sending the actual msg.
338
*/
339
#define MASTER_TO_SRV_MSG_SIZE 1024
340
341
#ifdef PRINTING
342
#define TPRINTF(error_string, arg) \
343
do \
344
{ \
345
fprintf (stderr, error_string, (arg)); \
346
fflush (stderr); \
347
} \
348
while (0)
349
350
#define TPRINTF2(error_string, arg1, arg2) \
351
do \
352
{ \
353
fprintf (stderr, error_string, (arg1), (arg2)); \
354
fflush (stderr); \
355
} \
356
while (0)
357
#else
/* PRINTING */
358
#define TPRINTF(error_string, arg)
359
#define TPRINTF2(error_string, arg1, arg2)
360
#endif
/* PRINTING */
361
362
/* TODO: 64Bit porting */
363
#define HIGH16BITS(X) (((X) >> 16) & 0xffffL)
364
#define LOW16BITS(X) ((X) & 0xffffL)
365
#define DEFAULT_HEADER_DATA {0,0,0,NULL_TRAN_INDEX,0,0,0,0,0}
366
367
#define CSS_RID_FROM_EID(eid) ((unsigned short) LOW16BITS(eid))
368
#define CSS_ENTRYID_FROM_EID(eid) ((unsigned short) HIGH16BITS(eid))
369
370
#define NET_HEADER_FLAG_INVALIDATE_SNAPSHOT 0x8000
371
372
/*
373
* This is the format of the header for each command packet that is sent
374
* across the network.
375
*/
376
typedef
struct
packet_header
NET_HEADER
;
377
struct
packet_header
378
{
379
int
type
;
380
int
version
;
381
int
host_id
;
382
int
transaction_id
;
383
int
request_id
;
384
int
db_error
;
385
short
function_code
;
386
unsigned
short
flags
;
387
int
buffer_size
;
388
};
389
390
/*
391
* These are the data definitions for the queuing routines.
392
*/
393
typedef
struct
css_queue_entry
CSS_QUEUE_ENTRY
;
394
struct
css_queue_entry
395
{
396
CSS_QUEUE_ENTRY
*
next
;
397
char
*
buffer
;
398
399
#if !defined(SERVER_MODE)
400
unsigned
int
key
;
401
#else
402
int
key;
403
#endif
404
405
int
size
;
406
int
rc
;
407
int
transaction_id
;
408
int
invalidate_snapshot
;
409
int
db_error
;
410
411
#if !defined(SERVER_MODE)
412
char
lock
;
413
#endif
414
};
415
#if defined(SERVER_MODE)
416
struct
session_state
;
417
#endif
418
/*
419
* This data structure is the interface between the client and the
420
* communication software to identify the data connection.
421
*/
422
typedef
struct
css_conn_entry
CSS_CONN_ENTRY
;
423
struct
css_conn_entry
424
{
425
SOCKET
fd
;
426
unsigned
short
request_id
;
427
int
status
;
/* CONN_OPEN, CONN_CLOSED, CONN_CLOSING = 3 */
428
int
invalidate_snapshot
;
429
int
client_id
;
430
int
db_error
;
431
bool
in_transaction
;
/* this client is in-transaction or out-of- */
432
bool
reset_on_commit
;
/* set reset_on_commit when commit/abort */
433
434
#if defined(SERVER_MODE)
435
int
idx;
/* connection index */
436
BOOT_CLIENT_TYPE
client_type;
437
SYNC_RMUTEX
rmutex;
/* connection mutex */
438
439
bool
stop_talk;
/* block and stop this connection */
440
bool
ignore_repl_delay;
/* don't do reset_on_commit by the delay of replication */
441
unsigned
short
stop_phase;
442
443
char
*version_string;
/* client version string */
444
445
CSS_QUEUE_ENTRY
*free_queue_list;
446
struct
css_wait_queue_entry
*free_wait_queue_list;
447
char
*free_net_header_list;
448
int
free_queue_count;
449
int
free_wait_queue_count;
450
int
free_net_header_count;
451
452
CSS_LIST
request_queue;
/* list of requests */
453
CSS_LIST
data_queue;
/* list of data packets */
454
CSS_LIST
data_wait_queue;
/* list of waiters */
455
CSS_LIST
abort_queue;
/* list of aborted requests */
456
CSS_LIST
buffer_queue;
/* list of buffers queued for data */
457
CSS_LIST
error_queue;
/* list of (server) error messages */
458
struct
session_state
*session_p;
/* session object for current request */
459
#else
460
FILE *
file
;
461
CSS_QUEUE_ENTRY
*
request_queue
;
/* the header for unseen requests */
462
CSS_QUEUE_ENTRY
*
data_queue
;
/* header for unseen data packets */
463
CSS_QUEUE_ENTRY
*
abort_queue
;
/* queue of aborted requests */
464
CSS_QUEUE_ENTRY
*
buffer_queue
;
/* header of buffers queued for data */
465
CSS_QUEUE_ENTRY
*
error_queue
;
/* queue of (server) error messages */
466
void
*
cnxn
;
467
#endif
468
SESSION_ID
session_id
;
469
CSS_CONN_ENTRY
*
next
;
470
471
#if defined __cplusplus
472
// transaction ID manipulation
473
void
set_tran_index (
int
tran_index);
474
int
get_tran_index (
void
);
475
476
// request count manipulation
477
void
add_pending_request ();
478
void
start_request ();
479
bool
has_pending_request ()
const
;
480
void
init_pending_request ();
481
482
private
:
483
// note - I want to protect this.
484
int
transaction_id
;
485
// *INDENT-OFF*
486
std::atomic<size_t> pending_request_count;
487
// *INDENT-ON*
488
#else // not c++ = c
489
int
transaction_id
;
490
#endif // not c++ = c
491
};
492
493
/*
494
* This is the mapping entry from a host/key to/from the entry id.
495
*/
496
typedef
struct
css_mapping_entry
CSS_MAP_ENTRY
;
497
struct
css_mapping_entry
498
{
499
char
*
key
;
/* host name (or some such) */
500
CSS_CONN_ENTRY
*
conn
;
/* the connection */
501
#if !defined(SERVER_MODE)
502
CSS_MAP_ENTRY
*
next
;
503
#endif
504
unsigned
short
id
;
/* host id to help identify the connection */
505
};
506
507
/*
508
* This data structure is the information of user access status written
509
* when client login server.
510
*/
511
typedef
struct
last_access_status
LAST_ACCESS_STATUS
;
512
struct
last_access_status
513
{
514
char
db_user[
DB_MAX_USER_LENGTH
];
515
time_t
time
;
516
char
host
[
CUB_MAXHOSTNAMELEN
];
517
char
program_name
[32];
518
LAST_ACCESS_STATUS
*
next
;
519
};
520
521
#endif
/* _CONNECTION_DEFS_H_ */
DEACT_CONFIRM_STOP_ALL
Definition:
connection_defs.h:129
CSS_CHECK_PEER_ALIVE_BOTH
Definition:
connection_defs.h:252
GET_REQUEST_COUNT
Definition:
connection_defs.h:95
css_conn_entry::status
int status
Definition:
connection_defs.h:427
ERROR_MESSAGE_FROM_MASTER
Definition:
connection_defs.h:201
css_conn_entry::cnxn
void * cnxn
Definition:
connection_defs.h:466
GET_SERVER_STATE
Definition:
connection_defs.h:132
css_mapping_entry::id
unsigned short id
Definition:
connection_defs.h:504
css_conn_entry::buffer_queue
CSS_QUEUE_ENTRY * buffer_queue
Definition:
connection_defs.h:464
packet_header::type
int type
Definition:
connection_defs.h:379
css_error_code
css_error_code
Definition:
connection_defs.h:211
NO_DATA_AVAILABLE
Definition:
connection_defs.h:222
HA_SERVER_MODE_TERNARY
Definition:
connection_defs.h:295
thread_compat.hpp
DEACTIVATE_HEARTBEAT
Definition:
connection_defs.h:122
css_mapping_entry::key
char * key
Definition:
connection_defs.h:499
packet_header
Definition:
connection_defs.h:377
SERVER_START_TRACING
Definition:
connection_defs.h:141
SERVER_ALREADY_EXISTS
Definition:
connection_defs.h:81
SERVER_REQUEST_ACCEPTED
Definition:
connection_defs.h:82
SERVER_NOT_FOUND
Definition:
connection_defs.h:197
SOCKET
int SOCKET
Definition:
porting.h:482
ERROR_ON_WRITE
Definition:
connection_defs.h:217
SERVER_CONNECTED_NEW
Definition:
connection_defs.h:202
WRONG_PACKET_TYPE
Definition:
connection_defs.h:223
packet_header::request_id
int request_id
Definition:
connection_defs.h:383
BOOT_CLIENT_TYPE
enum db_client_type BOOT_CLIENT_TYPE
Definition:
client_credentials.hpp:33
ERROR_ON_COMMAND_READ
Definition:
connection_defs.h:221
GET_REPL_LIST
Definition:
connection_defs.h:110
SERVER_SHUTDOWN_IMMEDIATE
Definition:
connection_defs.h:148
SERVER_ABORTED
Definition:
connection_defs.h:225
WRITE_ONLY
Definition:
connection_defs.h:175
HA_MODE_OFF
Definition:
connection_defs.h:266
INTERRUPTED_READ
Definition:
connection_defs.h:226
css_queue_entry::db_error
int db_error
Definition:
connection_defs.h:409
START_MASTER_TRACING
Definition:
connection_defs.h:96
porting.h
GET_HA_NODE_LIST_VERBOSE
Definition:
connection_defs.h:117
HA_LOG_APPLIER_STATE_NA
Definition:
connection_defs.h:310
GET_HA_ADMIN_INFO
Definition:
connection_defs.h:131
GET_HA_PING_HOST_INFO
Definition:
connection_defs.h:127
GET_REPL_COUNT
Definition:
connection_defs.h:112
GET_HA_NODE_LIST
Definition:
connection_defs.h:116
UNUSED_REQUEST
Definition:
connection_defs.h:70
HA_MODE_FAIL_OVER
Definition:
connection_defs.h:267
HA_LOG_APPLIER_STATE_WORKING
Definition:
connection_defs.h:313
css_queue_entry::size
int size
Definition:
connection_defs.h:405
css_conn_entry::fd
SOCKET fd
Definition:
connection_defs.h:425
GET_SERVER_COUNT
Definition:
connection_defs.h:94
ha_mode
ha_mode
Definition:
connection_defs.h:264
SET_SERVER_LIMIT
Definition:
connection_defs.h:100
READ_LENGTH_MISMATCH
Definition:
connection_defs.h:220
css_mapping_entry::conn
CSS_CONN_ENTRY * conn
Definition:
connection_defs.h:500
OS_ERROR
Definition:
connection_defs.h:228
packet_header::flags
unsigned short flags
Definition:
connection_defs.h:386
ABORT_TYPE
Definition:
connection_defs.h:185
SERVER_HAS_SHUT_DOWN
Definition:
connection_defs.h:200
DATA_TYPE
Definition:
connection_defs.h:184
css_client_request
css_client_request
Definition:
connection_defs.h:91
SERVER_GET_HA_MODE
Definition:
connection_defs.h:149
START_HA_UTIL_PROCESS
Definition:
connection_defs.h:133
CSS_UNPLANNED_SHUTDOWN
Definition:
connection_defs.h:240
SERVER_CLIENTS_EXCEEDED
Definition:
connection_defs.h:203
css_conn_entry
Definition:
connection_defs.h:423
CSS_PLANNED_SHUTDOWN
Definition:
connection_defs.h:241
css_queue_entry::key
unsigned int key
Definition:
connection_defs.h:400
CLOSE_TYPE
Definition:
connection_defs.h:186
critical_section.h
ACTIVATE_HEARTBEAT
Definition:
connection_defs.h:123
SERVER_STOP_SHUTDOWN
Definition:
connection_defs.h:147
SERVER_REQUEST
Definition:
connection_defs.h:69
STOP_SLAVE_TRACING
Definition:
connection_defs.h:99
HA_SERVER_MODE_ACTIVE
Definition:
connection_defs.h:290
CONN_CLOSED
Definition:
connection_defs.h:164
GET_SHUTDOWN_TIME
Definition:
connection_defs.h:108
CSS_CHECK_PEER_ALIVE_NONE
Definition:
connection_defs.h:249
CSS_NO_ERRORS
Definition:
connection_defs.h:239
HA_SERVER_MODE
enum ha_server_mode HA_SERVER_MODE
Definition:
connection_defs.h:297
css_conn_entry::transaction_id
int transaction_id
Definition:
connection_defs.h:489
CONNECTION_CLOSED
Definition:
connection_defs.h:214
css_conn_status
css_conn_status
Definition:
connection_defs.h:161
DEREGISTER_HA_PROCESS_BY_PID
Definition:
connection_defs.h:120
SERVER_STARTED
Definition:
connection_defs.h:198
last_access_status::next
LAST_ACCESS_STATUS * next
Definition:
connection_defs.h:518
HA_SERVER_MODE_BACKUP
Definition:
connection_defs.h:292
css_conn_entry::data_queue
CSS_QUEUE_ENTRY * data_queue
Definition:
connection_defs.h:462
MAX_REQUEST
Definition:
connection_defs.h:72
css_queue_entry::transaction_id
int transaction_id
Definition:
connection_defs.h:407
css_queue_entry::rc
int rc
Definition:
connection_defs.h:406
SERVER_REQUEST_ACCEPTED_NEW
Definition:
connection_defs.h:84
GET_SERVER_HA_MODE
Definition:
connection_defs.h:115
css_wait_queue_entry
Definition:
connection_sr.c:96
CSS_CHECK_PEER_ALIVE_SERVER_ONLY
Definition:
connection_defs.h:250
last_access_status::time
time_t time
Definition:
connection_defs.h:515
HA_SERVER_MODE_SECONDARY
Definition:
connection_defs.h:294
GET_START_TIME
Definition:
connection_defs.h:93
css_conn_entry::request_id
unsigned short request_id
Definition:
connection_defs.h:426
NULL_REQUEST
Definition:
connection_defs.h:66
CANT_ALLOC_BUFFER
Definition:
connection_defs.h:227
RECORD_TRUNCATED
Definition:
connection_defs.h:218
STOP_MASTER_TRACING
Definition:
connection_defs.h:97
STOP_SERVER
Definition:
connection_defs.h:101
SERVER_GET_EOF
Definition:
connection_defs.h:153
HA_LOG_APPLIER_STATE
enum ha_log_applier_state HA_LOG_APPLIER_STATE
Definition:
connection_defs.h:317
HA_MODE_LAZY_BACK
Definition:
connection_defs.h:269
css_conn_entry::file
FILE * file
Definition:
connection_defs.h:460
NO_ERRORS
Definition:
connection_defs.h:213
SERVER_CONNECTED
Definition:
connection_defs.h:196
SERVER_IS_RECOVERING
Definition:
connection_defs.h:199
ha_server_mode
ha_server_mode
Definition:
connection_defs.h:288
sync_rmutex
Definition:
critical_section.h:134
css_conn_entry::in_transaction
bool in_transaction
Definition:
connection_defs.h:431
REQUEST_REFUSED
Definition:
connection_defs.h:215
SERVER_START_NEW_CLIENT
Definition:
connection_defs.h:145
SERVER_CHANGE_HA_MODE
Definition:
connection_defs.h:151
css_conn_entry::abort_queue
CSS_QUEUE_ENTRY * abort_queue
Definition:
connection_defs.h:463
HA_LOG_APPLIER_STATE_RECOVERING
Definition:
connection_defs.h:312
packet_header::version
int version
Definition:
connection_defs.h:380
READ_ONLY
Definition:
connection_defs.h:174
packet_header::host_id
int host_id
Definition:
connection_defs.h:381
packet_header::buffer_size
int buffer_size
Definition:
connection_defs.h:387
css_mapping_entry::next
CSS_MAP_ENTRY * next
Definition:
connection_defs.h:502
GET_ALL_COUNT
Definition:
connection_defs.h:113
HA_MODE_REPLICA
Definition:
connection_defs.h:271
KILL_MASTER_SERVER
Definition:
connection_defs.h:104
DATA_REQUEST
Definition:
connection_defs.h:68
css_queue_entry::invalidate_snapshot
int invalidate_snapshot
Definition:
connection_defs.h:408
START_SHUTDOWN
Definition:
connection_defs.h:106
boot.h
ERROR_WHEN_READING_SIZE
Definition:
connection_defs.h:219
RECONFIG_HEARTBEAT
Definition:
connection_defs.h:121
DEACT_STOP_ALL
Definition:
connection_defs.h:128
css_queue_entry::lock
char lock
Definition:
connection_defs.h:412
ERROR_ON_READ
Definition:
connection_defs.h:216
INTERNAL_CSS_ERROR
Definition:
connection_defs.h:230
ha_log_applier_state
ha_log_applier_state
Definition:
connection_defs.h:308
packet_header::db_error
int db_error
Definition:
connection_defs.h:384
HA_LOG_APPLIER_STATE_ERROR
Definition:
connection_defs.h:315
SERVER_REQUEST_NEW
Definition:
connection_defs.h:71
DRIVER_NOT_FOUND
Definition:
connection_defs.h:83
CONN_CLOSING
Definition:
connection_defs.h:165
css_conn_entry::reset_on_commit
bool reset_on_commit
Definition:
connection_defs.h:432
COMMAND_TYPE
Definition:
connection_defs.h:183
CSS_CHECK_PEER_ALIVE_CLIENT_ONLY
Definition:
connection_defs.h:251
css_master_response
css_master_response
Definition:
connection_defs.h:79
SERVER_DEREGISTER_HA_PROCESS
Definition:
connection_defs.h:152
css_queue_entry::next
CSS_QUEUE_ENTRY * next
Definition:
connection_defs.h:396
KILL_SLAVE_SERVER
Definition:
connection_defs.h:105
DEACT_CONFIRM_NO_SERVER
Definition:
connection_defs.h:130
css_status_code
css_status_code
Definition:
connection_defs.h:237
CONN_OPEN
Definition:
connection_defs.h:163
HA_SERVER_MODE_STANDBY
Definition:
connection_defs.h:291
TIMEDOUT_ON_QUEUE
Definition:
connection_defs.h:229
SESSION_ID
unsigned int SESSION_ID
Definition:
dbtype_def.h:480
SERVER_WAS_NOT_FOUND
Definition:
connection_defs.h:224
css_conn_entry::error_queue
CSS_QUEUE_ENTRY * error_queue
Definition:
connection_defs.h:465
memory_alloc.h
error_manager.h
packet_header::transaction_id
int transaction_id
Definition:
connection_defs.h:382
START_SLAVE_TRACING
Definition:
connection_defs.h:98
CANCEL_SHUTDOWN
Definition:
connection_defs.h:107
IS_REGISTERED_HA_PROC
Definition:
connection_defs.h:125
connection_list_sr.h
HA_SERVER_MODE_PRIMARY
Definition:
connection_defs.h:293
SERVER_HALT_EXECUTION
Definition:
connection_defs.h:143
session_state
Definition:
session.c:109
GET_HA_PROCESS_LIST
Definition:
connection_defs.h:118
HA_MODE
enum ha_mode HA_MODE
Definition:
connection_defs.h:273
GET_ALL_LIST
Definition:
connection_defs.h:111
HA_MODE_ROLE_CHANGE
Definition:
connection_defs.h:270
packet_header::function_code
short function_code
Definition:
connection_defs.h:385
SERVER_START_SHUTDOWN
Definition:
connection_defs.h:146
CSS_SERVER_REQUEST
enum css_server_request CSS_SERVER_REQUEST
Definition:
connection_defs.h:155
START_SERVER
Definition:
connection_defs.h:102
READ_WRITE
Definition:
connection_defs.h:173
INFO_REQUEST
Definition:
connection_defs.h:67
css_list
Definition:
connection_list_sr.h:37
css_conn_entry::invalidate_snapshot
int invalidate_snapshot
Definition:
connection_defs.h:428
css_server_request
css_server_request
Definition:
connection_defs.h:139
KILL_ALL_HA_PROCESS
Definition:
connection_defs.h:124
GET_SERVER_LIST
Definition:
connection_defs.h:103
css_check_peer_alive
css_check_peer_alive
Definition:
connection_defs.h:247
KILL_REPL_SERVER
Definition:
connection_defs.h:114
css_conn_entry::request_queue
CSS_QUEUE_ENTRY * request_queue
Definition:
connection_defs.h:461
css_conn_entry::next
CSS_CONN_ENTRY * next
Definition:
connection_defs.h:469
SERVER_REGISTER_HA_PROCESS
Definition:
connection_defs.h:150
program_name
const char * program_name
Definition:
cas.c:147
CUB_MAXHOSTNAMELEN
#define CUB_MAXHOSTNAMELEN
Definition:
porting.h:379
css_conn_entry::db_error
int db_error
Definition:
connection_defs.h:430
SERVER_INACCESSIBLE_IP
Definition:
connection_defs.h:204
host
static char * host
Definition:
broker_log_replay.c:133
css_command_type
css_command_type
Definition:
connection_defs.h:64
css_queue_entry
Definition:
connection_defs.h:394
DB_MAX_USER_LENGTH
#define DB_MAX_USER_LENGTH
Definition:
dbtype_def.h:498
SERVER_STOP_TRACING
Definition:
connection_defs.h:142
DEREGISTER_HA_PROCESS_BY_ARGS
Definition:
connection_defs.h:126
css_packet_type
css_packet_type
Definition:
connection_defs.h:181
GET_HA_PROCESS_LIST_VERBOSE
Definition:
connection_defs.h:119
ERROR_TYPE
Definition:
connection_defs.h:187
HA_LOG_APPLIER_STATE_UNREGISTERED
Definition:
connection_defs.h:311
css_mapping_entry
Definition:
connection_defs.h:497
css_conn_entry::session_id
SESSION_ID session_id
Definition:
connection_defs.h:468
HA_LOG_APPLIER_STATE_DONE
Definition:
connection_defs.h:314
HA_MODE_FAIL_BACK
Definition:
connection_defs.h:268
KILL_SERVER_IMMEDIATE
Definition:
connection_defs.h:109
SERVER_RESUME_EXECUTION
Definition:
connection_defs.h:144
css_conn_entry::client_id
int client_id
Definition:
connection_defs.h:429
css_status
css_status
Definition:
connection_defs.h:194
css_queue_entry::buffer
char * buffer
Definition:
connection_defs.h:397
last_access_status
Definition:
connection_defs.h:512
SERVER_HANG
Definition:
connection_defs.h:205
src
connection
connection_defs.h
Generated by
1.8.11