Fixed #29882 -- Added events and stored routines to MySQL's cloned test databases.

This commit is contained in:
thomazzo 2018-10-29 18:45:30 +00:00 committed by Tim Graham
parent 4f8f1b2f24
commit 9625d13f7b
1 changed files with 3 additions and 3 deletions

View File

@ -55,9 +55,9 @@ class DatabaseCreation(BaseDatabaseCreation):
self._clone_db(source_database_name, target_database_name) self._clone_db(source_database_name, target_database_name)
def _clone_db(self, source_database_name, target_database_name): def _clone_db(self, source_database_name, target_database_name):
dump_cmd = DatabaseClient.settings_to_cmd_args(self.connection.settings_dict) dump_args = DatabaseClient.settings_to_cmd_args(self.connection.settings_dict)[1:]
dump_cmd[0] = 'mysqldump' dump_args[-1] = source_database_name
dump_cmd[-1] = source_database_name dump_cmd = ['mysqldump', '--routines', '--events'] + dump_args
load_cmd = DatabaseClient.settings_to_cmd_args(self.connection.settings_dict) load_cmd = DatabaseClient.settings_to_cmd_args(self.connection.settings_dict)
load_cmd[-1] = target_database_name load_cmd[-1] = target_database_name