From 370016677af391c58c03a0eca198936b3ac5d382 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 29 Jun 2002 00:16:15 +0300 Subject: Added support for semaphores in mysys. (Needed for query cache for systems which doesn't have native semaphores) mysys/my_getopt.c: Safety fix. mysys/my_winsem.c: Shange all semaphore code to be uniform mysys/thr_rwlock.c: cleanup sql/gen_lex_hash.cc: Error message if wrong number of arguments. sql/slave.cc: R --- sql/gen_lex_hash.cc | 5 +++-- sql/slave.cc | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'sql') diff --git a/sql/gen_lex_hash.cc b/sql/gen_lex_hash.cc index a4f0791d105..776b6840b45 100644 --- a/sql/gen_lex_hash.cc +++ b/sql/gen_lex_hash.cc @@ -373,7 +373,7 @@ static my_bool get_one_option(int optid, const struct my_option *opt __attribute__((unused)), char *argument __attribute__((unused))) { - switch(optid) { + switch (optid) { case 'v': opt_verbose++; break; @@ -398,8 +398,9 @@ static int get_options(int argc, char **argv) if (argc >= 1) { + fprintf(stderr,"%s: Too many arguments\n", my_progname); usage(0); - exit(1); + exit(1); } return(0); } diff --git a/sql/slave.cc b/sql/slave.cc index 6f173ba5cd8..5ca78b6c7a2 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -881,7 +881,7 @@ static int create_table_from_dump(THD* thd, NET* net, const char* db, /* we do not want to log create table statement */ save_options = thd->options; - thd->options &= ~OPTION_BIN_LOG; + thd->options &= ~(ulong) OPTION_BIN_LOG; thd->proc_info = "Creating table from master dump"; // save old db in case we are creating in a different database char* save_db = thd->db; -- cgit v1.2.1