~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/mf_tempfile.cc

  • Committer: Brian Aker
  • Date: 2009-05-23 17:13:03 UTC
  • mfrom: (1034.1.8 merge)
  • Revision ID: brian@gaz-20090523171303-d28xhutqic0xe2b4
Merge Brian

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
    to             pointer to buffer where temporary filename will be stored
36
36
    dir            directory where to create the file
37
37
    prefix         prefix the filename with this
38
 
    mode           Flags to use for my_create/my_open
39
38
    MyFlags        Magic flags
40
39
 
41
40
  @return
53
52
 
54
53
*/
55
54
 
56
 
File create_temp_file(char *to, const char *dir, const char *prefix,
57
 
                      int,
58
 
                      myf MyFlags)
 
55
File create_temp_file(char *to, const char *dir, const char *prefix, myf MyFlags)
59
56
{
60
57
  File file= -1;
61
58
 
90
87
     * if (mode & O_TEMPORARY)
91
88
      (void) my_delete(to, MYF(MY_WME | ME_NOINPUT));
92
89
     */
93
 
    file=my_register_filename(org_file, to, FILE_BY_MKSTEMP,
94
 
                              EE_CANTCREATEFILE, MyFlags);
 
90
    file=my_register_filename(org_file, to, EE_CANTCREATEFILE, MyFlags);
 
91
 
95
92
    /* If we didn't manage to register the name, remove the temp file */
96
93
    if (org_file >= 0 && file < 0)
97
94
    {
132
129
#error No implementation found for create_temp_file
133
130
#endif
134
131
  if (file >= 0)
135
 
    thread_safe_increment(my_tmp_file_created,&THR_LOCK_open);
 
132
    my_tmp_file_created++;
 
133
 
136
134
  return(file);
137
135
}