~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle-2.0/structs.h

Fix merge issues with 1.0 CC fix.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
 *
35
35
 */
36
36
 
 
37
#pragma once
 
38
 
37
39
/**
38
40
 * @file
39
41
 * @brief Struct Definitions
40
42
 */
41
43
 
42
 
#ifndef __DRIZZLE_STRUCTS_H
43
 
#define __DRIZZLE_STRUCTS_H
44
 
 
45
44
#include <sys/types.h>
46
45
 
47
46
#ifndef NI_MAXHOST
70
69
{
71
70
public:
72
71
  uint16_t error_code;
73
 
  int options;
 
72
  struct options_t {
 
73
    bool is_allocated;
 
74
    bool is_non_blocking;
 
75
    bool is_free_objects;
 
76
    bool is_assert_dangling;
 
77
 
 
78
    options_t() :
 
79
      is_allocated(false),
 
80
      is_non_blocking(false),
 
81
      is_free_objects(false),
 
82
      is_assert_dangling(false)
 
83
    { }
 
84
  } options;
74
85
  drizzle_verbose_t verbose;
75
86
  uint32_t con_count;
76
87
  uint32_t pfds_size;
93
104
 
94
105
  drizzle_st() :
95
106
    error_code(0),
96
 
    options(DRIZZLE_NONE),
 
107
    options(),
97
108
    verbose(DRIZZLE_VERBOSE_ERROR),
98
109
    con_count(0),
99
110
    pfds_size(0),
150
161
  int capabilities;
151
162
  drizzle_charset_t charset;
152
163
  drizzle_command_t command;
 
164
  struct option_t {
 
165
    bool is_allocated;
 
166
 
 
167
    option_t() :
 
168
      is_allocated(false)
 
169
    { }
 
170
  } _options;
153
171
  int options;
154
172
  drizzle_con_socket_t socket_type;
155
173
  drizzle_con_status_t status;
182
200
    drizzle_con_uds_st uds;
183
201
  } socket;
184
202
  uint8_t buffer[DRIZZLE_MAX_BUFFER_SIZE];
185
 
  char db[DRIZZLE_MAX_DB_SIZE];
 
203
  char schema[DRIZZLE_MAX_DB_SIZE];
186
204
  char password[DRIZZLE_MAX_PASSWORD_SIZE];
187
205
  uint8_t scramble_buffer[DRIZZLE_MAX_SCRAMBLE_SIZE];
188
206
  char server_version[DRIZZLE_MAX_SERVER_VERSION_SIZE];
229
247
 */
230
248
class drizzle_query_st
231
249
{
 
250
private:
232
251
public:
233
252
  drizzle_st *drizzle;
234
253
  drizzle_query_st *next;
235
254
  drizzle_query_st *prev;
236
 
  int options;
 
255
  struct option_t {
 
256
    bool is_allocated;
 
257
 
 
258
    option_t() :
 
259
      is_allocated(false)
 
260
    { }
 
261
  } options;
237
262
  drizzle_query_state_t state;
238
263
  drizzle_con_st *con;
239
264
  drizzle_result_st *result;
246
271
    drizzle(NULL),
247
272
    next(NULL),
248
273
    prev(NULL),
249
 
    options(0),
250
274
    con(NULL),
251
275
    result(NULL),
252
276
    string(NULL),
265
289
  drizzle_con_st *con;
266
290
  drizzle_result_st *next;
267
291
  drizzle_result_st *prev;
 
292
  struct option_t {
 
293
    bool is_allocated;
 
294
 
 
295
    option_t() :
 
296
      is_allocated(false)
 
297
    { }
 
298
  } _options;
268
299
  int options;
269
300
 
270
301
  char info[DRIZZLE_MAX_INFO_SIZE];
332
363
  drizzle_result_st *result;
333
364
  drizzle_column_st *next;
334
365
  drizzle_column_st *prev;
335
 
  int options;
 
366
  struct options_t {
 
367
    bool is_allocated;
 
368
 
 
369
    options_t() :
 
370
      is_allocated(false)
 
371
    { }
 
372
  } options;
336
373
  char catalog[DRIZZLE_MAX_CATALOG_SIZE];
337
 
  char db[DRIZZLE_MAX_DB_SIZE];
 
374
  char schema[DRIZZLE_MAX_DB_SIZE];
338
375
  char table[DRIZZLE_MAX_TABLE_SIZE];
339
376
  char orig_table[DRIZZLE_MAX_TABLE_SIZE];
340
377
  char name[DRIZZLE_MAX_COLUMN_NAME_SIZE];
352
389
    result(NULL),
353
390
    next(NULL),
354
391
    prev(NULL),
355
 
    options(0),
356
392
    size(0),
357
393
    max_size(0),
358
394
    flags(DRIZZLE_COLUMN_FLAGS_NONE),
365
401
#ifdef __cplusplus
366
402
}
367
403
#endif
368
 
 
369
 
#endif /* __DRIZZLE_STRUCTS_H */