fix: avoid tablespace privilege requirement during init backup
This commit is contained in:
parent
e308a6a7f2
commit
26bcd97d15
@ -949,6 +949,7 @@ def backup_mysql_database(settings: object, output_dir: str | Path) -> str:
|
||||
f"--defaults-extra-file={defaults_path}",
|
||||
f"--result-file={backup_path}",
|
||||
"--single-transaction",
|
||||
"--no-tablespaces",
|
||||
"--routines",
|
||||
"--triggers",
|
||||
database,
|
||||
|
||||
@ -194,6 +194,7 @@ class SystemInitializerResetTest(unittest.TestCase):
|
||||
|
||||
self.assertTrue(backup_path.endswith(".sql"))
|
||||
self.assertEqual(len(commands), 1)
|
||||
self.assertIn("--no-tablespaces", commands[0])
|
||||
self.assertFalse(any("secret" in part for part in commands[0]))
|
||||
defaults_arg = next(part for part in commands[0] if part.startswith("--defaults-extra-file="))
|
||||
self.assertFalse(Path(defaults_arg.split("=", 1)[1]).exists())
|
||||
|
||||
Loading…
Reference in New Issue
Block a user