640
596
Commands( "DEFAULT", 0, 0, 0, ""),
641
597
Commands( "DEFINER", 0, 0, 0, ""),
642
598
Commands( "DELAYED", 0, 0, 0, ""),
599
Commands( "DELAY_KEY_WRITE", 0, 0, 0, ""),
643
600
Commands( "DELETE", 0, 0, 0, ""),
644
601
Commands( "DESC", 0, 0, 0, ""),
645
602
Commands( "DESCRIBE", 0, 0, 0, ""),
603
Commands( "DES_KEY_FILE", 0, 0, 0, ""),
646
604
Commands( "DETERMINISTIC", 0, 0, 0, ""),
605
Commands( "DIRECTORY", 0, 0, 0, ""),
647
606
Commands( "DISABLE", 0, 0, 0, ""),
648
607
Commands( "DISCARD", 0, 0, 0, ""),
649
608
Commands( "DISTINCT", 0, 0, 0, ""),
650
609
Commands( "DISTINCTROW", 0, 0, 0, ""),
651
610
Commands( "DIV", 0, 0, 0, ""),
611
Commands( "DO", 0, 0, 0, ""),
652
612
Commands( "DOUBLE", 0, 0, 0, ""),
653
613
Commands( "DROP", 0, 0, 0, ""),
614
Commands( "DUAL", 0, 0, 0, ""),
654
615
Commands( "DUMPFILE", 0, 0, 0, ""),
655
616
Commands( "DUPLICATE", 0, 0, 0, ""),
656
617
Commands( "DYNAMIC", 0, 0, 0, ""),
755
720
Commands( "LOCKS", 0, 0, 0, ""),
756
721
Commands( "LOGS", 0, 0, 0, ""),
757
722
Commands( "LONG", 0, 0, 0, ""),
723
Commands( "LONGTEXT", 0, 0, 0, ""),
758
724
Commands( "LOOP", 0, 0, 0, ""),
725
Commands( "LOW_PRIORITY", 0, 0, 0, ""),
726
Commands( "MASTER", 0, 0, 0, ""),
727
Commands( "MASTER_CONNECT_RETRY", 0, 0, 0, ""),
728
Commands( "MASTER_HOST", 0, 0, 0, ""),
729
Commands( "MASTER_LOG_FILE", 0, 0, 0, ""),
730
Commands( "MASTER_LOG_POS", 0, 0, 0, ""),
731
Commands( "MASTER_PASSWORD", 0, 0, 0, ""),
732
Commands( "MASTER_PORT", 0, 0, 0, ""),
733
Commands( "MASTER_SERVER_ID", 0, 0, 0, ""),
734
Commands( "MASTER_SSL", 0, 0, 0, ""),
735
Commands( "MASTER_SSL_CA", 0, 0, 0, ""),
736
Commands( "MASTER_SSL_CAPATH", 0, 0, 0, ""),
737
Commands( "MASTER_SSL_CERT", 0, 0, 0, ""),
738
Commands( "MASTER_SSL_CIPHER", 0, 0, 0, ""),
739
Commands( "MASTER_SSL_KEY", 0, 0, 0, ""),
740
Commands( "MASTER_USER", 0, 0, 0, ""),
759
741
Commands( "MATCH", 0, 0, 0, ""),
760
742
Commands( "MAX_CONNECTIONS_PER_HOUR", 0, 0, 0, ""),
761
743
Commands( "MAX_QUERIES_PER_HOUR", 0, 0, 0, ""),
783
767
Commands( "NAMES", 0, 0, 0, ""),
784
768
Commands( "NATIONAL", 0, 0, 0, ""),
785
769
Commands( "NATURAL", 0, 0, 0, ""),
770
Commands( "NDB", 0, 0, 0, ""),
771
Commands( "NDBCLUSTER", 0, 0, 0, ""),
786
772
Commands( "NCHAR", 0, 0, 0, ""),
787
773
Commands( "NEW", 0, 0, 0, ""),
788
774
Commands( "NEXT", 0, 0, 0, ""),
789
775
Commands( "NO", 0, 0, 0, ""),
790
776
Commands( "NONE", 0, 0, 0, ""),
791
777
Commands( "NOT", 0, 0, 0, ""),
778
Commands( "NO_WRITE_TO_BINLOG", 0, 0, 0, ""),
792
779
Commands( "NULL", 0, 0, 0, ""),
793
780
Commands( "NUMERIC", 0, 0, 0, ""),
794
781
Commands( "NVARCHAR", 0, 0, 0, ""),
795
782
Commands( "OFFSET", 0, 0, 0, ""),
783
Commands( "OLD_PASSWORD", 0, 0, 0, ""),
796
784
Commands( "ON", 0, 0, 0, ""),
797
785
Commands( "ONE", 0, 0, 0, ""),
798
786
Commands( "ONE_SHOT", 0, 0, 0, ""),
1075
1086
Commands( "MD5", 0, 0, 0, ""),
1076
1087
Commands( "MID", 0, 0, 0, ""),
1077
1088
Commands( "MIN", 0, 0, 0, ""),
1089
Commands( "MLINEFROMTEXT", 0, 0, 0, ""),
1090
Commands( "MLINEFROMWKB", 0, 0, 0, ""),
1091
Commands( "MPOINTFROMTEXT", 0, 0, 0, ""),
1092
Commands( "MPOINTFROMWKB", 0, 0, 0, ""),
1093
Commands( "MPOLYFROMTEXT", 0, 0, 0, ""),
1094
Commands( "MPOLYFROMWKB", 0, 0, 0, ""),
1078
1095
Commands( "MONTHNAME", 0, 0, 0, ""),
1096
Commands( "MULTILINESTRINGFROMTEXT", 0, 0, 0, ""),
1097
Commands( "MULTILINESTRINGFROMWKB", 0, 0, 0, ""),
1098
Commands( "MULTIPOINTFROMTEXT", 0, 0, 0, ""),
1099
Commands( "MULTIPOINTFROMWKB", 0, 0, 0, ""),
1100
Commands( "MULTIPOLYGONFROMTEXT", 0, 0, 0, ""),
1101
Commands( "MULTIPOLYGONFROMWKB", 0, 0, 0, ""),
1079
1102
Commands( "NAME_CONST", 0, 0, 0, ""),
1080
1103
Commands( "NOW", 0, 0, 0, ""),
1081
1104
Commands( "NULLIF", 0, 0, 0, ""),
1105
Commands( "NUMINTERIORRINGS", 0, 0, 0, ""),
1082
1106
Commands( "NUMPOINTS", 0, 0, 0, ""),
1083
1107
Commands( "OCTET_LENGTH", 0, 0, 0, ""),
1084
1108
Commands( "OCT", 0, 0, 0, ""),
1307
1337
static void check_max_input_line(uint32_t in_max_input_line)
1309
1339
opt_max_input_line= 0;
1310
if (in_max_input_line < 4096 || in_max_input_line > (int64_t)2*1024L*1024L*1024L)
1340
if (in_max_input_line<4096 || in_max_input_line>(int64_t)2*1024L*1024L*1024L)
1312
cout << _("Error: Invalid Value for max_input_line");
1342
cout<<N_("Error: Invalid Value for max_input_line");
1315
opt_max_input_line= in_max_input_line - (in_max_input_line % 1024);
1345
opt_max_input_line= in_max_input_line/1024;
1346
opt_max_input_line*=1024;
1318
1349
int main(int argc,char *argv[])
1323
1353
#if defined(ENABLE_NLS)
1324
1354
# if defined(HAVE_LOCALE_H)
1325
1355
setlocale(LC_ALL, "");
1327
bindtextdomain("drizzle7", LOCALEDIR);
1328
textdomain("drizzle7");
1357
bindtextdomain("drizzle", LOCALEDIR);
1358
textdomain("drizzle");
1331
po::options_description commandline_options(_("Options used only in command line"));
1361
po::options_description commandline_options("Options used only in command line");
1332
1362
commandline_options.add_options()
1333
("help,?",_("Displays this help and exit."))
1334
("batch,B",_("Don't use history file. Disable interactive behavior. (Enables --silent)"))
1363
("help,?",N_("Displays this help and exit."))
1364
("batch,B",N_("Don't use history file. Disable interactive behavior. (Enables --silent)"))
1335
1365
("column-type-info", po::value<bool>(&column_types_flag)->default_value(false)->zero_tokens(),
1336
_("Display column type information."))
1366
N_("Display column type information."))
1337
1367
("comments,c", po::value<bool>(&preserve_comments)->default_value(false)->zero_tokens(),
1338
_("Preserve comments. Send comments to the server. The default is --skip-comments (discard comments), enable with --comments"))
1368
N_("Preserve comments. Send comments to the server. The default is --skip-comments (discard comments), enable with --comments"))
1369
("compress,C", po::value<bool>(&opt_compress)->default_value(false)->zero_tokens(),
1370
N_("Use compression in server/client protocol."))
1339
1371
("vertical,E", po::value<bool>(&vertical)->default_value(false)->zero_tokens(),
1340
_("Print the output of a query (rows) vertically."))
1372
N_("Print the output of a query (rows) vertically."))
1341
1373
("force,f", po::value<bool>(&ignore_errors)->default_value(false)->zero_tokens(),
1342
_("Continue even if we get an sql error."))
1374
N_("Continue even if we get an sql error."))
1343
1375
("named-commands,G", po::value<bool>(&named_cmds)->default_value(false)->zero_tokens(),
1344
_("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."))
1376
N_("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."))
1377
("no-named-commands,g",
1378
N_("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."))
1379
("ignore-spaces,i", N_("Ignore space after function names."))
1345
1380
("no-beep,b", po::value<bool>(&opt_nobeep)->default_value(false)->zero_tokens(),
1346
_("Turn off beep on error."))
1347
("disable-line-numbers", _("Do not write line numbers for errors."))
1348
("disable-column-names", _("Do not write column names in results."))
1381
N_("Turn off beep on error."))
1382
("line-numbers", po::value<bool>(&line_numbers)->default_value(true)->zero_tokens(),
1383
N_("Write line numbers for errors."))
1384
("skip-line-numbers,L",
1385
N_("Don't write line number for errors. WARNING: -L is deprecated, use long version of this option instead."))
1386
("column-name", po::value<bool>(&column_names)->default_value(true)->zero_tokens(),
1387
N_("Write column names in results."))
1349
1388
("skip-column-names,N",
1350
_("Don't write column names in results. WARNING: -N is deprecated, use long version of this options instead."))
1389
N_("Don't write column names in results. WARNING: -N is deprecated, use long version of this options instead."))
1351
1390
("set-variable,O", po::value<string>(),
1352
_("Change the value of a variable. Please note that this option is deprecated; you can set variables directly with --variable-name=value."))
1391
N_("Change the value of a variable. Please note that this option is deprecated; you can set variables directly with --variable-name=value."))
1353
1392
("table,t", po::value<bool>(&output_tables)->default_value(false)->zero_tokens(),
1354
_("Output in table format."))
1355
("safe-updates,U", po::value<bool>(&safe_updates)->default_value(false)->zero_tokens(),
1356
_("Only allow UPDATE and DELETE that uses keys."))
1357
("i-am-a-dummy,U", po::value<bool>(&safe_updates)->default_value(false)->zero_tokens(),
1358
_("Synonym for option --safe-updates, -U."))
1393
N_("Output in table format."))
1394
("safe-updates,U", po::value<bool>(&safe_updates)->default_value(0)->zero_tokens(),
1395
N_("Only allow UPDATE and DELETE that uses keys."))
1396
("i-am-a-dummy,U", po::value<bool>(&safe_updates)->default_value(0)->zero_tokens(),
1397
N_("Synonym for option --safe-updates, -U."))
1359
1398
("verbose,v", po::value<string>(&opt_verbose)->default_value(""),
1360
_("-v vvv implies that verbose= 3, Used to specify verbose"))
1361
("version,V", _("Output version information and exit."))
1399
N_("-v vvv implies that verbose= 3, Used to specify verbose"))
1400
("version,V", N_("Output version information and exit."))
1362
1401
("secure-auth", po::value<bool>(&opt_secure_auth)->default_value(false)->zero_tokens(),
1363
_("Refuse client connecting to server if it uses old (pre-4.1.1) protocol"))
1402
N_("Refuse client connecting to server if it uses old (pre-4.1.1) protocol"))
1364
1403
("show-warnings", po::value<bool>(&show_warnings)->default_value(false)->zero_tokens(),
1365
_("Show warnings after every statement."))
1404
N_("Show warnings after every statement."))
1366
1405
("show-progress-size", po::value<uint32_t>(&show_progress_size)->default_value(0),
1367
_("Number of lines before each import progress report."))
1406
N_("Number of lines before each import progress report."))
1368
1407
("ping", po::value<bool>(&opt_ping)->default_value(false)->zero_tokens(),
1369
_("Ping the server to check if it's alive."))
1408
N_("Ping the server to check if it's alive."))
1370
1409
("no-defaults", po::value<bool>()->default_value(false)->zero_tokens(),
1371
_("Configuration file defaults are not used if no-defaults is set"))
1410
N_("Configuration file defaults are not used if no-defaults is set"))
1374
po::options_description drizzle_options(_("Options specific to the drizzle client"));
1413
po::options_description drizzle_options("Options specific to the drizzle client");
1375
1414
drizzle_options.add_options()
1376
("disable-auto-rehash,A",
1377
_("Disable automatic rehashing. One doesn't need to use 'rehash' to get table and field completion, but startup and reconnecting may take a longer time."))
1415
("auto-rehash", po::value<bool>(&opt_rehash)->default_value(true)->zero_tokens(),
1416
N_("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."))
1417
("no-auto-rehash,A",N_("No automatic rehashing. One has to use 'rehash' to get table and field completion. This gives a quicker start of drizzle_st and disables rehashing on reconnect. WARNING: options deprecated; use --disable-auto-rehash instead."))
1378
1418
("auto-vertical-output", po::value<bool>(&auto_vertical_output)->default_value(false)->zero_tokens(),
1379
_("Automatically switch to vertical output mode if the result is wider than the terminal width."))
1419
N_("Automatically switch to vertical output mode if the result is wider than the terminal width."))
1380
1420
("database,D", po::value<string>(¤t_db)->default_value(""),
1381
_("Database to use."))
1421
N_("Database to use."))
1382
1422
("default-character-set",po::value<string>(),
1384
1424
("delimiter", po::value<string>(&delimiter_str)->default_value(";"),
1385
_("Delimiter to be used."))
1425
N_("Delimiter to be used."))
1386
1426
("execute,e", po::value<string>(),
1387
_("Execute command and quit. (Disables --force and history file)"))
1427
N_("Execute command and quit. (Disables --force and history file)"))
1388
1428
("local-infile", po::value<bool>(&opt_local_infile)->default_value(false)->zero_tokens(),
1389
_("Enable LOAD DATA LOCAL INFILE."))
1429
N_("Enable/disable LOAD DATA LOCAL INFILE."))
1390
1430
("unbuffered,n", po::value<bool>(&unbuffered)->default_value(false)->zero_tokens(),
1391
_("Flush buffer after each query."))
1431
N_("Flush buffer after each query."))
1392
1432
("sigint-ignore", po::value<bool>(&opt_sigint_ignore)->default_value(false)->zero_tokens(),
1393
_("Ignore SIGINT (CTRL-C)"))
1433
N_("Ignore SIGINT (CTRL-C)"))
1394
1434
("one-database,o", po::value<bool>(&one_database)->default_value(false)->zero_tokens(),
1395
_("Only update the default database. This is useful for skipping updates to other database in the update log."))
1435
N_("Only update the default database. This is useful for skipping updates to other database in the update log."))
1396
1436
("pager", po::value<string>(),
1397
_("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."))
1437
N_("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."))
1398
1438
("disable-pager", po::value<bool>(&opt_nopager)->default_value(false)->zero_tokens(),
1399
_("Disable pager and print to stdout. See interactive help (\\h) also."))
1439
N_("Disable pager and print to stdout. See interactive help (\\h) also."))
1400
1440
("prompt", po::value<string>(¤t_prompt)->default_value(""),
1401
_("Set the drizzle prompt to this value."))
1441
N_("Set the drizzle prompt to this value."))
1402
1442
("quick,q", po::value<bool>(&quick)->default_value(false)->zero_tokens(),
1403
_("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."))
1443
N_("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."))
1404
1444
("raw,r", po::value<bool>(&opt_raw_data)->default_value(false)->zero_tokens(),
1405
_("Write fields without conversion. Used with --batch."))
1406
("disable-reconnect", _("Do not reconnect if the connection is lost."))
1407
("shutdown", po::value<bool>()->zero_tokens(),
1408
_("Shutdown the server"))
1409
("silent,s", _("Be more silent. Print results with a tab as separator, each row on new line."))
1445
N_("Write fields without conversion. Used with --batch."))
1446
("reconnect", po::value<bool>(&opt_reconnect)->default_value(true)->zero_tokens(),
1447
N_("Reconnect if the connection is lost. Disable with --disable-reconnect. This option is enabled by default."))
1448
("shutdown", po::value<bool>(&opt_shutdown)->default_value(false)->zero_tokens(),
1449
N_("Shutdown the server"))
1450
("silent,s", N_("Be more silent. Print results with a tab as separator, each row on new line."))
1410
1451
("tee", po::value<string>(),
1411
_("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."))
1452
N_("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."))
1412
1453
("disable-tee", po::value<bool>()->default_value(false)->zero_tokens(),
1413
_("Disable outfile. See interactive help (\\h) also."))
1414
("connect-timeout", po::value<uint32_t>(&opt_connect_timeout)->default_value(0)->notifier(&check_timeout_value),
1415
_("Number of seconds before connection timeout."))
1416
("max-input-line", po::value<uint32_t>(&opt_max_input_line)->default_value(16*1024L*1024L)->notifier(&check_max_input_line),
1417
_("Max length of input line"))
1418
("select-limit", po::value<uint32_t>(&select_limit)->default_value(1000L),
1419
_("Automatic limit for SELECT when using --safe-updates"))
1420
("max-join-size", po::value<uint32_t>(&max_join_size)->default_value(1000000L),
1421
_("Automatic limit for rows in a join when using --safe-updates"))
1454
N_("Disable outfile. See interactive help (\\h) also."))
1455
("wait,w", N_("Wait and retry if connection is down."))
1456
("connect_timeout", po::value<uint32_t>(&opt_connect_timeout)->default_value(0)->notifier(&check_timeout_value),
1457
N_("Number of seconds before connection timeout."))
1458
("max_input_line", po::value<uint32_t>(&opt_max_input_line)->default_value(16*1024L*1024L)->notifier(&check_max_input_line),
1459
N_("Max length of input line"))
1460
("select_limit", po::value<uint32_t>(&select_limit)->default_value(1000L),
1461
N_("Automatic limit for SELECT when using --safe-updates"))
1462
("max_join_size", po::value<uint32_t>(&max_join_size)->default_value(1000000L),
1463
N_("Automatic limit for rows in a join when using --safe-updates"))
1424
po::options_description client_options(_("Options specific to the client"));
1466
po::options_description client_options("Options specific to the client");
1425
1467
client_options.add_options()
1468
("mysql,m", po::value<bool>(&opt_mysql)->default_value(true)->zero_tokens(),
1469
N_("Use MySQL Protocol."))
1426
1470
("host,h", po::value<string>(¤t_host)->default_value("localhost"),
1427
_("Connect to host"))
1471
N_("Connect to host"))
1428
1472
("password,P", po::value<string>(¤t_password)->default_value(PASSWORD_SENTINEL),
1429
_("Password to use when connecting to server. If password is not given it's asked from the tty."))
1473
N_("Password to use when connecting to server. If password is not given it's asked from the tty."))
1430
1474
("port,p", po::value<uint32_t>()->default_value(0),
1431
_("Port number to use for connection or 0 for default to, in order of preference, drizzle.cnf, $DRIZZLE_TCP_PORT, built-in default"))
1432
#ifdef DRIZZLE_ADMIN_TOOL
1433
("user,u", po::value<string>(¤t_user)->default_value("root"),
1475
N_("Port number to use for connection or 0 for default to, in order of preference, drizzle.cnf, $DRIZZLE_TCP_PORT, built-in default"))
1435
1476
("user,u", po::value<string>(¤t_user)->default_value(""),
1437
_("User for login if not current user."))
1438
("protocol",po::value<string>(&opt_protocol)->default_value("mysql"),
1439
_("The protocol of connection (mysql or drizzle)."))
1477
N_("User for login if not current user."))
1478
("protocol",po::value<string>(),
1479
N_("The protocol of connection (tcp,socket,pipe,memory)."))
1442
po::options_description long_options(_("Allowed Options"));
1482
po::options_description long_options("Allowed Options");
1443
1483
long_options.add(commandline_options).add(drizzle_options).add(client_options);
1445
1485
std::string system_config_dir_drizzle(SYSCONFDIR);
4143
4100
drizzle_row_t cur=drizzle_row_next(&result);
4146
tee_fprintf(stdout, _("Current schema:\t%s\n"), cur[0] ? cur[0] : "");
4147
tee_fprintf(stdout, _("Current user:\t\t%s\n"), cur[1]);
4103
tee_fprintf(stdout, "Current database:\t%s\n", cur[0] ? cur[0] : "");
4104
tee_fprintf(stdout, "Current user:\t\t%s\n", cur[1]);
4149
4106
drizzle_result_free(&result);
4151
4108
else if (ret == DRIZZLE_RETURN_ERROR_CODE)
4152
4109
drizzle_result_free(&result);
4153
tee_puts(_("SSL:\t\t\tNot in use"), stdout);
4110
tee_puts("SSL:\t\t\tNot in use", stdout);
4157
4114
vidattr(A_BOLD);
4158
tee_fprintf(stdout, _("\nNo connection\n"));
4115
tee_fprintf(stdout, "\nNo connection\n");
4159
4116
vidattr(A_NORMAL);
4162
4119
if (skip_updates)
4164
4121
vidattr(A_BOLD);
4165
tee_fprintf(stdout, _("\nAll updates ignored to this schema\n"));
4122
tee_fprintf(stdout, "\nAll updates ignored to this database\n");
4166
4123
vidattr(A_NORMAL);
4168
tee_fprintf(stdout, _("Current pager:\t\t%s\n"), pager.c_str());
4169
tee_fprintf(stdout, _("Using outfile:\t\t'%s'\n"), opt_outfile ? outfile.c_str() : "");
4170
tee_fprintf(stdout, _("Using delimiter:\t%s\n"), delimiter);
4171
tee_fprintf(stdout, _("Server version:\t\t%s\n"), server_version_string(&con));
4172
tee_fprintf(stdout, _("Protocol:\t\t%s\n"), opt_protocol.c_str());
4173
tee_fprintf(stdout, _("Protocol version:\t%d\n"), drizzle_con_protocol_version(&con));
4174
tee_fprintf(stdout, _("Connection:\t\t%s\n"), drizzle_con_host(&con));
4125
tee_fprintf(stdout, "Current pager:\t\t%s\n", pager.c_str());
4126
tee_fprintf(stdout, "Using outfile:\t\t'%s'\n", opt_outfile ? outfile.c_str() : "");
4127
tee_fprintf(stdout, "Using delimiter:\t%s\n", delimiter);
4128
tee_fprintf(stdout, "Server version:\t\t%s\n", server_version_string(&con));
4129
tee_fprintf(stdout, "Protocol version:\t%d\n", drizzle_con_protocol_version(&con));
4130
tee_fprintf(stdout, "Connection:\t\t%s\n", drizzle_con_host(&con));
4175
4131
/* XXX need to save this from result
4176
4132
if ((id= drizzleclient_insert_id(&drizzle)))
4177
4133
tee_fprintf(stdout, "Insert id:\t\t%s\n", internal::llstr(id, buff));
4180
4136
if (drizzle_con_uds(&con))
4181
tee_fprintf(stdout, _("UNIX socket:\t\t%s\n"), drizzle_con_uds(&con));
4137
tee_fprintf(stdout, "UNIX socket:\t\t%s\n", drizzle_con_uds(&con));
4183
tee_fprintf(stdout, _("TCP port:\t\t%d\n"), drizzle_con_port(&con));
4139
tee_fprintf(stdout, "TCP port:\t\t%d\n", drizzle_con_port(&con));
4185
4141
if (safe_updates)
4187
4143
vidattr(A_BOLD);
4188
tee_fprintf(stdout, _("\nNote that you are running in safe_update_mode:\n"));
4144
tee_fprintf(stdout, "\nNote that you are running in safe_update_mode:\n");
4189
4145
vidattr(A_NORMAL);
4190
tee_fprintf(stdout, _("\
4146
tee_fprintf(stdout, "\
4191
4147
UPDATEs and DELETEs that don't use a key in the WHERE clause are not allowed.\n\
4192
4148
(One can force an UPDATE/DELETE by adding LIMIT # at the end of the command.)\n \
4193
4149
SELECT has an automatic 'LIMIT %lu' if LIMIT is not used.\n \
4194
Max number of examined row combination in a join is set to: %lu\n\n"),
4150
Max number of examined row combination in a join is set to: %lu\n\n",
4195
4151
select_limit, max_join_size);
4197
4153
tee_puts("--------------\n", stdout);