Commit e6066f37 authored by unknown's avatar unknown

Merge bk-internal:/home/bk/mysql-4.0

into sergbook.mysql.com:/usr/home/serg/Abk/mysql-4.0
parents 44e26b27 c585b490
......@@ -45,6 +45,7 @@ miguel@hegel.br
miguel@hegel.local
miguel@light.
miguel@light.local
mmatthew@markslaptop.
monty@bitch.mysql.fi
monty@butch.
monty@donna.mysql.fi
......@@ -67,6 +68,7 @@ paul@teton.kitebird.com
pem@mysql.com
peter@linux.local
peter@mysql.com
peterg@mysql.com
pgulutzan@linux.local
ram@mysql.r18.ru
ram@ram.(none)
......
This diff is collapsed.
......@@ -43,6 +43,7 @@ static const char* default_dbug_option = "d:t:o,/tmp/mysqlbinlog.trace";
void sql_print_error(const char *format, ...);
static bool one_database = 0;
static bool force_opt= 0;
static const char* database;
static bool short_form = 0;
static ulonglong offset = 0;
......@@ -73,6 +74,9 @@ static struct my_option my_long_options[] =
{"database", 'd', "List entries for just this database (local log only)",
(gptr*) &database, (gptr*) &database, 0, GET_STR_ALLOC, REQUIRED_ARG,
0, 0, 0, 0, 0, 0},
{"force-read", 'f', "Force reading unknown binlog events",
(gptr*) &force_opt, (gptr*) &force_opt, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
0, 0},
{"help", '?', "Display this help and exit",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"host", 'h', "Get the binlog from server", (gptr*) &host, (gptr*) &host,
......
......@@ -145,6 +145,9 @@ typedef uint rf_SetTimer;
#define USE_MB_IDENT 1
#define USE_STRCOLL 1
/* If LOAD DATA LOCAL INFILE should be enabled by default */
#define ENABLED_LOCAL_INFILE 1
/* Convert some simple functions to Posix */
#define sigset(A,B) signal((A),(B))
......
......@@ -659,10 +659,19 @@ Log_event* Log_event::read_log_event(const char* buf, int event_len,
}
if (!ev || !ev->is_valid())
{
*error= "Found invalid event in binary log";
delete ev;
#ifdef MYSQL_CLIENT
if (!force_opt)
{
*error= "Found invalid event in binary log";
return 0;
}
ev= new Unknown_log_event(buf, old_format);
#else
*error= "Found invalid event in binary log";
return 0;
#endif
}
ev->cached_event_len = event_len;
return ev;
}
......@@ -1695,6 +1704,17 @@ void Execute_load_log_event::pack_info(String* packet)
}
#endif
#ifdef MYSQL_CLIENT
void Unknown_log_event::print(FILE* file, bool short_form, char* last_db)
{
if (short_form)
return;
print_header(file);
fputc('\n', file);
fprintf(file, "# %s", "Unknown event\n");
}
#endif
#ifndef MYSQL_CLIENT
int Query_log_event::exec_event(struct st_relay_log_info* rli)
{
......
......@@ -201,10 +201,10 @@ struct sql_ex_info
enum Log_event_type
{
START_EVENT = 1, QUERY_EVENT =2, STOP_EVENT=3, ROTATE_EVENT = 4,
INTVAR_EVENT=5, LOAD_EVENT=6, SLAVE_EVENT=7, CREATE_FILE_EVENT=8,
APPEND_BLOCK_EVENT=9, EXEC_LOAD_EVENT=10, DELETE_FILE_EVENT=11,
NEW_LOAD_EVENT=12, RAND_EVENT=13
UNKNOWN_EVENT = 0, START_EVENT = 1, QUERY_EVENT =2, STOP_EVENT=3,
ROTATE_EVENT = 4, INTVAR_EVENT=5, LOAD_EVENT=6, SLAVE_EVENT=7,
CREATE_FILE_EVENT=8, APPEND_BLOCK_EVENT=9, EXEC_LOAD_EVENT=10,
DELETE_FILE_EVENT=11, NEW_LOAD_EVENT=12, RAND_EVENT=13
};
enum Int_event_type
......@@ -714,4 +714,18 @@ class Execute_load_log_event: public Log_event
int write_data(IO_CACHE* file);
};
#ifdef MYSQL_CLIENT
class Unknown_log_event: public Log_event
{
public:
Unknown_log_event(const char* buf, bool old_format):
Log_event(buf, old_format)
{}
~Unknown_log_event() {}
void print(FILE* file, bool short_form= 0, char* last_db= 0);
Log_event_type get_type_code() { return UNKNOWN_EVENT;}
bool is_valid() { return 1; }
};
#endif
#endif /* _log_event_h */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment