~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzle.c

  • Committer: Brian Aker
  • Date: 2008-08-03 22:27:54 UTC
  • mfrom: (236.1.66 codestyle)
  • Revision ID: brian@tangent.org-20080803222754-yhkw8plul06oqvhe
Merge from Monty.

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
#include <sys/ioctl.h>
47
47
 
48
48
 
49
 
#if defined(USE_LIBEDIT_INTERFACE) && defined(HAVE_LOCALE_H)
 
49
#if defined(HAVE_LOCALE_H)
50
50
#include <locale.h>
51
51
#endif
52
52
 
 
53
#include <libdrizzle/gettext.h>
 
54
 
53
55
const char *VER= "14.14";
54
56
 
55
57
/* Don't try to make a nice table if the data is too big */
181
183
  "\"", "&quot;",
182
184
  0, 0
183
185
};
 
186
// TODO: Need to i18n these
184
187
static const char *day_names[]={"Sun","Mon","Tue","Wed","Thu","Fri","Sat"};
185
188
static const char *month_names[]={"Jan","Feb","Mar","Apr","May","Jun","Jul",
186
189
                                  "Aug","Sep","Oct","Nov","Dec"};
254
257
 
255
258
 
256
259
static COMMANDS commands[] = {
257
 
  { "?",      '?', com_help,   1, "Synonym for `help'." },
258
 
  { "clear",  'c', com_clear,  0, "Clear command."},
 
260
  { "?",      '?', com_help,   1, gettext_noop("Synonym for `help'.") },
 
261
  { "clear",  'c', com_clear,  0, gettext_noop("Clear command.")},
259
262
  { "connect",'r', com_connect,1,
260
 
    "Reconnect to the server. Optional arguments are db and host." },
 
263
    gettext_noop("Reconnect to the server. Optional arguments are db and host." }),
261
264
  { "delimiter", 'd', com_delimiter,    1,
262
 
    "Set statement delimiter. NOTE: Takes the rest of the line as new delimiter." },
 
265
    gettext_noop("Set statement delimiter. NOTE: Takes the rest of the line as new delimiter.") },
263
266
  { "ego",    'G', com_ego,    0,
264
 
    "Send command to drizzle server, display result vertically."},
265
 
  { "exit",   'q', com_quit,   0, "Exit drizzle. Same as quit."},
266
 
  { "go",     'g', com_go,     0, "Send command to drizzle server." },
267
 
  { "help",   'h', com_help,   1, "Display this help." },
268
 
  { "nopager",'n', com_nopager,0, "Disable pager, print to stdout." },
269
 
  { "notee",  't', com_notee,  0, "Don't write into outfile." },
 
267
    gettext_noop("Send command to drizzle server, display result vertically.")},
 
268
  { "exit",   'q', com_quit,   0, gettext_noop("Exit drizzle. Same as quit.")},
 
269
  { "go",     'g', com_go,     0, gettext_noop("Send command to drizzle server.") },
 
270
  { "help",   'h', com_help,   1, gettext_noop("Display this help.") },
 
271
  { "nopager",'n', com_nopager,0, gettext_noop("Disable pager, print to stdout.") },
 
272
  { "notee",  't', com_notee,  0, gettext_noop("Don't write into outfile.") },
270
273
  { "pager",  'P', com_pager,  1,
271
 
    "Set PAGER [to_pager]. Print the query results via PAGER." },
272
 
  { "print",  'p', com_print,  0, "Print current command." },
273
 
  { "prompt", 'R', com_prompt, 1, "Change your drizzle prompt."},
274
 
  { "quit",   'q', com_quit,   0, "Quit drizzle." },
275
 
  { "rehash", '#', com_rehash, 0, "Rebuild completion hash." },
 
274
    gettext_noop("Set PAGER [to_pager]. Print the query results via PAGER.") },
 
275
  { "print",  'p', com_print,  0, gettext_noop("Print current command.") },
 
276
  { "prompt", 'R', com_prompt, 1, gettext_noop("Change your drizzle prompt.")},
 
277
  { "quit",   'q', com_quit,   0, gettext_noop("Quit drizzle.") },
 
278
  { "rehash", '#', com_rehash, 0, gettext_noop("Rebuild completion hash.") },
276
279
  { "source", '.', com_source, 1,
277
 
    "Execute an SQL script file. Takes a file name as an argument."},
278
 
  { "status", 's', com_status, 0, "Get status information from the server."},
 
280
    gettext_noop("Execute an SQL script file. Takes a file name as an argument.")},
 
281
  { "status", 's', com_status, 0, gettext_noop("Get status information from the server.")},
279
282
  { "tee",    'T', com_tee,    1,
280
 
    "Set outfile [to_outfile]. Append everything into given outfile." },
 
283
    gettext_noop("Set outfile [to_outfile]. Append everything into given outfile.") },
281
284
  { "use",    'u', com_use,    1,
282
 
    "Use another database. Takes database name as argument." },
 
285
    gettext_noop("Use another database. Takes database name as argument.") },
283
286
  { "charset",    'C', com_charset,    1,
284
 
    "Switch to another charset. Might be needed for processing binlog with multi-byte charsets." },
 
287
    gettext_noop("Switch to another charset. Might be needed for processing binlog with multi-byte charsets.") },
285
288
  { "warnings", 'W', com_warnings,  0,
286
 
    "Show warnings after every statement." },
 
289
    gettext_noop("Show warnings after every statement.") },
287
290
  { "nowarning", 'w', com_nowarnings, 0,
288
 
    "Don't show warnings after every statement." },
 
291
    gettext_noop("Don't show warnings after every statement.") },
289
292
  /* Get bash-like expansion for some commands */
290
293
  { "create table",     0, 0, 0, ""},
291
294
  { "create database",  0, 0, 0, ""},
