~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/mf_tempdir.c

  • Committer: Jay Pipes
  • Date: 2008-07-17 19:43:08 UTC
  • mto: This revision was merged to the branch mainline in revision 182.
  • Revision ID: jay@mysql.com-20080717194308-l9i4ti57gikm2qbv
Phase 1 removal of DBUG in mysys

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
{
23
23
  char *end, *copy;
24
24
  char buff[FN_REFLEN];
25
 
  DBUG_ENTER("init_tmpdir");
26
 
  DBUG_PRINT("enter", ("pathlist: %s", pathlist ? pathlist : "NULL"));
27
25
 
28
26
  pthread_mutex_init(&tmpdir->mutex, MY_MUTEX_INIT_FAST);
29
27
  if (my_init_dynamic_array(&tmpdir->full_list, sizeof(char*), 1, 5))
43
41
    length= cleanup_dirname(buff, buff);
44
42
    if (!(copy= my_strndup(buff, length, MYF(MY_WME))) ||
45
43
        insert_dynamic(&tmpdir->full_list, (uchar*) &copy))
46
 
      DBUG_RETURN(true);
 
44
      return(true);
47
45
    pathlist=end+1;
48
46
  }
49
47
  while (*end);
51
49
  tmpdir->list=(char **)tmpdir->full_list.buffer;
52
50
  tmpdir->max=tmpdir->full_list.elements-1;
53
51
  tmpdir->cur=0;
54
 
  DBUG_RETURN(false);
 
52
  return(false);
55
53
 
56
54
err:
57
55
  delete_dynamic(&tmpdir->full_list);           /* Safe to free */
58
56
  pthread_mutex_destroy(&tmpdir->mutex);
59
 
  DBUG_RETURN(true);
 
57
  return(true);
60
58
}
61
59
 
62
60