~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle/client.c

  • Committer: Monty Taylor
  • Date: 2008-08-16 21:06:40 UTC
  • Revision ID: monty@inaugust.com-20080816210640-zxa7xvavyjsdvvox
Cleaned up libdrizzle error messages a little more.

Show diffs side-by-side

added added

removed removed

Lines of Context:
84
84
#include "client_settings.h"
85
85
#include <drizzled/version.h>
86
86
#include <libdrizzle/sql_common.h>
 
87
#include <libdrizzle/gettext.h>
87
88
 
88
89
uint    drizzle_port=0;
89
90
char    *drizzle_unix_port= 0;
669
670
          if ((options->protocol= find_type(opt_arg,
670
671
                                            &sql_protocol_typelib,0)) <= 0)
671
672
          {
672
 
            fprintf(stderr, "Unknown option to protocol: %s\n", opt_arg);
 
673
            fprintf(stderr, _("Unknown option to protocol: %s\n"), opt_arg);
673
674
            exit(1);
674
675
          }
675
676
          break;
1149
1150
        if (!my_charset_same(drizzle->charset, collation))
1150
1151
        {
1151
1152
          my_printf_error(ER_UNKNOWN_ERROR,
1152
 
                         "COLLATION %s is not valid for CHARACTER SET %s",
 
1153
                         _("COLLATION %s is not valid for CHARACTER SET %s"),
1153
1154
                         MYF(0),
1154
1155
                         default_collation_name, drizzle->options.charset_name);
1155
1156
          drizzle->charset= NULL;
1271
1272
    if (gai_errno != 0)
1272
1273
    {
1273
1274
      set_drizzle_extended_error(drizzle, CR_UNKNOWN_HOST, unknown_sqlstate,
1274
 
                               ER(CR_UNKNOWN_HOST), host, errno);
 
1275
                                 ER(CR_UNKNOWN_HOST), host, errno);
1275
1276
 
1276
1277
      goto error;
1277
1278
    }
1335
1336
      vio_poll_read(net->vio, drizzle->options.connect_timeout))
1336
1337
  {
1337
1338
    set_drizzle_extended_error(drizzle, CR_SERVER_LOST, unknown_sqlstate,
1338
 
                             ER(CR_SERVER_LOST_EXTENDED),
1339
 
                             "waiting for initial communication packet",
 
1339
                             ER(CR_SERVER_LOST_INITIAL_COMM_WAIT),
1340
1340
                             errno);
1341
1341
    goto error;
1342
1342
  }
1349
1349
  {
1350
1350
    if (drizzle->net.last_errno == CR_SERVER_LOST)
1351
1351
      set_drizzle_extended_error(drizzle, CR_SERVER_LOST, unknown_sqlstate,
1352
 
                               ER(CR_SERVER_LOST_EXTENDED),
1353
 
                               "reading initial communication packet",
 
1352
                               ER(CR_SERVER_LOST_INITIAL_COMM_READ),
1354
1353
                               errno);
1355
1354
    goto error;
1356
1355
  }
1481
1480
  if (my_net_write(net, (uchar*) buff, (size_t) (end-buff)) || net_flush(net))
1482
1481
  {
1483
1482
    set_drizzle_extended_error(drizzle, CR_SERVER_LOST, unknown_sqlstate,
1484
 
                             ER(CR_SERVER_LOST_EXTENDED),
1485
 
                             "sending authentication information",
 
1483
                             ER(CR_SERVER_LOST_SEND_AUTH),
1486
1484
                             errno);
1487
1485
    goto error;
1488
1486
  }
1496
1494
  {
1497
1495
    if (drizzle->net.last_errno == CR_SERVER_LOST)
1498
1496
      set_drizzle_extended_error(drizzle, CR_SERVER_LOST, unknown_sqlstate,
1499
 
                               ER(CR_SERVER_LOST_EXTENDED),
1500
 
                               "reading authorization packet",
 
1497
                               ER(CR_SERVER_LOST_READ_AUTH),
1501
1498
                               errno);
1502
1499
    goto error;
1503
1500
  }
1510
1507
  {
1511
1508
    if (drizzle->net.last_errno == CR_SERVER_LOST)
1512
1509
        set_drizzle_extended_error(drizzle, CR_SERVER_LOST, unknown_sqlstate,
1513
 
                                 ER(CR_SERVER_LOST_EXTENDED),
1514
 
                                 "Setting intital database",
 
1510
                                 ER(CR_SERVER_LOST_SETTING_DB),
1515
1511
                                 errno);
1516
1512
    goto error;
1517
1513
  }