summaryrefslogtreecommitdiff
path: root/innobase/include
diff options
context:
space:
mode:
Diffstat (limited to 'innobase/include')
-rw-r--r--innobase/include/dyn0dyn.h3
-rw-r--r--innobase/include/mtr0log.h3
-rw-r--r--innobase/include/mtr0log.ic3
-rw-r--r--innobase/include/os0file.h4
-rw-r--r--innobase/include/page0page.ic15
-rw-r--r--innobase/include/srv0srv.h3
-rw-r--r--innobase/include/srv0start.h6
-rw-r--r--innobase/include/ut0dbg.h34
8 files changed, 62 insertions, 9 deletions
diff --git a/innobase/include/dyn0dyn.h b/innobase/include/dyn0dyn.h
index 501fde05e90..abee62300e3 100644
--- a/innobase/include/dyn0dyn.h
+++ b/innobase/include/dyn0dyn.h
@@ -47,7 +47,8 @@ dyn_array_open(
/*===========*/
/* out: pointer to the buffer */
dyn_array_t* arr, /* in: dynamic array */
- ulint size); /* in: size in bytes of the buffer */
+ ulint size); /* in: size in bytes of the buffer; MUST be
+ smaller than DYN_ARRAY_DATA_SIZE! */
/*************************************************************************
Closes the buffer returned by dyn_array_open. */
UNIV_INLINE
diff --git a/innobase/include/mtr0log.h b/innobase/include/mtr0log.h
index 41be168a371..9c9c6f696e8 100644
--- a/innobase/include/mtr0log.h
+++ b/innobase/include/mtr0log.h
@@ -111,7 +111,8 @@ mlog_open(
/*======*/
/* out: buffer, NULL if log mode MTR_LOG_NONE */
mtr_t* mtr, /* in: mtr */
- ulint size); /* in: buffer size in bytes */
+ ulint size); /* in: buffer size in bytes; MUST be
+ smaller than DYN_ARRAY_DATA_SIZE! */
/************************************************************
Closes a buffer opened to mlog. */
UNIV_INLINE
diff --git a/innobase/include/mtr0log.ic b/innobase/include/mtr0log.ic
index aa3f945c202..08d9a6448eb 100644
--- a/innobase/include/mtr0log.ic
+++ b/innobase/include/mtr0log.ic
@@ -18,7 +18,8 @@ mlog_open(
/*======*/
/* out: buffer, NULL if log mode MTR_LOG_NONE */
mtr_t* mtr, /* in: mtr */
- ulint size) /* in: buffer size in bytes */
+ ulint size) /* in: buffer size in bytes; MUST be
+ smaller than DYN_ARRAY_DATA_SIZE! */
{
dyn_array_t* mlog;
diff --git a/innobase/include/os0file.h b/innobase/include/os0file.h
index 6549a3748df..f1647c47bce 100644
--- a/innobase/include/os0file.h
+++ b/innobase/include/os0file.h
@@ -169,12 +169,12 @@ void
os_io_init_simple(void);
/*===================*/
/***************************************************************************
-Creates a temporary file. In case of error, causes abnormal termination. */
+Creates a temporary file. */
FILE*
os_file_create_tmpfile(void);
/*========================*/
- /* out: temporary file handle (never NULL) */
+ /* out: temporary file handle (never NULL) */
/***************************************************************************
The os_file_opendir() function opens a directory stream corresponding to the
directory named by the dirname argument. The directory stream is positioned
diff --git a/innobase/include/page0page.ic b/innobase/include/page0page.ic
index e7c0f8ee07c..3d2bf3b090e 100644
--- a/innobase/include/page0page.ic
+++ b/innobase/include/page0page.ic
@@ -479,7 +479,20 @@ page_rec_get_next(
offs = rec_get_next_offs(rec);
- ut_a(offs < UNIV_PAGE_SIZE);
+ if (offs >= UNIV_PAGE_SIZE) {
+ fprintf(stderr,
+"InnoDB: Next record offset is nonsensical %lu in record at offset %lu\n",
+ (ulong)offs, (ulong)(rec - page));
+ fprintf(stderr,
+"\nInnoDB: rec address %lx, first buffer frame %lx\n"
+"InnoDB: buffer pool high end %lx, buf fix count %lu\n",
+ (ulong)rec, (ulong)buf_pool->frame_zero,
+ (ulong)buf_pool->high_end,
+ (ulong)buf_block_align(rec)->buf_fix_count);
+ buf_page_print(page);
+
+ ut_a(0);
+ }
if (offs == 0) {
diff --git a/innobase/include/srv0srv.h b/innobase/include/srv0srv.h
index c7ba39aaaf1..2e42c2f5036 100644
--- a/innobase/include/srv0srv.h
+++ b/innobase/include/srv0srv.h
@@ -42,6 +42,7 @@ extern char* srv_arch_dir;
#endif /* UNIV_LOG_ARCHIVE */
extern ibool srv_file_per_table;
+extern ibool srv_locks_unsafe_for_binlog;
extern ulint srv_n_data_files;
extern char** srv_data_file_names;
@@ -98,6 +99,8 @@ extern lint srv_conc_n_threads;
extern ibool srv_fast_shutdown;
+extern ibool srv_innodb_status;
+
extern ibool srv_use_doublewrite_buf;
extern ibool srv_set_thread_priorities;
diff --git a/innobase/include/srv0start.h b/innobase/include/srv0start.h
index 0074de537c3..75af1a212b4 100644
--- a/innobase/include/srv0start.h
+++ b/innobase/include/srv0start.h
@@ -64,15 +64,17 @@ innobase_start_or_create_for_mysql(void);
/* out: DB_SUCCESS or error code */
/********************************************************************
Shuts down the Innobase database. */
-
int
innobase_shutdown_for_mysql(void);
/*=============================*/
/* out: DB_SUCCESS or error code */
-
extern dulint srv_shutdown_lsn;
extern dulint srv_start_lsn;
+#ifdef __NETWARE__
+void set_panic_flag_for_netware(void);
+#endif
+
extern ulint srv_sizeof_trx_t_in_ha_innodb_cc;
extern ibool srv_is_being_started;
diff --git a/innobase/include/ut0dbg.h b/innobase/include/ut0dbg.h
index a155f68bd12..5f30a894874 100644
--- a/innobase/include/ut0dbg.h
+++ b/innobase/include/ut0dbg.h
@@ -22,7 +22,38 @@ extern ulint* ut_dbg_null_ptr;
extern const char* ut_dbg_msg_assert_fail;
extern const char* ut_dbg_msg_trap;
extern const char* ut_dbg_msg_stop;
-
+/* Have a graceful exit on NetWare rather than a segfault to avoid abends */
+#ifdef __NETWARE__
+extern ibool panic_shutdown;
+#define ut_a(EXPR) do {\
+ if (!((ulint)(EXPR) + ut_dbg_zero)) {\
+ ut_print_timestamp(stderr);\
+ fprintf(stderr, ut_dbg_msg_assert_fail,\
+ os_thread_pf(os_thread_get_curr_id()), __FILE__,\
+ (ulint)__LINE__);\
+ fputs("InnoDB: Failing assertion: " #EXPR "\n", stderr);\
+ fputs(ut_dbg_msg_trap, stderr);\
+ ut_dbg_stop_threads = TRUE;\
+ if (ut_dbg_stop_threads) {\
+ fprintf(stderr, ut_dbg_msg_stop,\
+ os_thread_pf(os_thread_get_curr_id()), __FILE__, (ulint)__LINE__);\
+ }\
+ if(!panic_shutdown){\
+ panic_shutdown = TRUE;\
+ innobase_shutdown_for_mysql();}\
+ exit(1);\
+ }\
+} while (0)
+#define ut_error do {\
+ ut_print_timestamp(stderr);\
+ fprintf(stderr, ut_dbg_msg_assert_fail,\
+ os_thread_pf(os_thread_get_curr_id()), __FILE__, (ulint)__LINE__);\
+ fprintf(stderr, ut_dbg_msg_trap);\
+ ut_dbg_stop_threads = TRUE;\
+ if(!panic_shutdown){panic_shutdown = TRUE;\
+ innobase_shutdown_for_mysql();}\
+} while (0)
+#else
#define ut_a(EXPR) do {\
if (!((ulint)(EXPR) + ut_dbg_zero)) {\
ut_print_timestamp(stderr);\
@@ -49,6 +80,7 @@ extern const char* ut_dbg_msg_stop;
ut_dbg_stop_threads = TRUE;\
if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = NULL;\
} while (0)
+#endif
#ifdef UNIV_DEBUG
#define ut_ad(EXPR) ut_a(EXPR)