~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/create_field.cc

  • Committer: Mark Atwood
  • Date: 2011-10-06 04:38:39 UTC
  • mfrom: (2426.3.1 drizzle-docs71)
  • Revision ID: me@mark.atwood.name-20111006043839-qrtu9wtrr04k7ie4
mergeĀ lp:~hingo/drizzle/drizzle-new-pandora-pluginini-keys

Show diffs side-by-side

added added

removed removed

Lines of Context:
182
182
                        const char *fld_length,
183
183
                        const char *fld_decimals,
184
184
                        uint32_t fld_type_modifier,
185
 
                        lex_string_t *fld_comment,
 
185
                        str_ref fld_comment,
186
186
                        const char *fld_change,
187
187
                        List<String> *fld_interval_list,
188
188
                        const charset_info_st* fld_charset,
215
215
  charset= fld_charset;
216
216
  interval_list.clear();
217
217
 
218
 
  comment= *fld_comment;
 
218
  comment= fld_comment;
219
219
 
220
220
  if (fld_length && !(length= (uint32_t) atoi(fld_length)))
221
221
    fld_length= 0;
309
309
        pack_length= 4;
310
310
 
311
311
        List<String>::iterator it(fld_interval_list->begin());
312
 
        String *tmp;
313
 
        while ((tmp= it++))
 
312
        while (String* tmp= it++)
314
313
          interval_list.push_back(tmp);
315
314
        length= 1;
316
315
        break;
365
364
  if (sql_type == DRIZZLE_TYPE_BLOB && default_value_item)
366
365
  {
367
366
    /* Allow empty as default value. */
368
 
    String str,*res;
369
 
    res= default_value_item->val_str(&str);
 
367
    String str;
 
368
    String* res= default_value_item->val_str(&str);
370
369
    if (res->length())
371
370
    {
372
371
      my_error(ER_BLOB_CANT_HAVE_DEFAULT, MYF(0), field_name);
397
396
      }
398
397
      else
399
398
      {
400
 
        unireg_check= (on_update_now ? Field::TIMESTAMP_UN_FIELD:
401
 
                       Field::NONE);
 
399
        unireg_check= on_update_now ? Field::TIMESTAMP_UN_FIELD : Field::NONE;
402
400
      }
403
401
    }
404
402
    else
416
414
        If we have TIMESTAMP NULL column without explicit DEFAULT value
417
415
        we treat it as having DEFAULT NULL attribute.
418
416
      */
419
 
      unireg_check= (on_update_now ? Field::TIMESTAMP_UN_FIELD :
420
 
                     (flags & NOT_NULL_FLAG ? Field::TIMESTAMP_OLD_FIELD :
421
 
                      Field::NONE));
 
417
      unireg_check= on_update_now ? Field::TIMESTAMP_UN_FIELD :
 
418
                     (flags & NOT_NULL_FLAG ? Field::TIMESTAMP_OLD_FIELD : Field::NONE);
422
419
    }
423
420
  }
424
421