~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/discover.cc

  • Committer: Eric Herman
  • Date: 2008-12-06 19:42:46 UTC
  • mto: (656.1.6 devel)
  • mto: This revision was merged to the branch mainline in revision 665.
  • Revision ID: eric@mysql.com-20081206194246-5cdexuu81i366eek
removed trailing whitespace with simple script:

for file in $(find . -name "*.c") $(find . -name "*.cc") $(find . -name "*.h"); do ruby -pe 'gsub(/\s+$/, $/)' < $file > $file.out; mv $file.out $file; done;

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
  File   file;
49
49
  size_t read_len;
50
50
  unsigned char *read_data;
51
 
  struct stat state;  
52
 
  
 
51
  struct stat state;
 
52
 
53
53
  *frmdata= NULL;      // In case of errors
54
54
  *len= 0;
55
55
  error= 1;
56
56
  if ((file=my_open(fn_format(index_file,name,"",reg_ext,
57
57
                              MY_UNPACK_FILENAME|MY_APPEND_EXT),
58
58
                    O_RDONLY,
59
 
                    MYF(0))) < 0)  
60
 
    goto err_end; 
61
 
  
 
59
                    MYF(0))) < 0)
 
60
    goto err_end;
 
61
 
62
62
  // Get length of file
63
63
  error= 2;
64
64
  if (fstat(file, &state))
65
65
    goto err;
66
 
  read_len= state.st_size;  
 
66
  read_len= state.st_size;
67
67
 
68
68
  // Read whole frm file
69
69
  error= 3;
75
75
  *frmdata= (unsigned char*) read_data;
76
76
  *len= read_len;
77
77
  error= 0;
78
 
  
 
78
 
79
79
 err:
80
80
  if (file > 0)
81
81
    my_close(file,MYF(MY_WME));
82
 
  
 
82
 
83
83
 err_end:                     /* Here when no file */
84
84
  return(error);
85
85
} /* readfrm */
86
86
 
87
87
 
88
88
/*
89
 
  Write the content of a frm data pointer 
 
89
  Write the content of a frm data pointer
90
90
  to a frm file.
91
91
 
92
92
  @param name           path to table-file "db/name"