Protect from empty --query argument

parent 52c9feff
...@@ -1038,7 +1038,7 @@ run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit) ...@@ -1038,7 +1038,7 @@ run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit)
case 0: case 0:
/* child */ /* child */
DBUG_PRINT("info", ("fork returned 0, calling task(\"%s\"), pid %d gid %d", DBUG_PRINT("info", ("fork returned 0, calling task(\"%s\"), pid %d gid %d",
stmts->string, pid, getgid())); stmts ? stmts->string : "", pid, getgid()));
if (verbose >= 2) if (verbose >= 2)
fprintf(stderr, fprintf(stderr,
"%s: fork returned 0, calling task pid %d gid %d\n", "%s: fork returned 0, calling task pid %d gid %d\n",
...@@ -1124,7 +1124,7 @@ run_task(thread_context *con) ...@@ -1124,7 +1124,7 @@ run_task(thread_context *con)
statement *ptr; statement *ptr;
DBUG_ENTER("run_task"); DBUG_ENTER("run_task");
DBUG_PRINT("info", ("task script \"%s\"", con->stmt->string)); DBUG_PRINT("info", ("task script \"%s\"", con->stmt ? con->stmt->string : ""));
if (!(mysql= mysql_init(NULL))) if (!(mysql= mysql_init(NULL)))
goto end; goto end;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment