~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/create_field.cc

Monty fixes pluss a few from me for charset.

Show diffs side-by-side

added added

removed removed

Lines of Context:
185
185
  uint32_t allowed_type_modifier= 0;
186
186
  uint32_t max_field_charlength= MAX_FIELD_CHARLENGTH;
187
187
 
 
188
  if (interval_list == NULL)
 
189
  {
 
190
    void *interval_list_mem=
 
191
        sql_alloc(sizeof(std::vector<String*>));
 
192
    if (interval_list_mem == NULL)
 
193
    {
 
194
      my_error(ER_OUTOFMEMORY, MYF(0), sizeof(std::vector<String*>));
 
195
      return true;
 
196
    }
 
197
    interval_list= new (interval_list_mem) std::vector<String*>;
 
198
  }
 
199
 
188
200
  field= 0;
189
201
  field_name= fld_name;
190
202
  def= fld_default_value;
206
218
  interval= 0;
207
219
  pack_length= key_length= 0;
208
220
  charset= fld_charset;
209
 
  interval_list.empty();
 
221
  interval_list->empty();
210
222
 
211
223
  comment= *fld_comment;
212
224
 
358
370
        List_iterator<String> it(*fld_interval_list);
359
371
        String *tmp;
360
372
        while ((tmp= it++))
361
 
          interval_list.push_back(tmp);
 
373
          interval_list->push_back(tmp);
362
374
        length= 1;
363
375
        break;
364
376
    }