~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/default_modify.c

  • Committer: Brian Aker
  • Date: 2008-07-01 08:15:04 UTC
  • Revision ID: brian@tangent.org-20080701081504-qn3jzgsbb2twnchs
Large file and ftruncate() support

Show diffs side-by-side

added added

removed removed

Lines of Context:
209
209
  if (opt_applied)
210
210
  {
211
211
    /* Don't write the file if there are no changes to be made */
212
 
    if (my_chsize(fileno(cnf_file), (my_off_t) (dst_ptr - file_buffer), 0,
213
 
                  MYF(MY_WME)) ||
 
212
    if (ftruncate(fileno(cnf_file), (my_off_t) (dst_ptr - file_buffer)) ||
214
213
        my_fseek(cnf_file, 0, MY_SEEK_SET, MYF(0)) ||
215
214
        my_fwrite(cnf_file, (uchar*) file_buffer, (size_t) (dst_ptr - file_buffer),
216
215
                  MYF(MY_NABP)))