Commit 0ec590fa authored by unknown's avatar unknown
Browse files

Varchar hack to clean strings removed.


storage/archive/ha_archive.cc:
  Removed Varchar cleanup hack. I'm going to commit new pack code.
parent 19daf5d9
Loading
Loading
Loading
Loading
+0 −21
Original line number Diff line number Diff line
@@ -896,27 +896,6 @@ int ha_archive::write_row(byte *buf)
    if (init_archive_writer())
      DBUG_RETURN(HA_ERR_CRASHED_ON_USAGE);

  /*
    Varchar structures are constant in size but are not cleaned up request
    to request. The following sets all unused space to null to improve
    compression.
  */
  for (Field **field=table->field ; *field ; field++)
  {
    DBUG_PRINT("archive",("Pack is %d\n", (*field)->pack_length()));
    DBUG_PRINT("archive",("MyPack is %d\n", (*field)->data_length((char*) buf + (*field)->offset(record))));
    if ((*field)->real_type() == MYSQL_TYPE_VARCHAR)
    {
      char *ptr= (*field)->ptr + actual_length;

      DBUG_ASSERT(actual_length <= (*field)->pack_length());

      uint32 to_free= (*field)->pack_length() - actual_length; 
      if (to_free > 0)
        bzero(ptr, to_free);
    }
  }

  share->rows_recorded++;
  rc= real_write_row(buf, &(share->archive_write));
error: