|
@@ -102,6 +102,7 @@ class MysqlHandler(MysqldumpHandler):
|
|
|
_rx_prog = re.compile(r'^((?:CREATE TABLE )|(?:INSERT INTO ))`(\w+)`')
|
|
_rx_prog = re.compile(r'^((?:CREATE TABLE )|(?:INSERT INTO ))`(\w+)`')
|
|
|
_log_all = LOG_PIPES_OUTPUT
|
|
_log_all = LOG_PIPES_OUTPUT
|
|
|
_action_name = "restoring"
|
|
_action_name = "restoring"
|
|
|
|
|
+ _last_logged = ""
|
|
|
|
|
|
|
|
def process(self, line):
|
|
def process(self, line):
|
|
|
""" Process the last line that was read
|
|
""" Process the last line that was read
|
|
@@ -110,10 +111,13 @@ class MysqlHandler(MysqldumpHandler):
|
|
|
if SHOW_PROGRESSION:
|
|
if SHOW_PROGRESSION:
|
|
|
match = self._rx_prog.search(line)
|
|
match = self._rx_prog.search(line)
|
|
|
if match:
|
|
if match:
|
|
|
- logger.debug('... %s %s %s', self._action_name,
|
|
|
|
|
- 'structure of' if 'CREATE' in match.group(1) else 'data of',
|
|
|
|
|
- match.group(2))
|
|
|
|
|
- print('.', end="", flush=True)
|
|
|
|
|
|
|
+ tname = match.group(2)
|
|
|
|
|
+ if tname != self._last_logged:
|
|
|
|
|
+ logger.debug('... %s %s %s', self._action_name,
|
|
|
|
|
+ 'structure of' if 'CREATE' in match.group(1) else 'data of',
|
|
|
|
|
+ tname)
|
|
|
|
|
+ print('.', end="", flush=True)
|
|
|
|
|
+ self._last_logged = tname
|
|
|
if self._log_all:
|
|
if self._log_all:
|
|
|
logger.debug(line)
|
|
logger.debug(line)
|
|
|
|
|
|
|
@@ -154,7 +158,7 @@ class MySqlServer:
|
|
|
user=self.username,
|
|
user=self.username,
|
|
|
password=self.password,
|
|
password=self.password,
|
|
|
autocommit=autocommit,
|
|
autocommit=autocommit,
|
|
|
- max_allowed_packet=MAX_ALLOWED_PACKET,
|
|
|
|
|
|
|
+ max_allowed_packet="32M",
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
if not self.cnn.open:
|
|
if not self.cnn.open:
|
|
@@ -299,7 +303,7 @@ class CloningOperation:
|
|
|
ready-to-consume list for Popen
|
|
ready-to-consume list for Popen
|
|
|
@see https://dev.mysql.com/doc/refman/8.0/en/mysql-command-options.html#option_mysql_quick
|
|
@see https://dev.mysql.com/doc/refman/8.0/en/mysql-command-options.html#option_mysql_quick
|
|
|
"""
|
|
"""
|
|
|
- init_command = "set global max_allowed_packet=1073741824;" \
|
|
|
|
|
|
|
+ init_command = f"set global max_allowed_packet={MAX_ALLOWED_PACKET};" \
|
|
|
"set global wait_timeout=28800;" \
|
|
"set global wait_timeout=28800;" \
|
|
|
"set global interactive_timeout=28800;"
|
|
"set global interactive_timeout=28800;"
|
|
|
|
|
|