~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to sql/log.cc

MergedĀ fromĀ trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3851
3851
      my_off_t offset= BIN_LOG_HEADER_SIZE + FLAGS_OFFSET;
3852
3852
      my_off_t org_position= my_tell(log_file.file, MYF(0));
3853
3853
      uchar flags= 0;            // clearing LOG_EVENT_BINLOG_IN_USE_F
3854
 
      my_pwrite(log_file.file, &flags, 1, offset, MYF(0));
3855
 
      /*
3856
 
        Restore position so that anything we have in the IO_cache is written
3857
 
        to the correct position.
3858
 
        We need the seek here, as my_pwrite() is not guaranteed to keep the
3859
 
        original position on system that doesn't support pwrite().
3860
 
      */
3861
 
      my_seek(log_file.file, org_position, MY_SEEK_SET, MYF(0));
 
3854
      pwrite(log_file.file, &flags, 1, offset);
3862
3855
    }
3863
3856
 
3864
3857
    /* this will cleanup IO_CACHE, sync and close the file */