~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzle.cc

  • Committer: Brian Aker
  • Date: 2009-03-05 02:48:46 UTC
  • mto: This revision was merged to the branch mainline in revision 911.
  • Revision ID: brian@tangent.org-20090305024846-0z5m0j3e80phlzh4
Remove my_fopen() and key_map.cc file (thanks to Jay's lcov)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2748
2748
  FILE* new_outfile;
2749
2749
  if (opt_outfile)
2750
2750
    end_tee();
2751
 
  if (!(new_outfile= my_fopen(file_name, O_APPEND | O_WRONLY, MYF(MY_WME))))
 
2751
  if (!(new_outfile= fopen(file_name, "a")))
2752
2752
  {
2753
2753
    tee_fprintf(stdout, "Error logging to file '%s'\n", file_name);
2754
2754
    return;
2757
2757
  strncpy(outfile, file_name, FN_REFLEN-1);
2758
2758
  tee_fprintf(stdout, "Logging to file '%s'\n", file_name);
2759
2759
  opt_outfile= 1;
 
2760
 
2760
2761
  return;
2761
2762
}
2762
2763
 
2763
2764
 
2764
2765
static void end_tee()
2765
2766
{
2766
 
  my_fclose(OUTFILE, MYF(0));
 
2767
  fclose(OUTFILE);
2767
2768
  OUTFILE= 0;
2768
2769
  opt_outfile= 0;
2769
2770
  return;
3459
3460
  end[0]=0;
3460
3461
  unpack_filename(source_name,source_name);
3461
3462
  /* open file name */
3462
 
  if (!(sql_file = my_fopen(source_name, O_RDONLY,MYF(0))))
 
3463
  if (!(sql_file = fopen(source_name, "r")))
3463
3464
  {
3464
3465
    char buff[FN_REFLEN+60];
3465
3466
    sprintf(buff,"Failed to open file '%s', error: %d", source_name,errno);
3468
3469
 
3469
3470
  if (!(line_buff=batch_readline_init(opt_max_allowed_packet+512,sql_file)))
3470
3471
  {
3471
 
    my_fclose(sql_file,MYF(0));
 
3472
    fclose(sql_file);
3472
3473
    return put_info("Can't initialize batch_readline", INFO_ERROR, 0 ,0);
3473
3474
  }
3474
3475
 
3486
3487
  error= read_and_execute(false);
3487
3488
  // Continue as before
3488
3489
  status=old_status;
3489
 
  my_fclose(sql_file,MYF(0));
 
3490
  fclose(sql_file);
3490
3491
  batch_readline_end(line_buff);
3491
3492
  return error;
3492
3493
}