I recently added a global variable in mmy.cnf max_statement_time=120 ; to stop long running queries and to throw an exception. Its working fine. Then I am unable to run mysqldump for backing up all my databases , obviously its true that we have large databases so backing up using mysqldump will take hours since here I have added max_statement_time to 120 seconds only. So how I can pass this as a session variable thru mysqldump to set it to hours just for mysqldump and still global value remains 120 seconds itself. Apparently I am after something like below :
mysqldump --max_statement_time=1000000 -u root -pMYPASS --all-databases > file.sql
Do we have any option there ? I went thru the mysqldump and found that it has --variable-name=value , but its not accepting this. I am using Mariadb 10.2 version.
MAX_STATEMENT_TIME
does that take precedence over the global variable? Otherwise a creating a feature task of--dump-variable=value
seems like sane feature request.