1030
1033
{
1031
1034
  char buff[80];
1032
1035
 
 
1036
#if defined(ENABLE_NLS)
 
1037
# if defined(HAVE_LOCALE_H)
 
1038
  setlocale(LC_ALL, "");
 
1039
# endif
 
1040
  bindtextdomain("drizzle", LOCALEDIR);
 
1041
  textdomain("drizzle");
 
1042
#endif
 
1043
 
1033
1044
  MY_INIT(argv[0]);
1034
1045
  delimiter_str= delimiter;
1035
1046
  default_prompt= my_strdup(getenv("DRIZZLE_PS1") ?
1116
1127
  window_resize(0);
1117
1128
#endif
1118
1129
 
1119
 
  put_info("Welcome to the Drizzle client..  Commands end with ; or \\g.",
 
1130
  put_info(_("Welcome to the Drizzle client..  Commands end with ; or \\g."),
1120
1131
           INFO_INFO,0,0);
1121
1132
 
1122
1133
  glob_buffer= (DYNAMIC_STRING *)my_malloc(sizeof(DYNAMIC_STRING), MYF(0));
1124
1135
 
1125
1136
  /* this is a slight abuse of the DYNAMIC_STRING interface. deal. */
1126
1137
  sprintf(glob_buffer->str,
1127
 
          "Your Drizzle connection id is %u\nServer version: %s\n",
 
1138
          _("Your Drizzle connection id is %u\nServer version: %s\n"),
1128
1139
          drizzle_thread_id(&drizzle), server_version_string(&drizzle));
1129
1140
  put_info(glob_buffer->str, INFO_INFO, 0, 0);
1130
1141
  dynstr_set(glob_buffer, NULL);
1154
1165
    if (histfile)
1155
1166
    {
1156
1167
      if (verbose)
1157
 
        tee_fprintf(stdout, "Reading history-file %s\n",histfile);
 
1168
        tee_fprintf(stdout, _("Reading history-file %s\n"),histfile);
1158
1169
      read_history(histfile);
1159
1170
      if (!(histfile_tmp= (char*) my_malloc((uint) strlen(histfile) + 5,
1160
1171
                                            MYF(MY_WME))))
1161
1172
      {
1162
 
        fprintf(stderr, "Couldn't allocate memory for temp histfile!\n");
 
1173
        fprintf(stderr, _("Couldn't allocate memory for temp histfile!\n"));
1163
1174
        exit(1);
1164
1175
      }
1165
1176
      sprintf(histfile_tmp, "%s.TMP", histfile);
1166
1177
    }
1167
1178
  }
1168
1179
  sprintf(buff, "%s",
1169
 
          "Type 'help;' or '\\h' for help. Type '\\c' to clear the buffer.\n");
 
1180
          _("Type 'help;' or '\\h' for help. Type '\\c' to clear the buffer.\n"));
1170
1181
 
1171
1182
  put_info(buff,INFO_INFO,0,0);
1172
1183
  status.exit_status= read_and_execute(!status.batch);
1185
1196
  {
1186
1197
    /* write-history */
1187
1198
    if (verbose)
1188
 
      tee_fprintf(stdout, "Writing history-file %s\n",histfile);
 
1199
      tee_fprintf(stdout, _("Writing history-file %s\n"),histfile);
1189
1200
    if (!write_history(histfile_tmp))
1190
1201
      my_rename(histfile_tmp, histfile, MYF(MY_WME));
1191
1202
  }
1194
1205
  free_root(&hash_mem_root,MYF(0));
1195
1206
 
1196
1207
  if (sig >= 0)
1197
 
    put_info(sig ? "Aborted" : "Bye", INFO_RESULT,0,0);
 
1208
    put_info(sig ? _("Aborted") : _("Bye"), INFO_RESULT,0,0);
1198
1209
  if (glob_buffer)
1199
1210
    dynstr_free(glob_buffer);
1200
1211
  my_free(glob_buffer, MYF(MY_ALLOW_ZERO_PTR));
1247
1258
  sprintf(kill_buffer, "KILL /*!50000 QUERY */ %u", drizzle_thread_id(&drizzle));
1248
1259
  drizzle_real_query(kill_drizzle, kill_buffer, strlen(kill_buffer));
1249
1260
  drizzle_close(kill_drizzle);
1250
 
  tee_fprintf(stdout, "Query aborted by Ctrl+C\n");
 
1261
  tee_fprintf(stdout, _("Query aborted by Ctrl+C\n"));
1251
1262
 
1252
1263
  interrupted_query= 1;
1253
1264
 
1270
1281
 
1271
1282
static struct my_option my_long_options[] =
1272
1283
{
1273
 
  {"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0,
 
1284
  {"help", '?', gettext_noop("Display this help and exit."), 0, 0, 0, GET_NO_ARG, NO_ARG, 0,
1274
1285
   0, 0, 0, 0, 0},
1275
 
  {"help", 'I', "Synonym for -?", 0, 0, 0, GET_NO_ARG, NO_ARG, 0,
 
1286
  {"help", 'I', gettext_noop("Synonym for -?"), 0, 0, 0, GET_NO_ARG, NO_ARG, 0,
1276
1287
   0, 0, 0, 0, 0},
1277
1288
  {"auto-rehash", OPT_AUTO_REHASH,
1278
 
   "Enable automatic rehashing. One doesn't need to use 'rehash' to get table and field completion, but startup and reconnecting may take a longer time. Disable with --disable-auto-rehash.",
 
1289
   gettext_noop("Enable automatic rehashing. One doesn't need to use 'rehash' to get table and field completion, but startup and reconnecting may take a longer time. Disable with --disable-auto-rehash."),
1279
1290
   (char**) &opt_rehash, (char**) &opt_rehash, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0,
1280
1291
   0, 0},
1281
1292
  {"no-auto-rehash", 'A',
1282
 
   "No automatic rehashing. One has to use 'rehash' to get table and field completion. This gives a quicker start of DRIZZLE and disables rehashing on reconnect. WARNING: options deprecated; use --disable-auto-rehash instead.",
 
1293
   gettext_noop("No automatic rehashing. One has to use 'rehash' to get table and field completion. This gives a quicker start of DRIZZLE and disables rehashing on reconnect. WARNING: options deprecated; use --disable-auto-rehash instead."),
1283
1294
   0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
1284
1295
  {"auto-vertical-output", OPT_AUTO_VERTICAL_OUTPUT,
1285
 
   "Automatically switch to vertical output mode if the result is wider than the terminal width.",
 
1296
   gettext_noop("Automatically switch to vertical output mode if the result is wider than the terminal width."),
1286
1297
   (char**) &auto_vertical_output, (char**) &auto_vertical_output, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
1287
1298
  {"batch", 'B',
1288
 
   "Don't use history file. Disable interactive behavior. (Enables --silent)", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
 
1299
   gettext_noop("Don't use history file. Disable interactive behavior. (Enables --silent)"), 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
1289
1300
  {"character-sets-dir", OPT_CHARSETS_DIR,
1290
 
   "Directory where character sets are.", (char**) &charsets_dir,
 
1301
   gettext_noop("Directory where character sets are."), (char**) &charsets_dir,
1291
1302
   (char**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1292
 
  {"column-type-info", OPT_COLUMN_TYPES, "Display column type information.",
 
1303
  {"column-type-info", OPT_COLUMN_TYPES, gettext_noop("Display column type information."),
1293
1304
   (char**) &column_types_flag, (char**) &column_types_flag,
1294
1305
   0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
1295
 
  {"comments", 'c', "Preserve comments. Send comments to the server."
1296
 
   " The default is --skip-comments (discard comments), enable with --comments",
 
1306
  {"comments", 'c', gettext_noop("Preserve comments. Send comments to the server. The default is --skip-comments (discard comments), enable with --comments"),
1297
1307
   (char**) &preserve_comments, (char**) &preserve_comments,
1298
1308
   0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
1299
 
  {"compress", 'C', "Use compression in server/client protocol.",
 
1309
  {"compress", 'C', gettext_noop("Use compression in server/client protocol."),
1300
1310
   (char**) &opt_compress, (char**) &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0,
1301
1311
   0, 0, 0},
1302
 
  {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit .",
 
1312
  {"debug-check", OPT_DEBUG_CHECK, gettext_noop("Check memory and open file usage at exit ."),
1303
1313
   (char**) &debug_check_flag, (char**) &debug_check_flag, 0,
1304
1314
   GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
1305
 
  {"debug-info", 'T', "Print some debug info at exit.", (char**) &debug_info_flag,
 
1315
  {"debug-info", 'T', gettext_noop("Print some debug info at exit."), (char**) &debug_info_flag,
1306
1316
   (char**) &debug_info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
1307
 
  {"database", 'D', "Database to use.", (char**) &current_db,
 
1317
  {"database", 'D', gettext_noop("Database to use."), (char**) &current_db,
1308
1318
   (char**) &current_db, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1309
1319
  {"default-character-set", OPT_DEFAULT_CHARSET,
1310
 
   "Set the default character set.", (char**) &default_charset,
 
1320
   gettext_noop("Set the default character set."), (char**) &default_charset,
1311
1321
   (char**) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1312
 
  {"delimiter", OPT_DELIMITER, "Delimiter to be used.", (char**) &delimiter_str,
 
1322
  {"delimiter", OPT_DELIMITER, gettext_noop("Delimiter to be used."), (char**) &delimiter_str,
1313
1323
   (char**) &delimiter_str, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1314
 
  {"execute", 'e', "Execute command and quit. (Disables --force and history file)", 0,
 
1324
  {"execute", 'e', gettext_noop("Execute command and quit. (Disables --force and history file)"), 0,
1315
1325
   0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1316
 
  {"vertical", 'E', "Print the output of a query (rows) vertically.",
 
1326
  {"vertical", 'E', gettext_noop("Print the output of a query (rows) vertically."),
1317
1327
   (char**) &vertical, (char**) &vertical, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0,
1318
1328
   0},
1319
 
  {"force", 'f', "Continue even if we get an sql error.",
 
1329
  {"force", 'f', gettext_noop("Continue even if we get an sql error."),
1320
1330
   (char**) &ignore_errors, (char**) &ignore_errors, 0, GET_BOOL, NO_ARG, 0, 0,
1321
1331
   0, 0, 0, 0},
1322
1332
  {"named-commands", 'G',
1323
 
   "Enable named commands. Named commands mean this program's internal commands; see drizzle> help . When enabled, the named commands can be used from any line of the query, otherwise only from the first line, before an enter. Disable with --disable-named-commands. This option is disabled by default.",
 
1333
   gettext_noop("Enable named commands. Named commands mean this program's internal commands; see drizzle> help . When enabled, the named commands can be used from any line of the query, otherwise only from the first line, before an enter. Disable with --disable-named-commands. This option is disabled by default."),
1324
1334
   (char**) &named_cmds, (char**) &named_cmds, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
1325
1335
   0, 0},
1326
1336
  {"no-named-commands", 'g',
1327
 
   "Named commands are disabled. Use \\* form only, or use named commands only in the beginning of a line ending with a semicolon (;) Since version 10.9 the client now starts with this option ENABLED by default! Disable with '-G'. Long format commands still work from the first line. WARNING: option deprecated; use --disable-named-commands instead.",
 
1337
   gettext_noop("Named commands are disabled. Use \\* form only, or use named commands only in the beginning of a line ending with a semicolon (;) Since version 10.9 the client now starts with this option ENABLED by default! Disable with '-G'. Long format commands still work from the first line. WARNING: option deprecated; use --disable-named-commands instead."),
1328
1338
   0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
1329
 
  {"ignore-spaces", 'i', "Ignore space after function names.", 0, 0, 0,
 
1339
  {"ignore-spaces", 'i', gettext_noop("Ignore space after function names."), 0, 0, 0,
1330
1340
   GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
1331
 
  {"local-infile", OPT_LOCAL_INFILE, "Enable/disable LOAD DATA LOCAL INFILE.",
 
1341
  {"local-infile", OPT_LOCAL_INFILE, gettext_noop("Enable/disable LOAD DATA LOCAL INFILE."),
1332
1342
   (char**) &opt_local_infile,
1333
1343
   (char**) &opt_local_infile, 0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0},
1334
 
  {"no-beep", 'b', "Turn off beep on error.", (char**) &opt_nobeep,
 
1344
  {"no-beep", 'b', gettext_noop("Turn off beep on error."), (char**) &opt_nobeep,
1335
1345
   (char**) &opt_nobeep, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
1336
 
  {"host", 'h', "Connect to host.", (char**) &current_host,
 
1346
  {"host", 'h', gettext_noop("Connect to host."), (char**) &current_host,
1337
1347
   (char**) &current_host, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1338
 
  {"html", 'H', "Produce HTML output.", (char**) &opt_html, (char**) &opt_html,
 
1348
  {"html", 'H', gettext_noop("Produce HTML output."), (char**) &opt_html, (char**) &opt_html,
1339
1349
   0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
1340
 
  {"xml", 'X', "Produce XML output", (char**) &opt_xml, (char**) &opt_xml, 0,
 
1350
  {"xml", 'X', gettext_noop("Produce XML output"), (char**) &opt_xml, (char**) &opt_xml, 0,
1341
1351
   GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
1342
 
  {"line-numbers", OPT_LINE_NUMBERS, "Write line numbers for errors.",
 
1352
  {"line-numbers", OPT_LINE_NUMBERS, gettext_noop("Write line numbers for errors."),
1343
1353
   (char**) &line_numbers, (char**) &line_numbers, 0, GET_BOOL,
1344
1354
   NO_ARG, 1, 0, 0, 0, 0, 0},
1345
 
  {"skip-line-numbers", 'L', "Don't write line number for errors. WARNING: -L is deprecated, use long version of this option instead.", 0, 0, 0, GET_NO_ARG,
 
1355
  {"skip-line-numbers", 'L', gettext_noop("Don't write line number for errors. WARNING: -L is deprecated, use long version of this option instead."), 0, 0, 0, GET_NO_ARG,
1346
1356
   NO_ARG, 0, 0, 0, 0, 0, 0},
1347
 
  {"unbuffered", 'n', "Flush buffer after each query.", (char**) &unbuffered,
 
1357
  {"unbuffered", 'n', gettext_noop("Flush buffer after each query."), (char**) &unbuffered,
1348
1358
   (char**) &unbuffered, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
1349
 
  {"column-names", OPT_COLUMN_NAMES, "Write column names in results.",
 
1359
  {"column-names", OPT_COLUMN_NAMES, gettext_noop("Write column names in results."),
1350
1360
   (char**) &column_names, (char**) &column_names, 0, GET_BOOL,
1351
1361
   NO_ARG, 1, 0, 0, 0, 0, 0},
1352
1362
  {"skip-column-names", 'N',
1353
 
   "Don't write column names in results. WARNING: -N is deprecated, use long version of this options instead.",
 
1363
   gettext_noop("Don't write column names in results. WARNING: -N is deprecated, use long version of this options instead."),
1354
1364
   0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
1355
1365
  {"set-variable", 'O',
1356
 
   "Change the value of a variable. Please note that this option is deprecated; you can set variables directly with --variable-name=value.",
 
1366
   gettext_noop("Change the value of a variable. Please note that this option is deprecated; you can set variables directly with --variable-name=value."),
1357
1367
   0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1358
 
  {"sigint-ignore", OPT_SIGINT_IGNORE, "Ignore SIGINT (CTRL-C)",
 
1368
  {"sigint-ignore", OPT_SIGINT_IGNORE, gettext_noop("Ignore SIGINT (CTRL-C)"),
1359
1369
   (char**) &opt_sigint_ignore,  (char**) &opt_sigint_ignore, 0, GET_BOOL,
1360
1370
   NO_ARG, 0, 0, 0, 0, 0, 0},
1361
1371
  {"one-database", 'o',
1362
 
   "Only update the default database. This is useful for skipping updates to other database in the update log.",
 
1372
   gettext_noop("Only update the default database. This is useful for skipping updates to other database in the update log."),
1363
1373
   0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
1364
1374
  {"pager", OPT_PAGER,
1365
 
   "Pager to use to display results. If you don't supply an option the default pager is taken from your ENV variable PAGER. Valid pagers are less, more, cat [> filename], etc. See interactive help (\\h) also. This option does not work in batch mode. Disable with --disable-pager. This option is disabled by default.",
 
1375
   gettext_noop("Pager to use to display results. If you don't supply an option the default pager is taken from your ENV variable PAGER. Valid pagers are less, more, cat [> filename], etc. See interactive help (\\h) also. This option does not work in batch mode. Disable with --disable-pager. This option is disabled by default."),
1366
1376
   0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
1367
1377
  {"no-pager", OPT_NOPAGER,
1368
 
   "Disable pager and print to stdout. See interactive help (\\h) also. WARNING: option deprecated; use --disable-pager instead.",
 
1378
   gettext_noop("Disable pager and print to stdout. See interactive help (\\h) also. WARNING: option deprecated; use --disable-pager instead."),
1369
1379
   0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
1370
1380
  {"password", 'p',
1371
 
   "Password to use when connecting to server. If password is not given it's asked from the tty.",
 
1381
   gettext_noop("Password to use when connecting to server. If password is not given it's asked from the tty."),
1372
1382
   0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
1373
 
  {"port", 'P', "Port number to use for connection or 0 for default to, in "
1374
 
   "order of preference, my.cnf, $MYSQL_TCP_PORT, "
 
1383
  {"port", 'P', gettext_noop("Port number to use for connection or 0 for default to, in order of preference, my.cnf, $MYSQL_TCP_PORT, ")
1375
1384
#if MYSQL_PORT_DEFAULT == 0
1376
1385
   "/etc/services, "
1377
1386
#endif
1378
 
   "built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
 
1387
   gettext_noop("built-in default") " (" STRINGIFY_ARG(MYSQL_PORT) ").",
1379
1388
   (char**) &opt_drizzle_port,
1380
1389
   (char**) &opt_drizzle_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,  0},
1381
 
  {"prompt", OPT_PROMPT, "Set the drizzle prompt to this value.",
 
1390
  {"prompt", OPT_PROMPT, gettext_noop("Set the drizzle prompt to this value."),
1382
1391
   (char**) &current_prompt, (char**) &current_prompt, 0, GET_STR_ALLOC,
1383
1392
   REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1384
 
  {"protocol", OPT_DRIZZLE_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory).",
 
1393
  {"protocol", OPT_DRIZZLE_PROTOCOL, gettext_noop("The protocol of connection (tcp,socket,pipe,memory)."),
1385
1394
   0, 0, 0, GET_STR,  REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1386
1395
  {"quick", 'q',
1387
 
   "Don't cache result, print it row by row. This may slow down the server if the output is suspended. Doesn't use history file.",
 
1396
   gettext_noop("Don't cache result, print it row by row. This may slow down the server if the output is suspended. Doesn't use history file."),
1388
1397
   (char**) &quick, (char**) &quick, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
1389
 
  {"raw", 'r', "Write fields without conversion. Used with --batch.",
 
1398
  {"raw", 'r', gettext_noop("Write fields without conversion. Used with --batch."),
1390
1399
   (char**) &opt_raw_data, (char**) &opt_raw_data, 0, GET_BOOL, NO_ARG, 0, 0, 0,
1391
1400
   0, 0, 0},
1392
 
  {"reconnect", OPT_RECONNECT, "Reconnect if the connection is lost. Disable with --disable-reconnect. This option is enabled by default.",
 
1401
  {"reconnect", OPT_RECONNECT, gettext_noop("Reconnect if the connection is lost. Disable with --disable-reconnect. This option is enabled by default."),
1393
1402
   (char**) &opt_reconnect, (char**) &opt_reconnect, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
1394
 
  {"silent", 's', "Be more silent. Print results with a tab as separator, each row on new line.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0,
 
1403
  {"silent", 's', gettext_noop("Be more silent. Print results with a tab as separator, each row on new line."), 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0,
1395
1404
   0, 0},
1396
 
  {"socket", 'S', "Socket file to use for connection.",
 
1405
  {"socket", 'S', gettext_noop("Socket file to use for connection."),
1397
1406
   (char**) &opt_drizzle_unix_port, (char**) &opt_drizzle_unix_port, 0, GET_STR_ALLOC,
1398
1407
   REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1399
 
  {"table", 't', "Output in table format.", (char**) &output_tables,
 
1408
  {"table", 't', gettext_noop("Output in table format."), (char**) &output_tables,
1400
1409
   (char**) &output_tables, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
1401
1410
  {"tee", OPT_TEE,
1402
 
   "Append everything into outfile. See interactive help (\\h) also. Does not work in batch mode. Disable with --disable-tee. This option is disabled by default.",
 
1411
   gettext_noop("Append everything into outfile. See interactive help (\\h) also. Does not work in batch mode. Disable with --disable-tee. This option is disabled by default."),
1403
1412
   0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1404
 
  {"no-tee", OPT_NOTEE, "Disable outfile. See interactive help (\\h) also. WARNING: option deprecated; use --disable-tee instead", 0, 0, 0, GET_NO_ARG,
 
1413
  {"no-tee", OPT_NOTEE, gettext_noop("Disable outfile. See interactive help (\\h) also. WARNING: option deprecated; use --disable-tee instead"), 0, 0, 0, GET_NO_ARG,
1405
1414
   NO_ARG, 0, 0, 0, 0, 0, 0},
1406
1415
#ifndef DONT_ALLOW_USER_CHANGE
1407
 
  {"user", 'u', "User for login if not current user.", (char**) &current_user,
 
1416
  {"user", 'u', gettext_noop("User for login if not current user."), (char**) &current_user,
1408
1417
   (char**) &current_user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1409
1418
#endif
1410
 
  {"safe-updates", 'U', "Only allow UPDATE and DELETE that uses keys.",
1411
 
   (char**) &safe_updates, (char**) &safe_updates, 0, GET_BOOL, NO_ARG, 0, 0,
1412
 
   0, 0, 0, 0},
1413
 
  {"i-am-a-dummy", 'U', "Synonym for option --safe-updates, -U.",
1414
 
   (char**) &safe_updates, (char**) &safe_updates, 0, GET_BOOL, NO_ARG, 0, 0,
1415
 
   0, 0, 0, 0},
1416
 
  {"verbose", 'v', "Write more. (-v -v -v gives the table output format).", 0,
 
1419
  {"safe-updates", 'U', gettext_noop("Only allow UPDATE and DELETE that uses keys."),
 
1420
   (char**) &safe_updates, (char**) &safe_updates, 0, GET_BOOL, NO_ARG, 0, 0,
 
1421
   0, 0, 0, 0},
 
1422
  {"i-am-a-dummy", 'U', gettext_noop("Synonym for option --safe-updates, -U."),
 
1423
   (char**) &safe_updates, (char**) &safe_updates, 0, GET_BOOL, NO_ARG, 0, 0,
 
1424
   0, 0, 0, 0},
 
1425
  {"verbose", 'v', gettext_noop("Write more. (-v -v -v gives the table output format)."), 0,
1417
1426
   0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
1418
 
  {"version", 'V', "Output version information and exit.", 0, 0, 0,
 
1427
  {"version", 'V', gettext_noop("Output version information and exit."), 0, 0, 0,
1419
1428
   GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
1420
 
  {"wait", 'w', "Wait and retry if connection is down.", 0, 0, 0, GET_NO_ARG,
 
1429
  {"wait", 'w', gettext_noop("Wait and retry if connection is down."), 0, 0, 0, GET_NO_ARG,
1421
1430
   NO_ARG, 0, 0, 0, 0, 0, 0},
1422
1431
  {"connect_timeout", OPT_CONNECT_TIMEOUT,
1423
 
   "Number of seconds before connection timeout.",
 
1432
   gettext_noop("Number of seconds before connection timeout."),
1424
1433
   (char**) &opt_connect_timeout,
1425
1434
   (char**) &opt_connect_timeout, 0, GET_ULONG, REQUIRED_ARG, 0, 0, 3600*12, 0,
1426
1435
   0, 0},
1427
1436
  {"max_allowed_packet", OPT_MAX_ALLOWED_PACKET,
1428
 
   "Max packet length to send to, or receive from server",
 
1437
   gettext_noop("Max packet length to send to, or receive from server"),
1429
1438
   (char**) &opt_max_allowed_packet, (char**) &opt_max_allowed_packet, 0,
1430
1439
   GET_ULONG, REQUIRED_ARG, 16 *1024L*1024L, 4096,
1431
1440
   (int64_t) 2*1024L*1024L*1024L, MALLOC_OVERHEAD, 1024, 0},
1432
1441
  {"net_buffer_length", OPT_NET_BUFFER_LENGTH,
1433
 
   "Buffer for TCP/IP and socket communication",
 
1442
   gettext_noop("Buffer for TCP/IP and socket communication"),
1434
1443
   (char**) &opt_net_buffer_length, (char**) &opt_net_buffer_length, 0, GET_ULONG,
1435
1444
   REQUIRED_ARG, 16384, 1024, 512*1024*1024L, MALLOC_OVERHEAD, 1024, 0},
1436
1445
  {"select_limit", OPT_SELECT_LIMIT,
1437
 
   "Automatic limit for SELECT when using --safe-updates",
 
1446
   gettext_noop("Automatic limit for SELECT when using --safe-updates"),
1438
1447
   (char**) &select_limit,
1439
1448
   (char**) &select_limit, 0, GET_ULONG, REQUIRED_ARG, 1000L, 1, ULONG_MAX,
1440
1449
   0, 1, 0},
1441
1450
  {"max_join_size", OPT_MAX_JOIN_SIZE,
1442
 
   "Automatic limit for rows in a join when using --safe-updates",
 
1451
   gettext_noop("Automatic limit for rows in a join when using --safe-updates"),
1443
1452
   (char**) &max_join_size,
1444
1453
   (char**) &max_join_size, 0, GET_ULONG, REQUIRED_ARG, 1000000L, 1, ULONG_MAX,
1445
1454
   0, 1, 0},
1446
 
  {"secure-auth", OPT_SECURE_AUTH, "Refuse client connecting to server if it"
1447
 
   " uses old (pre-4.1.1) protocol", (char**) &opt_secure_auth,
 
1455
  {"secure-auth", OPT_SECURE_AUTH, gettext_noop("Refuse client connecting to server if it uses old (pre-4.1.1) protocol"), (char**) &opt_secure_auth,
1448
1456
   (char**) &opt_secure_auth, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
1449
 
  {"server-arg", OPT_SERVER_ARG, "Send embedded server this as a parameter.",
 
1457
  {"server-arg", OPT_SERVER_ARG, gettext_noop("Send embedded server this as a parameter."),
1450
1458
   0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1451
 
  {"show-warnings", OPT_SHOW_WARNINGS, "Show warnings after every statement.",
 
1459
  {"show-warnings", OPT_SHOW_WARNINGS, gettext_noop("Show warnings after every statement."),
1452
1460
   (char**) &show_warnings, (char**) &show_warnings, 0, GET_BOOL, NO_ARG,
1453
1461
   0, 0, 0, 0, 0, 0},
1454
1462
  { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
1459
1467
{
1460
1468
  const char* readline= "readline";
1461
1469
 
1462
 
  printf("%s  Ver %s Distrib %s, for %s (%s) using %s %s\n",
 
1470
  printf(_("%s  Ver %s Distrib %s, for %s (%s) using %s %s\n"),
1463
1471
         my_progname, VER, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE,
1464
1472
         readline, rl_library_version);
1465
1473
 
1466
1474
  if (version)
1467
1475
    return;
1468
 
  printf("\
1469
 
Copyright (C) 2000-2008 Drizzle AB\n                                      \
 
1476
  printf(_("\
 
1477
Copyright (C) 2000-2008 MySQL AB\n                                      \
1470
1478
This software comes with ABSOLUTELY NO WARRANTY. This is free software,\n \
1471
 
and you are welcome to modify and redistribute it under the GPL license\n");
1472
 
  printf("Usage: %s [OPTIONS] [database]\n", my_progname);
 
1479
and you are welcome to modify and redistribute it under the GPL license\n"));
 
1480
  printf(_("Usage: %s [OPTIONS] [database]\n"), my_progname);
1473
1481
  my_print_help(my_long_options);
1474
1482
  print_defaults("my", load_default_groups);
1475
1483
  my_print_variables(my_long_options);
1502
1510
      }
1503
1511
      else
1504
1512
      {
1505
 
        put_info("DELIMITER cannot contain a backslash character",
 
1513
        put_info(_("DELIMITER cannot contain a backslash character"),
1506
1514
                 INFO_ERROR,0,0);
1507
1515
        return 0;
1508
1516
      }
1523
1531
      init_tee(argument);
1524
1532
    break;
1525
1533
  case OPT_NOTEE:
1526
 
    printf("WARNING: option deprecated; use --disable-tee instead.\n");
 
1534
    printf(_("WARNING: option deprecated; use --disable-tee instead.\n"));
1527
1535
    if (opt_outfile)
1528
1536
      end_tee();
1529
1537
    break;
1546
1554
    }
1547
1555
    break;
1548
1556
  case OPT_NOPAGER:
1549
 
    printf("WARNING: option deprecated; use --disable-pager instead.\n");
 
1557
    printf(_("WARNING: option deprecated; use --disable-pager instead.\n"));
1550
1558
    opt_nopager= 1;
1551
1559
    break;
1552
1560
  case OPT_DRIZZLE_PROTOCOL:
1554
1562
                                    opt->name);
1555
1563
    break;
1556
1564
  case OPT_SERVER_ARG:
1557
 
    printf("WARNING: --server-arg option not supported in this configuration.\n");
 
1565
    printf(("WARNING: --server-arg option not supported in this configuration.\n"));
1558
1566
    break;
1559
1567
  case 'A':
1560
1568
    opt_rehash= 0;
1925
1933
      }
1926
1934
      else
1927
1935
      {
1928
 
        sprintf(buff,"Unknown command '\\%c'.",inchar);
 
1936
        sprintf(buff,_("Unknown command '\\%c'."),inchar);
1929
1937
        if (put_info(buff,INFO_ERROR,0,0) > 0)
1930
1938
          return(1);
1931
1939
        *out++='\\';
2355
2363
    {
2356
2364
      if (drizzle_num_rows(tables) > 0 && !opt_silent && write_info)
2357
2365
      {
2358
 
        tee_fprintf(stdout, "\
 
2366
        tee_fprintf(stdout, _("\
2359
2367
Reading table information for completion of table and column names\n    \
2360
 
You can turn off this feature to get a quicker startup with -A\n\n");
 
2368
You can turn off this feature to get a quicker startup with -A\n\n"));
2361
2369
      }
2362
2370
      while ((table_row=drizzle_fetch_row(tables)))
2363
2371
      {
2452
2460
  /* purecov: begin tested */
2453
2461
  if (opt_reconnect)
2454
2462
  {
2455
 
    put_info("No connection. Trying to reconnect...",INFO_INFO,0,0);
 
2463
    put_info(_("No connection. Trying to reconnect..."),INFO_INFO,0,0);
2456
2464
    (void) com_connect((DYNAMIC_STRING *) 0, 0);
2457
2465
    if (opt_rehash)
2458
2466
      com_rehash(NULL, NULL);
2459
2467
  }
2460
2468
  if (!connected)
2461
 
    return put_info("Can't connect to the server\n",INFO_ERROR,0,0);
 
2469
    return put_info(_("Can't connect to the server\n"),INFO_ERROR,0,0);
2462
2470
  /* purecov: end */
2463
2471
  return 0;
2464
2472
}
2515
2523
  char ccat= (*cur)[num_cat][0];
2516
2524
  if (*last_char != ccat)
2517
2525
  {
2518
 
    put_info(ccat == 'Y' ? "categories:" : "topics:", INFO_INFO,0,0);
 
2526
    put_info(ccat == 'Y' ? _("categories:") : _("topics:"), INFO_INFO,0,0);
2519
2527
    *last_char= ccat;
2520
2528
  }
2521
2529
  tee_fprintf(PAGER, "   %s\n", (*cur)[num_name]);
2566
2574
      }
2567
2575
 
2568
2576
      init_pager();
2569
 
      tee_fprintf(PAGER,   "Name: \'%s\'\n", cur[0]);
2570
 
      tee_fprintf(PAGER,   "Description:\n%s", cur[1]);
 
2577
      tee_fprintf(PAGER,   _("Name: \'%s\'\n"), cur[0]);
 
2578
      tee_fprintf(PAGER,   _("Description:\n%s"), cur[1]);
2571
2579
      if (cur[2] && *((char*)cur[2]))
2572
 
        tee_fprintf(PAGER, "Examples:\n%s", cur[2]);
 
2580
        tee_fprintf(PAGER, _("Examples:\n%s"), cur[2]);
2573
2581
      tee_fprintf(PAGER,   "\n");
2574
2582
      end_pager();
2575
2583
    }
2582
2590
 
2583
2591
      if (num_fields == 2)
2584
2592
      {
2585
 
        put_info("Many help items for your request exist.", INFO_INFO,0,0);
2586
 
        put_info("To make a more specific request, please type 'help <item>',\nwhere <item> is one of the following", INFO_INFO,0,0);
 
2593
        put_info(_("Many help items for your request exist."), INFO_INFO,0,0);
 
2594
        put_info(_("To make a more specific request, please type 'help <item>',\nwhere <item> is one of the following"), INFO_INFO,0,0);
2587
2595
        num_name= 0;
2588
2596
        num_cat= 1;
2589
2597
      }
2590
2598
      else if ((cur= drizzle_fetch_row(result)))
2591
2599
      {
2592
 
        tee_fprintf(PAGER, "You asked for help about help category: \"%s\"\n", cur[0]);
2593
 
        put_info("For more information, type 'help <item>', where <item> is one of the following", INFO_INFO,0,0);
 
2600
        tee_fprintf(PAGER, _("You asked for help about help category: '%s'\n"), cur[0]);
 
2601
        put_info(_("For more information, type 'help <item>', where <item> is one of the following"), INFO_INFO,0,0);
2594
2602
        num_name= 1;
2595
2603
        num_cat= 2;
2596
2604
        print_help_item(&cur,1,2,&last_char);
2603
2611
    }
2604
2612
    else
2605
2613
    {
2606
 
      put_info("\nNothing found", INFO_INFO,0,0);
2607
 
      put_info("Please try to run 'help contents' for a list of all accessible topics\n", INFO_INFO,0,0);
 
2614
      put_info(_("\nNothing found"), INFO_INFO,0,0);
 
2615
      put_info(_("Please try to run 'help contents' for a list of all accessible topics\n"), INFO_INFO,0,0);
2608
2616
    }
2609
2617
  }
2610
2618
 
2627
2635
      return com_server_help(buffer,line,help_arg);
2628
2636
  }
2629
2637
 
2630
 
  put_info("List of all Drizzle commands:", INFO_INFO,0,0);
 
2638
  put_info(_("List of all Drizzle commands:"), INFO_INFO,0,0);
2631
2639
  if (!named_cmds)
2632
 
    put_info("Note that all text commands must be first on line and end with ';'",INFO_INFO,0,0);
 
2640
    put_info(_("Note that all text commands must be first on line and end with ';'"),INFO_INFO,0,0);
2633
2641
  for (i = 0; commands[i].name; i++)
2634
2642
  {
2635
2643
    end= strmov(buff, commands[i].name);
2637
2645
      end= strmov(end, " ");
2638
2646
    if (commands[i].func)
2639
2647
      tee_fprintf(stdout, "%s(\\%c) %s\n", buff,
2640
 
                  commands[i].cmd_char, commands[i].doc);
 
2648
                  commands[i].cmd_char, _(commands[i].doc));
2641
2649
  }
2642
2650
  if (connected && drizzle_get_server_version(&drizzle) >= 40100)
2643
 
    put_info("\nFor server side help, type 'help contents'\n", INFO_INFO,0,0);
 
2651
    put_info(_("\nFor server side help, type 'help contents'\n"), INFO_INFO,0,0);
2644
2652
  return 0;
2645
2653
}
2646
2654
 
2663
2671
  param= get_arg(buff, 0);
2664
2672
  if (!param || !*param)
2665
2673
  {
2666
 
    return put_info("Usage: \\C char_setname | charset charset_name",
 
2674
    return put_info(_("Usage: \\C char_setname | charset charset_name"),
2667
2675
                    INFO_ERROR, 0, 0);
2668
2676
  }
2669
2677
  new_cs= get_charset_by_csname(param, MY_CS_PRIMARY, MYF(MY_WME));
2673
2681
    drizzle_set_character_set(&drizzle, charset_info->csname);
2674
2682
    default_charset= (char *)charset_info->csname;
2675
2683
    default_charset_used= 1;
2676
 
    put_info("Charset changed", INFO_INFO,0,0);
 
2684
    put_info(_("Charset changed"), INFO_INFO,0,0);
2677
2685
  }
2678
 
  else put_info("Charset is not found", INFO_INFO,0,0);
 
2686
  else put_info(_("Charset is not found"), INFO_INFO,0,0);
2679
2687
  return 0;
2680
2688
}
2681
2689
 
2706
2714
    // Ignore empty quries
2707
2715
    if (status.batch)
2708
2716
      return 0;
2709
 
    return put_info("No query specified\n",INFO_ERROR,0,0);
 
2717
    return put_info(_("No query specified\n"),INFO_ERROR,0,0);
2710
2718
 
2711
2719
  }
2712
2720
  if (!connected && reconnect())
2721
2729
  if (skip_updates &&
2722
2730
      ((buffer->length < 4) || !strncmp(buffer->str, "SET ", 4)))
2723
2731
  {
2724
 
    (void) put_info("Ignoring query to other database",INFO_INFO,0,0);
 
2732
    (void) put_info(_("Ignoring query to other database"),INFO_INFO,0,0);
2725
2733
    return 0;
2726
2734
  }
2727
2735
 
2770
2778
    {
2771
2779
      if (!drizzle_num_rows(result) && ! quick && !column_types_flag)
2772
2780
      {
2773
 
        strmov(buff, "Empty set");
 
2781
        strmov(buff, _("Empty set"));
2774
2782
        if (opt_xml)
2775
2783
        {
2776
2784
          /*
2796
2804
          print_tab_data(result);
2797
2805
        else
2798
2806
          print_table_data(result);
2799
 
        sprintf(buff,"%ld %s in set",
2800
 
                (long) drizzle_num_rows(result),
2801
 
                (long) drizzle_num_rows(result) == 1 ? "row" : "rows");
 
2807
        sprintf(buff,
 
2808
                ngettext("%ld row in set","%ld rows in set",
 
2809
                         (long) drizzle_num_rows(result)),
 
2810
                (long) drizzle_num_rows(result));
2802
2811
        end_pager();
2803
2812
        if (drizzle_errno(&drizzle))
2804
2813
          error= put_error(&drizzle);
2805
2814
      }
2806
2815
    }
2807
2816
    else if (drizzle_affected_rows(&drizzle) == ~(uint64_t) 0)
2808
 
      strmov(buff,"Query OK");
 
2817
      strmov(buff,_("Query OK"));
2809
2818
    else
2810
 
      sprintf(buff,"Query OK, %ld %s affected",
2811
 
              (long) drizzle_affected_rows(&drizzle),
2812
 
              (long) drizzle_affected_rows(&drizzle) == 1 ? "row" : "rows");
 
2819
      sprintf(buff, ngettext("Query OK, %ld row affected",
 
2820
                             "Query OK, %ld rows affected",
 
2821
                             (long) drizzle_affected_rows(&drizzle)),
 
2822
              (long) drizzle_affected_rows(&drizzle));
2813
2823
 
2814
2824
    pos=strend(buff);
2815
2825
    if ((warnings= drizzle_warning_count(&drizzle)))