28
28
#define EX_MYSQLERR 2
30
30
static MYSQL mysql_connection, *sock = 0;
31
static my_bool opt_alldbs = 0, opt_check_only_changed = 0, opt_extended = 0,
31
static bool opt_alldbs = 0, opt_check_only_changed = 0, opt_extended = 0,
32
32
opt_compress = 0, opt_databases = 0, opt_fast = 0,
33
33
opt_medium_check = 0, opt_quick = 0, opt_all_in_1 = 0,
34
34
opt_silent = 0, opt_auto_repair = 0, ignore_errors = 0,
85
85
"To check several databases. Note the difference in usage; In this case no tables are given. All name arguments are regarded as databasenames.",
86
86
(char**) &opt_databases, (char**) &opt_databases, 0, GET_BOOL, NO_ARG,
89
{"debug", '#', "This is a non-debug version. Catch this and exit.",
90
0, 0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
92
{"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.",
93
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
95
88
{"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.",
96
89
(char**) &debug_check_flag, (char**) &debug_check_flag, 0,
97
90
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
694
683
for (i = 0; (row = mysql_fetch_row(res)); i++)
696
685
int changed = strcmp(prev, row[0]);
697
my_bool status = !strcmp(row[2], "status");
686
bool status = !strcmp(row[2], "status");
768
757
static void DBerror(MYSQL *mysql, const char *when)
770
DBUG_ENTER("DBerror");
771
759
my_printf_error(0,"Got error: %d: %s %s", MYF(0),
772
760
mysql_errno(mysql), mysql_error(mysql), when);
773
761
safe_exit(EX_MYSQLERR);