Commit 685ca4d7 authored by unknown's avatar unknown
Browse files

Dump reject file before mysqltest in 'die'

Makes it easier to see what happened before the failure


client/mysqltest.c:
  Dump reject file before mysqltest in 'die'
parent fd6d45f0
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -573,6 +573,8 @@ static void die(const char *fmt, ...)
{
  va_list args;
  DBUG_ENTER("die");

  /* Print the error message */
  va_start(args, fmt);
  if (fmt)
  {
@@ -587,6 +589,15 @@ static void die(const char *fmt, ...)
    fflush(stderr);
  }
  va_end(args);

  /* Dump the result that has been accumulated so far to reject file */
  if (result_file && ds_res.length)
  {

    reject_dump(result_file, ds_res.str, ds_res.length);
  }

  /* Clean up and exit */
  free_used_memory();
  my_end(MY_CHECK_ERROR);
  exit(1);