diff options
author | monty@mashka.mysql.fi <> | 2004-02-22 11:01:28 +0200 |
---|---|---|
committer | monty@mashka.mysql.fi <> | 2004-02-22 11:01:28 +0200 |
commit | 1ae05760acade0af82ff3e73ad1a3145bea26bf7 (patch) | |
tree | 5cbf5acd9871f4013aae8ed412d72912dbc4706f /innobase/include | |
parent | e17e1901f29507e6bb6b4c82d0ed37f4f1612946 (diff) | |
parent | 7084e3642cb29be2e879f30b31a4e01e05f8c3ea (diff) | |
download | mariadb-git-1ae05760acade0af82ff3e73ad1a3145bea26bf7.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mashka.mysql.fi:/home/my/mysql-4.1
Diffstat (limited to 'innobase/include')
26 files changed, 49 insertions, 765 deletions
diff --git a/innobase/include/Makefile.am b/innobase/include/Makefile.am index 8664f6dfc17..ab1f14d0770 100644 --- a/innobase/include/Makefile.am +++ b/innobase/include/Makefile.am @@ -50,7 +50,7 @@ noinst_HEADERS = btr0btr.h btr0btr.ic btr0cur.h btr0cur.ic \ thr0loc.h thr0loc.ic trx0purge.h trx0purge.ic trx0rec.h \ trx0rec.ic trx0roll.h trx0roll.ic trx0rseg.h trx0rseg.ic \ trx0sys.h trx0sys.ic trx0trx.h trx0trx.ic trx0types.h \ - trx0undo.h trx0undo.ic univ.i univold.i univoldmysql.i \ + trx0undo.h trx0undo.ic univ.i \ usr0sess.h usr0sess.ic usr0types.h ut0byte.h ut0byte.ic \ ut0dbg.h ut0lst.h ut0mem.h ut0mem.ic ut0rnd.h ut0rnd.ic \ ut0sort.h ut0ut.h ut0ut.ic diff --git a/innobase/include/btr0cur.h b/innobase/include/btr0cur.h index 31aecef8104..221f479df40 100644 --- a/innobase/include/btr0cur.h +++ b/innobase/include/btr0cur.h @@ -365,17 +365,6 @@ btr_cur_parse_update_in_place( byte* ptr, /* in: buffer */ byte* end_ptr,/* in: buffer end */ page_t* page); /* in: page or NULL */ -/*************************************************************** -Parses a redo log record of updating a record, but not in-place. */ - -byte* -btr_cur_parse_opt_update( -/*=====================*/ - /* out: end of log record or NULL */ - byte* ptr, /* in: buffer */ - byte* end_ptr,/* in: buffer end */ - page_t* page, /* in: page or NULL */ - mtr_t* mtr); /* in: mtr or NULL */ /******************************************************************** Parses the redo log record for delete marking or unmarking of a clustered index record. */ diff --git a/innobase/include/btr0sea.h b/innobase/include/btr0sea.h index ee762a12221..68396d47193 100644 --- a/innobase/include/btr0sea.h +++ b/innobase/include/btr0sea.h @@ -49,21 +49,6 @@ btr_search_info_update( dict_index_t* index, /* in: index of the cursor */ btr_cur_t* cursor);/* in: cursor which was just positioned */ /********************************************************************** -Tries to guess the right search position based on the search pattern info -of the index. */ - -ibool -btr_search_guess_on_pattern( -/*========================*/ - /* out: TRUE if succeeded */ - dict_index_t* index, /* in: index */ - btr_search_t* info, /* in: index search info */ - dtuple_t* tuple, /* in: logical record */ - ulint mode, /* in: PAGE_CUR_L, ... */ - ulint latch_mode, /* in: BTR_SEARCH_LEAF, ... */ - btr_cur_t* cursor, /* out: tree cursor */ - mtr_t* mtr); /* in: mtr */ -/********************************************************************** Tries to guess the right search position based on the hash search info of the index. Note that if mode is PAGE_CUR_LE, which is used in inserts, and the function returns TRUE, then cursor->up_match and cursor->low_match @@ -140,26 +125,6 @@ btr_search_update_hash_on_delete( record to delete using btr_cur_search_..., the record is not yet deleted */ /************************************************************************ -Prints info of the search system. */ - -void -btr_search_print_info(void); -/*=======================*/ -/************************************************************************ -Prints info of searches on an index. */ - -void -btr_search_index_print_info( -/*========================*/ - dict_index_t* index); /* in: index */ -/************************************************************************ -Prints info of searches on a table. */ - -void -btr_search_table_print_info( -/*========================*/ - char* name); /* in: table name */ -/************************************************************************ Validates the search system. */ ibool diff --git a/innobase/include/buf0buf.ic b/innobase/include/buf0buf.ic index eb22bae7ff0..0df8570e4e2 100644 --- a/innobase/include/buf0buf.ic +++ b/innobase/include/buf0buf.ic @@ -496,6 +496,7 @@ buf_frame_get_modify_clock( return(block->modify_clock); } +#ifdef UNIV_SYNC_DEBUG /*********************************************************************** Increments the bufferfix count. */ UNIV_INLINE @@ -515,7 +516,7 @@ buf_block_buf_fix_inc_debug( #endif block->buf_fix_count++; } - +#else /* UNIV_SYNC_DEBUG */ /*********************************************************************** Increments the bufferfix count. */ UNIV_INLINE @@ -526,7 +527,7 @@ buf_block_buf_fix_inc( { block->buf_fix_count++; } - +#endif /* UNIV_SYNC_DEBUG */ /********************************************************************** Returns the control block of a file page, NULL if not found. */ UNIV_INLINE diff --git a/innobase/include/data0data.h b/innobase/include/data0data.h index 2ec94a9517a..2501d2b809f 100644 --- a/innobase/include/data0data.h +++ b/innobase/include/data0data.h @@ -375,84 +375,6 @@ dtuple_big_rec_free( /*================*/ big_rec_t* vector); /* in, own: big rec vector; it is freed in this function */ -/*************************************************************** -Generates a random tuple. */ - -dtuple_t* -dtuple_gen_rnd_tuple( -/*=================*/ - /* out: pointer to the tuple */ - mem_heap_t* heap); /* in: memory heap where generated */ -/******************************************************************* -Generates a test tuple for sort and comparison tests. */ - -void -dtuple_gen_test_tuple( -/*==================*/ - dtuple_t* tuple, /* in/out: a tuple with 3 fields */ - ulint i); /* in: a number, 0 <= i < 512 */ -/******************************************************************* -Generates a test tuple for B-tree speed tests. */ - -void -dtuple_gen_test_tuple3( -/*===================*/ - dtuple_t* tuple, /* in/out: a tuple with 3 fields */ - ulint i, /* in: a number < 1000000 */ - ulint type, /* in: DTUPLE_TEST_FIXED30, ... */ - byte* buf); /* in: a buffer of size >= 8 bytes */ -/******************************************************************* -Generates a test tuple for B-tree speed tests. */ - -void -dtuple_gen_search_tuple3( -/*=====================*/ - dtuple_t* tuple, /* in/out: a tuple with 1 or 2 fields */ - ulint i, /* in: a number < 1000000 */ - byte* buf); /* in: a buffer of size >= 8 bytes */ -/******************************************************************* -Generates a test tuple for TPC-A speed test. */ - -void -dtuple_gen_test_tuple_TPC_A( -/*========================*/ - dtuple_t* tuple, /* in/out: a tuple with >= 3 fields */ - ulint i, /* in: a number < 10000 */ - byte* buf); /* in: a buffer of size >= 16 bytes */ -/******************************************************************* -Generates a test tuple for B-tree speed tests. */ - -void -dtuple_gen_search_tuple_TPC_A( -/*==========================*/ - dtuple_t* tuple, /* in/out: a tuple with 1 field */ - ulint i, /* in: a number < 10000 */ - byte* buf); /* in: a buffer of size >= 16 bytes */ -/******************************************************************* -Generates a test tuple for TPC-C speed test. */ - -void -dtuple_gen_test_tuple_TPC_C( -/*========================*/ - dtuple_t* tuple, /* in/out: a tuple with >= 12 fields */ - ulint i, /* in: a number < 100000 */ - byte* buf); /* in: a buffer of size >= 16 bytes */ -/******************************************************************* -Generates a test tuple for B-tree speed tests. */ - -void -dtuple_gen_search_tuple_TPC_C( -/*==========================*/ - dtuple_t* tuple, /* in/out: a tuple with 1 field */ - ulint i, /* in: a number < 100000 */ - byte* buf); /* in: a buffer of size >= 16 bytes */ - -/* Types of the third field in dtuple_gen_test_tuple3 */ -#define DTUPLE_TEST_FIXED30 1 -#define DTUPLE_TEST_RND30 2 -#define DTUPLE_TEST_RND3500 3 -#define DTUPLE_TEST_FIXED2000 4 -#define DTUPLE_TEST_FIXED3 5 /*######################################################################*/ diff --git a/innobase/include/dict0crea.h b/innobase/include/dict0crea.h index b2c3ad7ca96..8b6944fc605 100644 --- a/innobase/include/dict0crea.h +++ b/innobase/include/dict0crea.h @@ -17,15 +17,6 @@ Created 1/8/1996 Heikki Tuuri #include "mtr0mtr.h" /************************************************************************* -Creates the default clustered index for a table: the records are ordered -by row id. */ - -void -dict_create_default_index( -/*======================*/ - dict_table_t* table, /* in: table */ - trx_t* trx); /* in: transaction handle */ -/************************************************************************* Creates a table create graph. */ tab_node_t* diff --git a/innobase/include/dict0dict.h b/innobase/include/dict0dict.h index 07184d8e28d..534c9e380b8 100644 --- a/innobase/include/dict0dict.h +++ b/innobase/include/dict0dict.h @@ -677,13 +677,6 @@ dict_index_get_tree( /* out: index tree */ dict_index_t* index); /* in: index */ /************************************************************************* -Gets the column data type. */ -UNIV_INLINE -dtype_t* -dict_col_get_type( -/*==============*/ - dict_col_t* col); -/************************************************************************* Gets the field order criterion. */ UNIV_INLINE ulint diff --git a/innobase/include/ibuf0ibuf.h b/innobase/include/ibuf0ibuf.h index bf03b06bd28..8ef67df26f8 100644 --- a/innobase/include/ibuf0ibuf.h +++ b/innobase/include/ibuf0ibuf.h @@ -177,15 +177,6 @@ ibuf_page_low( mtr_t* mtr); /* in: mtr which will contain an x-latch to the bitmap page if the page is not one of the fixed address ibuf pages */ -/************************************************************************* -Checks if an index page has so much free space that the free bit should -be set TRUE in the ibuf bitmap. */ - -ibool -ibuf_index_page_has_free( -/*=====================*/ - /* out: TRUE if there is enough free space */ - page_t* page); /* in: non-unique secondary index page */ /*************************************************************************** Frees excess pages from the ibuf free list. This function is called when an OS thread calls fsp services to allocate a new file segment, or a new page to a diff --git a/innobase/include/lock0lock.h b/innobase/include/lock0lock.h index 49f4597b30c..103d28cd130 100644 --- a/innobase/include/lock0lock.h +++ b/innobase/include/lock0lock.h @@ -442,14 +442,6 @@ lock_rec_hash( ulint space, /* in: space */ ulint page_no);/* in: page number */ /************************************************************************* -Gets the mutex protecting record locks on a given page address. */ - -mutex_t* -lock_rec_get_mutex_for_addr( -/*========================*/ - ulint space, /* in: space id */ - ulint page_no);/* in: page number */ -/************************************************************************* Checks that a transaction id is sensible, i.e., not in the future. */ ibool diff --git a/innobase/include/mem0dbg.h b/innobase/include/mem0dbg.h index 0b1aa53d694..6c92d669be3 100644 --- a/innobase/include/mem0dbg.h +++ b/innobase/include/mem0dbg.h @@ -60,6 +60,7 @@ mem_heap_validate_or_print( ulint* n_blocks); /* out: number of blocks in the heap, if a NULL pointer is passed as this argument, it is ignored */ +#ifdef UNIV_MEM_DEBUG /****************************************************************** Prints the contents of a memory heap. */ @@ -67,6 +68,7 @@ void mem_heap_print( /*===========*/ mem_heap_t* heap); /* in: memory heap */ +#endif /* UNIV_MEM_DEBUG */ /****************************************************************** Checks that an object is a memory heap (or a block of it) */ @@ -83,20 +85,7 @@ mem_heap_validate( /*==============*/ /* out: TRUE if ok */ mem_heap_t* heap); /* in: memory heap */ -/********************************************************************* -Prints information of dynamic memory usage and currently live -memory heaps or buffers. Can only be used in the debug version. */ - -void -mem_print_info(void); -/*=================*/ -/********************************************************************* -Prints information of dynamic memory usage and currently allocated memory -heaps or buffers since the last ..._print_info or..._print_new_info. */ - -void -mem_print_new_info(void); -/*====================*/ +#ifdef UNIV_MEM_DEBUG /********************************************************************* TRUE if no memory is currently allocated. */ @@ -118,6 +107,7 @@ ibool mem_validate(void); /*===============*/ /* out: TRUE if ok */ +#endif /* UNIV_MEM_DEBUG */ /**************************************************************** Tries to find neigboring memory allocation blocks and dumps to stderr the neighborhood of a given pointer. */ diff --git a/innobase/include/mem0mem.ic b/innobase/include/mem0mem.ic index 1ff8c66e80a..fb4cef49ec9 100644 --- a/innobase/include/mem0mem.ic +++ b/innobase/include/mem0mem.ic @@ -162,7 +162,7 @@ mem_heap_alloc( mem_block_set_free(block, free + MEM_SPACE_NEEDED(n)); - #ifdef UNIV_MEM_DEBUG +#ifdef UNIV_MEM_DEBUG /* In the debug version write debugging info to the field */ mem_field_init((byte*)buf, n); @@ -171,7 +171,7 @@ mem_heap_alloc( caller */ buf = (byte*)buf + MEM_FIELD_HEADER_SIZE; - #endif +#endif #ifdef UNIV_SET_MEM_TO_ZERO memset(buf, '\0', n); #endif @@ -212,15 +212,15 @@ mem_heap_free_heap_top( { mem_block_t* block; mem_block_t* prev_block; - #ifdef UNIV_MEM_DEBUG +#ifdef UNIV_MEM_DEBUG ibool error; ulint total_size; ulint size; - #endif +#endif ut_ad(mem_heap_check(heap)); - #ifdef UNIV_MEM_DEBUG +#ifdef UNIV_MEM_DEBUG /* Validate the heap and get its total allocated size */ mem_heap_validate_or_print(heap, NULL, FALSE, &error, &total_size, @@ -232,7 +232,7 @@ mem_heap_free_heap_top( NULL); ut_a(!error); - #endif +#endif block = UT_LIST_GET_LAST(heap->base); @@ -259,7 +259,7 @@ mem_heap_free_heap_top( /* Set the free field of block */ mem_block_set_free(block, old_top - (byte*)block); - #ifdef UNIV_MEM_DEBUG +#ifdef UNIV_MEM_DEBUG ut_ad(mem_block_get_start(block) <= mem_block_get_free(block)); /* In the debug version erase block from top up */ @@ -271,7 +271,7 @@ mem_heap_free_heap_top( mem_current_allocated_memory -= (total_size - size); mutex_exit(&mem_hash_mutex); - #endif +#endif /* If free == start, we may free the block if it is not the first one */ @@ -317,7 +317,7 @@ mem_heap_get_top( buf = (byte*)block + mem_block_get_free(block) - MEM_SPACE_NEEDED(n); - #ifdef UNIV_MEM_DEBUG +#ifdef UNIV_MEM_DEBUG ut_ad(mem_block_get_start(block) <=(ulint)((byte*)buf - (byte*)block)); /* In the debug version, advance buf to point at the storage which @@ -327,7 +327,7 @@ mem_heap_get_top( /* Check that the field lengths agree */ ut_ad(n == (ulint)mem_field_header_get_len(buf)); - #endif +#endif return(buf); } @@ -351,13 +351,13 @@ mem_heap_free_top( /* Subtract the free field of block */ mem_block_set_free(block, mem_block_get_free(block) - MEM_SPACE_NEEDED(n)); - #ifdef UNIV_MEM_DEBUG +#ifdef UNIV_MEM_DEBUG ut_ad(mem_block_get_start(block) <= mem_block_get_free(block)); /* In the debug version check the consistency, and erase field */ mem_field_erase((byte*)block + mem_block_get_free(block), n); - #endif +#endif /* If free == start, we may free the block if it is not the first one */ @@ -417,7 +417,7 @@ mem_heap_create_func( /* Add the created block itself as the first block in the list */ UT_LIST_ADD_FIRST(list, block->base, block); - #ifdef UNIV_MEM_DEBUG +#ifdef UNIV_MEM_DEBUG if (block == NULL) { @@ -426,7 +426,7 @@ mem_heap_create_func( mem_hash_insert(block, file_name, line); - #endif +#endif return(block); } @@ -452,14 +452,14 @@ mem_heap_free_func( block = UT_LIST_GET_LAST(heap->base); - #ifdef UNIV_MEM_DEBUG +#ifdef UNIV_MEM_DEBUG /* In the debug version remove the heap from the hash table of heaps and check its consistency */ mem_hash_remove(heap, file_name, line); - #endif +#endif if (heap->free_block) { mem_heap_free_block_free(heap); @@ -493,18 +493,6 @@ mem_alloc_func( ulint line /* in: line where created */ ) { -#ifdef notdefined - void* buf; - - buf = mem_area_alloc(n, mem_comm_pool); - -#ifdef UNIV_SET_MEM_TO_ZERO - memset(buf, '\0', n); -#endif - return(buf); - -#else - mem_heap_t* heap; void* buf; @@ -525,8 +513,6 @@ mem_alloc_func( ut_a((byte*)heap == (byte*)buf - MEM_BLOCK_HEADER_SIZE - MEM_FIELD_HEADER_SIZE); return(buf); - -#endif } /******************************************************************* @@ -542,17 +528,11 @@ mem_free_func( ulint line /* in: line where created */ ) { -#ifdef notdefined - - mem_area_free(ptr, mem_comm_pool); - -#else mem_heap_t* heap; heap = (mem_heap_t*)((byte*)ptr - MEM_BLOCK_HEADER_SIZE - MEM_FIELD_HEADER_SIZE); mem_heap_free_func(heap, file_name, line); -#endif } /********************************************************************* diff --git a/innobase/include/mtr0log.h b/innobase/include/mtr0log.h index da942dd45d7..cc42924fe4d 100644 --- a/innobase/include/mtr0log.h +++ b/innobase/include/mtr0log.h @@ -133,15 +133,6 @@ mlog_write_initial_log_record_fast( byte type, /* in: log item type: MLOG_1BYTE, ... */ byte* log_ptr,/* in: pointer to mtr log which has been opened */ mtr_t* mtr); /* in: mtr */ -/**************************************************************** -Writes the contents of a mini-transaction log, if any, to the database log. */ - -dulint -mlog_write( -/*=======*/ - dyn_array_t* mlog, /* in: mlog */ - ibool* modifications); /* out: TRUE if there were - log items to write */ /************************************************************ Parses an initial log record written by mlog_write_initial_log_record. */ diff --git a/innobase/include/mtr0mtr.h b/innobase/include/mtr0mtr.h index c47fb54a6f8..8408abf43e4 100644 --- a/innobase/include/mtr0mtr.h +++ b/innobase/include/mtr0mtr.h @@ -132,16 +132,6 @@ void mtr_commit( /*=======*/ mtr_t* mtr); /* in: mini-transaction */ -/**************************************************************** -Writes to the database log the full contents of the pages that this mtr is -the first to modify in the buffer pool. This function is called when the -database is in the online backup state. */ - -void -mtr_log_write_backup_entries( -/*=========================*/ - mtr_t* mtr, /* in: mini-transaction */ - dulint backup_lsn); /* in: online backup lsn */ /************************************************************** Sets and returns a savepoint in mtr. */ UNIV_INLINE diff --git a/innobase/include/os0proc.h b/innobase/include/os0proc.h index 664952bd166..d0d3cf82e38 100644 --- a/innobase/include/os0proc.h +++ b/innobase/include/os0proc.h @@ -102,37 +102,6 @@ os_mem_alloc_nocache( /*=================*/ /* out: allocated memory */ ulint n); /* in: number of bytes */ -#ifdef notdefined -/******************************************************************** -Creates a new process. */ - -ibool -os_process_create( -/*==============*/ - char* name, /* in: name of the executable to start - or its full path name */ - char* cmd, /* in: command line for the starting - process, or NULL if no command line - specified */ - os_process_t* proc, /* out: handle to the process */ - os_process_id_t* id); /* out: process id */ -/************************************************************************** -Exits a process. */ - -void -os_process_exit( -/*============*/ - ulint code); /* in: exit code */ -/************************************************************************** -Gets process exit code. */ - -ibool -os_process_get_exit_code( -/*=====================*/ - /* out: TRUE if succeed, FALSE if fail */ - os_process_t proc, /* in: handle to the process */ - ulint* code); /* out: exit code */ -#endif /******************************************************************** Sets the priority boost for threads released from waiting within the current process. */ diff --git a/innobase/include/os0thread.h b/innobase/include/os0thread.h index 554ca0563e4..6603229e524 100644 --- a/innobase/include/os0thread.h +++ b/innobase/include/os0thread.h @@ -99,13 +99,6 @@ os_thread_t os_thread_get_curr(void); /*====================*/ /********************************************************************* -Waits for a thread to terminate. */ - -void -os_thread_wait( -/*===========*/ - os_thread_t thread); /* in: thread to wait */ -/********************************************************************* Advises the os to give up remainder of the thread's time slice. */ void diff --git a/innobase/include/rem0cmp.ic b/innobase/include/rem0cmp.ic index ebf513f538c..75cb3ef04e8 100644 --- a/innobase/include/rem0cmp.ic +++ b/innobase/include/rem0cmp.ic @@ -9,24 +9,6 @@ Created 7/1/1994 Heikki Tuuri /***************************************************************** This function is used to compare two data fields for which we know the data type. */ - -int -cmp_data_data_slow( -/*===============*/ - /* out: 1, 0, -1, if data1 is greater, equal, - less than data2, respectively */ - dtype_t* cur_type,/* in: data type of the fields */ - byte* data1, /* in: data field (== a pointer to a memory - buffer) */ - ulint len1, /* in: data field length or UNIV_SQL_NULL */ - byte* data2, /* in: data field (== a pointer to a memory - buffer) */ - ulint len2); /* in: data field length or UNIV_SQL_NULL */ - - -/***************************************************************** -This function is used to compare two data fields for which we know the -data type. */ UNIV_INLINE int cmp_data_data( diff --git a/innobase/include/row0row.h b/innobase/include/row0row.h index d1befbbbad3..3956f3c1692 100644 --- a/innobase/include/row0row.h +++ b/innobase/include/row0row.h @@ -68,16 +68,6 @@ row_build_index_entry( dict_index_t* index, /* in: index on the table */ mem_heap_t* heap); /* in: memory heap from which the memory for the index entry is allocated */ -/********************************************************************* -Builds an index entry from a row. */ - -void -row_build_index_entry_to_tuple( -/*===========================*/ - dtuple_t* entry, /* in/out: index entry; the dtuple must have - enough fields for the index! */ - dtuple_t* row, /* in: row */ - dict_index_t* index); /* in: index on the table */ /*********************************************************************** An inverse function to dict_row_build_index_entry. Builds a row from a record in a clustered index. */ @@ -103,21 +93,6 @@ row_build( mem_heap_t* heap); /* in: memory heap from which the memory needed is allocated */ /*********************************************************************** -An inverse function to dict_row_build_index_entry. Builds a row from a -record in a clustered index. */ - -void -row_build_to_tuple( -/*===============*/ - dtuple_t* row, /* in/out: row built; see the NOTE below! */ - dict_index_t* index, /* in: clustered index */ - rec_t* rec); /* in: record in the clustered index; - NOTE: the data fields in the row will point - directly into this record, therefore, - the buffer page of this record must be - at least s-latched and the latch held - as long as the row dtuple is used! */ -/*********************************************************************** Converts an index record to a typed data tuple. */ dtuple_t* diff --git a/innobase/include/srv0srv.h b/innobase/include/srv0srv.h index 6e47c468d26..23c30554f08 100644 --- a/innobase/include/srv0srv.h +++ b/innobase/include/srv0srv.h @@ -216,13 +216,7 @@ srv_boot(void); /*==========*/ /* out: DB_SUCCESS or error code */ /************************************************************************* -Initializes the server. */ - -void -srv_init(void); -/*==========*/ -/************************************************************************* -Frees the OS fast mutex created in srv_init(). */ +Frees the OS fast mutex created in srv_boot(). */ void srv_free(void); @@ -272,23 +266,6 @@ srv_master_thread( /* out: a dummy parameter */ void* arg); /* in: a dummy parameter required by os_thread_create */ -/************************************************************************* -Reads a keyword and a value from a file. */ - -ulint -srv_read_init_val( -/*==============*/ - /* out: DB_SUCCESS or error code */ - FILE* initfile, /* in: file pointer */ - char* keyword, /* in: keyword before value(s), or NULL if - no keyword read */ - char* str_buf, /* in/out: buffer for a string value to read, - buffer size must be 10000 bytes, if NULL - then not read */ - ulint* num_val, /* out: numerical value to read, if NULL - then not read */ - ibool print_not_err); /* in: if TRUE, then we will not print - error messages to console */ /*********************************************************************** Tells the Innobase server that there has been activity in the database and wakes up the master thread if it is suspended (not sleeping). Used diff --git a/innobase/include/srv0start.h b/innobase/include/srv0start.h index 97a59fd14c7..0074de537c3 100644 --- a/innobase/include/srv0start.h +++ b/innobase/include/srv0start.h @@ -21,16 +21,6 @@ srv_normalize_path_for_win( /*=======================*/ char* str); /* in/out: null-terminated character string */ /************************************************************************* -Adds a slash or a backslash to the end of a string if it is missing -and the string is not empty. */ - -char* -srv_add_path_separator_if_needed( -/*=============================*/ - /* out, own: string which has the separator if the - string is not empty */ - char* str); /* in: null-terminated character string */ -/************************************************************************* Reads the data files and their sizes from a character string given in the .cnf file. */ diff --git a/innobase/include/sync0rw.ic b/innobase/include/sync0rw.ic index 36ef0a985ed..caf6f5f1de4 100644 --- a/innobase/include/sync0rw.ic +++ b/innobase/include/sync0rw.ic @@ -140,10 +140,10 @@ rw_lock_s_lock_low( /* Set the shared lock by incrementing the reader count */ lock->reader_count++; - #ifdef UNIV_SYNC_DEBUG +#ifdef UNIV_SYNC_DEBUG rw_lock_add_debug_info(lock, pass, RW_LOCK_SHARED, file_name, line); - #endif +#endif lock->last_s_file_name = file_name; lock->last_s_line = line; @@ -175,9 +175,9 @@ rw_lock_s_lock_direct( lock->last_s_file_name = file_name; lock->last_s_line = line; - #ifdef UNIV_SYNC_DEBUG +#ifdef UNIV_SYNC_DEBUG rw_lock_add_debug_info(lock, 0, RW_LOCK_SHARED, file_name, line); - #endif +#endif } /********************************************************************** @@ -204,9 +204,9 @@ rw_lock_x_lock_direct( lock->last_x_file_name = file_name; lock->last_x_line = line; - #ifdef UNIV_SYNC_DEBUG +#ifdef UNIV_SYNC_DEBUG rw_lock_add_debug_info(lock, 0, RW_LOCK_EX, file_name, line); - #endif +#endif } /********************************************************************** @@ -275,10 +275,10 @@ rw_lock_s_lock_func_nowait( /* Set the shared lock by incrementing the reader count */ lock->reader_count++; - #ifdef UNIV_SYNC_DEBUG +#ifdef UNIV_SYNC_DEBUG rw_lock_add_debug_info(lock, 0, RW_LOCK_SHARED, file_name, line); - #endif +#endif lock->last_s_file_name = file_name; lock->last_s_line = line; @@ -320,9 +320,9 @@ rw_lock_x_lock_func_nowait( lock->writer_count++; lock->pass = 0; - #ifdef UNIV_SYNC_DEBUG +#ifdef UNIV_SYNC_DEBUG rw_lock_add_debug_info(lock, 0, RW_LOCK_EX, file_name, line); - #endif +#endif lock->last_x_file_name = file_name; lock->last_x_line = line; @@ -361,9 +361,9 @@ rw_lock_s_unlock_func( ut_a(lock->reader_count > 0); lock->reader_count--; - #ifdef UNIV_SYNC_DEBUG +#ifdef UNIV_SYNC_DEBUG rw_lock_remove_debug_info(lock, pass, RW_LOCK_SHARED); - #endif +#endif /* If there may be waiters and this was the last s-lock, signal the object */ @@ -402,9 +402,9 @@ rw_lock_s_unlock_direct( lock->reader_count--; - #ifdef UNIV_SYNC_DEBUG +#ifdef UNIV_SYNC_DEBUG rw_lock_remove_debug_info(lock, 0, RW_LOCK_SHARED); - #endif +#endif ut_ad(!lock->waiters); ut_ad(rw_lock_validate(lock)); @@ -442,9 +442,9 @@ rw_lock_x_unlock_func( rw_lock_set_writer(lock, RW_LOCK_NOT_LOCKED); } - #ifdef UNIV_SYNC_DEBUG +#ifdef UNIV_SYNC_DEBUG rw_lock_remove_debug_info(lock, pass, RW_LOCK_EX); - #endif +#endif /* If there may be waiters, signal the lock */ if (lock->waiters && (lock->writer_count == 0)) { @@ -486,9 +486,9 @@ rw_lock_x_unlock_direct( rw_lock_set_writer(lock, RW_LOCK_NOT_LOCKED); } - #ifdef UNIV_SYNC_DEBUG +#ifdef UNIV_SYNC_DEBUG rw_lock_remove_debug_info(lock, 0, RW_LOCK_EX); - #endif +#endif ut_ad(!lock->waiters); ut_ad(rw_lock_validate(lock)); diff --git a/innobase/include/sync0sync.h b/innobase/include/sync0sync.h index 330b6b77b08..f83f8cbe712 100644 --- a/innobase/include/sync0sync.h +++ b/innobase/include/sync0sync.h @@ -234,15 +234,6 @@ mutex_get_waiters( /*==============*/ /* out: value to set */ mutex_t* mutex); /* in: mutex */ -/********************************************************************** -Implements the memory barrier operation which makes a serialization point to -the instruction flow. This is needed because the Pentium may speculatively -execute reads before preceding writes are committed. We could also use here -any LOCKed instruction (see Intel Software Dev. Manual, Vol. 3). */ - -void -mutex_fence(void); -/*=============*/ /* LATCHING ORDER WITHIN THE DATABASE diff --git a/innobase/include/sync0sync.ic b/innobase/include/sync0sync.ic index c11cc0d196e..816b44a5bd3 100644 --- a/innobase/include/sync0sync.ic +++ b/innobase/include/sync0sync.ic @@ -250,9 +250,9 @@ mutex_enter_func( if (!mutex_test_and_set(mutex)) { - #ifdef UNIV_SYNC_DEBUG +#ifdef UNIV_SYNC_DEBUG mutex_set_debug_info(mutex, file_name, line); - #endif +#endif mutex->file_name = file_name; mutex->line = line; diff --git a/innobase/include/univold.i b/innobase/include/univold.i deleted file mode 100644 index 8bcd28e180f..00000000000 --- a/innobase/include/univold.i +++ /dev/null @@ -1,164 +0,0 @@ -/*************************************************************************** -Version control for database, common definitions, and include files - -(c) 1994 - 2000 Innobase Oy - -Created 1/20/1994 Heikki Tuuri -****************************************************************************/ - -#ifndef univ_i -#define univ_i - -#define UNIV_INTEL -#define UNIV_PENTIUM -/* If UNIV_WINNT is not defined, we assume Windows 95 */ - -#define UNIV_WINNT -#define UNIV_WINNT4 -#define __NT__ - -#define UNIV_VISUALC - -#define __WIN__ -#define _WIN32_WINNT 0x0400 - -/* DEBUG VERSION CONTROL - ===================== */ -/* Make a non-inline debug version */ -/* -#define UNIV_DEBUG -#define UNIV_MEM_DEBUG -#define UNIV_SYNC_DEBUG -#define UNIV_SEARCH_DEBUG - -#define UNIV_IBUF_DEBUG - -#define UNIV_SEARCH_PERF_STAT -#define UNIV_SYNC_PERF_STAT -*/ -#define UNIV_LIGHT_MEM_DEBUG - -#define YYDEBUG 1 -/* -#define UNIV_SQL_DEBUG -#define UNIV_LOG_DEBUG -*/ - /* the above option prevents forcing of log to disk - at a buffer page write: it should be tested with this - option off; also some ibuf tests are suppressed */ -/* -#define UNIV_BASIC_LOG_DEBUG -*/ - /* the above option enables basic recovery debugging: - new allocated file pages are reset */ - -/* The debug version is slower, thus we may change the length of test loops -depending on the UNIV_DBC parameter */ -#ifdef UNIV_DEBUG -#define UNIV_DBC 1 -#else -#define UNIV_DBC 100 -#endif - -#ifndef UNIV_DEBUG -/* Definition for inline version */ - -#ifdef UNIV_VISUALC -#define UNIV_INLINE __inline -#elif defined(UNIV_GNUC) -#define UNIV_INLINE extern __inline__ -#endif - -#else -/* If we want to compile a noninlined version we use the following macro -definitions: */ - -#define UNIV_NONINL -#define UNIV_INLINE - -#endif /* UNIV_DEBUG */ -/* If the compiler does not know inline specifier, we use: */ -/* -#define UNIV_INLINE static -*/ - - -/* - MACHINE VERSION CONTROL - ======================= -*/ - -#ifdef UNIV_PENTIUM - -/* In a 32-bit computer word size is 4 */ -#define UNIV_WORD_SIZE 4 - -/* The following alignment is used in memory allocations in memory heap -management to ensure correct alignment for doubles etc. */ -#define UNIV_MEM_ALIGNMENT 8 - -/* The following alignment is used in aligning lints etc. */ -#define UNIV_WORD_ALIGNMENT UNIV_WORD_SIZE - -#endif - -/* - DATABASE VERSION CONTROL - ======================== -*/ - -/* The universal page size of the database */ -#define UNIV_PAGE_SIZE (2 * 8192)/* NOTE! Currently, this has to be a - power of 2 and divisible by - UNIV_MEM_ALIGNMENT */ - -/* Do non-buffered io in buffer pool read/write operations */ -#define UNIV_NON_BUFFERED_IO - -/* Maximum number of parallel threads in a parallelized operation */ -#define UNIV_MAX_PARALLELISM 32 - -/* - UNIVERSAL TYPE DEFINITIONS - ========================== -*/ - - -typedef unsigned char byte; - -/* An other basic type we use is unsigned long integer which is intended to be -equal to the word size of the machine. */ - -typedef unsigned long int ulint; - -typedef long int lint; - -/* The following type should be at least a 64-bit floating point number */ -typedef double utfloat; - -/* The 'undefined' value for a ulint */ -#define ULINT_UNDEFINED ((ulint)(-1)) - -/* The undefined 32-bit unsigned integer */ -#define ULINT32_UNDEFINED 0xFFFFFFFF - -/* Maximum value for a ulint */ -#define ULINT_MAX ((ulint)(-2)) - - -/* Definition of the boolean type */ -typedef ulint bool; - -#define TRUE 1 -#define FALSE 0 - -/* The following number as the length of a logical field means that the field -has the SQL NULL as its value. */ -#define UNIV_SQL_NULL ULINT_UNDEFINED - -#include <stdio.h> -#include "ut0dbg.h" -#include "ut0ut.h" -#include "db0err.h" - -#endif diff --git a/innobase/include/univoldmysql.i b/innobase/include/univoldmysql.i deleted file mode 100644 index 269b584d073..00000000000 --- a/innobase/include/univoldmysql.i +++ /dev/null @@ -1,181 +0,0 @@ -/*************************************************************************** -Version control for database, common definitions, and include files - -(c) 1994 - 1996 Innobase Oy - -Created 1/20/1994 Heikki Tuuri -****************************************************************************/ - -#ifndef univ_i -#define univ_i - -#define UNIV_INTEL -#define UNIV_PENTIUM -/* If UNIV_WINNT is not defined, we assume Windows 95 */ - -#define UNIV_WINNT -#define UNIV_WINNT4 - -#define UNIV_VISUALC - -/* DEBUG VERSION CONTROL - ===================== */ -/* Make a profiler version where mutex_fence does not use CPUID and therefore -is not totally safe. The sync-library must be recompiled before profiling. */ -/* -#define UNIV_PROFILE -*/ -/* When the following flag is defined, also mutex lock word reset to 0 -in mutex_exit is performed using a serializing instruction, which does not -allow speculative reads be performed before memory writes */ -/* -#define SYNC_SERIALIZE_MUTEX_RESET -*/ -/* Make a non-inline debug version */ - -#define UNIV_DEBUG -#define UNIV_MEM_DEBUG -#define UNIV_SYNC_DEBUG -#define UNIV_SEARCH_DEBUG - -#define UNIV_IBUF_DEBUG - -#define UNIV_SEARCH_PERF_STAT -#define UNIV_SYNC_PERF_STAT - - -#define UNIV_LIGHT_MEM_DEBUG - -#define YYDEBUG 1 -/* -#define UNIV_SQL_DEBUG -#define UNIV_LOG_DEBUG -*/ - /* the above option prevents forcing of log to disk - at a buffer page write: it should be tested with this - option off; also some ibuf tests are suppressed */ -/* -#define UNIV_BASIC_LOG_DEBUG -*/ - /* the above option enables basic recovery debugging: - new allocated file pages are reset */ - -/* The debug version is slower, thus we may change the length of test loops -depending on the UNIV_DBC parameter */ -#ifdef UNIV_DEBUG -#define UNIV_DBC 1 -#else -#define UNIV_DBC 100 -#endif - -#ifndef UNIV_DEBUG -/* Definition for inline version */ - -#ifdef UNIV_VISUALC -#define UNIV_INLINE __inline -#elif defined(UNIV_GNUC) -#define UNIV_INLINE extern __inline__ -#endif - -#else -/* If we want to compile a noninlined version we use the following macro -definitions: */ - -#define UNIV_NONINL -#define UNIV_INLINE - -#endif /* UNIV_DEBUG */ -/* If the compiler does not know inline specifier, we use: */ -/* -#define UNIV_INLINE static -*/ - - -/* - MACHINE VERSION CONTROL - ======================= -*/ - -#ifdef UNIV_PENTIUM - -/* In a 32-bit computer word size is 4 */ -#define UNIV_WORD_SIZE 4 - -/* The following alignment is used in memory allocations in memory heap -management to ensure correct alignment for doubles etc. */ -#define UNIV_MEM_ALIGNMENT 8 - -/* The following alignment is used in aligning lints etc. */ -#define UNIV_WORD_ALIGNMENT UNIV_WORD_SIZE - -#endif - -/* - DATABASE VERSION CONTROL - ======================== -*/ - -/* The universal page size of the database */ -#define UNIV_PAGE_SIZE 8192 /* NOTE! Currently, this has to be a - power of 2 and divisible by - UNIV_MEM_ALIGNMENT */ -/* 2-based logarithm of UNIV_PAGE_SIZE */ -#define UNIV_PAGE_SIZE_SHIFT 13 - -/* Do asynchronous io in buffer pool read/write operations */ -#ifdef UNIV_WINNT -#define UNIV_ASYNC_IO -#endif - -/* Do non-buffered io in buffer pool read/write operations */ -#define UNIV_NON_BUFFERED_IO - -/* Maximum number of parallel threads in a parallelized operation */ -#define UNIV_MAX_PARALLELISM 32 - -/* - UNIVERSAL TYPE DEFINITIONS - ========================== -*/ - -/* -typedef unsigned char byte; -*/ - -/* An other basic type we use is unsigned long integer which is intended to be -equal to the word size of the machine. */ - -typedef unsigned long int ulint; - -typedef long int lint; - -/* The following type should be at least a 64-bit floating point number */ -typedef double utfloat; - -/* The 'undefined' value for a ulint */ -#define ULINT_UNDEFINED ((ulint)(-1)) - -/* The undefined 32-bit unsigned integer */ -#define ULINT32_UNDEFINED 0xFFFFFFFF - -/* Maximum value for a ulint */ -#define ULINT_MAX ((ulint)(-2)) - -/* Definition of the boolean type */ -#ifndef bool -typedef ulint bool; -#endif - -#define TRUE 1 -#define FALSE 0 - -/* The following number as the length of a logical field means that the field -has the SQL NULL as its value. */ -#define UNIV_SQL_NULL ULINT_UNDEFINED - -#include <stdio.h> -#include "ut0dbg.h" -#include "ut0ut.h" -#include "db0err.h" - -#endif diff --git a/innobase/include/usr0sess.h b/innobase/include/usr0sess.h index 365f828ecfc..e277d801672 100644 --- a/innobase/include/usr0sess.h +++ b/innobase/include/usr0sess.h @@ -66,28 +66,6 @@ sess_open( byte* addr_buf, /* in: client address */ ulint addr_len); /* in: client address length */ /************************************************************************* -Closes a session, freeing the memory occupied by it. */ - -void -sess_close( -/*=======*/ - sess_t* sess); /* in, own: session object */ -/************************************************************************* -Raises an SQL error. */ - -void -sess_raise_error_low( -/*=================*/ - trx_t* trx, /* in: transaction */ - ulint err_no, /* in: error number */ - ulint type, /* in: more info of the error, or 0 */ - dict_table_t* table, /* in: dictionary table or NULL */ - dict_index_t* index, /* in: table index or NULL */ - dtuple_t* tuple, /* in: tuple to insert or NULL */ - rec_t* rec, /* in: record or NULL */ - char* err_str);/* in: arbitrary null-terminated error string, - or NULL */ -/************************************************************************* Closes a session, freeing the memory occupied by it, if it is in a state where it should be closed. */ @@ -117,16 +95,6 @@ sess_srv_msg_send_simple( ulint rel_kernel); /* in: SESS_RELEASE_KERNEL or SESS_NOT_RELEASE_KERNEL */ /*************************************************************************** -Processes a message from a client. NOTE: May release the kernel mutex -temporarily. */ - -void -sess_receive_msg_rel_kernel( -/*========================*/ - sess_t* sess, /* in: session */ - byte* str, /* in: message string */ - ulint len); /* in: message length */ -/*************************************************************************** When a command has been completed, this function sends the message about it to the client. */ @@ -136,17 +104,6 @@ sess_command_completed_message( sess_t* sess, /* in: session */ byte* msg, /* in: message buffer */ ulint len); /* in: message data length */ -/*********************************************************************** -Starts a new connection and a session, or starts a query based on a client -message. This is called by a SRV_COM thread. */ - -void -sess_process_cli_msg( -/*=================*/ - byte* str, /* in: message string */ - ulint len, /* in: string length */ - byte* addr, /* in: address string */ - ulint alen); /* in: address length */ /* The session handle. All fields are protected by the kernel mutex */ diff --git a/innobase/include/ut0rnd.ic b/innobase/include/ut0rnd.ic index e166a26fe86..5493c37404a 100644 --- a/innobase/include/ut0rnd.ic +++ b/innobase/include/ut0rnd.ic @@ -176,19 +176,19 @@ ut_fold_string( /* out: folded value */ char* str) /* in: null-terminated string */ { - #ifdef UNIV_DEBUG +#ifdef UNIV_DEBUG ulint i = 0; - #endif +#endif ulint fold = 0; ut_ad(str); while (*str != '\0') { - #ifdef UNIV_DEBUG +#ifdef UNIV_DEBUG i++; ut_a(i < 100); - #endif +#endif fold = ut_fold_ulint_pair(fold, (ulint)(*str)); str++; |