~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/function_engine/cursor.cc

  • Committer: Monty Taylor
  • Date: 2010-02-25 05:06:21 UTC
  • mfrom: (1308 staging)
  • mto: This revision was merged to the branch mainline in revision 1311.
  • Revision ID: mordred@inaugust.com-20100225050621-1vmy8ryyo4s58vsf
Merged trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
int FunctionCursor::rnd_next(unsigned char *)
69
69
{
70
70
  bool more_rows;
71
 
  ha_statistic_increment(&SSV::ha_read_rnd_next_count);
 
71
  ha_statistic_increment(&system_status_var::ha_read_rnd_next_count);
72
72
 
73
73
  /* Fix bug in the debug logic for field */
74
74
  for (Field **field=table->field ; *field ; field++)
96
96
{
97
97
  unsigned char *copy;
98
98
 
99
 
  copy= (unsigned char *)malloc(table->s->reclength);
 
99
  copy= (unsigned char *)calloc(table->s->reclength, sizeof(unsigned char));
 
100
  assert(copy);
100
101
  memcpy(copy, record, table->s->reclength);
101
102
  row_cache.push_back(copy);
102
103
  internal::my_store_ptr(ref, ref_length, record_id);
124
125
 
125
126
int FunctionCursor::rnd_pos(unsigned char *buf, unsigned char *pos)
126
127
{
127
 
  ha_statistic_increment(&SSV::ha_read_rnd_count);
 
128
  ha_statistic_increment(&system_status_var::ha_read_rnd_count);
128
129
  size_t position_id= (size_t)internal::my_get_ptr(pos, ref_length);
129
130
 
130
131
  memcpy(buf, row_cache[position_id], table->s->reclength);