summaryrefslogtreecommitdiff
path: root/storage/innobase/include
diff options
context:
space:
mode:
authorunknown <aivanov@mysql.com>2006-04-26 08:30:37 +0400
committerunknown <aivanov@mysql.com>2006-04-26 08:30:37 +0400
commit67d23360d791b86a0f82fef56b80c7884ea0dede (patch)
treef6f9823c53befea7e0c9ba768102a4be32689bf3 /storage/innobase/include
parentf13569a76b996816657e4526898b59c42d545a2c (diff)
downloadmariadb-git-67d23360d791b86a0f82fef56b80c7884ea0dede.tar.gz
Applied innodb-5.1-ss492 snapshot.
* Fix BUG#19217 "dict_load_indexes() may read the delete-mark incorrectly". * Remove obsolete and unused variables from srv0srv.c. * Remove srv_sys->operational since it is unused. * Make thread_id parameter in os_thread_create() optional. * Add platform-specific os_thread_ret_t and OS_THREAD_DUMMY_RETURN, and convert thread start functions to use them. storage/innobase/dict/dict0dict.c: Applied innodb-5.1-ss492 snapshot. storage/innobase/dict/dict0load.c: Applied innodb-5.1-ss492 snapshot. dict_load_indexes(): pass comp=0 to rec_get_deleted_flag(), because SYS_INDEXES always is in ROW_FORMAT=REDUNDANT (Bug #19217). storage/innobase/include/os0thread.h: Applied innodb-5.1-ss492 snapshot. storage/innobase/include/srv0srv.h: Applied innodb-5.1-ss492 snapshot. storage/innobase/include/trx0roll.h: Applied innodb-5.1-ss492 snapshot. storage/innobase/include/univ.i: Applied innodb-5.1-ss492 snapshot. storage/innobase/log/log0recv.c: Applied innodb-5.1-ss492 snapshot. storage/innobase/os/os0thread.c: Applied innodb-5.1-ss492 snapshot. storage/innobase/que/que0que.c: Applied innodb-5.1-ss492 snapshot. storage/innobase/srv/srv0srv.c: Applied innodb-5.1-ss492 snapshot. storage/innobase/srv/srv0start.c: Applied innodb-5.1-ss492 snapshot. storage/innobase/trx/trx0roll.c: Applied innodb-5.1-ss492 snapshot.
Diffstat (limited to 'storage/innobase/include')
-rw-r--r--storage/innobase/include/os0thread.h2
-rw-r--r--storage/innobase/include/srv0srv.h42
-rw-r--r--storage/innobase/include/trx0roll.h6
-rw-r--r--storage/innobase/include/univ.i12
4 files changed, 17 insertions, 45 deletions
diff --git a/storage/innobase/include/os0thread.h b/storage/innobase/include/os0thread.h
index 4685ffad351..3cf05feb3a9 100644
--- a/storage/innobase/include/os0thread.h
+++ b/storage/innobase/include/os0thread.h
@@ -77,7 +77,7 @@ os_thread_create(
void* arg, /* in: argument to start
function */
os_thread_id_t* thread_id); /* out: id of the created
- thread */
+ thread, or NULL */
int
os_thread_join(
/*===========*/
diff --git a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h
index 906f0e3875c..ff82cb2999a 100644
--- a/storage/innobase/include/srv0srv.h
+++ b/storage/innobase/include/srv0srv.h
@@ -157,33 +157,12 @@ extern ulint srv_pool_size;
extern ulint srv_mem_pool_size;
extern ulint srv_lock_table_size;
-extern ulint srv_sim_disk_wait_pct;
-extern ulint srv_sim_disk_wait_len;
-extern ibool srv_sim_disk_wait_by_yield;
-extern ibool srv_sim_disk_wait_by_wait;
-
-extern ibool srv_measure_contention;
-extern ibool srv_measure_by_spin;
-
extern ibool srv_print_thread_releases;
extern ibool srv_print_lock_waits;
extern ibool srv_print_buf_io;
extern ibool srv_print_log_io;
-extern ibool srv_print_parsed_sql;
extern ibool srv_print_latch_waits;
-extern ibool srv_test_nocache;
-extern ibool srv_test_cache_evict;
-
-extern ibool srv_test_extra_mutexes;
-extern ibool srv_test_sync;
-extern ulint srv_test_n_threads;
-extern ulint srv_test_n_loops;
-extern ulint srv_test_n_free_rnds;
-extern ulint srv_test_n_reserved_rnds;
-extern ulint srv_test_n_mutexes;
-extern ulint srv_test_array_size;
-
extern ulint srv_activity_count;
extern ulint srv_fatal_semaphore_wait_threshold;
extern ulint srv_dml_needed_delay;
@@ -365,11 +344,7 @@ srv_release_threads(
/*************************************************************************
The master thread controlling the server. */
-#ifndef __WIN__
-void*
-#else
-ulint
-#endif
+os_thread_ret_t
srv_master_thread(
/*==============*/
/* out: a dummy parameter */
@@ -451,11 +426,7 @@ srv_release_mysql_thread_if_suspended(
A thread which wakes up threads whose lock wait may have lasted too long.
This also prints the info output by various InnoDB monitors. */
-#ifndef __WIN__
-void*
-#else
-ulint
-#endif
+os_thread_ret_t
srv_lock_timeout_and_monitor_thread(
/*================================*/
/* out: a dummy parameter */
@@ -465,11 +436,7 @@ srv_lock_timeout_and_monitor_thread(
A thread which prints warnings about semaphore waits which have lasted
too long. These can be used to track bugs which cause hangs. */
-#ifndef __WIN__
-void*
-#else
-ulint
-#endif
+os_thread_ret_t
srv_error_monitor_thread(
/*=====================*/
/* out: a dummy parameter */
@@ -567,9 +534,6 @@ struct export_var_struct{
/* The server system struct */
struct srv_sys_struct{
- os_event_t operational; /* created threads must wait for the
- server to become operational by
- waiting for this event */
srv_table_t* threads; /* server thread table */
UT_LIST_BASE_NODE_T(que_thr_t)
tasks; /* task queue */
diff --git a/storage/innobase/include/trx0roll.h b/storage/innobase/include/trx0roll.h
index 7b450f9da39..25546430ba0 100644
--- a/storage/innobase/include/trx0roll.h
+++ b/storage/innobase/include/trx0roll.h
@@ -107,11 +107,7 @@ transaction already was committed, then we clean up a possible insert
undo log. If the transaction was not yet committed, then we roll it back.
Note: this is done in a background thread. */
-#ifndef __WIN__
-void*
-#else
-ulint
-#endif
+os_thread_ret_t
trx_rollback_or_clean_all_without_sess(
/*===================================*/
/* out: a dummy parameter */
diff --git a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i
index 5b294ae0769..c5e87e468c6 100644
--- a/storage/innobase/include/univ.i
+++ b/storage/innobase/include/univ.i
@@ -273,6 +273,18 @@ it is read or written. */
/* Compile-time constant of the given array's size. */
#define UT_ARR_SIZE(a) (sizeof(a) / sizeof((a)[0]))
+/* The return type from a thread's start function differs between Unix and
+Windows, so define a typedef for it and a macro to use at the end of such
+functions. */
+
+#ifdef __WIN__
+typedef ulint os_thread_ret_t;
+#define OS_THREAD_DUMMY_RETURN return(0)
+#else
+typedef void* os_thread_ret_t;
+#define OS_THREAD_DUMMY_RETURN return(NULL)
+#endif
+
#include <stdio.h>
#include "ut0dbg.h"
#include "ut0ut.h"