Description:
When running MEB using 3.6 version, we need to specify the --backup-dir option
so that contents and files are copied to that directory.
But if no value is mentioned, backup-dir takes the current working directory as
backup directory and copies the files there.
As per design, --backup-dir should not take any default value and copy files
there. Instead it should issue an error message as "Backup directory name
missing" or something similar.
I used the latest MEB 3.6 version from "bzrroot/meb/sbin-repo/single-bin" repo
How to repeat:
I executed the test from
/export/home/tmp/mysql-5.1-meb-testing/mysql-test$
$MYSQLBACKUP --port=13000 --protocol=tcp --user=root --backup-dir= backup
The above command will pass and backup logs will be produced where it specifies that "Existing backup dir '/export/home2/tmp/mysql-5.1-meb-testing/mysql-test/' will be reused"
If you notice above, the current working directory or from the place where the
test is executed is taken as backup directory if no value is mentioned for
backup-dir option.
The contents are copied in mysql-test dir
backup-my.cnf db1 mtr
ibbackup_logfile
ibdata1
ibdata2
...
...
Suggested fix:
Ideally if no value is specified, backup should error out and not take the 'pwd' as backup directory.