summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-12-03 20:34:50 +0100
committerSergei Golubchik <serg@mariadb.org>2016-12-06 09:45:50 +0100
commitb5aa0f437fc595d508b9eb5d36185fd8cbaa62eb (patch)
tree303c8abb53b69d8d377dd97f3cc5ee4114f1d6ad /client
parent952856c810c7a44678960a455062531279ddf113 (diff)
downloadmariadb-git-b5aa0f437fc595d508b9eb5d36185fd8cbaa62eb.tar.gz
MDEV-11319 mysqlbinlog crashes or fails with out of memory while reading some encrypted binlogs
support encrypted binlogs. Not decryption, but at least recognizing that event are encrypted and prining them as such
Diffstat (limited to 'client')
-rw-r--r--client/mysqlbinlog.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc
index da41268ee19..e27a4a8e4e3 100644
--- a/client/mysqlbinlog.cc
+++ b/client/mysqlbinlog.cc
@@ -1257,6 +1257,9 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
goto err;
break;
}
+ case START_ENCRYPTION_EVENT:
+ glob_description_event->start_decryption((Start_encryption_log_event*)ev);
+ /* fall through */
default:
print_skip_replication_statement(print_event_info, ev);
ev->print(result_file, print_event_info);
@@ -2837,9 +2840,16 @@ void *sql_alloc(size_t size)
return alloc_root(&s_mem_root, size);
}
+uint dummy1() { return 1; }
struct encryption_service_st encryption_handler=
{
- 0, 0, 0, 0, 0, 0, 0
+ (uint(*)(uint))dummy1,
+ (uint(*)(uint, uint, uchar*, uint*))dummy1,
+ (uint(*)(uint, uint))dummy1,
+ (int (*)(void*, const uchar*, uint, const uchar*, uint, int, uint, uint))dummy1,
+ (int (*)(void*, const uchar*, uint, uchar*, uint*))dummy1,
+ (int (*)(void*, uchar*, uint*))dummy1,
+ (uint (*)(uint, uint, uint))dummy1
};
/*