~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/mf_iocache2.cc

  • Committer: Monty Taylor
  • Date: 2008-12-06 22:41:03 UTC
  • mto: (656.1.7 devel)
  • mto: This revision was merged to the branch mainline in revision 665.
  • Revision ID: monty@inaugust.com-20081206224103-jdouqwt9hb0f01y1
Moved non-working tests into broken suite for easier running of working tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
  bytes_in_cache= my_b_bytes_in_cache(cache);
62
62
  do
63
63
  {
64
 
    if (fwrite(cache->read_pos, 1, bytes_in_cache, file)
65
 
               != bytes_in_cache)
 
64
    if (my_fwrite(file, cache->read_pos, bytes_in_cache,
 
65
                  MYF(MY_WME | MY_NABP)) == (size_t) -1)
66
66
      return(1);
67
67
    cache->read_pos= cache->read_end;
68
68
  } while ((bytes_in_cache= my_b_fill(cache)));
76
76
    Prevent optimizer from putting res in a register when debugging
77
77
    we need this to be able to see the value of res when the assert fails
78
78
  */
79
 
  volatile my_off_t res;
 
79
  volatile my_off_t res; 
80
80
 
81
81
  /*
82
82
    We need to lock the append buffer mutex to keep flush_io_cache()
173
173
 
174
174
  if (info->seek_not_done)
175
175
  {                                     /* File touched, do seek */
176
 
    if (lseek(info->file,pos_in_file,SEEK_SET) ==
 
176
    if (my_seek(info->file,pos_in_file,MY_SEEK_SET,MYF(0)) ==
177
177
        MY_FILEPOS_ERROR)
178
178
    {
179
179
      info->error= 0;
255
255
    return my_b_tell(info);
256
256
 
257
257
  info->seek_not_done= 1;
258
 
  return lseek(info->file, 0L, SEEK_END);
 
258
  return my_seek(info->file, 0L, MY_SEEK_END, MYF(0));
259
259
}
260
260
 
261
261
 
298
298
    /* Copy everything until '%' or end of string */
299
299
    const char *start=fmt;
300
300
    size_t length;
301
 
 
 
301
    
302
302
    for (; (*fmt != '\0') && (*fmt != '%'); fmt++) ;
303
303
 
304
304
    length= (size_t) (fmt - start);
309
309
    if (*fmt == '\0')                           /* End of format */
310
310
      return out_length;
311
311
 
312
 
    /*
 
312
    /* 
313
313
      By this point, *fmt must be a percent;  Keep track of this location and
314
 
      skip over the percent character.
 
314
      skip over the percent character. 
315
315
    */
316
316
    assert(*fmt == '%');
317
317
    backtrack= fmt;
326
326
process_flags:
327
327
    switch (*fmt)
328
328
    {
329
 
      case '-':
 
329
      case '-': 
330
330
        minimum_width_sign= -1; fmt++; goto process_flags;
331
331
      case '0':
332
332
        is_zero_padded= true; fmt++; goto process_flags;
394
394
      if (*fmt == 'd')
395
395
        length2= (size_t) (int10_to_str((long) iarg,buff, -10) - buff);
396
396
      else
397
 
        length2= (uint32_t) (int10_to_str((long) (uint32_t) iarg,buff,10)- buff);
 
397
        length2= (uint) (int10_to_str((long) (uint) iarg,buff,10)- buff);
398
398
 
399
399
      /* minimum width padding */
400
 
      if (minimum_width > length2)
 
400
      if (minimum_width > length2) 
401
401
      {
402
402
        const size_t buflen = minimum_width - length2;
403
403
        buffz.clear();