~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/function_engine/cursor.cc

  • Committer: Brian Aker
  • Date: 2010-10-22 20:50:08 UTC
  • mto: This revision was merged to the branch mainline in revision 1873.
  • Revision ID: brian@tangent.org-20101022205008-3rfeukcx1o9c3xnh
getTable()

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
int FunctionCursor::doStartTableScan(bool)
68
68
{
69
69
  rows_returned= 0;
70
 
  generator= tool->generator(table->getFields());
 
70
  generator= tool->generator(getTable()->getFields());
71
71
 
72
72
  return 0;
73
73
}
79
79
  ha_statistic_increment(&system_status_var::ha_read_rnd_next_count);
80
80
 
81
81
  /* Fix bug in the debug logic for field */
82
 
  for (Field **field= table->getFields() ; *field ; field++)
 
82
  for (Field **field= getTable()->getFields() ; *field ; field++)
83
83
  {
84
84
    (*field)->setWriteSet();
85
85
  }
86
86
 
87
 
  more_rows= generator->sub_populate(table->getShare()->sizeFields());
 
87
  more_rows= generator->sub_populate(getTable()->getShare()->sizeFields());
88
88
 
89
89
  if (more_rows)
90
90
  {
102
102
 
103
103
void FunctionCursor::position(const unsigned char *record)
104
104
{
105
 
  if (row_cache.size() <= record_id * table->getShare()->getRecordLength())
 
105
  if (row_cache.size() <= record_id * getTable()->getShare()->getRecordLength())
106
106
  {
107
 
    row_cache.resize(row_cache.size() + table->getShare()->getRecordLength() * 100); // Hardwired at adding an additional 100 rows of storage
 
107
    row_cache.resize(row_cache.size() + getTable()->getShare()->getRecordLength() * 100); // Hardwired at adding an additional 100 rows of storage
108
108
  }
109
 
  memcpy(&row_cache[record_id * table->getShare()->getRecordLength()], record, table->getShare()->getRecordLength());
 
109
  memcpy(&row_cache[record_id * getTable()->getShare()->getRecordLength()], record, getTable()->getShare()->getRecordLength());
110
110
  internal::my_store_ptr(ref, ref_length, record_id);
111
111
  record_id++;
112
112
}
151
151
  ha_statistic_increment(&system_status_var::ha_read_rnd_count);
152
152
  size_t position_id= (size_t)internal::my_get_ptr(pos, ref_length);
153
153
 
154
 
  assert(position_id * table->getShare()->getRecordLength() < row_cache.size());
155
 
  memcpy(buf, &row_cache[position_id * table->getShare()->getRecordLength()], table->getShare()->getRecordLength());
 
154
  assert(position_id * getTable()->getShare()->getRecordLength() < row_cache.size());
 
155
  memcpy(buf, &row_cache[position_id * getTable()->getShare()->getRecordLength()], getTable()->getShare()->getRecordLength());
156
156
 
157
157
  return 0;
158
158
}