Commit f81f985f authored by Sergei Golubchik's avatar Sergei Golubchik

fix conpilation on OpenBSD

parent 39ec5ac4
...@@ -64,13 +64,13 @@ extern "C" sig_handler handle_fatal_signal(int sig) ...@@ -64,13 +64,13 @@ extern "C" sig_handler handle_fatal_signal(int sig)
struct tm tm; struct tm tm;
#ifdef HAVE_STACKTRACE #ifdef HAVE_STACKTRACE
THD *thd; THD *thd;
#endif
/* /*
This flag remembers if the query pointer was found invalid. This flag remembers if the query pointer was found invalid.
We will try and print the query at the end of the signal handler, in case We will try and print the query at the end of the signal handler, in case
we're wrong. we're wrong.
*/ */
bool print_invalid_query_pointer= false; bool print_invalid_query_pointer= false;
#endif
if (segfaulted) if (segfaulted)
{ {
...@@ -265,6 +265,7 @@ extern "C" sig_handler handle_fatal_signal(int sig) ...@@ -265,6 +265,7 @@ extern "C" sig_handler handle_fatal_signal(int sig)
"\"mlockall\" bugs.\n"); "\"mlockall\" bugs.\n");
} }
#ifdef HAVE_STACKTRACE
if (print_invalid_query_pointer) if (print_invalid_query_pointer)
{ {
my_safe_printf_stderr( my_safe_printf_stderr(
...@@ -274,6 +275,7 @@ extern "C" sig_handler handle_fatal_signal(int sig) ...@@ -274,6 +275,7 @@ extern "C" sig_handler handle_fatal_signal(int sig)
my_write_stderr(thd->query(), MY_MIN(65536U, thd->query_length())); my_write_stderr(thd->query(), MY_MIN(65536U, thd->query_length()));
my_safe_printf_stderr("\n\n"); my_safe_printf_stderr("\n\n");
} }
#endif
#ifdef HAVE_WRITE_CORE #ifdef HAVE_WRITE_CORE
if (test_flags & TEST_CORE_ON_SIGNAL) if (test_flags & TEST_CORE_ON_SIGNAL)
......
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