~jaypipes/drizzle/subscriber-plugin

« back to all changes in this revision

Viewing changes to storage/myisam/mi_packrec.c

  • Committer: Brian Aker
  • Date: 2008-07-29 07:47:38 UTC
  • mfrom: (212.6.1 bzero-memset)
  • Revision ID: brian@tangent.org-20080729074738-lfzim6htapm42f2o
MergeĀ fromĀ Mats

Show diffs side-by-side

added added

removed removed

Lines of Context:
771
771
                                   uchar *to, uchar *end)
772
772
{
773
773
  if (get_bit(bit_buff))
774
 
    bzero((char*) to,(uint) (end-to));
 
774
    memset((char*) to, 0, (uint) (end-to));
775
775
  else
776
776
  {
777
777
    end-=rec->space_length_bits;
778
778
    decode_bytes(rec,bit_buff,to,end);
779
 
    bzero((char*) end,rec->space_length_bits);
 
779
    memset((char*) end, 0, rec->space_length_bits);
780
780
  }
781
781
}
782
782
 
784
784
                          uchar *end)
785
785
{
786
786
  if (get_bit(bit_buff))
787
 
    bzero((char*) to,(uint) (end-to));
 
787
    memset((char*) to, 0, (uint) (end-to));
788
788
  else
789
789
    decode_bytes(rec,bit_buff,to,end);
790
790
}
957
957
{
958
958
  end-=rec->space_length_bits;
959
959
  decode_bytes(rec,bit_buff,(uchar*) to,end);
960
 
  bzero((char*) end,rec->space_length_bits);
 
960
  memset((char*) end, 0, rec->space_length_bits);
961
961
}
962
962
 
963
963
static void uf_constant(MI_COLUMNDEF *rec,
983
983
                    MI_BIT_BUFF *bit_buff __attribute__((unused)),
984
984
                    uchar *to, uchar *end)
985
985
{
986
 
  bzero((char*) to,(uint) (end-to));
 
986
  memset((char*) to, 0, (uint) (end-to));
987
987
}
988
988
 
989
989
static void uf_blob(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff,
990
990
                    uchar *to, uchar *end)
991
991
{
992
992
  if (get_bit(bit_buff))
993
 
    bzero((uchar*) to,(end-to));
 
993
    memset((uchar*) to, 0, (end-to));
994
994
  else
995
995
  {
996
996
    ulong length=get_bits(bit_buff,rec->space_length_bits);
998
998
    if (bit_buff->blob_pos+length > bit_buff->blob_end)
999
999
    {
1000
1000
      bit_buff->error=1;
1001
 
      bzero((uchar*) to,(end-to));
 
1001
      memset((uchar*) to, 0, (end-to));
1002
1002
      return;
1003
1003
    }
1004
1004
    decode_bytes(rec,bit_buff,bit_buff->blob_pos,bit_buff->blob_pos+length);