~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table/singular.cc

  • Committer: Mark Atwood
  • Date: 2011-06-24 11:45:17 UTC
  • mfrom: (2318.6.64 rf)
  • Revision ID: me@mark.atwood.name-20110624114517-1mq8no6jlp2nrg7m
mergeĀ lp:~olafvdspek/drizzle/refactor15

Show diffs side-by-side

added added

removed removed

Lines of Context:
88
88
  getMutableShare()->setRecordLength(record_length + null_pack_length);
89
89
  getMutableShare()->rec_buff_length= ALIGN_SIZE(getMutableShare()->getRecordLength() + 1);
90
90
  record[0]= session->mem.alloc(getMutableShare()->rec_buff_length);
91
 
  if (not getInsertRecord())
92
 
  {
93
 
    throw "Memory allocation failure";
94
 
  }
95
91
 
96
92
  if (null_pack_length)
97
93
  {
98
 
    null_flags= (unsigned char*) getInsertRecord();
 
94
    null_flags= getInsertRecord();
99
95
    getMutableShare()->null_fields= null_count;
100
96
    getMutableShare()->null_bytes= null_pack_length;
101
97
  }
186
182
  if (getShare()->sizeKeys())
187
183
  {                                             // Get keys for ni_create
188
184
    bool using_unique_constraint= false;
189
 
    HA_KEYSEG *seg= (HA_KEYSEG*) getMemRoot().alloc(sizeof(*seg) * keyinfo->key_parts);
 
185
    HA_KEYSEG *seg= (HA_KEYSEG*) mem().alloc(sizeof(*seg) * keyinfo->key_parts);
190
186
 
191
187
    memset(seg, 0, sizeof(*seg) * keyinfo->key_parts);
192
188
    if (keyinfo->key_length >= cursor->getEngine()->max_key_length() ||
239
235
      if (!(key_field->flags & NOT_NULL_FLAG))
240
236
      {
241
237
        seg->null_bit= key_field->null_bit;
242
 
        seg->null_pos= (uint32_t) (key_field->null_ptr - (unsigned char*) getInsertRecord());
 
238
        seg->null_pos= (uint32_t) (key_field->null_ptr - getInsertRecord());
243
239
        /*
244
240
          We are using a GROUP BY on something that contains NULL
245
241
          In this case we have to tell MyISAM that two NULL should
327
323
  }
328
324
  free_io_cache();
329
325
 
330
 
  getMemRoot().free_root(MYF(0));
 
326
  mem().free_root(MYF(0));
331
327
  in_use->set_proc_info(save_proc_info);
332
328
}
333
329