List:Internals« Previous MessageNext Message »
From:stewart Date:June 30 2008 3:22am
Subject:[patch 08/10] WL4271 Encrypted online backup: encrypted restore syntax
View as plain text  
---
 mysql-test/r/backup_encrypted_syntax_basic.result |    3 +++
 mysql-test/t/backup_encrypted_syntax_basic.test   |    3 +++
 sql/sql_yacc.yy                                   |    8 ++++++++
 3 files changed, 14 insertions(+)

Index: stew-encrypted-backup/mysql-test/t/backup_encrypted_syntax_basic.test
===================================================================
--- stew-encrypted-backup.orig/mysql-test/t/backup_encrypted_syntax_basic.test	2008-06-26
03:09:27.899623071 +1000
+++ stew-encrypted-backup/mysql-test/t/backup_encrypted_syntax_basic.test	2008-06-26
13:31:22.016045654 +1000
@@ -11,6 +11,9 @@ BACKUP DATABASE test TO 'test4.ba' ENCRY
 --error 1235
 BACKUP DATABASE test TO 'test5.ba' ENCRYPTION_ALGORITHM=aes ENCRYPTION_KEYSIZE=128
ENCRYPTION_KEYFILE='foo.key';
 
+use test;
+--error 1630
+RESTORE FROM 'test4.ba' ENCRYPTION_ALGORITHM=aes PASSWORD='pants';
 
 --remove_file $MYSQLTEST_VARDIR/master-data/test.ba
 
Index: stew-encrypted-backup/sql/sql_yacc.yy
===================================================================
--- stew-encrypted-backup.orig/sql/sql_yacc.yy	2008-06-26 02:57:11.870619695 +1000
+++ stew-encrypted-backup/sql/sql_yacc.yy	2008-06-26 13:31:22.024066918 +1000
@@ -6294,6 +6294,10 @@ restore:
           RESTORE_SYM
           FROM
           TEXT_STRING_sys
+	  opt_encryption_algorithm
+	  opt_encryption_keysize
+	  opt_encryption_keyfile
+	  opt_encryption_password
           {
             LEX *lex= Lex;
             if (lex->sphead)
@@ -6304,6 +6308,10 @@ restore:
             lex->sql_command = SQLCOM_RESTORE;
             lex->db_list.empty();
             lex->backup_dir = $3; 
+	    lex->encryption_algorithm= $4;
+	    lex->encryption_keysize= $5;
+	    lex->encryption_keyfile= $6;
+	    lex->encryption_password= $7;
           }
         ;
 
Index: stew-encrypted-backup/mysql-test/r/backup_encrypted_syntax_basic.result
===================================================================
---
stew-encrypted-backup.orig/mysql-test/r/backup_encrypted_syntax_basic.result	2008-06-26
13:19:03.739047538 +1000
+++ stew-encrypted-backup/mysql-test/r/backup_encrypted_syntax_basic.result	2008-06-26
13:31:22.024066918 +1000
@@ -12,3 +12,6 @@ backup_id
 5
 BACKUP DATABASE test TO 'test5.ba' ENCRYPTION_ALGORITHM=aes ENCRYPTION_KEYSIZE=128
ENCRYPTION_KEYFILE='foo.key';
 ERROR 42000: This version of MySQL doesn't yet support 'Encryption with keyfile'
+use test;
+RESTORE FROM 'test4.ba' ENCRYPTION_ALGORITHM=aes PASSWORD='pants';
+ERROR HY000: Can't read backup location 'test4.ba'

-- 
Stewart Smith
Thread
[patch 00/10] Encrypted online backupstewart30 Jun
  • [patch 01/10] Bug #37654 lex backup_compression not being set when no compressionstewart30 Jun
  • [patch 02/10] Basic backup and restore teststewart30 Jun
  • [patch 03/10] WL4271: Encrypted Online Backup: add symbols to parserstewart30 Jun
  • [patch 05/10] WL4271 Encrypted online backup: display correct message for no yassl/not implementedstewart30 Jun
  • [patch 04/10] WL4271 Encrypted online backup: pass encryption information to backup kernel, return ER_NOT_SUPPORTED_YETstewart30 Jun
  • [patch 06/10] WL4271 Encrypted online backup: my_crypt_io: an IO abstraction allowing for filteringstewart30 Jun
  • [patch 08/10] WL4271 Encrypted online backup: encrypted restore syntaxstewart30 Jun
  • [patch 07/10] WL4271 Encrytped backup: implement basic AES Encyrptionstewart30 Jun
  • [patch 09/10] WL4271 Encrypted online backup: pass restore options to backup kernelstewart30 Jun
  • [patch 10/10] WL4271 Encrypted online backup: decrypt encrytped backupstewart30 Jun