~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/join_cache.cc

Collection of patches/bug fixes from new-cleanup tree (none of the
Table/other fixes are included).

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
  last record is stored with pointers to blobs to support very big
56
56
  records
57
57
******************************************************************************/
58
 
int join_init_cache(Session *session, JOIN_TAB *tables, uint32_t table_count)
 
58
int join_init_cache(Session *session, JoinTable *tables, uint32_t table_count)
59
59
{
60
60
  register unsigned int i;
61
61
  unsigned int length, blobs;
62
62
  size_t size;
63
63
  CACHE_FIELD *copy,**blob_ptr;
64
64
  JOIN_CACHE  *cache;
65
 
  JOIN_TAB *join_tab;
 
65
  JoinTable *join_tab;
66
66
 
67
67
  cache= &tables[table_count].cache;
68
68
  cache->fields=blobs=0;
76
76
    blobs+=join_tab->used_blobs;
77
77
 
78
78
    /* SemiJoinDuplicateElimination: reserve space for rowid */
79
 
    if (join_tab->rowid_keep_flags & JOIN_TAB::KEEP_ROWID)
 
79
    if (join_tab->rowid_keep_flags & JoinTable::KEEP_ROWID)
80
80
    {
81
81
      cache->fields++;
82
82
      join_tab->used_fieldlength += join_tab->table->file->ref_length;
140
140
      cache->fields++;
141
141
    }
142
142
    /* SemiJoinDuplicateElimination: Allocate space for rowid if needed */
143
 
    if (tables[i].rowid_keep_flags & JOIN_TAB::KEEP_ROWID)
 
143
    if (tables[i].rowid_keep_flags & JoinTable::KEEP_ROWID)
144
144
    {
145
145
      copy->str= tables[i].table->file->ref;
146
146
      copy->length= tables[i].table->file->ref_length;
147
147
      copy->strip=0;
148
148
      copy->blob_field=0;
149
149
      copy->get_rowid= NULL;
150
 
      if (tables[i].rowid_keep_flags & JOIN_TAB::CALL_POSITION)
 
150
      if (tables[i].rowid_keep_flags & JoinTable::CALL_POSITION)
151
151
      {
152
152
        /* We will need to call h->position(): */
153
153
        copy->get_rowid= tables[i].table;
154
154
        /* And those after us won't have to: */
155
 
        tables[i].rowid_keep_flags&=  ~((int)JOIN_TAB::CALL_POSITION);
 
155
        tables[i].rowid_keep_flags&=  ~((int)JoinTable::CALL_POSITION);
156
156
      }
157
157
      copy++;
158
158
    }