From: Date: June 30 2008 3:22am Subject: [patch 08/10] WL4271 Encrypted online backup: encrypted restore syntax List-Archive: http://lists.mysql.com/internals/35766 Message-Id: <20080630012612.578639919@flamingspork.com> --- 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