~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/optimizer/quick_group_min_max_select.cc

  • Committer: Olaf van der Spek
  • Date: 2011-06-22 17:21:46 UTC
  • mto: This revision was merged to the branch mainline in revision 2347.
  • Revision ID: olafvdspek@gmail.com-20110622172146-fmtxxu9xt3ddmnm5
Refactor

Show diffs side-by-side

added added

removed removed

Lines of Context:
101
101
  if (group_prefix) /* Already initialized. */
102
102
    return 0;
103
103
 
104
 
  last_prefix= (unsigned char*) alloc.alloc(group_prefix_len);
 
104
  last_prefix= alloc.alloc(group_prefix_len);
105
105
  /*
106
106
    We may use group_prefix to store keys with all select fields, so allocate
107
107
    enough space for it.
108
108
  */
109
 
  group_prefix= (unsigned char*) alloc.alloc(real_prefix_len + min_max_arg_len);
 
109
  group_prefix= alloc.alloc(real_prefix_len + min_max_arg_len);
110
110
 
111
111
  if (key_infix_len > 0)
112
112
  {
114
114
      The memory location pointed to by key_infix will be deleted soon, so
115
115
      allocate a new buffer and copy the key_infix into it.
116
116
    */
117
 
    unsigned char *tmp_key_infix= (unsigned char*) alloc.alloc(key_infix_len);
 
117
    unsigned char *tmp_key_infix= alloc.alloc(key_infix_len);
118
118
    memcpy(tmp_key_infix, this->key_infix, key_infix_len);
119
119
    this->key_infix= tmp_key_infix;
120
120
  }