Debian Codegraph @

mysql-test/suite/ndb/r/backup_passwords.result

raw
1 # backup_password.txt will contain password and os dependent line ending.
2
3 # --decrypt-password=SECRET will not be used since input file is not
4 # encrypted, but will cause warning.
5 # Command will create a file encrypted with password from stdin without
6 # line ending.
7 ndbxfrm: [Warning] Using a password on the command line interface can be insecure.
8
9 # Encrypt also a backup data file - to be able to do restore later
10 # With same password given in different way, also compress just for
11 # some variation, will show up in ndbxfrm --info later.
12 ndbxfrm: [Warning] Using a password on the command line interface can be insecure.
13
14 # Encrypt also a backup log file - to be able to do restore later
15
16 # Check that new files are encrypted, and old files are not.
17 # One can note that of the new files only data file is compressed.
18 # Later restore will handle both compressed and uncompressed files.
19 File=NDB_SAVED_BACKUPS/undo_backup/BACKUP-1-PART-1-OF-4/BACKUP-1.1.ctl, compression=yes, encryption=no
20 File=NDB_SAVED_BACKUPS/undo_backup/BACKUP-1-PART-1-OF-4/BACKUP-1-0.1.Data, compression=yes, encryption=no
21 File=NDB_SAVED_BACKUPS/undo_backup/BACKUP-1-PART-1-OF-4/BACKUP-1.1.log, compression=no, encryption=no
22 File=MYSQL_TMP_DIR/BACKUP-1.1.ctl, compression=no, encryption=yes
23 File=MYSQL_TMP_DIR/BACKUP-1-0.1.Data, compression=yes, encryption=yes
24 File=MYSQL_TMP_DIR/BACKUP-1.1.log, compression=no, encryption=yes
25
26 # Verify that ndb_print_backup_file can decrypt file using the TOPSECRET
27 # password, given on command line to ensure no line ending. This also
28 # verifies that reading password from stdin do not include the line
29 # endings in password.
30 ndb_print_backup_file: [Warning] Using a password on the command line interface can be insecure.
31
32 # Do restore using the new encrypted files.
33 # extra_encrypted_backup.cnf specifies backup-password for ndb_restore,
34 # need to skip that for --backup-password not conflict with
35 # --backup-password-from-stdin.
36 # Trigger sync of created logfile group, tablespace, and, tables to be
37 # recognized by MySQL server.
38 SET GLOBAL ndb_metadata_sync=ON;
39
40 # Pass two passwords via stdin.
41 # Passing file with one password.
42 Error: encrypt password has no end.
43
44 # Pass two passwords via stdin.
45 # Passing file with two passwords.
46
47 # Pass one passwords via stdin.
48 # Passing file with one password without any new line character.
49 select "TOPSECRET-NO-NL" into dumpfile "NDB_PASSWORD_DIR/backup_password_no_nl.txt";
50 Error: decrypt password has no end.
51
52 # Pass a too long passwords via stdin.
53 select repeat("TOPSECRET", 60) into outfile "NDB_PASSWORD_DIR/backup_password_long.txt";
54 Error: Can not read file MYSQL_TMP_DIR/BACKUP-1.1.ctl, bad password or key?
55
56 # Pass a too long passwords via stdin.
57 select repeat("TOPSECRET", 120) into outfile "NDB_PASSWORD_DIR/backup_password_long2.txt";
58 Error: decrypt password too long.
59
60 # Pass a passwords with control character (ctrl-V) via stdin.
61 select char(22) into outfile "NDB_PASSWORD_DIR/backup_password_ctrl.txt";
62 ndbxfrm: [Warning] Using a password on the command line interface can be insecure.
63 Error: encrypt password has some bad character.
64
65 # Pass wrong passwords
66 ndbxfrm: [Warning] Using a password on the command line interface can be insecure.
67 Error: Can not read file MYSQL_TMP_DIR/BACKUP-1.1.ctl, bad password or key?
68
69 # Wait for schema synchronization to finish.
70
71 # Drop tables, tablespace and logfile group created by restore.
72 DROP TABLE test . t_gis;
73 DROP TABLE test . t_num;
74 DROP TABLE test . t_string_1;
75 DROP TABLE test . t_string_2;
76 DROP TABLE test . t_string_3;
77 DROP TABLE test . t_string_4;
78 DROP TABLE test . t_string_5;
79 DROP TABLE test . t_datetime;
80 ALTER TABLESPACE ts1 DROP DATAFILE 'datafile.dat';
81 DROP TABLESPACE ts1;
82 DROP LOGFILE GROUP lg1 ENGINE NDBCLUSTER;
83
84 # Test ended, cleanup files.