~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field.cc

Merge trunk and resolve all conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
561
561
  return 0;
562
562
}
563
563
 
564
 
bool Field::is_null(my_ptrdiff_t row_offset)
 
564
bool Field::is_null(ptrdiff_t row_offset)
565
565
{
566
566
  return null_ptr ?
567
567
    (null_ptr[row_offset] & null_bit ? true : false) :
568
568
    table->null_row;
569
569
}
570
570
 
571
 
bool Field::is_real_null(my_ptrdiff_t row_offset)
 
571
bool Field::is_real_null(ptrdiff_t row_offset)
572
572
{
573
573
  return null_ptr ? (null_ptr[row_offset] & null_bit ? true : false) : false;
574
574
}
580
580
  return test(record[(uint32_t) (null_ptr -table->record[0])] & null_bit);
581
581
}
582
582
 
583
 
bool Field::is_null_in_record_with_offset(my_ptrdiff_t with_offset)
 
583
bool Field::is_null_in_record_with_offset(ptrdiff_t with_offset)
584
584
{
585
585
  if (! null_ptr)
586
586
    return false;
587
587
  return test(null_ptr[with_offset] & null_bit);
588
588
}
589
589
 
590
 
void Field::set_null(my_ptrdiff_t row_offset)
 
590
void Field::set_null(ptrdiff_t row_offset)
591
591
{
592
592
  if (null_ptr)
593
593
    null_ptr[row_offset]|= null_bit;
594
594
}
595
595
 
596
 
void Field::set_notnull(my_ptrdiff_t row_offset)
 
596
void Field::set_notnull(ptrdiff_t row_offset)
597
597
{
598
598
  if (null_ptr)
599
599
    null_ptr[row_offset]&= (unsigned char) ~null_bit;
941
941
  if ((tmp= (Field*) memdup_root(root,(char*) this,size_of())))
942
942
  {
943
943
    tmp->init(new_table);
944
 
    tmp->move_field_offset((my_ptrdiff_t) (new_table->record[0] -
 
944
    tmp->move_field_offset((ptrdiff_t) (new_table->record[0] -
945
945
                                           new_table->s->default_values));
946
946
  }
947
947
  return tmp;