diff options
author | unknown <monty@donna.mysql.fi> | 2001-10-30 17:38:44 +0200 |
---|---|---|
committer | unknown <monty@donna.mysql.fi> | 2001-10-30 17:38:44 +0200 |
commit | 7b24c57c56b150132f0c4b541ef23a20f8f74ace (patch) | |
tree | 097886eb981160413975cb915243d4ae60718154 /innobase/include | |
parent | fed395c75224ee11c1cd53fc24285e8575c6bec8 (diff) | |
download | mariadb-git-7b24c57c56b150132f0c4b541ef23a20f8f74ace.tar.gz |
Merge
include/my_base.h:
Try again merge InnoDB-3.23.44
include/mysqld_error.h:
Try again merge InnoDB-3.23.44
sql/handler.cc:
Try again merge InnoDB-3.23.44
sql/mysqld.cc:
Try again merge InnoDB-3.23.44
sql/ha_innobase.cc:
Try again merge InnoDB-3.23.44
sql/ha_innobase.h:
Try again merge InnoDB-3.23.44
sql/share/czech/errmsg.txt:
Try again merge InnoDB-3.23.44
sql/share/danish/errmsg.txt:
Try again merge InnoDB-3.23.44
sql/share/dutch/errmsg.txt:
Try again merge InnoDB-3.23.44
sql/share/english/errmsg.txt:
Try again merge InnoDB-3.23.44
sql/share/estonian/errmsg.txt:
Try again merge InnoDB-3.23.44
sql/share/french/errmsg.txt:
Try again merge InnoDB-3.23.44
sql/share/german/errmsg.txt:
Try again merge InnoDB-3.23.44
sql/share/greek/errmsg.txt:
Try again merge InnoDB-3.23.44
sql/share/hungarian/errmsg.txt:
Try again merge InnoDB-3.23.44
sql/share/italian/errmsg.txt:
Try again merge InnoDB-3.23.44
sql/share/japanese/errmsg.txt:
Try again merge InnoDB-3.23.44
sql/share/korean/errmsg.txt:
Try again merge InnoDB-3.23.44
sql/share/norwegian-ny/errmsg.txt:
Try again merge InnoDB-3.23.44
sql/share/norwegian/errmsg.txt:
Try again merge InnoDB-3.23.44
sql/share/polish/errmsg.txt:
Try again merge InnoDB-3.23.44
sql/share/portuguese/errmsg.txt:
Try again merge InnoDB-3.23.44
sql/share/romanian/errmsg.txt:
Try again merge InnoDB-3.23.44
sql/share/russian/errmsg.txt:
Try again merge InnoDB-3.23.44
sql/share/slovak/errmsg.txt:
Try again merge InnoDB-3.23.44
sql/share/spanish/errmsg.txt:
Try again merge InnoDB-3.23.44
sql/share/swedish/errmsg.txt:
Try again merge InnoDB-3.23.44
sql/share/ukrainian/errmsg.txt:
Try again merge InnoDB-3.23.44
innobase/btr/btr0btr.c:
Try again merge InnoDB-3.23.44
innobase/buf/buf0flu.c:
Try again merge InnoDB-3.23.44
innobase/buf/buf0lru.c:
Try again merge InnoDB-3.23.44
innobase/dict/dict0boot.c:
Try again merge InnoDB-3.23.44
innobase/dict/dict0crea.c:
Try again merge InnoDB-3.23.44
innobase/dict/dict0dict.c:
Try again merge InnoDB-3.23.44
innobase/ibuf/ibuf0ibuf.c:
Try again merge InnoDB-3.23.44
innobase/include/dict0boot.h:
Try again merge InnoDB-3.23.44
innobase/include/dict0boot.ic:
Try again merge InnoDB-3.23.44
innobase/include/dict0dict.h:
Try again merge InnoDB-3.23.44
innobase/include/os0file.h:
Try again merge InnoDB-3.23.44
innobase/include/os0sync.h:
Try again merge InnoDB-3.23.44
innobase/include/page0page.ic:
Try again merge InnoDB-3.23.44
innobase/include/read0read.h:
Try again merge InnoDB-3.23.44
innobase/include/row0mysql.h:
Try again merge InnoDB-3.23.44
innobase/include/srv0srv.h:
Try again merge InnoDB-3.23.44
innobase/include/srv0start.h:
Try again merge InnoDB-3.23.44
innobase/include/trx0purge.h:
Try again merge InnoDB-3.23.44
innobase/include/trx0rec.h:
Try again merge InnoDB-3.23.44
innobase/include/trx0trx.h:
Try again merge InnoDB-3.23.44
innobase/lock/lock0lock.c:
Try again merge InnoDB-3.23.44
innobase/log/log0log.c:
Try again merge InnoDB-3.23.44
innobase/log/log0recv.c:
Try again merge InnoDB-3.23.44
innobase/os/os0file.c:
Try again merge InnoDB-3.23.44
innobase/page/page0page.c:
Try again merge InnoDB-3.23.44
innobase/read/read0read.c:
Try again merge InnoDB-3.23.44
innobase/rem/rem0cmp.c:
Try again merge InnoDB-3.23.44
innobase/rem/rem0rec.c:
Try again merge InnoDB-3.23.44
innobase/row/row0ins.c:
Try again merge InnoDB-3.23.44
innobase/row/row0mysql.c:
Try again merge InnoDB-3.23.44
innobase/row/row0purge.c:
Try again merge InnoDB-3.23.44
innobase/row/row0row.c:
Try again merge InnoDB-3.23.44
innobase/row/row0sel.c:
Try again merge InnoDB-3.23.44
innobase/row/row0umod.c:
Try again merge InnoDB-3.23.44
innobase/row/row0upd.c:
Try again merge InnoDB-3.23.44
innobase/row/row0vers.c:
Try again merge InnoDB-3.23.44
innobase/srv/srv0start.c:
Try again merge InnoDB-3.23.44
innobase/sync/sync0arr.c:
Try again merge InnoDB-3.23.44
innobase/trx/trx0purge.c:
Try again merge InnoDB-3.23.44
innobase/trx/trx0rec.c:
Try again merge InnoDB-3.23.44
innobase/trx/trx0roll.c:
Try again merge InnoDB-3.23.44
innobase/trx/trx0sys.c:
Try again merge InnoDB-3.23.44
innobase/trx/trx0trx.c:
Try again merge InnoDB-3.23.44
innobase/trx/trx0undo.c:
Try again merge InnoDB-3.23.44
innobase/srv/srv0srv.c:
Commit change made by heikki
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
Diffstat (limited to 'innobase/include')
-rw-r--r-- | innobase/include/dict0boot.h | 4 | ||||
-rw-r--r-- | innobase/include/dict0boot.ic | 52 | ||||
-rw-r--r-- | innobase/include/dict0dict.h | 9 | ||||
-rw-r--r-- | innobase/include/os0file.h | 4 | ||||
-rw-r--r-- | innobase/include/os0sync.h | 2 | ||||
-rw-r--r-- | innobase/include/page0page.ic | 39 | ||||
-rw-r--r-- | innobase/include/read0read.h | 7 | ||||
-rw-r--r-- | innobase/include/row0mysql.h | 6 | ||||
-rw-r--r-- | innobase/include/srv0srv.h | 35 | ||||
-rw-r--r-- | innobase/include/srv0start.h | 11 | ||||
-rw-r--r-- | innobase/include/trx0purge.h | 6 | ||||
-rw-r--r-- | innobase/include/trx0rec.h | 7 | ||||
-rw-r--r-- | innobase/include/trx0trx.h | 13 |
13 files changed, 84 insertions, 111 deletions
diff --git a/innobase/include/dict0boot.h b/innobase/include/dict0boot.h index 71180439913..cb631be7e35 100644 --- a/innobase/include/dict0boot.h +++ b/innobase/include/dict0boot.h @@ -22,7 +22,7 @@ typedef byte dict_hdr_t; /************************************************************************** Gets a pointer to the dictionary header and x-latches its page. */ -UNIV_INLINE + dict_hdr_t* dict_hdr_get( /*=========*/ @@ -31,7 +31,7 @@ dict_hdr_get( mtr_t* mtr); /* in: mtr */ /************************************************************************** Returns a new row, table, index, or tree id. */ -UNIV_INLINE + dulint dict_hdr_get_new_id( /*================*/ diff --git a/innobase/include/dict0boot.ic b/innobase/include/dict0boot.ic index 8f1e214701f..8a91feed018 100644 --- a/innobase/include/dict0boot.ic +++ b/innobase/include/dict0boot.ic @@ -16,58 +16,6 @@ dict_hdr_flush_row_id(void); /************************************************************************** -Gets a pointer to the dictionary header and x-latches its page. */ -UNIV_INLINE -dict_hdr_t* -dict_hdr_get( -/*=========*/ - /* out: pointer to the dictionary header, - page x-latched */ - mtr_t* mtr) /* in: mtr */ -{ - dict_hdr_t* header; - - ut_ad(mtr); - - header = DICT_HDR + buf_page_get(DICT_HDR_SPACE, DICT_HDR_PAGE_NO, - RW_X_LATCH, mtr); - buf_page_dbg_add_level(header, SYNC_DICT_HEADER); - - return(header); -} - -/************************************************************************** -Returns a new table, index, or tree id. */ -UNIV_INLINE -dulint -dict_hdr_get_new_id( -/*================*/ - /* out: the new id */ - ulint type) /* in: DICT_HDR_ROW_ID, ... */ -{ - dict_hdr_t* dict_hdr; - dulint id; - mtr_t mtr; - - ut_ad((type == DICT_HDR_TABLE_ID) || (type == DICT_HDR_INDEX_ID) - || (type == DICT_HDR_MIX_ID)); - - mtr_start(&mtr); - - dict_hdr = dict_hdr_get(&mtr); - - id = mtr_read_dulint(dict_hdr + type, MLOG_8BYTES, &mtr); - - id = ut_dulint_add(id, 1); - - mlog_write_dulint(dict_hdr + type, id, MLOG_8BYTES, &mtr); - - mtr_commit(&mtr); - - return(id); -} - -/************************************************************************** Returns a new row id. */ UNIV_INLINE dulint diff --git a/innobase/include/dict0dict.h b/innobase/include/dict0dict.h index 56b55b8a417..a4ab4faa25c 100644 --- a/innobase/include/dict0dict.h +++ b/innobase/include/dict0dict.h @@ -261,6 +261,15 @@ void dict_table_print_by_name( /*=====================*/ char* name); +/************************************************************************** +Sprintfs to a string info on foreign keys of a table. */ + +void +dict_print_info_on_foreign_keys( +/*============================*/ + char* str, /* in/out: pointer to a string */ + ulint len, /* in: space in str available for info */ + dict_table_t* table); /* in: table */ /************************************************************************ Gets the first index on the table (the clustered index). */ UNIV_INLINE diff --git a/innobase/include/os0file.h b/innobase/include/os0file.h index 75bbbba549f..411a9fb2c21 100644 --- a/innobase/include/os0file.h +++ b/innobase/include/os0file.h @@ -106,6 +106,10 @@ log. */ #define OS_WIN95 2 #define OS_WINNT 3 +extern ulint os_n_file_reads; +extern ulint os_n_file_writes; +extern ulint os_n_fsyncs; + /*************************************************************************** Gets the operating system version. Currently works only on Windows. */ diff --git a/innobase/include/os0sync.h b/innobase/include/os0sync.h index 78374cf8ede..26f7dff5d8b 100644 --- a/innobase/include/os0sync.h +++ b/innobase/include/os0sync.h @@ -14,7 +14,7 @@ Created 9/6/1995 Heikki Tuuri #ifdef __WIN__ #define os_fast_mutex_t CRITICAL_SECTION -typedef void* os_event_t; +typedef void* os_event_t; #else diff --git a/innobase/include/page0page.ic b/innobase/include/page0page.ic index a029604c2bc..6e33fe2ca5d 100644 --- a/innobase/include/page0page.ic +++ b/innobase/include/page0page.ic @@ -396,45 +396,6 @@ page_rec_check( return(TRUE); } -/****************************************************************** -Used to check the consistency of a directory slot. */ -UNIV_INLINE -ibool -page_dir_slot_check( -/*================*/ - /* out: TRUE if succeed */ - page_dir_slot_t* slot) /* in: slot */ -{ - page_t* page; - ulint n_slots; - ulint n_owned; - - ut_a(slot); - - page = buf_frame_align(slot); - - n_slots = page_header_get_field(page, PAGE_N_DIR_SLOTS); - - ut_a(slot <= page_dir_get_nth_slot(page, 0)); - ut_a(slot >= page_dir_get_nth_slot(page, n_slots - 1)); - - ut_a(page_rec_check(page + mach_read_from_2(slot))); - - n_owned = rec_get_n_owned(page + mach_read_from_2(slot)); - - if (slot == page_dir_get_nth_slot(page, 0)) { - ut_a(n_owned == 1); - } else if (slot == page_dir_get_nth_slot(page, n_slots - 1)) { - ut_a(n_owned >= 1); - ut_a(n_owned <= PAGE_DIR_SLOT_MAX_N_OWNED); - } else { - ut_a(n_owned >= PAGE_DIR_SLOT_MIN_N_OWNED); - ut_a(n_owned <= PAGE_DIR_SLOT_MAX_N_OWNED); - } - - return(TRUE); -} - /******************************************************************* Gets the record pointed to by a directory slot. */ UNIV_INLINE diff --git a/innobase/include/read0read.h b/innobase/include/read0read.h index dea952c8547..cebb2d6701c 100644 --- a/innobase/include/read0read.h +++ b/innobase/include/read0read.h @@ -53,6 +53,13 @@ read_view_sees_trx_id( /* out: TRUE if sees */ read_view_t* view, /* in: read view */ dulint trx_id); /* in: trx id */ +/************************************************************************* +Prints a read view to stderr. */ + +void +read_view_print( +/*============*/ + read_view_t* view); /* in: read view */ /* Read view lists the trx ids of those transactions for which a consistent diff --git a/innobase/include/row0mysql.h b/innobase/include/row0mysql.h index 4e90c0ac590..32354219e64 100644 --- a/innobase/include/row0mysql.h +++ b/innobase/include/row0mysql.h @@ -342,6 +342,12 @@ struct row_prebuilt_struct { the row id: in this case this flag is set to TRUE */ dict_index_t* index; /* current index for a search, if any */ + ulint read_just_key; /* set to 1 when MySQL calls + ha_innobase::extra with the + argument HA_EXTRA_KEYREAD; it is enough + to read just columns defined in + the index (i.e., no read of the + clustered index record necessary) */ ulint template_type; /* ROW_MYSQL_WHOLE_ROW, ROW_MYSQL_REC_FIELDS, ROW_MYSQL_DUMMY_TEMPLATE, or diff --git a/innobase/include/srv0srv.h b/innobase/include/srv0srv.h index 49eb2b6ec35..afa40980264 100644 --- a/innobase/include/srv0srv.h +++ b/innobase/include/srv0srv.h @@ -15,6 +15,7 @@ Created 10/10/1995 Heikki Tuuri #include "os0sync.h" #include "com0com.h" #include "que0types.h" +#include "trx0types.h" /* When this event is set the lock timeout and InnoDB monitor @@ -64,6 +65,8 @@ extern ulint srv_lock_wait_timeout; extern char* srv_unix_file_flush_method_str; extern ulint srv_unix_file_flush_method; extern ulint srv_force_recovery; +extern ulint srv_thread_concurrency; +extern ibool srv_fast_shutdown; extern ibool srv_use_doublewrite_buf; @@ -82,6 +85,9 @@ extern ibool srv_print_innodb_lock_monitor; extern ibool srv_print_innodb_tablespace_monitor; extern ibool srv_print_innodb_table_monitor; +extern ibool srv_lock_timeout_and_monitor_active; +extern ibool srv_error_monitor_active; + extern ulint srv_n_spin_wait_rounds; extern ulint srv_spin_wait_delay; extern ibool srv_priority_boost; @@ -159,7 +165,11 @@ of lower numbers are included. */ #define SRV_FORCE_NO_IBUF_MERGE 4 /* prevent also ibuf operations: if they would cause a crash, better not do them */ -#define SRV_FORCE_NO_LOG_REDO 5 /* do not do the log roll-forward +#define SRV_FORCE_NO_UNDO_LOG_SCAN 5 /* do not look at undo logs when + starting the database: InnoDB will + treat even incomplete transactions + as committed */ +#define SRV_FORCE_NO_LOG_REDO 6 /* do not do the log roll-forward in connection with recovery */ /************************************************************************* @@ -234,6 +244,29 @@ mutex, for performace reasons). */ void srv_active_wake_master_thread(void); /*===============================*/ +/************************************************************************* +Puts an OS thread to wait if there are too many concurrent threads +(>= srv_thread_concurrency) inside InnoDB. The threads wait in a FIFO queue. */ + +void +srv_conc_enter_innodb( +/*==================*/ + trx_t* trx); /* in: transaction object associated with the + thread */ +/************************************************************************* +This lets a thread enter InnoDB regardless of the number of threads inside +InnoDB. This must be called when a thread ends a lock wait. */ + +void +srv_conc_force_enter_innodb(void); +/*=============================*/ +/************************************************************************* +This must be called when a thread exits InnoDB. This must also be called +when a thread goes to wait for a lock. */ + +void +srv_conc_exit_innodb(void); +/*======================*/ /******************************************************************* Puts a MySQL OS thread to wait for a lock to be released. */ diff --git a/innobase/include/srv0start.h b/innobase/include/srv0start.h index e2b20f3b5fc..6dbdcd27250 100644 --- a/innobase/include/srv0start.h +++ b/innobase/include/srv0start.h @@ -29,6 +29,15 @@ innobase_shutdown_for_mysql(void); /*=============================*/ /* out: DB_SUCCESS or error code */ -extern ibool srv_startup_is_before_trx_rollback_phase; +extern ibool srv_startup_is_before_trx_rollback_phase; +extern ibool srv_is_being_shut_down; + +/* At a shutdown the value first climbs from 0 to SRV_SHUTDOWN_CLEANUP +and then to SRV_SHUTDOWN_LAST_PHASE */ + +extern ulint srv_shutdown_state; + +#define SRV_SHUTDOWN_CLEANUP 1 +#define SRV_SHUTDOWN_LAST_PHASE 2 #endif diff --git a/innobase/include/trx0purge.h b/innobase/include/trx0purge.h index 8870ebc936c..087be2f060e 100644 --- a/innobase/include/trx0purge.h +++ b/innobase/include/trx0purge.h @@ -94,6 +94,12 @@ trx_purge(void); /*===========*/ /* out: number of undo log pages handled in the batch */ +/********************************************************************** +Prints information of the purge system to stderr. */ + +void +trx_purge_sys_print(void); +/*======================*/ /* The control structure used in the purge operation */ struct trx_purge_struct{ diff --git a/innobase/include/trx0rec.h b/innobase/include/trx0rec.h index edfc283d1b2..50d942d9040 100644 --- a/innobase/include/trx0rec.h +++ b/innobase/include/trx0rec.h @@ -127,7 +127,9 @@ Builds an update vector based on a remaining part of an undo log record. */ byte* trx_undo_update_rec_get_update( /*===========================*/ - /* out: remaining part of the record */ + /* out: remaining part of the record, + NULL if an error detected, which means that + the record is corrupted */ byte* ptr, /* in: remaining part in update undo log record, after reading the row reference NOTE that this copy of the undo log record must @@ -235,7 +237,8 @@ trx_undo_prev_version_build( /*========================*/ /* out: DB_SUCCESS, or DB_MISSING_HISTORY if the previous version is not >= purge_view, - which means that it may have been removed */ + which means that it may have been removed, + DB_ERROR if corrupted record */ rec_t* index_rec,/* in: clustered index record in the index tree */ mtr_t* index_mtr,/* in: mtr which contains the latch to diff --git a/innobase/include/trx0trx.h b/innobase/include/trx0trx.h index 8db0b39d3b4..58cef01b376 100644 --- a/innobase/include/trx0trx.h +++ b/innobase/include/trx0trx.h @@ -17,11 +17,6 @@ Created 3/26/1996 Heikki Tuuri #include "mem0mem.h" #include "read0types.h" -/* If this flag is defined, then unneeded update undo logs are discarded, -saving CPU time. The kernel mutex contention is increased, however. */ - -#define TRX_UPDATE_UNDO_OPT - extern ulint trx_n_mysql_transactions; /************************************************************************ @@ -130,14 +125,6 @@ void trx_mark_sql_stat_end( /*==================*/ trx_t* trx); /* in: trx handle */ -/************************************************************************** -Marks the latest SQL statement ended but does not start a new transaction -if the trx is not started. */ - -void -trx_mark_sql_stat_end_do_not_start_new( -/*===================================*/ - trx_t* trx); /* in: trx handle */ /************************************************************************ Assigns a read view for a consistent read query. All the consistent reads within the same transaction will get the same read view, which is created |