592
592
"Generate CSV output to named file or to stdout if no file is named.",
593
593
(char**) &opt_csv_str, (char**) &opt_csv_str, 0, GET_STR,
594
594
OPT_ARG, 0, 0, 0, 0, 0, 0},
596
{"debug", '#', "This is a non-debug version. Catch this and exit.",
597
0, 0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
599
{"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.",
600
(char**) &default_dbug_option, (char**) &default_dbug_option, 0, GET_STR,
601
OPT_ARG, 0, 0, 0, 0, 0, 0},
603
595
{"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.",
604
596
(char**) &debug_check_flag, (char**) &debug_check_flag, 0,
605
597
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
804
792
unsigned int col_count;
806
794
DYNAMIC_STRING table_string;
807
DBUG_ENTER("build_table_string");
809
DBUG_PRINT("info", ("num int cols %u num char cols %u",
810
num_int_cols, num_char_cols));
812
796
init_dynamic_string(&table_string, "", HUGE_STRING_LENGTH, HUGE_STRING_LENGTH);
946
930
unsigned int col_count;
948
932
DYNAMIC_STRING update_string;
949
DBUG_ENTER("build_update_string");
951
935
init_dynamic_string(&update_string, "", HUGE_STRING_LENGTH, HUGE_STRING_LENGTH);
1019
1003
unsigned int col_count;
1020
1004
statement *ptr;
1021
1005
DYNAMIC_STRING insert_string;
1022
DBUG_ENTER("build_insert_string");
1024
1008
init_dynamic_string(&insert_string, "", HUGE_STRING_LENGTH, HUGE_STRING_LENGTH);
1159
1143
unsigned int col_count;
1160
1144
statement *ptr;
1161
1145
static DYNAMIC_STRING query_string;
1162
DBUG_ENTER("build_select_string");
1164
1148
init_dynamic_string(&query_string, "", HUGE_STRING_LENGTH, HUGE_STRING_LENGTH);
1242
1226
option_string *sql_type;
1243
1227
unsigned int sql_type_count= 0;
1245
DBUG_ENTER("get_options");
1246
1230
if ((ho_error= handle_options(argc, argv, my_long_options, get_one_option)))
1247
1231
exit(ho_error);
1248
1232
if (debug_info_flag)
1838
1822
char query[HUGE_STRING_LENGTH];
1840
DBUG_ENTER("drop_schema");
1841
1825
len= snprintf(query, HUGE_STRING_LENGTH, "DROP SCHEMA IF EXISTS `%s`", db);
1843
1827
if (run_query(mysql, query, len))
1891
1875
thread_context *con;
1892
1876
pthread_t mainthread; /* Thread descriptor */
1893
1877
pthread_attr_t attr; /* Thread attributes */
1894
DBUG_ENTER("run_scheduler");
1896
1880
pthread_attr_init(&attr);
1897
1881
pthread_attr_setdetachstate(&attr,
2060
2040
pthread_mutex_unlock(&sleeper_mutex);
2062
DBUG_PRINT("info", ("trying to connect to host %s as user %s", host, user));
2064
2042
slap_connect(&mysql, TRUE);
2066
DBUG_PRINT("info", ("connected."));
2067
2044
if (verbose >= 3)
2068
2045
printf("connected!\n");
2101
2078
Just in case someone runs this under an experimental engine we don't
2102
2079
want a crash so the if() is placed here.
2104
DBUG_ASSERT(primary_keys_number_of);
2081
assert(primary_keys_number_of);
2105
2082
if (primary_keys_number_of)
2107
2084
key_val= (unsigned int)(random() % primary_keys_number_of);
2108
2085
key= primary_keys[key_val];
2112
2089
length= snprintf(buffer, HUGE_STRING_LENGTH, "%.*s '%s'",
2113
2090
(int)ptr->length, ptr->string, key);