diff options
author | unknown <lars@mysql.com> | 2005-09-30 00:12:14 +0200 |
---|---|---|
committer | unknown <lars@mysql.com> | 2005-09-30 00:12:14 +0200 |
commit | 374deedd859d1fae898b668a7442850cb9ac6d33 (patch) | |
tree | 1d1bce23497a5268b1525bfafa6fcb9c2522dee8 /client/mysqlbinlog.cc | |
parent | d2b5d5a403fe03190c21c0bd6c3ce0659137f9a7 (diff) | |
download | mariadb-git-374deedd859d1fae898b668a7442850cb9ac6d33.tar.gz |
mysqlbinlog --hexdump additional patch 2
- Fixes related to Guilhems review
- Special printing of event header
client/mysqlbinlog.cc:
Fixes of option --hexdump handling
sql/log_event.cc:
Fixes related to Guilhems review
Special printing of event header
sql/log_event.h:
Fixes related to Guilhems review
Diffstat (limited to 'client/mysqlbinlog.cc')
-rw-r--r-- | client/mysqlbinlog.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index 577ae82eebd..d78b6ca4412 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -525,7 +525,7 @@ int process_event(LAST_EVENT_INFO *last_event_info, Log_event *ev, fprintf(result_file, "# at %s\n",llstr(pos,ll_buff)); /* Set pos to 0 if hexdump is disabled */ - pos= (opt_hexdump ? pos : 0); + if (!opt_hexdump) pos= 0; switch (ev_type) { case QUERY_EVENT: @@ -674,8 +674,9 @@ static struct my_option my_long_options[] = 0, 0}, {"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"hexdump", 'H', "Augment output with hexadecimal and ascii data dump.", - 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, + {"hexdump", 'H', "Augment output with hexadecimal and ASCII event dump.", + (gptr*) &opt_hexdump, (gptr*) &opt_hexdump, 0, GET_BOOL, NO_ARG, + 0, 0, 0, 0, 0, 0}, {"host", 'h', "Get the binlog from server.", (gptr*) &host, (gptr*) &host, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"offset", 'o', "Skip the first N entries.", (gptr*) &offset, (gptr*) &offset, @@ -855,9 +856,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), case 'd': one_database = 1; break; - case 'H': - opt_hexdump= 1; - break; case 'p': if (argument) { |