1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

mysqlbinlog --hexdump additional patch 2

- Fixes related to Guilhems review
- Special printing of event header
This commit is contained in:
lars@mysql.com
2005-09-30 00:12:14 +02:00
parent 835a24cb13
commit bf19d02b27
3 changed files with 109 additions and 100 deletions

View File

@ -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)
{