~ubuntu-branches/ubuntu/hardy/mysql-dfsg-5.0/hardy-updates

« back to all changes in this revision

Viewing changes to mysys/mf_tempdir.c

  • Committer: Bazaar Package Importer
  • Author(s): sean finney
  • Date: 2007-05-13 12:32:45 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20070513123245-8c3l187dk34cz2ar
Tags: 5.0.41-2
the previous "translation changes" inadvertently introduced unrelated
changes in the package control file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
{
27
27
  char *end, *copy;
28
28
  char buff[FN_REFLEN];
29
 
  DYNAMIC_ARRAY t_arr;
30
29
  pthread_mutex_init(&tmpdir->mutex, MY_MUTEX_INIT_FAST);
31
 
  if (my_init_dynamic_array(&t_arr, sizeof(char*), 1, 5))
 
30
  if (my_init_dynamic_array(&tmpdir->full_list, sizeof(char*), 1, 5))
32
31
    return TRUE;
33
32
  if (!pathlist || !pathlist[0])
34
33
  {
49
48
    convert_dirname(buff, pathlist, end);
50
49
    if (!(copy=my_strdup(buff, MYF(MY_WME))))
51
50
      return TRUE;
52
 
    if (insert_dynamic(&t_arr, (gptr)&copy))
 
51
    if (insert_dynamic(&tmpdir->full_list, (gptr)&copy))
53
52
      return TRUE;
54
53
    pathlist=end+1;
55
54
  }
56
55
  while (*end);
57
 
  freeze_size(&t_arr);
58
 
  tmpdir->list=(char **)t_arr.buffer;
59
 
  tmpdir->max=t_arr.elements-1;
 
56
  freeze_size(&tmpdir->full_list);
 
57
  tmpdir->list=(char **)tmpdir->full_list.buffer;
 
58
  tmpdir->max=tmpdir->full_list.elements-1;
60
59
  tmpdir->cur=0;
61
60
  return FALSE;
62
61
}
76
75
  uint i;
77
76
  for (i=0; i<=tmpdir->max; i++)
78
77
    my_free(tmpdir->list[i], MYF(0));
79
 
  my_free((gptr)tmpdir->list, MYF(0));
 
78
  delete_dynamic(&tmpdir->full_list);
80
79
  pthread_mutex_destroy(&tmpdir->mutex);
81
80
}
82
81