~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzletest.cc

  • Committer: Brian Aker
  • Date: 2009-03-10 07:23:57 UTC
  • mfrom: (923.1.8 merge)
  • Revision ID: brian@tangent.org-20090310072357-8k8bx8wn56v7pwmw
Merge of the removal of dead COM code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2845
2845
 
2846
2846
*/
2847
2847
 
2848
 
static void do_change_user(struct st_command *command)
 
2848
static void do_change_user(struct st_command *)
2849
2849
{
2850
 
  DRIZZLE *drizzle= &cur_con->drizzle;
2851
 
  /* static keyword to make the NetWare compiler happy. */
2852
 
  string ds_user, ds_passwd, ds_db;
2853
 
  const struct command_arg change_user_args[] = {
2854
 
    { "user", ARG_STRING, false, &ds_user, "User to connect as" },
2855
 
    { "password", ARG_STRING, false, &ds_passwd, "Password used when connecting" },
2856
 
    { "database", ARG_STRING, false, &ds_db, "Database to select after connect" },
2857
 
  };
2858
 
 
2859
 
 
2860
 
 
2861
 
  check_command_args(command, command->first_argument,
2862
 
                     change_user_args,
2863
 
                     sizeof(change_user_args)/sizeof(struct command_arg),
2864
 
                     ',');
2865
 
 
2866
 
  if (!ds_user.length())
2867
 
    ds_user.append(drizzle->user);
2868
 
 
2869
 
  if (!ds_passwd.length())
2870
 
    ds_passwd.append(drizzle->passwd);
2871
 
 
2872
 
  if (!ds_db.length())
2873
 
    ds_db.append(drizzle->db);
2874
 
 
2875
 
  if (drizzleclient_change_user(drizzle, ds_user.c_str(),
2876
 
                          ds_passwd.c_str(), ds_db.c_str()))
2877
 
    die("change user failed: %s", drizzleclient_error(drizzle));
2878
 
 
2879
 
 
2880
 
  return;
 
2850
  assert(0);
2881
2851
}
2882
2852
 
2883
 
 
2884
2853
/*
2885
2854
  SYNOPSIS
2886
2855
  do_perl