830
static void combine_queries(vector<string> queries)
832
user_supplied_query.erase();
833
for (vector<string>::iterator it= queries.begin();
837
user_supplied_query.append(*it);
838
user_supplied_query.append(delimiter);
842
* commandline_options is the set of all options that can only be called via the command line.
844
* client_options is the set of all options that can be defined via both command line and via
845
* the configuration file client.cnf
847
* slap_options is the set of all drizzleslap specific options which behave in a manner
848
* similar to that of client_options. It's configuration file is drizzleslap.cnf
850
* long_options is the union of commandline_options, slap_options and client_options.
852
* There are two configuration files per set of options, one which is defined by the user and
853
* which is found at ~/.drizzle directory and the other which is the system configuration
854
* file which is found in the SYSCONFDIR/drizzle directory.
856
* The system configuration file is over ridden by the user's configuration file which
857
* in turn is over ridden by the command line.
824
859
int main(int argc, char **argv)
861
char *password= NULL;
864
po::options_description commandline_options("Options used only in command line");
865
commandline_options.add_options()
866
("help,?","Display this help and exit")
867
("info,i","Gives information and exit")
868
("burnin",po::value<bool>(&opt_burnin)->default_value(false)->zero_tokens(),
869
"Run full test case in infinite loop")
870
("ignore-sql-errors", po::value<bool>(&opt_ignore_sql_errors)->default_value(false)->zero_tokens(),
871
"Ignore SQL errors in query run")
872
("create-schema",po::value<string>(&create_schema_string)->default_value("drizzleslap"),
873
"Schema to run tests in")
874
("create",po::value<string>(&create_string)->default_value(""),
875
"File or string to use to create tables")
876
("detach",po::value<uint32_t>(&detach_rate)->default_value(0),
877
"Detach (close and re open) connections after X number of requests")
878
("iterations,i",po::value<uint32_t>(&iterations)->default_value(1),
879
"Number of times to run the tests")
880
("label",po::value<string>(&opt_label)->default_value(""),
881
"Label to use for print and csv")
882
("number-blob-cols",po::value<string>(&num_blob_cols_opt)->default_value(""),
883
"Number of BLOB columns to create table with if specifying --auto-generate-sql. Example --number-blob-cols=3:1024/2048 would give you 3 blobs with a random size between 1024 and 2048. ")
884
("number-char-cols,x",po::value<string>(&num_char_cols_opt)->default_value(""),
885
"Number of VARCHAR columns to create in table if specifying --auto-generate-sql.")
886
("number-int-cols,y",po::value<string>(&num_int_cols_opt)->default_value(""),
887
"Number of INT columns to create in table if specifying --auto-generate-sql.")
888
("number-of-queries",
889
po::value<uint64_t>(&num_of_query)->default_value(0),
890
"Limit each client to this number of queries(this is not exact)")
891
("only-print",po::value<bool>(&opt_only_print)->default_value(false)->zero_tokens(),
892
"This causes drizzleslap to not connect to the database instead print out what it would have done instead")
893
("post-query", po::value<string>(&user_supplied_post_statements)->default_value(""),
894
"Query to run or file containing query to execute after tests have completed.")
895
("post-system",po::value<string>(&post_system)->default_value(""),
896
"system() string to execute after tests have completed")
898
po::value<string>(&user_supplied_pre_statements)->default_value(""),
899
"Query to run or file containing query to execute before running tests.")
900
("pre-system",po::value<string>(&pre_system)->default_value(""),
901
"system() string to execute before running tests.")
902
("query,q",po::value<vector<string> >(&user_supplied_queries)->composing()->notifier(&combine_queries),
903
"Query to run or file containing query")
904
("verbose,v", po::value<string>(&opt_verbose)->default_value("v"), "Increase verbosity level by one.")
905
("version,V","Output version information and exit")
908
po::options_description slap_options("Options specific to drizzleslap");
909
slap_options.add_options()
910
("auto-generate-sql-select-columns",
911
po::value<string>(&auto_generate_selected_columns_opt)->default_value(""),
912
"Provide a string to use for the select fields used in auto tests")
913
("auto-generate-sql,a",po::value<bool>(&auto_generate_sql)->default_value(false)->zero_tokens(),
914
"Generate SQL where not supplied by file or command line")
915
("auto-generate-sql-add-autoincrement",
916
po::value<bool>(&auto_generate_sql_autoincrement)->default_value(false)->zero_tokens(),
917
"Add an AUTO_INCREMENT column to auto-generated tables")
918
("auto-generate-sql-execute-number",
919
po::value<uint64_t>(&auto_actual_queries)->default_value(0),
920
"See this number and generate a set of queries to run")
921
("auto-generate-sql-guid-primary",
922
po::value<bool>(&auto_generate_sql_guid_primary)->default_value(false)->zero_tokens(),
923
"Add GUID based primary keys to auto-generated tables")
924
("auto-generate-sql-load-type",
925
po::value<string>(&opt_auto_generate_sql_type)->default_value("mixed"),
926
"Specify test load type: mixed, update, write, key or read; default is mixed")
927
("auto-generate-sql-secondary-indexes",
928
po::value<uint32_t>(&auto_generate_sql_secondary_indexes)->default_value(0),
929
"Number of secondary indexes to add to auto-generated tables")
930
("auto-generated-sql-unique-query-number",
931
po::value<uint64_t>(&auto_generate_sql_unique_query_number)->default_value(10),
932
"Number of unique queries to generate for automatic tests")
933
("auto-generate-sql-unique-write-number",
934
po::value<uint64_t>(&auto_generate_sql_unique_write_number)->default_value(10),
935
"Number of unique queries to generate for auto-generate-sql-write-number")
936
("auto-generate-sql-write-number",
937
po::value<uint64_t>(&auto_generate_sql_number)->default_value(100),
938
"Number of row inserts to perform for each thread (default is 100).")
939
("commit",po::value<uint32_t>(&commit_rate)->default_value(0),
940
"Commit records every X number of statements")
941
("concurrency,c",po::value<string>(&concurrency_str)->default_value(""),
942
"Number of clients to simulate for query to run")
943
("csv",po::value<std::string>(&opt_csv_str)->default_value(""),
944
"Generate CSV output to named file or to stdout if no file is name.")
945
("delayed-start",po::value<uint32_t>(&opt_delayed_start)->default_value(0),
946
"Delay the startup of threads by a random number of microsends (the maximum of the delay")
947
("delimiter,F",po::value<string>(&delimiter)->default_value("\n"),
948
"Delimiter to use in SQL statements supplied in file or command line")
949
("engine ,e",po::value<string>(&default_engine)->default_value(""),
950
"Storage engien to use for creating the table")
952
po::value<uint32_t>(&opt_set_random_seed)->default_value(0),
953
"Seed for random number generator (srandom(3)) ")
954
("silent,s",po::value<bool>(&opt_silent)->default_value(false)->zero_tokens(),
955
"Run program in silent mode - no output. ")
956
("timer-length",po::value<uint32_t>(&opt_timer_length)->default_value(0),
957
"Require drizzleslap to run each specific test a certain amount of time in seconds")
960
po::options_description client_options("Options specific to the client");
961
client_options.add_options()
962
("mysql,m", po::value<bool>(&opt_mysql)->default_value(true)->zero_tokens(),
963
N_("Use MySQL Protocol."))
964
("host,h",po::value<string>(&host)->default_value("localhost"),"Connect to the host")
965
("password,P",po::value<char *>(&password),
966
"Password to use when connecting to server. If password is not given it's asked from the tty")
967
("port,p",po::value<uint32_t>(), "Port number to use for connection")
968
("protocol",po::value<string>(),
969
"The protocol of connection (tcp,socket,pipe,memory).")
970
("user,u",po::value<string>(&user)->default_value(""),
971
"User for login if not current user")
974
po::options_description long_options("Allowed Options");
975
long_options.add(commandline_options).add(slap_options).add(client_options);
977
std::string system_config_dir_slap(SYSCONFDIR);
978
system_config_dir_slap.append("/drizzle/drizzleslap.cnf");
980
std::string system_config_dir_client(SYSCONFDIR);
981
system_config_dir_client.append("/drizzle/client.cnf");
983
uint64_t temp_drizzle_port= 0;
826
984
drizzle_con_st con;
827
985
OptionString *eptr;
834
internal::load_defaults("drizzle",load_default_groups,&argc,&argv);
836
if (get_options(&argc,&argv))
838
internal::free_defaults(defaults_argv);
989
po::variables_map vm;
990
po::store(po::parse_command_line(argc,argv,long_options),vm);
992
ifstream user_slap_ifs("~/.drizzle/drizzleslap.cnf");
993
po::store(parse_config_file(user_slap_ifs, slap_options), vm);
995
ifstream system_slap_ifs(system_config_dir_slap.c_str());
996
store(parse_config_file(system_slap_ifs, slap_options), vm);
998
ifstream user_client_ifs("~/.drizzle/client.cnf");
999
po::store(parse_config_file(user_client_ifs, client_options), vm);
1001
ifstream system_client_ifs(system_config_dir_client.c_str());
1002
store(parse_config_file(system_client_ifs, client_options), vm);
1006
if (process_options())
1009
if( vm.count("help") || vm.count("info"))
1011
printf("%s Ver %s Distrib %s, for %s-%s (%s)\n",internal::my_progname, SLAP_VERSION,
1012
drizzle_version(),HOST_VENDOR,HOST_OS,HOST_CPU);
1013
puts("Copyright (C) 2008 Sun Microsystems");
1014
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\
1015
\nand you are welcome to modify and redistribute it under the GPL \
1017
puts("Run a query multiple times against the server\n");
1018
cout<<long_options<<endl;
1022
if(vm.count("port"))
1024
temp_drizzle_port= vm["port"].as<uint32_t>();
1026
if ((temp_drizzle_port == 0) || (temp_drizzle_port > 65535))
1028
fprintf(stderr, _("Value supplied for port is not valid.\n"));
1033
opt_drizzle_port= (uint32_t) temp_drizzle_port;
1037
if( vm.count("password") )
1039
char *start= vm["password"].as<char *>();
1040
if (!opt_password.empty())
1041
opt_password.erase();
1042
opt_password = strdup(vm["password"].as<char *>());
1043
if (opt_password.c_str() == NULL)
1045
fprintf(stderr, "Memory allocation error while copying password. "
1052
/* Overwriting password with 'x' */
1058
/* Cut length of argument */
1067
if( vm.count("version") )
1069
printf("%s Ver %s Distrib %s, for %s-%s (%s)\n",internal::my_progname, SLAP_VERSION,
1070
drizzle_version(),HOST_VENDOR,HOST_OS,HOST_CPU);
843
1074
/* Seed the random number generator if we will be using it. */
1035
static struct option my_long_options[] =
1037
{"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG,
1039
{"auto-generate-sql-select-columns", OPT_SLAP_AUTO_GENERATE_SELECT_COLUMNS,
1040
"Provide a string to use for the select fields used in auto tests.",
1041
(char**) &auto_generate_selected_columns_opt,
1042
(char**) &auto_generate_selected_columns_opt,
1043
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1044
{"auto-generate-sql", 'a',
1045
"Generate SQL where not supplied by file or command line.",
1046
(char**) &auto_generate_sql, (char**) &auto_generate_sql,
1047
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
1048
{"auto-generate-sql-add-autoincrement", OPT_SLAP_AUTO_GENERATE_ADD_AUTO,
1049
"Add an AUTO_INCREMENT column to auto-generated tables.",
1050
(char**) &auto_generate_sql_autoincrement,
1051
(char**) &auto_generate_sql_autoincrement,
1052
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
1053
{"auto-generate-sql-execute-number", OPT_SLAP_AUTO_GENERATE_EXECUTE_QUERIES,
1054
"Set this number to generate a set number of queries to run.",
1055
(char**) &auto_actual_queries, (char**) &auto_actual_queries,
1056
0, GET_ULL, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1057
{"auto-generate-sql-guid-primary", OPT_SLAP_AUTO_GENERATE_GUID_PRIMARY,
1058
"Add GUID based primary keys to auto-generated tables.",
1059
(char**) &auto_generate_sql_guid_primary,
1060
(char**) &auto_generate_sql_guid_primary,
1061
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
1062
{"auto-generate-sql-load-type", OPT_SLAP_AUTO_GENERATE_SQL_LOAD_TYPE,
1063
"Specify test load type: mixed, update, write, key, or read; default is mixed.",
1064
(char**) &opt_auto_generate_sql_type, (char**) &opt_auto_generate_sql_type,
1065
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1066
{"auto-generate-sql-secondary-indexes",
1067
OPT_SLAP_AUTO_GENERATE_SECONDARY_INDEXES,
1068
"Number of secondary indexes to add to auto-generated tables.",
1069
(char**) &auto_generate_sql_secondary_indexes,
1070
(char**) &auto_generate_sql_secondary_indexes, 0,
1071
GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1072
{"auto-generate-sql-unique-query-number",
1073
OPT_SLAP_AUTO_GENERATE_UNIQUE_QUERY_NUM,
1074
"Number of unique queries to generate for automatic tests.",
1075
(char**) &auto_generate_sql_unique_query_number,
1076
(char**) &auto_generate_sql_unique_query_number,
1077
0, GET_ULL, REQUIRED_ARG, 10, 0, 0, 0, 0, 0},
1078
{"auto-generate-sql-unique-write-number",
1079
OPT_SLAP_AUTO_GENERATE_UNIQUE_WRITE_NUM,
1080
"Number of unique queries to generate for auto-generate-sql-write-number.",
1081
(char**) &auto_generate_sql_unique_write_number,
1082
(char**) &auto_generate_sql_unique_write_number,
1083
0, GET_ULL, REQUIRED_ARG, 10, 0, 0, 0, 0, 0},
1084
{"auto-generate-sql-write-number", OPT_SLAP_AUTO_GENERATE_WRITE_NUM,
1085
"Number of row inserts to perform for each thread (default is 100).",
1086
(char**) &auto_generate_sql_number, (char**) &auto_generate_sql_number,
1087
0, GET_ULL, REQUIRED_ARG, 100, 0, 0, 0, 0, 0},
1088
{"burnin", OPT_SLAP_BURNIN, "Run full test case in infinite loop.",
1089
(char**) &opt_burnin, (char**) &opt_burnin, 0, GET_BOOL, NO_ARG, 0, 0, 0,
1091
{"ignore-sql-errors", OPT_SLAP_IGNORE_SQL_ERRORS,
1092
"Ignore SQL erros in query run.",
1093
(char**) &opt_ignore_sql_errors,
1094
(char**) &opt_ignore_sql_errors,
1095
0, GET_BOOL, NO_ARG, 0, 0, 0,
1097
{"commit", OPT_SLAP_COMMIT, "Commit records every X number of statements.",
1098
(char**) &commit_rate, (char**) &commit_rate, 0, GET_UINT, REQUIRED_ARG,
1100
{"concurrency", 'c', "Number of clients to simulate for query to run.",
1101
(char**) &concurrency_str, (char**) &concurrency_str, 0, GET_STR,
1102
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1103
{"create", OPT_SLAP_CREATE_STRING, "File or string to use create tables.",
1104
(char**) &create_string, (char**) &create_string, 0, GET_STR, REQUIRED_ARG,
1106
{"create-schema", OPT_CREATE_SLAP_SCHEMA, "Schema to run tests in.",
1107
(char**) &create_schema_string, (char**) &create_schema_string, 0, GET_STR,
1108
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1109
{"csv", OPT_SLAP_CSV,
1110
"Generate CSV output to named file or to stdout if no file is named.",
1111
(char**) &opt_csv_str, (char**) &opt_csv_str, 0, GET_STR,
1112
OPT_ARG, 0, 0, 0, 0, 0, 0},
1113
{"delayed-start", OPT_SLAP_DELAYED_START,
1114
"Delay the startup of threads by a random number of microsends (the maximum of the delay)",
1115
(char**) &opt_delayed_start, (char**) &opt_delayed_start, 0, GET_UINT,
1116
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1118
"Delimiter to use in SQL statements supplied in file or command line.",
1119
(char**) &delimiter, (char**) &delimiter, 0, GET_STR, REQUIRED_ARG,
1121
{"detach", OPT_SLAP_DETACH,
1122
"Detach (close and reopen) connections after X number of requests.",
1123
(char**) &detach_rate, (char**) &detach_rate, 0, GET_UINT, REQUIRED_ARG,
1125
{"engine", 'e', "Storage engine to use for creating the table.",
1126
(char**) &default_engine, (char**) &default_engine, 0,
1127
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1128
{"host", 'h', "Connect to host.", (char**) &host, (char**) &host, 0, GET_STR,
1129
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1130
{"iterations", 'i', "Number of times to run the tests.", (char**) &iterations,
1131
(char**) &iterations, 0, GET_UINT, REQUIRED_ARG, 1, 0, 0, 0, 0, 0},
1132
{"label", OPT_SLAP_LABEL, "Label to use for print and csv output.",
1133
(char**) &opt_label, (char**) &opt_label, 0,
1134
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1135
{"mysql", 'm', N_("Use MySQL Protocol."),
1136
(char**) &opt_mysql, (char**) &opt_mysql, 0, GET_BOOL, NO_ARG, 1, 0, 0,
1138
{"number-blob-cols", OPT_SLAP_BLOB_COL,
1139
"Number of BLOB columns to create table with if specifying --auto-generate-sql. Example --number-blob-cols=3:1024/2048 would give you 3 blobs with a random size between 1024 and 2048. ",
1140
(char**) &num_blob_cols_opt, (char**) &num_blob_cols_opt, 0, GET_STR, REQUIRED_ARG,
1142
{"number-char-cols", 'x',
1143
"Number of VARCHAR columns to create in table if specifying --auto-generate-sql.",
1144
(char**) &num_char_cols_opt, (char**) &num_char_cols_opt, 0, GET_STR, REQUIRED_ARG,
1146
{"number-int-cols", 'y',
1147
"Number of INT columns to create in table if specifying --auto-generate-sql.",
1148
(char**) &num_int_cols_opt, (char**) &num_int_cols_opt, 0, GET_STR, REQUIRED_ARG,
1150
{"number-of-queries", OPT_DRIZZLE_NUMBER_OF_QUERY,
1151
"Limit each client to this number of queries (this is not exact).",
1152
(char**) &num_of_query, (char**) &num_of_query, 0,
1153
GET_ULL, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1154
{"only-print", OPT_DRIZZLE_ONLY_PRINT,
1155
"This causes drizzleslap to not connect to the databases, but instead print "
1156
"out what it would have done instead.",
1157
(char**) &opt_only_print, (char**) &opt_only_print, 0, GET_BOOL, NO_ARG,
1160
"Password to use when connecting to server. If password is not given it's "
1161
"asked from the tty.", 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
1162
{"port", 'p', "Port number to use for connection.",
1163
0, 0, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1164
{"post-query", OPT_SLAP_POST_QUERY,
1165
"Query to run or file containing query to execute after tests have completed.",
1166
(char**) &user_supplied_post_statements,
1167
(char**) &user_supplied_post_statements,
1168
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1169
{"post-system", OPT_SLAP_POST_SYSTEM,
1170
"system() string to execute after tests have completed.",
1171
(char**) &post_system,
1172
(char**) &post_system,
1173
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1174
{"pre-query", OPT_SLAP_PRE_QUERY,
1175
"Query to run or file containing query to execute before running tests.",
1176
(char**) &user_supplied_pre_statements,
1177
(char**) &user_supplied_pre_statements,
1178
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1179
{"pre-system", OPT_SLAP_PRE_SYSTEM,
1180
"system() string to execute before running tests.",
1181
(char**) &pre_system,
1182
(char**) &pre_system,
1183
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1184
{"protocol", OPT_DRIZZLE_PROTOCOL,
1185
"The protocol of connection (tcp,socket,pipe,memory).",
1186
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1187
{"query", 'q', "Query to run or file containing query to run.",
1188
(char**) &user_supplied_query, (char**) &user_supplied_query,
1189
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1190
{"set-random-seed", OPT_SLAP_SET_RANDOM_SEED,
1191
"Seed for random number generator (srandom(3))",
1192
(char**)&opt_set_random_seed,
1193
(char**)&opt_set_random_seed,0,
1194
GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1195
{"silent", 's', "Run program in silent mode - no output.",
1196
(char**) &opt_silent, (char**) &opt_silent, 0, GET_BOOL, NO_ARG,
1198
{"timer-length", OPT_SLAP_TIMER_LENGTH,
1199
"Require drizzleslap to run each specific test a certain amount of time in seconds.",
1200
(char**) &opt_timer_length, (char**) &opt_timer_length, 0, GET_UINT,
1201
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1202
{"user", 'u', "User for login if not current user.", (char**) &user,
1203
(char**) &user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1205
"More verbose output; you can use this multiple times to get even more "
1206
"verbose output.", (char**) &verbose, (char**) &verbose, 0,
1207
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
1208
{"version", 'V', "Output version information and exit.", 0, 0, 0, GET_NO_ARG,
1209
NO_ARG, 0, 0, 0, 0, 0, 0},
1210
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
1214
static void print_version(void)
1216
printf("%s Ver %s Distrib %s, for %s-%s (%s)\n",internal::my_progname, SLAP_VERSION,
1217
drizzle_version(),HOST_VENDOR,HOST_OS,HOST_CPU);
1221
static void usage(void)
1224
puts("Copyright (C) 2008 Sun Microsystems");
1225
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\
1226
\nand you are welcome to modify and redistribute it under the GPL \
1228
puts("Run a query multiple times against the server\n");
1229
printf("Usage: %s [OPTIONS]\n",internal::my_progname);
1230
internal::print_defaults("drizzle",load_default_groups);
1231
my_print_help(my_long_options);
1234
static int get_one_option(int optid, const struct option *, char *argument)
1236
char *endchar= NULL;
1237
uint64_t temp_drizzle_port= 0;
1244
temp_drizzle_port= (uint64_t) strtoul(argument, &endchar, 10);
1245
/* if there is an alpha character this is not a valid port */
1246
if (strlen(endchar) != 0)
1248
fprintf(stderr, _("Non-integer value supplied for port. If you are trying to enter a password please use --password instead.\n"));
1251
/* If the port number is > 65535 it is not a valid port
1252
This also helps with potential data loss casting unsigned long to a
1254
if ((temp_drizzle_port == 0) || (temp_drizzle_port > 65535))
1256
fprintf(stderr, _("Value supplied for port is not valid.\n"));
1261
opt_drizzle_port= (uint32_t) temp_drizzle_port;
1267
char *start= argument;
1270
opt_password = strdup(argument);
1271
if (opt_password == NULL)
1273
fprintf(stderr, "Memory allocation error while copying password. "
1279
/* Overwriting password with 'x' */
1284
/* Cut length of argument */
1296
case 'I': /* Info */
1305
1264
get_random_string(char *buf, size_t size)