~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/join_cache.cc

  • Committer: Brian Aker
  • Date: 2010-06-03 22:55:32 UTC
  • mto: (1578.6.9 explain-drizzle)
  • mto: This revision was merged to the branch mainline in revision 1591.
  • Revision ID: brian@gir-2.local-20100603225532-5yuc8um41i4owavf
Additional pass through to remove raw field access.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
#include "config.h"
31
31
#include "drizzled/sql_select.h" /* include join.h */
32
32
#include "drizzled/field/blob.h"
33
 
#include "drizzled/drizzled.h"
34
 
#include "drizzled/internal/my_sys.h"
35
33
 
36
34
#include <algorithm>
37
35
 
89
87
  if (!(cache->field=(CacheField*)
90
88
        memory::sql_alloc(sizeof(CacheField)*(cache->fields+table_count*2)+(blobs+1)* sizeof(CacheField*))))
91
89
  {
92
 
    size= cache->end - cache->buff;
93
 
    global_join_buffer.sub(size);
94
90
    free((unsigned char*) cache->buff);
95
91
    cache->buff=0;
96
92
    return(1);
104
100
  {
105
101
    uint32_t null_fields=0, used_fields;
106
102
    Field **f_ptr,*field;
107
 
    for (f_ptr= tables[i].table->getFields(), used_fields= tables[i].used_fields; used_fields; f_ptr++)
 
103
    for (f_ptr= tables[i].table->field,used_fields= tables[i].used_fields; used_fields; f_ptr++)
108
104
    {
109
105
      field= *f_ptr;
110
106
      if (field->isReadSet())
166
162
  cache->blobs= blobs;
167
163
  *blob_ptr= NULL;                                      /* End sequentel */
168
164
  size= max((size_t) session->variables.join_buff_size, (size_t)cache->length);
169
 
  if (not global_join_buffer.add(size))
170
 
  {
171
 
    my_error(ER_OUT_OF_GLOBAL_JOINMEMORY, MYF(ME_ERROR+ME_WAITTANG));
172
 
    return 1;
173
 
  }
174
165
  if (!(cache->buff= (unsigned char*) malloc(size)))
175
166
    return 1;
176
167
  cache->end= cache->buff+size;
229
220
    {
230
221
      // SemiJoinDuplicateElimination: Get the rowid into table->ref:
231
222
      if (copy->get_rowid)
232
 
        copy->get_rowid->cursor->position(copy->get_rowid->getInsertRecord());
 
223
        copy->get_rowid->cursor->position(copy->get_rowid->record[0]);
233
224
 
234
225
      if (copy->strip)
235
226
      {