~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/join_cache.h

  • Committer: Paul McCullagh
  • Date: 2010-09-22 13:04:27 UTC
  • mto: (1787.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1788.
  • Revision ID: paul.mccullagh@primebase.org-20100922130427-utakdj4ec4uiv1kc
Fixed PBXT recovery and shutdown, added shutdownPlugin() call to all plugins before the plugins are deleted

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
  CacheField and JoinCache is used on full join to cache records in outer
31
31
  table
32
32
*/
33
 
class CacheField {
 
33
struct CacheField {
34
34
  /*
35
35
    Where source data is located (i.e. this points to somewhere in
36
36
    tableX->getInsertRecord())
37
37
  */
38
 
public:
39
38
  unsigned char *str;
40
39
  uint32_t length; /* Length of data at *str, in bytes */
41
40
  uint32_t blob_length; /* Valid IFF blob_field != 0 */
42
41
  Field_blob *blob_field;
43
42
  bool strip; /* true <=> Strip endspaces ?? */
 
43
 
44
44
  Table *get_rowid; /* _ != NULL <=> */
45
 
 
46
 
  CacheField():
47
 
    str(NULL),
48
 
    length(0),
49
 
    blob_length(0),
50
 
    blob_field(NULL),
51
 
    strip(false),
52
 
    get_rowid(NULL)
53
 
  {}
54
 
 
55
45
};
56
46
 
57
 
class JoinCache
 
47
struct JoinCache
58
48
{
59
 
public:
60
49
  unsigned char *buff;
61
50
  unsigned char *pos;    /* Start of free space in the buffer */
62
51
  unsigned char *end;
77
66
  CacheField **blob_ptr;
78
67
  optimizer::SqlSelect *select;
79
68
 
80
 
  JoinCache():
81
 
    buff(NULL),
82
 
    pos(NULL),
83
 
    end(NULL),
84
 
    records(0),
85
 
    record_nr(0),
86
 
    ptr_record(0),
87
 
    fields(0),
88
 
    length(0),
89
 
    blobs(0),
90
 
    field(NULL),
91
 
    blob_ptr(NULL),
92
 
    select(NULL)
93
 
  {}
94
 
 
95
69
  void reset_cache_read();
96
70
  void reset_cache_write();
97
71
  bool store_record_in_cache();