~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/definition/table.cc

  • Committer: Brian Aker
  • Date: 2010-12-17 00:08:06 UTC
  • mfrom: (2002.1.4 clean)
  • Revision ID: brian@tangent.org-20101217000806-fa6kmggjnhsl4q85
Rollup for field encapsulation, monty fix for bzrignore, and Andrew bug
fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
 
1
/* -*- mode: c++; c-basic-offset: 2; i/dent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
4
 *  Copyright (C) 2010 Brian Aker
361
361
      size_t num_parts= index.index_part_size();
362
362
      for (size_t y= 0; y < num_parts; ++y)
363
363
      {
364
 
        if (index.index_part(y).fieldnr() == in_field->field_index)
 
364
        if (index.index_part(y).fieldnr() == in_field->position())
365
365
          return true;
366
366
      }
367
367
    }
398
398
  uniques(0),
399
399
  null_fields(0),
400
400
  blob_fields(0),
401
 
  timestamp_field_offset(0),
402
401
  has_variable_width(false),
403
402
  db_create_options(0),
404
403
  db_options_in_use(0),
464
463
  uniques(0),
465
464
  null_fields(0),
466
465
  blob_fields(0),
467
 
  timestamp_field_offset(0),
468
466
  has_variable_width(false),
469
467
  db_create_options(0),
470
468
  db_options_in_use(0),
540
538
  uniques(0),
541
539
  null_fields(0),
542
540
  blob_fields(0),
543
 
  timestamp_field_offset(0),
544
541
  has_variable_width(false),
545
542
  db_create_options(0),
546
543
  db_options_in_use(0),
619
616
  uniques(0),
620
617
  null_fields(0),
621
618
  blob_fields(0),
622
 
  timestamp_field_offset(0),
623
619
  has_variable_width(false),
624
620
  db_create_options(0),
625
621
  db_options_in_use(0),
1404
1400
    f->setTable(NULL);
1405
1401
    f->orig_table= NULL;
1406
1402
 
1407
 
    f->field_index= fieldnr;
 
1403
    f->setPosition(fieldnr);
1408
1404
    f->comment= comment;
1409
1405
    if (! default_value &&
1410
1406
        ! (f->unireg_check==Field::NEXT_NUMBER) &&
1417
1413
    if (f->unireg_check == Field::NEXT_NUMBER)
1418
1414
      found_next_number_field= &(field[fieldnr]);
1419
1415
 
1420
 
    if (timestamp_field == f)
1421
 
      timestamp_field_offset= fieldnr;
1422
 
 
1423
1416
    if (use_hash) /* supposedly this never fails... but comments lie */
1424
1417
    {
1425
1418
      const char *local_field_name= field[fieldnr]->field_name;
1854
1847
    outparam.found_next_number_field=
1855
1848
      outparam.getField(positionFields(found_next_number_field));
1856
1849
  if (timestamp_field)
1857
 
    outparam.timestamp_field= (Field_timestamp*) outparam.getField(timestamp_field_offset);
 
1850
    outparam.timestamp_field= (Field_timestamp*) outparam.getField(timestamp_field->position());
1858
1851
 
1859
1852
  /* Fix key->name and key_part->field */
1860
1853
  if (key_parts)