1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

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
This commit is contained in:
Sergei Golubchik
2016-12-03 20:34:50 +01:00
parent 952856c810
commit b5aa0f437f
5 changed files with 54 additions and 5 deletions

View File

@@ -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
};
/*