~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/join_cache.h

  • Committer: lbieber
  • Date: 2010-10-01 13:06:31 UTC
  • mfrom: (1802.2.2 drizzle-bug-651948)
  • mto: This revision was merged to the branch mainline in revision 1805.
  • Revision ID: lbieber@orisndriz08-20101001130631-xubscnhmj7r5dn6g
Merge Andrew - Fix bug 651948 - Index lengths not retrieved using drizzledump

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2008 Sun Microsystems, Inc.
 
4
 *  Copyright (C) 2008 Sun Microsystems
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
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();