summaryrefslogtreecommitdiff
path: root/sql/rpl_parallel.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-09-02 09:58:08 +0200
committerSergei Golubchik <serg@mariadb.org>2015-09-04 10:33:55 +0200
commitb85a00161e91080cb82b99e812c18eafb6467737 (patch)
tree3b502db8d25f0eb0a93901e3417d097626ecf8ea /sql/rpl_parallel.cc
parent41d68cabee1d9c2a8e8c7a006b17070392a85ed7 (diff)
downloadmariadb-git-b85a00161e91080cb82b99e812c18eafb6467737.tar.gz
MDEV-8264 encryption for binlog
* Start_encryption_log_event * --encrypt-binlog command line option based on google patches.
Diffstat (limited to 'sql/rpl_parallel.cc')
-rw-r--r--sql/rpl_parallel.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/sql/rpl_parallel.cc b/sql/rpl_parallel.cc
index 8703ee4ff0c..844c3a3c4f8 100644
--- a/sql/rpl_parallel.cc
+++ b/sql/rpl_parallel.cc
@@ -570,16 +570,26 @@ do_retry:
err= 1;
goto check_retry;
}
+ description_event->reset_crypto();
/* Loop to try again on the new log file. */
}
event_type= ev->get_type_code();
if (event_type == FORMAT_DESCRIPTION_EVENT)
{
+ Format_description_log_event *newde= (Format_description_log_event*)ev;
+ newde->copy_crypto_data(description_event);
delete description_event;
- description_event= (Format_description_log_event *)ev;
+ description_event= newde;
continue;
- } else if (!Log_event::is_group_event(event_type))
+ }
+ else if (event_type == START_ENCRYPTION_EVENT)
+ {
+ description_event->start_decryption((Start_encryption_log_event*)ev);
+ delete ev;
+ continue;
+ }
+ else if (!Log_event::is_group_event(event_type))
{
delete ev;
continue;