Skip to content

Commit

Permalink
mxqd: Do not disconnect from mysql before helper call
Browse files Browse the repository at this point in the history
The helpers are trusted code, they won't do something nasty with the
connected mysql socket. So don't disconnect from and reconnect to the
mysql server when we call the tmpdir-setup helper.
  • Loading branch information
donald committed May 5, 2022
1 parent 40de658 commit 84a66e4
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions mxqd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1308,7 +1308,6 @@ static unsigned long start_job(struct mxq_group_list *glist)
}

if (group->job_tmpdir_size > 0) {
mx_mysql_disconnect(server->mysql);
char *argv[] = {
tmpdir_script,
"create",
Expand All @@ -1321,7 +1320,6 @@ static unsigned long start_job(struct mxq_group_list *glist)
free(argv[2]);
free(argv[3]);
free(argv[4]);
mx_mysql_connect_forever(&(server->mysql));
if (status == -1) {
mx_log_err("create job tmpdir: %m");
mxq_unload_job_from_server(server->mysql, job->job_id);
Expand Down

0 comments on commit 84a66e4

Please sign in to comment.