~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table.cc

  • Committer: Brian Aker
  • Date: 2010-12-20 19:20:57 UTC
  • mto: This revision was merged to the branch mainline in revision 2016.
  • Revision ID: brian@tangent.org-20101220192057-1ch4b9uo008d8rje
Merge in additional fixes for sign, plus alter table, plus TIME on
processlist.

Show diffs side-by-side

added added

removed removed

Lines of Context:
521
521
    We must set bit in read set as update_auto_increment() is using the
522
522
    store() to check overflow of auto_increment values
523
523
  */
524
 
  setReadSet(found_next_number_field->field_index);
525
 
  setWriteSet(found_next_number_field->field_index);
 
524
  setReadSet(found_next_number_field->position());
 
525
  setWriteSet(found_next_number_field->position());
526
526
  if (getShare()->next_number_keypart)
527
527
    mark_columns_used_by_index_no_reset(getShare()->next_number_index);
528
528
}
571
571
    for (reg_field= field ; *reg_field ; reg_field++)
572
572
    {
573
573
      if ((*reg_field)->flags & PART_KEY_FLAG)
574
 
        setReadSet((*reg_field)->field_index);
 
574
        setReadSet((*reg_field)->position());
575
575
    }
576
576
  }
577
577
}
620
620
    {
621
621
      /* Merge keys is all keys that had a column refered to in the query */
622
622
      if (is_overlapping(merge_keys, (*reg_field)->part_of_key))
623
 
        setReadSet((*reg_field)->field_index);
 
623
        setReadSet((*reg_field)->position());
624
624
    }
625
625
  }
626
626
 
965
965
            */
966
966
            (*argp)->maybe_null=1;
967
967
          }
968
 
          new_field->field_index= fieldnr++;
 
968
          new_field->setPosition(fieldnr++);
969
969
        }
970
970
      }
971
971
    }
1012
1012
        group_null_items++;
1013
1013
        new_field->flags|= GROUP_FLAG;
1014
1014
      }
1015
 
      new_field->field_index= fieldnr++;
 
1015
      new_field->setPosition(fieldnr++);
1016
1016
      *(reg_field++)= new_field;
1017
1017
    }
1018
1018
    if (!--hidden_field_count)
1507
1507
    for (Field **ptr= this->field ; *ptr != NULL; ptr++)
1508
1508
    {
1509
1509
      Field *f= *ptr;
1510
 
      if (write_set->test(f->field_index))
 
1510
      if (write_set->test(f->position()))
1511
1511
      {
1512
1512
        if (f->real_maybe_null())
1513
1513
        {
1540
1540
  /* Compare updated fields */
1541
1541
  for (Field **ptr= field ; *ptr ; ptr++)
1542
1542
  {
1543
 
    if (isWriteSet((*ptr)->field_index) &&
 
1543
    if (isWriteSet((*ptr)->position()) &&
1544
1544
        (*ptr)->cmp_binary_offset(getShare()->rec_buff_length))
1545
1545
      return true;
1546
1546
  }