Skip to content

Commit

Permalink
Add hex-blob arg to mysqldump
Browse files Browse the repository at this point in the history
  • Loading branch information
CBroz1 committed Oct 31, 2024
1 parent 93a3222 commit 1883fee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/spyglass/utils/sql_helper_fn.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,11 @@ def _write_sql_cnf(self):

def _cmd_prefix(self, docker_id=None):
"""Get prefix for mysqldump command. Includes docker exec if needed."""
default = "mysqldump --hex-blob "
if not docker_id:
return "mysqldump "
return default
return (
f"docker exec -i {docker_id} \\\n\tmysqldump "
f"docker exec -i {docker_id} \\\n\t{default}"
+ "-u {user} --password={password} \\\n\t".format(
**self._get_credentials()
)
Expand Down

0 comments on commit 1883fee

Please sign in to comment.