~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzletest.cc

  • Committer: Brian Aker
  • Date: 2009-06-09 22:40:20 UTC
  • mfrom: (971.3.46 eday-dev)
  • Revision ID: brian@gaz-20090609224020-o85u8iqqzgpth5sv
MergeĀ Eric

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
/* Added this for string translation. */
58
58
#include <drizzled/gettext.h>
59
59
 
 
60
#ifndef DRIZZLE_RETURN_SERVER_GONE
 
61
#define DRIZZLE_RETURN_HANDSHAKE_FAILED DRIZZLE_RETURN_ERROR_CODE
 
62
#endif
 
63
 
60
64
using namespace std;
61
65
 
62
66
#define MAX_VAR_NAME_LENGTH    256
3766
3770
  drizzle_con_set_db(con, db);
3767
3771
  if ((ret= drizzle_con_connect(con)) != DRIZZLE_RETURN_OK)
3768
3772
  {
3769
 
    if (ret == DRIZZLE_RETURN_ERROR_CODE)
 
3773
    if (ret == DRIZZLE_RETURN_HANDSHAKE_FAILED)
3770
3774
    {
3771
3775
      var_set_errno(drizzle_con_error_code(con));
3772
3776
      handle_error(command, drizzle_con_error_code(con), drizzle_con_error(con),
5120
5124
    (void) drizzle_query(con, &res, query, query_len, &ret);
5121
5125
    if (ret != DRIZZLE_RETURN_OK)
5122
5126
    {
5123
 
      if (ret == DRIZZLE_RETURN_ERROR_CODE)
 
5127
      if (ret == DRIZZLE_RETURN_ERROR_CODE ||
 
5128
          ret == DRIZZLE_RETURN_HANDSHAKE_FAILED)
5124
5129
      {
5125
5130
        err= drizzle_result_error_code(&res);
5126
5131
        handle_error(command, err, drizzle_result_error(&res),
5127
5132
                     drizzle_result_sqlstate(&res), ds);
5128
 
        drizzle_result_free(&res);
 
5133
        if (ret == DRIZZLE_RETURN_ERROR_CODE)
 
5134
          drizzle_result_free(&res);
5129
5135
      }
5130
5136
      else
5131
5137
      {