diff options
author | lars@mysql.com <> | 2005-09-30 00:12:14 +0200 |
---|---|---|
committer | lars@mysql.com <> | 2005-09-30 00:12:14 +0200 |
commit | bf19d02b276d9b06abc81a7c6a93ca160a4f21f5 (patch) | |
tree | 1d1bce23497a5268b1525bfafa6fcb9c2522dee8 /client | |
parent | 835a24cb136bdf90ecccf6237cfca9c4ca696165 (diff) | |
download | mariadb-git-bf19d02b276d9b06abc81a7c6a93ca160a4f21f5.tar.gz |
mysqlbinlog --hexdump additional patch 2
- Fixes related to Guilhems review
- Special printing of event header
Diffstat (limited to 'client')
-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) { |