Commit 76a11195 authored by unknown's avatar unknown

InnoDB: Fix ut0dbg compilation errors on NetWare


innobase/dict/dict0boot.c:
  Remove dummy code to work around bug in the pgcc compiler.
innobase/include/ut0dbg.h:
  UT_DBG_PANIC: Avoid exit(), as lexyy.c re-#defines exit().
  Move the code to the function ut_dbg_panic() instead.
innobase/ut/ut0dbg.c:
  [__NETWARE__] Add function ut_dbg_panic()
parent 5fed4f3a
...@@ -66,15 +66,6 @@ dict_hdr_get_new_id( ...@@ -66,15 +66,6 @@ dict_hdr_get_new_id(
dict_hdr = dict_hdr_get(&mtr); dict_hdr = dict_hdr_get(&mtr);
id = mtr_read_dulint(dict_hdr + type, &mtr); id = mtr_read_dulint(dict_hdr + type, &mtr);
/* Add some dummy code here because otherwise pgcc seems to
compile wrong */
if (0 == ut_dulint_cmp(id, ut_dulint_max)) {
/* TO DO: remove this code, or make it conditional */
ut_dbg_null_ptr = 0;
}
id = ut_dulint_add(id, 1); id = ut_dulint_add(id, 1);
mlog_write_dulint(dict_hdr + type, id, &mtr); mlog_write_dulint(dict_hdr + type, id, &mtr);
......
...@@ -36,12 +36,8 @@ ut_dbg_assertion_failed( ...@@ -36,12 +36,8 @@ ut_dbg_assertion_failed(
On NetWare, have a graceful exit rather than a segfault to avoid abends. */ On NetWare, have a graceful exit rather than a segfault to avoid abends. */
extern ibool panic_shutdown; extern ibool panic_shutdown;
/* Abort the execution. */ /* Abort the execution. */
# define UT_DBG_PANIC \ void ut_dbg_panic(void);
if (!panic_shutdown){ \ # define UT_DBG_PANIC ut_dbg_panic()
panic_shutdown = TRUE; \
innobase_shutdown_for_mysql(); \
} \
exit(1)
/* Stop threads in ut_a(). */ /* Stop threads in ut_a(). */
# define UT_DBG_STOP while (0) /* We do not do this on NetWare */ # define UT_DBG_STOP while (0) /* We do not do this on NetWare */
#else /* __NETWARE__ */ #else /* __NETWARE__ */
......
...@@ -59,7 +59,21 @@ ut_dbg_assertion_failed( ...@@ -59,7 +59,21 @@ ut_dbg_assertion_failed(
ut_dbg_stop_threads = TRUE; ut_dbg_stop_threads = TRUE;
} }
#ifndef __NETWARE__ #ifdef __NETWARE__
/*****************************************************************
Shut down MySQL/InnoDB after assertion failure. */
void
ut_dbg_panic(void)
/*==============*/
{
if (!panic_shutdown) {
panic_shutdown = TRUE;
innobase_shutdown_for_mysql();
}
exit(1);
}
#else /* __NETWARE__ */
/***************************************************************** /*****************************************************************
Stop a thread after assertion failure. */ Stop a thread after assertion failure. */
......
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