[MDEV-18702] mysqldump should use max_statement_time=0 and/or allow setting one Created: 2019-02-23  Updated: 2022-08-04  Resolved: 2022-08-02

Status: Closed
Project: MariaDB Server
Component/s: Scripts & Clients
Fix Version/s: 10.3.36, 10.4.26, 10.5.17, 10.6.9, 10.7.5, 10.8.4, 10.9.2, 10.10.1

Type: Task Priority: Minor
Reporter: Ralf Becker Assignee: Daniel Black
Resolution: Fixed Votes: 2
Labels: beginner-friendly, foundation, max_statement_time, mysqldump

Issue Links:
Duplicate
is duplicated by MDEV-29100 mysqldump: unknown variable 'max-stat... Closed

 Description   

If you have a global max_statement_time set, mysqldump might fail, as the dump takes longer. Unfortunately there is no way to specify a max_statement_time for mysqldump.

Solution would be:
a) use a session max_statement_time=0
b) add a --max-statement-time option to mysqldump to overwrite the default
c) allow to run an arbitrary query before the dump to eg. set session max_statement_time

Ralf



 Comments   
Comment by Daniel Black [ 2022-07-08 ]

For reference mariabackup does this unconditionally:

extra/mariabackup/backup_mysql.cc:      xb_mysql_query(connection, "SET SESSION wait_timeout=2147483, max_statement_time=0",

Comment by Daniel Black [ 2022-07-29 ]

rucha174, can I get a review request on #2212 please.

Generated at Thu Feb 08 08:46:05 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.