~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/structs.h

  • Committer: Stewart Smith
  • Date: 2009-08-20 17:15:54 UTC
  • mto: (1119.2.2 merge)
  • mto: This revision was merged to the branch mainline in revision 1124.
  • Revision ID: stewart@flamingspork.com-20090820171554-72eo1tqlc4n64rak
Valgrind 3.5 requires --alignment to be a power of 2 between 16 and 4096. The specifying --alignment is not important for us, so remove it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
#ifndef DRIZZLED_STRUCTS_H
24
24
#define DRIZZLED_STRUCTS_H
25
25
 
26
 
#include "drizzled/base.h"
27
 
#include "drizzled/definitions.h"
28
 
#include "drizzled/lex_string.h"
29
 
#include "drizzled/thr_lock.h"
30
 
 
31
 
namespace drizzled
32
 
{
33
 
 
34
 
namespace internal
35
 
{
36
 
typedef struct st_io_cache IO_CACHE;
37
 
}
 
26
#include <drizzled/base.h>
 
27
#include <mysys/definitions.h>
 
28
#include <drizzled/lex_string.h>
38
29
 
39
30
class Table;
40
31
class Field;
 
32
typedef struct st_io_cache IO_CACHE;
41
33
 
42
34
typedef struct st_keyfile_info {        /* used with ha_info() */
43
35
  unsigned char ref[MAX_REFLENGTH];             /* Pointer to current row */
44
36
  unsigned char dupp_ref[MAX_REFLENGTH];        /* Pointer to dupp row */
45
37
  uint32_t ref_length;                  /* Length of ref (1-8) */
46
38
  uint32_t block_size;                  /* index block size */
47
 
  int filenr;                           /* (uniq) filenr for table */
 
39
  File filenr;                          /* (uniq) filenr for table */
48
40
  ha_rows records;                      /* Records i datafilen */
49
41
  ha_rows deleted;                      /* Deleted records */
50
42
  uint64_t data_file_length;            /* Length off data file */
63
55
 
64
56
typedef struct st_key_part_info {       /* Info about a key part */
65
57
  Field *field;
66
 
  unsigned int  offset;                         /* offset in record (from 0) */
67
 
  unsigned int  null_offset;                    /* Offset to null_bit in record */
 
58
  uint  offset;                         /* offset in record (from 0) */
 
59
  uint  null_offset;                    /* Offset to null_bit in record */
68
60
  /* Length of key part in bytes, excluding NULL flag and length bytes */
69
61
  uint16_t length;
70
62
  /*
85
77
 
86
78
 
87
79
typedef struct st_key {
88
 
  unsigned int  key_length;             /* Tot length of key */
 
80
  uint  key_length;                     /* Tot length of key */
89
81
  enum  ha_key_alg algorithm;
90
 
  unsigned long flags;                  /* dupp key and pack flags */
91
 
  unsigned int key_parts;               /* How many key_parts */
 
82
  ulong flags;                          /* dupp key and pack flags */
 
83
  uint  key_parts;                      /* How many key_parts */
92
84
  uint32_t  extra_length;
93
 
  unsigned int usable_key_parts;        /* Should normally be = key_parts */
 
85
  uint  usable_key_parts;               /* Should normally be = key_parts */
94
86
  uint32_t  block_size;
95
87
  KEY_PART_INFO *key_part;
96
88
  char  *name;                          /* Name of key */
125
117
};
126
118
 
127
119
struct st_read_record;                          /* For referense later */
 
120
class SQL_SELECT;
128
121
class Session;
129
 
class Cursor;
130
 
namespace optimizer { class SqlSelect; }
 
122
class handler;
131
123
 
132
124
typedef struct st_read_record {                 /* Parameter to read_record */
133
125
  Table *table;                 /* Head-form */
134
 
  Cursor *cursor;
 
126
  handler *file;
135
127
  Table **forms;                        /* head and ref forms */
136
128
  int (*read_record)(struct st_read_record *);
137
129
  Session *session;
138
 
  optimizer::SqlSelect *select;
 
130
  SQL_SELECT *select;
139
131
  uint32_t cache_records;
140
132
  uint32_t ref_length,struct_length,reclength,rec_cache_size,error_offset;
141
133
  uint32_t index;
143
135
  unsigned char *record;
144
136
  unsigned char *rec_buf;                /* to read field values  after filesort */
145
137
  unsigned char *cache,*cache_pos,*cache_end,*read_positions;
146
 
  internal::IO_CACHE *io_cache;
 
138
  IO_CACHE *io_cache;
147
139
  bool print_error, ignore_not_found_rows;
148
140
  JoinTable *do_insideout_scan;
149
141
} READ_RECORD;
150
142
 
151
 
typedef int *(*update_var)(Session *, struct drizzle_show_var *);
152
 
 
153
 
} /* namespace drizzled */
 
143
extern const char *show_comp_option_name[];
 
144
 
 
145
typedef int *(*update_var)(Session *, struct st_mysql_show_var *);
 
146
 
 
147
        /* Bits in form->update */
 
148
#define REG_MAKE_DUPP           1       /* Make a copy of record when read */
 
149
#define REG_NEW_RECORD          2       /* Write a new record if not found */
 
150
#define REG_UPDATE              4       /* Uppdate record */
 
151
#define REG_DELETE              8       /* Delete found record */
 
152
#define REG_PROG                16      /* User is updating database */
 
153
#define REG_CLEAR_AFTER_WRITE   32
 
154
#define REG_MAY_BE_UPDATED      64
 
155
#define REG_AUTO_UPDATE         64      /* Used in D-forms for scroll-tables */
 
156
#define REG_OVERWRITE           128
 
157
#define REG_SKIP_DUP            256
154
158
 
155
159
        /* Bits in form->status */
156
160
#define STATUS_NO_RECORD        (1+2)   /* Record isn't usably */