~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzletest.cc

Merged trunk and use-std-unordred.

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
#include PCRE_HEADER
59
59
 
60
60
#include <stdarg.h>
 
61
#include <drizzled/unordered_map.h>
61
62
 
62
63
#include "errname.h"
63
64
 
64
65
/* Added this for string translation. */
65
66
#include "drizzled/gettext.h"
66
 
#include "drizzled/hash.h"
67
67
#include "drizzled/my_time.h"
68
68
#include "drizzled/charset.h"
69
69
 
208
208
VAR var_reg[10];
209
209
 
210
210
 
211
 
drizzled::hash_map<string, VAR *> var_hash;
 
211
unordered_map<string, VAR *> var_hash;
212
212
 
213
213
struct st_connection
214
214
{
1703
1703
      die("Too long variable name: %s", save_var_name);
1704
1704
 
1705
1705
    string save_var_name_str(save_var_name, length);
1706
 
    drizzled::hash_map<string, VAR*>::iterator iter=
 
1706
    unordered_map<string, VAR*>::iterator iter=
1707
1707
      var_hash.find(save_var_name_str);
1708
1708
    if (iter == var_hash.end())
1709
1709
    {
1741
1741
static VAR *var_obtain(const char *name, int len)
1742
1742
{
1743
1743
  string var_name(name, len);
1744
 
  drizzled::hash_map<string, VAR*>::iterator iter=
 
1744
  unordered_map<string, VAR*>::iterator iter=
1745
1745
    var_hash.find(var_name);
1746
1746
  if (iter != var_hash.end())
1747
1747
    return (*iter).second;
2147
2147
 
2148
2148
  if (!internal::test_if_hard_path(name))
2149
2149
  {
2150
 
    sprintf(buff,"%s%s",opt_basedir,name);
 
2150
    snprintf(buff, sizeof(buff), "%s%s",opt_basedir,name);
2151
2151
    name=buff;
2152
2152
  }
2153
2153
  internal::fn_format(buff, name, "", "", MY_UNPACK_FILENAME);
3121
3121
  if (!master_pos.file[0])
3122
3122
    die("Calling 'sync_with_master' without calling 'save_master_pos'");
3123
3123
 
3124
 
  sprintf(query_buf, "select master_pos_wait('%s', %ld)", master_pos.file,
 
3124
  snprintf(query_buf, sizeof(query_buf), "select master_pos_wait('%s', %ld)", master_pos.file,
3125
3125
          master_pos.pos + offset);
3126
3126
 
3127
3127
wait_for_position:
4680
4680
    char buff[FN_REFLEN];
4681
4681
    if (!internal::test_if_hard_path(argument))
4682
4682
    {
4683
 
      sprintf(buff,"%s%s",opt_basedir,argument);
 
4683
      snprintf(buff, sizeof(buff), "%s%s",opt_basedir,argument);
4684
4684
      argument= buff;
4685
4685
    }
4686
4686
    internal::fn_format(buff, argument, "", "", MY_UNPACK_FILENAME);
4703
4703
    static char buff[FN_REFLEN];
4704
4704
    if (!internal::test_if_hard_path(argument))
4705
4705
    {
4706
 
      sprintf(buff,"%s%s",opt_basedir,argument);
 
4706
      snprintf(buff, sizeof(buff), "%s%s",opt_basedir,argument);
4707
4707
      argument= buff;
4708
4708
    }
4709
4709
    internal::fn_format(buff, argument, "", "", MY_UNPACK_FILENAME);
4806
4806
  int flags= O_WRONLY | O_CREAT;
4807
4807
  if (!internal::test_if_hard_path(fname))
4808
4808
  {
4809
 
    sprintf(buff,"%s%s",opt_basedir,fname);
 
4809
    snprintf(buff, sizeof(buff), "%s%s",opt_basedir,fname);
4810
4810
    fname= buff;
4811
4811
  }
4812
4812
  internal::fn_format(buff, fname, "", "", MY_UNPACK_FILENAME);