~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzletest.cc

  • Committer: Brian Aker
  • Date: 2008-12-11 08:52:18 UTC
  • mfrom: (670.1.11 devel)
  • Revision ID: brian@tangent.org-20081211085218-cpmznmzrflyd82j2
Merge from Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
1955
1955
  dest->int_dirty= src->int_dirty;
1956
1956
 
1957
1957
  /* Alloc/realloc data for str_val in dest */
1958
 
  if (dest->alloced_len < src->alloced_len &&
1959
 
      !(dest->str_val= dest->str_val
1960
 
        ? (char *)realloc(dest->str_val, src->alloced_len)
1961
 
        : (char *)malloc(src->alloced_len)))
1962
 
    die("Out of memory");
 
1958
  if (dest->alloced_len < src->alloced_len)
 
1959
  {
 
1960
    char *tmpptr= (char *)realloc(dest->str_val, src->alloced_len);
 
1961
    if (tmpptr == NULL)
 
1962
      die("Out of memory");
 
1963
    dest->str_val= tmpptr;
 
1964
  }
1963
1965
  else
1964
1966
    dest->alloced_len= src->alloced_len;
1965
1967
 
2011
2013
      static int MIN_VAR_ALLOC= 32;
2012
2014
      v->alloced_len = (new_val_len < MIN_VAR_ALLOC - 1) ?
2013
2015
        MIN_VAR_ALLOC : new_val_len + 1;
2014
 
      if (!(v->str_val =
2015
 
            v->str_val ? (char *)realloc(v->str_val, v->alloced_len+1)
2016
 
                       : (char *)malloc(v->alloced_len+1)))
 
2016
      char *tmpptr= (char *)realloc(v->str_val, v->alloced_len+1);
 
2017
      if (tmpptr == NULL)
2017
2018
        die("Out of memory");
 
2019
      v->str_val= tmpptr;
2018
2020
    }
2019
2021
    v->str_val_len = new_val_len;
2020
2022
    memcpy(v->str_val, p, new_val_len);
3081
3083
    die("drizzle_store_result() retuned NULL for '%s'", query);
3082
3084
  if (!(row = drizzle_fetch_row(res)))
3083
3085
    die("empty result in show master status");
3084
 
  my_stpncpy(master_pos.file, row[0], sizeof(master_pos.file)-1);
 
3086
  strncpy(master_pos.file, row[0], sizeof(master_pos.file)-1);
3085
3087
  master_pos.pos = strtoul(row[1], (char**) 0, 10);
3086
3088
  drizzle_free_result(res);
3087
3089
  return(0);
4611
4613
      tty_password= 1;
4612
4614
    break;
4613
4615
  case 't':
4614
 
    my_stpncpy(TMPDIR, argument, sizeof(TMPDIR));
 
4616
    strncpy(TMPDIR, argument, sizeof(TMPDIR));
4615
4617
    break;
4616
4618
  case 'A':
4617
4619
    if (!embedded_server_arg_count)