Comment 5 for bug 717256

Revision history for this message
Peter Zaitsev (pz-percona) wrote : Re: [Bug 717256] Re: xtrabackup arguments are not validated

Yes... I understand. Though it can be generated automatically is not it ?

On Fri, Feb 11, 2011 at 12:34 PM, Vadim Tkachenko <email address hidden> wrote:

> Peter,
>
> I am afraid it is almost full list of mysqld options, which is about 150
> names.
>
>
> On Fri, Feb 11, 2011 at 12:24 PM, Peter Zaitsev <email address hidden> wrote:
> > Alexey,
> >
> > Should not we build a list of options which it needs to ignore ?
> >
> > On Fri, Feb 11, 2011 at 8:47 AM, Alexey Kopytov
> > <email address hidden>wrote:
> >
> >> I hit this bug too, but then realized it is an intended behavior. Since
> >> xtrabackup reads some of its options from my.cnf, it has to ignore all
> >> options it doesn't know.
> >>
> >> On the other hand, silently ignoring typos in command line options is
> >> definitely not a good idea for a backup utility. I am not sure how this
> >> can be resolved. One idea is to parse my.cnf with a custom parser rather
> >> than my_getopt.
> >>
> >> --
> >> You received this bug notification because you are a member of Percona
> >> developers, which is the registrant for Percona-XtraBackup.
> >> https://bugs.launchpad.net/bugs/717256
> >>
> >> Title:
> >> xtrabackup arguments are not validated
> >>
> >> Status in Open source backup tool for InnoDB and XtraDB:
> >> New
> >>
> >> Bug description:
> >> Have a look at the arguments I used. A typo in the arguments can cause
> >> wrong things to happen (--incremental-dir in this case)
> >> root@lesktop:/data/backups# xtrabackup --prepare --apply-log-only
> >> --target-dir=/data/backups/base_xtrabackup/
> >> --incremaaaal-dir=/data/backups/inc1/ --i-can-add --whatever-i-want
> >> xtrabackup Ver 1.4 Rev 193 for 5.1.47 unknown-linux-gnu (x86_64)
> >> xtrabackup: cd to /data/backups/base_xtrabackup/
> >> xtrabackup: This target seems to be already prepared.
> >> xtrabackup: notice: xtrabackup_logfile was already used to '--prepare'.
> >> xtrabackup: Temporary instance for recovery is set as followings.
> >> xtrabackup: innodb_data_home_dir = ./
> >> xtrabackup: innodb_data_file_path = ibdata1:10M:autoextend
> >> xtrabackup: innodb_log_group_home_dir = ./
> >> xtrabackup: innodb_log_files_in_group = 2
> >> xtrabackup: innodb_log_file_size = 5242880
> >> xtrabackup: Starting InnoDB instance for recovery.
> >> xtrabackup: Using 104857600 bytes for buffer pool (set by --use-memory
> >> parameter)
> >> InnoDB: The InnoDB memory heap is disabled
> >> InnoDB: Mutexes and rw_locks use GCC atomic builtins
> >> InnoDB: Compressed tables use zlib 1.2.3
> >> 110211 17:25:22 InnoDB: highest supported file format is Barracuda
>
> --
> You received this bug notification because you are a member of Percona
> developers, which is the registrant for Percona-XtraBackup.
> https://bugs.launchpad.net/bugs/717256
>
> Title:
> xtrabackup arguments are not validated
>
> Status in Open source backup tool for InnoDB and XtraDB:
> New
>
> Bug description:
> Have a look at the arguments I used. A typo in the arguments can cause
> wrong things to happen (--incremental-dir in this case)
> root@lesktop:/data/backups# xtrabackup --prepare --apply-log-only
> --target-dir=/data/backups/base_xtrabackup/
> --incremaaaal-dir=/data/backups/inc1/ --i-can-add --whatever-i-want
> xtrabackup Ver 1.4 Rev 193 for 5.1.47 unknown-linux-gnu (x86_64)
> xtrabackup: cd to /data/backups/base_xtrabackup/
> xtrabackup: This target seems to be already prepared.
> xtrabackup: notice: xtrabackup_logfile was already used to '--prepare'.
> xtrabackup: Temporary instance for recovery is set as followings.
> xtrabackup: innodb_data_home_dir = ./
> xtrabackup: innodb_data_file_path = ibdata1:10M:autoextend
> xtrabackup: innodb_log_group_home_dir = ./
> xtrabackup: innodb_log_files_in_group = 2
> xtrabackup: innodb_log_file_size = 5242880
> xtrabackup: Starting InnoDB instance for recovery.
> xtrabackup: Using 104857600 bytes for buffer pool (set by --use-memory
> parameter)
> InnoDB: The InnoDB memory heap is disabled
> InnoDB: Mutexes and rw_locks use GCC atomic builtins
> InnoDB: Compressed tables use zlib 1.2.3
> 110211 17:25:22 InnoDB: highest supported file format is Barracuda.
>
> [notice (again)]
> If you use binary log and don't use any hack of group commit,
> the binary log position seems to be:
> InnoDB: Last MySQL binlog file position 0 61013, file name
> /var/log/mysql/mysql-bin.000117
>
> xtrabackup: starting shutdown with innodb_fast_shutdown = 1
> 110211 17:25:22 InnoDB: Starting shutdown...
> 110211 17:25:22 InnoDB: Shutdown completed; log sequence number
> 4960382476
>
>
> Expected behavior: bail out when invalid arguments are added.
>
>
>

--
Peter Zaitsev, CEO, Percona Inc.
Tel: +1 888 401 3401 ext 501 Skype: peter_zaitsev
24/7 Emergency Line +1 888 401 3401 ext 911

Join us for Percona Live Event, San Francisco, Feb 16
http://www.percona.com/events/percona-live-san-francisco-2011/