seem the pt-archiver where condition cannot including space

seem the pt-archiver where condition cannot including space
have tried this condition and show me the an error

–where delete_timestamp < ADDDATE(LAST_DAY(SUBDATE(now(), INTERVAL 3 MONTH)), 1)

Usage: pt-archiver [OPTIONS] --source DSN --where WHERE

Errors in command-line arguments:

  • Unrecognized command-line options < ADDDATE(LAST_DAY(SUBDATE(now(), INTERVAL 3 MONTH)), 1)

pt-archiver nibbles records from a MySQL table. The --source and --dest
arguments use DSN syntax; if COPY is yes, --dest defaults to the key’s value
from --source. For more details, please use the --help option, or try ‘perldoc
/opt/mysqlapp/PerconaTool/percona-toolkit-2.2.16/bin/pt-archiver’ for complete
documentation.

But, If change the condition under will work

–where delete_timestamp < ADDDATE(LAST_DAY(SUBDATE(now(),90)), 1)

Hi CharlieCao;

Try putting quotations around it:

–where “delete_timestamp < ADDDATE(LAST_DAY(SUBDATE(now(), INTERVAL 3 MONTH)), 1)”

-Scott

Hi Scott,
I tried what your suggestion using quote in where condition but, got same issue:

306 --dry-run --where “delete_timestamp < ADDDATE(LAST_DAY(SUBDATE(now(),interval 3 month)), 1)”
Usage: pt-archiver [OPTIONS] --source DSN --where WHERE

Errors in command-line arguments:

  • Unrecognized command-line options < ADDDATE(LAST_DAY(SUBDATE(now(),interval 3 month)), 1)"

pt-archiver nibbles records from a MySQL table. The --source and --dest
arguments use DSN syntax; if COPY is yes, --dest defaults to the key’s value
from --source. For more details, please use the --help option, or try ‘perldoc
/opt/mysqlapp/PerconaTool/percona-toolkit-2.2.16/bin/pt-archiver’ for complete
documentation.

en, add the quote do solved the problem. but I still have an issue to write into shell script. that’s should be fine at least which is working manual write the command line.
Thanks Scott for your help!