~mdcallag/+junk/5.1-map

« back to all changes in this revision

Viewing changes to storage/archive/archive_test.c

  • Committer: msvensson at pilot
  • Date: 2007-04-24 09:11:45 UTC
  • mfrom: (2469.1.106)
  • Revision ID: sp1r-msvensson@pilot.blaudden-20070424091145-10463
Merge pilot.blaudden:/home/msvensson/mysql/my51-m-mysql_upgrade
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint

Show diffs side-by-side

added added

removed removed

Lines of Context:
217
217
 
218
218
  azclose(&writer_handle);
219
219
  azclose(&reader_handle);
220
 
  exit(0);
221
220
  unlink(TEST_FILENAME);
222
221
 
223
222
  /* Start size tests */
224
223
  printf("About to run 2/4/8 gig tests now, you may want to hit CTRL-C\n");
225
 
  size_test(TWOGIG, 2097152L);
226
 
  size_test(FOURGIG, 4194304L);
227
 
  size_test(EIGHTGIG, 8388608L);
 
224
  size_test(TWOGIG, 2088992L);
 
225
  size_test(FOURGIG, 4177984L);
 
226
  size_test(EIGHTGIG, 8355968L);
228
227
 
229
228
  return 0;
230
229
}
234
233
  azio_stream writer_handle, reader_handle;
235
234
  unsigned long long write_length;
236
235
  unsigned long long read_length= 0;
 
236
  unsigned long long count;
237
237
  unsigned int ret;
238
238
  char buffer[BUFFER_LEN];
239
239
  int error;
244
244
    return 0;
245
245
  }
246
246
 
247
 
  for (write_length= 0; write_length < length ; write_length+= ret)
 
247
  for (count= 0, write_length= 0; write_length < length ; 
 
248
       write_length+= ret)
248
249
  {
 
250
    count++;
249
251
    ret= azwrite(&writer_handle, test_string, BUFFER_LEN);
250
252
    if (ret != BUFFER_LEN)
251
253
    {
257
259
      azflush(&writer_handle,  Z_SYNC_FLUSH);
258
260
    }
259
261
  }
260
 
  assert(write_length == length);
 
262
  assert(write_length != count * BUFFER_LEN); /* Number of rows time BUFFER_LEN */
261
263
  azflush(&writer_handle,  Z_SYNC_FLUSH);
262
264
 
263
265
  printf("Reading back data\n");
279
281
    }
280
282
  }
281
283
 
282
 
  assert(read_length == length);
 
284
  assert(read_length == write_length);
283
285
  assert(writer_handle.rows == rows_to_test_for);
284
286
  azclose(&writer_handle);
285
287
  azclose(&reader_handle);