Commit bddb5a0c authored by marko's avatar marko

branches/zip: Add a UNIV_INTERN qualifier to every global function declaration

in *.h files, so that the function signatures in the *.h and *.c files fully
match each other.

ut_dulint_sort(): Add a UNIV_INTERN qualifier also to the function definition.
parent 99660234
......@@ -57,7 +57,7 @@ insert buffer to speed up inserts */
/******************************************************************
Gets the root node of a tree and x-latches it. */
UNIV_INTERN
page_t*
btr_root_get(
/*=========*/
......@@ -134,7 +134,7 @@ btr_page_get_prev(
/*****************************************************************
Gets pointer to the previous user record in the tree. It is assumed
that the caller has appropriate latches on the page and its neighbor. */
UNIV_INTERN
rec_t*
btr_get_prev_user_rec(
/*==================*/
......@@ -145,7 +145,7 @@ btr_get_prev_user_rec(
/*****************************************************************
Gets pointer to the next user record in the tree. It is assumed
that the caller has appropriate latches on the page and its neighbor. */
UNIV_INTERN
rec_t*
btr_get_next_user_rec(
/*==================*/
......@@ -174,7 +174,7 @@ btr_node_ptr_get_child_page_no(
const ulint* offsets);/* in: array returned by rec_get_offsets() */
/****************************************************************
Creates the root node for a new index tree. */
UNIV_INTERN
ulint
btr_create(
/*=======*/
......@@ -190,7 +190,7 @@ btr_create(
/****************************************************************
Frees a B-tree except the root page, which MUST be freed after this
by calling btr_free_root. */
UNIV_INTERN
void
btr_free_but_not_root(
/*==================*/
......@@ -200,7 +200,7 @@ btr_free_but_not_root(
ulint root_page_no); /* in: root page number */
/****************************************************************
Frees the B-tree root page. Other tree MUST already have been freed. */
UNIV_INTERN
void
btr_free_root(
/*==========*/
......@@ -216,7 +216,7 @@ the tuple. It is assumed that mtr contains an x-latch on the tree.
NOTE that the operation of this function must always succeed,
we cannot reverse it: therefore enough free disk space must be
guaranteed to be available before this function is called. */
UNIV_INTERN
rec_t*
btr_root_raise_and_insert(
/*======================*/
......@@ -234,7 +234,7 @@ IMPORTANT: if btr_page_reorganize() is invoked on a compressed leaf
page of a non-clustered index, the caller must update the insert
buffer free bits in the same mini-transaction in such a way that the
modification will be redo-logged. */
UNIV_INTERN
ibool
btr_page_reorganize(
/*================*/
......@@ -245,7 +245,7 @@ btr_page_reorganize(
/*****************************************************************
Decides if the page should be split at the convergence point of
inserts converging to left. */
UNIV_INTERN
ibool
btr_page_get_split_rec_to_left(
/*===========================*/
......@@ -257,7 +257,7 @@ btr_page_get_split_rec_to_left(
/*****************************************************************
Decides if the page should be split at the convergence point of
inserts converging to right. */
UNIV_INTERN
ibool
btr_page_get_split_rec_to_right(
/*============================*/
......@@ -273,7 +273,7 @@ is released within this function! NOTE that the operation of this
function must always succeed, we cannot reverse it: therefore
enough free disk space must be guaranteed to be available before
this function is called. */
UNIV_INTERN
rec_t*
btr_page_split_and_insert(
/*======================*/
......@@ -289,7 +289,7 @@ btr_page_split_and_insert(
/***********************************************************
Inserts a data tuple to a tree on a non-leaf level. It is assumed
that mtr holds an x-latch on the tree. */
UNIV_INTERN
void
btr_insert_on_non_leaf_level(
/*=========================*/
......@@ -299,7 +299,7 @@ btr_insert_on_non_leaf_level(
mtr_t* mtr); /* in: mtr */
/********************************************************************
Sets a record as the predefined minimum record. */
UNIV_INTERN
void
btr_set_min_rec_mark(
/*=================*/
......@@ -307,7 +307,7 @@ btr_set_min_rec_mark(
mtr_t* mtr); /* in: mtr */
/*****************************************************************
Deletes on the upper level the node pointer to a page. */
UNIV_INTERN
void
btr_node_ptr_delete(
/*================*/
......@@ -317,7 +317,7 @@ btr_node_ptr_delete(
#ifdef UNIV_DEBUG
/****************************************************************
Checks that the node pointer to a page is appropriate. */
UNIV_INTERN
ibool
btr_check_node_ptr(
/*===============*/
......@@ -335,7 +335,7 @@ level lifts the records of the page to the father page, thus reducing the
tree height. It is assumed that mtr holds an x-latch on the tree and on the
page. If cursor is on the leaf level, mtr must also hold x-latches to
the brothers, if they exist. */
UNIV_INTERN
ibool
btr_compress(
/*=========*/
......@@ -349,7 +349,7 @@ btr_compress(
Discards a page from a B-tree. This is used to remove the last record from
a B-tree page: the whole page must be removed at the same time. This cannot
be used for the root page, which is allowed to be empty. */
UNIV_INTERN
void
btr_discard_page(
/*=============*/
......@@ -359,7 +359,7 @@ btr_discard_page(
/********************************************************************
Parses the redo log record for setting an index record as the predefined
minimum record. */
UNIV_INTERN
byte*
btr_parse_set_min_rec_mark(
/*=======================*/
......@@ -371,7 +371,7 @@ btr_parse_set_min_rec_mark(
mtr_t* mtr); /* in: mtr or NULL */
/***************************************************************
Parses a redo log record of reorganizing a page. */
UNIV_INTERN
byte*
btr_parse_page_reorganize(
/*======================*/
......@@ -383,7 +383,7 @@ btr_parse_page_reorganize(
mtr_t* mtr); /* in: mtr or NULL */
/******************************************************************
Gets the number of pages in a B-tree. */
UNIV_INTERN
ulint
btr_get_size(
/*=========*/
......@@ -393,7 +393,7 @@ btr_get_size(
/******************************************************************
Allocates a new file page to be used in an index tree. NOTE: we assume
that the caller has made the reservation for free extents! */
UNIV_INTERN
buf_block_t*
btr_page_alloc(
/*===========*/
......@@ -409,7 +409,7 @@ btr_page_alloc(
/******************************************************************
Frees a file page used in an index tree. NOTE: cannot free field external
storage pages because the page must contain info on its level. */
UNIV_INTERN
void
btr_page_free(
/*==========*/
......@@ -420,7 +420,7 @@ btr_page_free(
Frees a file page used in an index tree. Can be used also to BLOB
external storage pages, because the page level 0 can be given as an
argument. */
UNIV_INTERN
void
btr_page_free_low(
/*==============*/
......@@ -431,14 +431,14 @@ btr_page_free_low(
#ifdef UNIV_BTR_PRINT
/*****************************************************************
Prints size info of a B-tree. */
UNIV_INTERN
void
btr_print_size(
/*===========*/
dict_index_t* index); /* in: index tree */
/******************************************************************
Prints directories and other info of all nodes in the index. */
UNIV_INTERN
void
btr_print_index(
/*============*/
......@@ -449,7 +449,7 @@ btr_print_index(
/****************************************************************
Checks the size and number of fields in a record based on the definition of
the index. */
UNIV_INTERN
ibool
btr_index_rec_validate(
/*===================*/
......@@ -461,7 +461,7 @@ btr_index_rec_validate(
and page on error */
/******************************************************************
Checks the consistency of an index tree. */
UNIV_INTERN
ibool
btr_validate_index(
/*===============*/
......
......@@ -105,7 +105,7 @@ to node pointer page number fields on the upper levels of the tree!
Note that if mode is PAGE_CUR_LE, which is used in inserts, then
cursor->up_match and cursor->low_match both will have sensible values.
If mode is PAGE_CUR_GE, then up_match will a have a sensible value. */
UNIV_INTERN
void
btr_cur_search_to_nth_level(
/*========================*/
......@@ -139,7 +139,7 @@ btr_cur_search_to_nth_level(
mtr_t* mtr); /* in: mtr */
/*********************************************************************
Opens a cursor at either end of an index. */
UNIV_INTERN
void
btr_cur_open_at_index_side(
/*=======================*/
......@@ -151,7 +151,7 @@ btr_cur_open_at_index_side(
mtr_t* mtr); /* in: mtr */
/**************************************************************************
Positions a cursor at a randomly chosen position within a B-tree. */
UNIV_INTERN
void
btr_cur_open_at_rnd_pos(
/*====================*/
......@@ -165,7 +165,7 @@ It is assumed that mtr holds an x-latch on the page. The operation does
not succeed if there is too little space on the page. If there is just
one record on the page, the insert will always succeed; this is to
prevent trying to split a page with just one record. */
UNIV_INTERN
ulint
btr_cur_optimistic_insert(
/*======================*/
......@@ -194,7 +194,7 @@ Performs an insert on a page of an index tree. It is assumed that mtr
holds an x-latch on the tree and on the cursor page. If the insert is
made on the leaf level, to avoid deadlocks, mtr must also own x-latches
to brothers of page, if those brothers exist. */
UNIV_INTERN
ulint
btr_cur_pessimistic_insert(
/*=======================*/
......@@ -218,7 +218,7 @@ btr_cur_pessimistic_insert(
mtr_t* mtr); /* in: mtr */
/*****************************************************************
Updates a record when the update causes no size changes in its fields. */
UNIV_INTERN
ulint
btr_cur_update_in_place(
/*====================*/
......@@ -238,7 +238,7 @@ Tries to update a record on a page in an index tree. It is assumed that mtr
holds an x-latch on the page. The operation does not succeed if there is too
little space on the page or if the update would result in too empty a page,
so that tree compression is recommended. */
UNIV_INTERN
ulint
btr_cur_optimistic_update(
/*======================*/
......@@ -263,7 +263,7 @@ Performs an update of a record on a page of a tree. It is assumed
that mtr holds an x-latch on the tree and on the cursor page. If the
update is made on the leaf level, to avoid deadlocks, mtr must also
own x-latches to brothers of page, if those brothers exist. */
UNIV_INTERN
ulint
btr_cur_pessimistic_update(
/*=======================*/
......@@ -287,7 +287,7 @@ Marks a clustered index record deleted. Writes an undo log record to
undo log on this delete marking. Writes in the trx id field the id
of the deleting transaction, and in the roll ptr field pointer to the
undo log record created. */
UNIV_INTERN
ulint
btr_cur_del_mark_set_clust_rec(
/*===========================*/
......@@ -300,7 +300,7 @@ btr_cur_del_mark_set_clust_rec(
mtr_t* mtr); /* in: mtr */
/***************************************************************
Sets a secondary index record delete mark to TRUE or FALSE. */
UNIV_INTERN
ulint
btr_cur_del_mark_set_sec_rec(
/*=========================*/
......@@ -314,7 +314,7 @@ btr_cur_del_mark_set_sec_rec(
/***************************************************************
Sets a secondary index record delete mark to FALSE. This function is
only used by the insert buffer insert merge mechanism. */
UNIV_INTERN
void
btr_cur_del_unmark_for_ibuf(
/*========================*/
......@@ -330,7 +330,7 @@ that mtr holds an x-latch on the tree and on the cursor page. To avoid
deadlocks, mtr must also own x-latches to brothers of page, if those
brothers exist. NOTE: it is assumed that the caller has reserved enough
free extents so that the compression will always succeed if done! */
UNIV_INTERN
ibool
btr_cur_compress_if_useful(
/*=======================*/
......@@ -343,7 +343,7 @@ btr_cur_compress_if_useful(
Removes the record on which the tree cursor is positioned. It is assumed
that the mtr has an x-latch on the page where the cursor is positioned,
but no latch on the whole tree. */
UNIV_INTERN
ibool
btr_cur_optimistic_delete(
/*======================*/
......@@ -361,7 +361,7 @@ or if it is the only page on the level. It is assumed that mtr holds
an x-latch on the tree and on the cursor page. To avoid deadlocks,
mtr must also own x-latches to brothers of page, if those brothers
exist. */
UNIV_INTERN
ibool
btr_cur_pessimistic_delete(
/*=======================*/
......@@ -383,7 +383,7 @@ btr_cur_pessimistic_delete(
mtr_t* mtr); /* in: mtr */
/***************************************************************
Parses a redo log record of updating a record in-place. */
UNIV_INTERN
byte*
btr_cur_parse_update_in_place(
/*==========================*/
......@@ -396,7 +396,7 @@ btr_cur_parse_update_in_place(
/********************************************************************
Parses the redo log record for delete marking or unmarking of a clustered
index record. */
UNIV_INTERN
byte*
btr_cur_parse_del_mark_set_clust_rec(
/*=================================*/
......@@ -409,7 +409,7 @@ btr_cur_parse_del_mark_set_clust_rec(
/********************************************************************
Parses the redo log record for delete marking or unmarking of a secondary
index record. */
UNIV_INTERN
byte*
btr_cur_parse_del_mark_set_sec_rec(
/*===============================*/
......@@ -420,7 +420,7 @@ btr_cur_parse_del_mark_set_sec_rec(
page_zip_des_t* page_zip);/* in/out: compressed page, or NULL */
/***********************************************************************
Estimates the number of rows in a given index range. */
UNIV_INTERN
ib_longlong
btr_estimate_n_rows_in_range(
/*=========================*/
......@@ -434,7 +434,7 @@ btr_estimate_n_rows_in_range(
Estimates the number of different key values in a given index, for
each n-column prefix of the index where n <= dict_index_get_n_unique(index).
The estimates are stored in the array index->stat_n_diff_key_vals. */
UNIV_INTERN
void
btr_estimate_number_of_different_key_vals(
/*======================================*/
......@@ -444,7 +444,7 @@ Marks not updated extern fields as not-owned by this record. The ownership
is transferred to the updated record which is inserted elsewhere in the
index tree. In purge only the owner of externally stored field is allowed
to free the field. */
UNIV_INTERN
void
btr_cur_mark_extern_inherited_fields(
/*=================================*/
......@@ -459,7 +459,7 @@ btr_cur_mark_extern_inherited_fields(
The complement of the previous function: in an update entry may inherit
some externally stored fields from a record. We must mark them as inherited
in entry, so that they are not freed in a rollback. */
UNIV_INTERN
void
btr_cur_mark_dtuple_inherited_extern(
/*=================================*/
......@@ -468,7 +468,7 @@ btr_cur_mark_dtuple_inherited_extern(
const upd_t* update); /* in: update vector */
/***********************************************************************
Marks all extern fields in a dtuple as owned by the record. */
UNIV_INTERN
void
btr_cur_unmark_dtuple_extern_fields(
/*================================*/
......@@ -478,7 +478,7 @@ Stores the fields in big_rec_vec to the tablespace and puts pointers to
them in rec. The extern flags in rec will have to be set beforehand.
The fields are stored on pages allocated from leaf node
file segment of the index tree. */
UNIV_INTERN
ulint
btr_store_big_rec_extern_fields(
/*============================*/
......@@ -500,7 +500,7 @@ Frees the space in an externally stored field to the file space
management if the field in data is owned the externally stored field,
in a rollback we may have the additional condition that the field must
not be inherited. */
UNIV_INTERN
void
btr_free_externally_stored_field(
/*=============================*/
......@@ -530,7 +530,7 @@ btr_free_externally_stored_field(
/***********************************************************************
Copies the prefix of an externally stored field of a record. The
clustered index record must be protected by a lock or a page latch. */
UNIV_INTERN
ulint
btr_copy_externally_stored_field_prefix(
/*====================================*/
......@@ -546,7 +546,7 @@ btr_copy_externally_stored_field_prefix(
ulint local_len);/* in: length of data, in bytes */
/***********************************************************************
Copies an externally stored field of a record to mem heap. */
UNIV_INTERN
byte*
btr_rec_copy_externally_stored_field(
/*=================================*/
......@@ -563,7 +563,7 @@ btr_rec_copy_externally_stored_field(
Flags the data tuple fields that are marked as extern storage in the
update vector. We use this function to remember which fields we must
mark as extern storage in a record inserted for an update. */
UNIV_INTERN
ulint
btr_push_update_extern_fields(
/*==========================*/
......
......@@ -31,21 +31,21 @@ of a scroll cursor easier */
/******************************************************************
Allocates memory for a persistent cursor object and initializes the cursor. */
UNIV_INTERN
btr_pcur_t*
btr_pcur_create_for_mysql(void);
/*============================*/
/* out, own: persistent cursor */
/******************************************************************
Frees the memory for a persistent cursor object. */
UNIV_INTERN
void
btr_pcur_free_for_mysql(
/*====================*/
btr_pcur_t* cursor); /* in, own: persistent cursor */
/******************************************************************
Copies the stored position of a pcur to another pcur. */
UNIV_INTERN
void
btr_pcur_copy_stored_position(
/*==========================*/
......@@ -143,7 +143,7 @@ PAGE_CUR_LE, on the last user record. If no such user record exists, then
in the first case sets the cursor after last in tree, and in the latter case
before first in tree. The latching mode must be BTR_SEARCH_LEAF or
BTR_MODIFY_LEAF. */
UNIV_INTERN
void
btr_pcur_open_on_user_rec(
/*======================*/
......@@ -180,7 +180,7 @@ cursor data structure, or just setting a flag if the cursor id before the
first in an EMPTY tree, or after the last in an EMPTY tree. NOTE that the
page where the cursor is positioned must not be empty if the index tree is
not totally empty! */
UNIV_INTERN
void
btr_pcur_store_position(
/*====================*/
......@@ -198,7 +198,7 @@ infimum;
GREATER than the user record which was the predecessor of the supremum.
(4) cursor was positioned before the first or after the last in an empty tree:
restores to before first or after the last in the tree. */
UNIV_INTERN
ibool
btr_pcur_restore_position(
/*======================*/
......@@ -216,7 +216,7 @@ releases the page latch and bufferfix reserved by the cursor.
NOTE! In the case of BTR_LEAF_MODIFY, there should not exist changes
made by the current mini-transaction to the data protected by the
cursor latch, as then the latch must not be released until mtr_commit. */
UNIV_INTERN
void
btr_pcur_release_leaf(
/*==================*/
......@@ -288,7 +288,7 @@ btr_pcur_move_to_next(
/*************************************************************
Moves the persistent cursor to the previous record in the tree. If no records
are left, the cursor stays 'before first in tree'. */
UNIV_INTERN
ibool
btr_pcur_move_to_prev(
/*==================*/
......@@ -322,7 +322,7 @@ Moves the persistent cursor to the first record on the next page.
Releases the latch on the current page, and bufferunfixes it.
Note that there must not be modifications on the current page,
as then the x-latch can be released only in mtr_commit. */
UNIV_INTERN
void
btr_pcur_move_to_next_page(
/*=======================*/
......@@ -339,7 +339,7 @@ The alphabetical position of the cursor is guaranteed to be sensible
on return, but it may happen that the cursor is not positioned on the
last record of any page, because the structure of the tree may have
changed while the cursor had no latches. */
UNIV_INTERN
void
btr_pcur_move_backward_from_page(
/*=============================*/
......
......@@ -19,7 +19,7 @@ Created 2/17/1996 Heikki Tuuri
/*********************************************************************
Creates and initializes the adaptive search system at a database start. */
UNIV_INTERN
void
btr_search_sys_create(
/*==================*/
......@@ -27,13 +27,13 @@ btr_search_sys_create(
/************************************************************************
Disable the adaptive hash search system and empty the index. */
UNIV_INTERN
void
btr_search_disable(void);
/*====================*/
/************************************************************************
Enable the adaptive hash search system. */
UNIV_INTERN
void
btr_search_enable(void);
/*====================*/
......@@ -48,7 +48,7 @@ btr_search_get_info(
dict_index_t* index); /* in: index */
/*********************************************************************
Creates and initializes a search info struct. */
UNIV_INTERN
btr_search_t*
btr_search_info_create(
/*===================*/
......@@ -67,7 +67,7 @@ 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
both have sensible values. */
UNIV_INTERN
ibool
btr_search_guess_on_hash(
/*=====================*/
......@@ -87,7 +87,7 @@ Moves or deletes hash entries for moved records. If new_page is already hashed,
then the hash index for page, if any, is dropped. If new_page is not hashed,
and page is hashed, then a new hash index is built to new_page with the same
parameters as page (this often happens when a page is split). */
UNIV_INTERN
void
btr_search_move_or_delete_hash_entries(
/*===================================*/
......@@ -100,7 +100,7 @@ btr_search_move_or_delete_hash_entries(
dict_index_t* index); /* in: record descriptor */
/************************************************************************
Drops a page hash index. */
UNIV_INTERN
void
btr_search_drop_page_hash_index(
/*============================*/
......@@ -111,7 +111,7 @@ btr_search_drop_page_hash_index(
/************************************************************************
Drops a page hash index when a page is freed from a fseg to the file system.
Drops possible hash index if the page happens to be in the buffer pool. */
UNIV_INTERN
void
btr_search_drop_page_hash_when_freed(
/*=================================*/
......@@ -121,7 +121,7 @@ btr_search_drop_page_hash_when_freed(
ulint page_no); /* in: page number */
/************************************************************************
Updates the page hash index when a single record is inserted on a page. */
UNIV_INTERN
void
btr_search_update_hash_node_on_insert(
/*==================================*/
......@@ -131,7 +131,7 @@ btr_search_update_hash_node_on_insert(
to the cursor */
/************************************************************************
Updates the page hash index when a single record is inserted on a page. */
UNIV_INTERN
void
btr_search_update_hash_on_insert(
/*=============================*/
......@@ -141,7 +141,7 @@ btr_search_update_hash_on_insert(
to the cursor */
/************************************************************************
Updates the page hash index when a single record is deleted from a page. */
UNIV_INTERN
void
btr_search_update_hash_on_delete(
/*=============================*/
......@@ -150,7 +150,7 @@ btr_search_update_hash_on_delete(
the record is not yet deleted */
/************************************************************************
Validates the search system. */
UNIV_INTERN
ibool
btr_search_validate(void);
/*======================*/
......
......@@ -80,7 +80,7 @@ enum buf_page_state {
/************************************************************************
Creates the buffer pool. */
UNIV_INTERN
buf_pool_t*
buf_pool_init(void);
/*===============*/
......@@ -89,7 +89,7 @@ buf_pool_init(void);
/************************************************************************
Frees the buffer pool at shutdown. This must not be invoked before
freeing all mutexes. */
UNIV_INTERN
void
buf_pool_free(void);
/*===============*/
......@@ -97,7 +97,7 @@ buf_pool_free(void);
/************************************************************************
Relocate a buffer control block. Relocates the block on the LRU list
and in buf_pool->page_hash. Does not relocate bpage->list. */
UNIV_INTERN
void
buf_relocate(
/*=========*/
......@@ -106,7 +106,7 @@ buf_relocate(
__attribute__((nonnull));
/************************************************************************
Resizes the buffer pool. */
UNIV_INTERN
void
buf_pool_resize(void);
/*=================*/
......@@ -183,7 +183,7 @@ RW_X_LATCH are allowed as LA! */
/************************************************************************
This is the general function used to get optimistic access to a database
page. */
UNIV_INTERN
ibool
buf_page_optimistic_get_func(
/*=========================*/
......@@ -198,7 +198,7 @@ buf_page_optimistic_get_func(
/************************************************************************
This is used to get access to a known database page, when no waiting can be
done. */
UNIV_INTERN
ibool
buf_page_get_known_nowait(
/*======================*/
......@@ -235,7 +235,7 @@ NOTE: the page is not protected by any latch. Mutual exclusion has to
be implemented at a higher level. In other words, all possible
accesses to a given page through this function must be protected by
the same set of mutexes or latches. */
UNIV_INTERN
buf_page_t*
buf_page_get_zip(
/*=============*/
......@@ -246,7 +246,7 @@ buf_page_get_zip(
ulint offset);/* in: page number */
/************************************************************************
This is the general function used to get access to a database page. */
UNIV_INTERN
buf_block_t*
buf_page_get_gen(
/*=============*/
......@@ -267,7 +267,7 @@ Initializes a page to the buffer buf_pool. The page is usually not read
from a file even if it cannot be found in the buffer buf_pool. This is one
of the functions which perform to a block a state transition NOT_USED =>
FILE_PAGE (the other is buf_page_get_gen). */
UNIV_INTERN
buf_block_t*
buf_page_create(
/*============*/
......@@ -280,7 +280,7 @@ buf_page_create(
#ifdef UNIV_HOTBACKUP
/************************************************************************
Inits a page to the buffer buf_pool, for use in ibbackup --restore. */
UNIV_INTERN
void
buf_page_init_for_backup_restore(
/*=============================*/
......@@ -313,7 +313,7 @@ buf_page_release(
Moves a page to the start of the buffer pool LRU list. This high-level
function can be used to prevent an important page from from slipping out of
the buffer pool. */
UNIV_INTERN
void
buf_page_make_young(
/*================*/
......@@ -333,7 +333,7 @@ buf_page_peek(
/************************************************************************
Resets the check_index_page_at_flush field of a page if found in the buffer
pool. */
UNIV_INTERN
void
buf_reset_check_index_page_at_flush(
/*================================*/
......@@ -345,7 +345,7 @@ Sets file_page_was_freed TRUE if the page is found in the buffer pool.
This function should be called when we free a file page and want the
debug version to check that it is not accessed any more unless
reallocated. */
UNIV_INTERN
buf_page_t*
buf_page_set_file_page_was_freed(
/*=============================*/
......@@ -358,7 +358,7 @@ Sets file_page_was_freed FALSE if the page is found in the buffer pool.
This function should be called when we free a file page and want the
debug version to check that it is not accessed any more unless
reallocated. */
UNIV_INTERN
buf_page_t*
buf_page_reset_file_page_was_freed(
/*===============================*/
......@@ -401,7 +401,7 @@ buf_page_peek_if_too_old(
Returns the current state of is_hashed of a page. FALSE if the page is
not in the pool. NOTE that this operation does not fix the page in the
pool if it is found there. */
UNIV_INTERN
ibool
buf_page_peek_if_search_hashed(
/*===========================*/
......@@ -441,7 +441,7 @@ buf_block_get_modify_clock(
Calculates a page checksum which is stored to the page when it is written
to a file. Note that we must be careful to calculate the same value
on 32-bit and 64-bit architectures. */
UNIV_INTERN
ulint
buf_calc_page_new_checksum(
/*=======================*/
......@@ -454,7 +454,7 @@ checksum.
NOTE: we must first store the new formula checksum to
FIL_PAGE_SPACE_OR_CHKSUM before calculating and storing this old checksum
because this takes that field as an input! */
UNIV_INTERN
ulint
buf_calc_page_old_checksum(
/*=======================*/
......@@ -462,7 +462,7 @@ buf_calc_page_old_checksum(
const byte* page); /* in: buffer page */
/************************************************************************
Checks if a page is corrupt. */
UNIV_INTERN
ibool
buf_page_is_corrupted(
/*==================*/
......@@ -494,7 +494,7 @@ buf_block_get_lock_hash_val(
/*************************************************************************
Finds a block in the buffer pool that points to a
given compressed page. */
UNIV_INTERN
buf_block_t*
buf_pool_contains_zip(
/*==================*/
......@@ -505,7 +505,7 @@ buf_pool_contains_zip(
#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
/*************************************************************************
Validates the buffer pool data structure. */
UNIV_INTERN
ibool
buf_validate(void);
/*==============*/
......@@ -513,14 +513,14 @@ buf_validate(void);
#if defined UNIV_DEBUG_PRINT || defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
/*************************************************************************
Prints info of the buffer pool data structure. */
UNIV_INTERN
void
buf_print(void);
/*============*/
#endif /* UNIV_DEBUG_PRINT || UNIV_DEBUG || UNIV_BUF_DEBUG */
/************************************************************************
Prints a page to stderr. */
UNIV_INTERN
void
buf_page_print(
/*===========*/
......@@ -529,19 +529,19 @@ buf_page_print(
0 for uncompressed pages */
/*************************************************************************
Returns the number of latched pages in the buffer pool. */
UNIV_INTERN
ulint
buf_get_latched_pages_number(void);
/*==============================*/
/*************************************************************************
Returns the number of pending buf pool ios. */
UNIV_INTERN
ulint
buf_get_n_pending_ios(void);
/*=======================*/
/*************************************************************************
Prints info of the buffer i/o. */
UNIV_INTERN
void
buf_print_io(
/*=========*/
......@@ -549,26 +549,26 @@ buf_print_io(
/*************************************************************************
Returns the ratio in percents of modified pages in the buffer pool /
database pages in the buffer pool. */
UNIV_INTERN
ulint
buf_get_modified_ratio_pct(void);
/*============================*/
/**************************************************************************
Refreshes the statistics used to print per-second averages. */
UNIV_INTERN
void
buf_refresh_io_stats(void);
/*======================*/
/*************************************************************************
Checks that all file pages in the buffer are in a replaceable state. */
UNIV_INTERN
ibool
buf_all_freed(void);
/*===============*/
/*************************************************************************
Checks that there currently are no pending i/o-operations for the buffer
pool. */
UNIV_INTERN
ibool
buf_pool_check_no_pending_io(void);
/*==============================*/
......@@ -577,7 +577,7 @@ buf_pool_check_no_pending_io(void);
Invalidates the file pages in the buffer pool when an archive recovery is
completed. All the file pages buffered must be in a replaceable state when
this function is called: not latched and not modified. */
UNIV_INTERN
void
buf_pool_invalidate(void);
/*=====================*/
......@@ -886,7 +886,7 @@ then this function does nothing.
Sets the io_fix flag to BUF_IO_READ and sets a non-recursive exclusive lock
on the buffer frame. The io-handler must take care that the flag is cleared
and the lock released later. */
UNIV_INTERN
buf_page_t*
buf_page_init_for_read(
/*===================*/
......@@ -903,7 +903,7 @@ buf_page_init_for_read(
/************************************************************************
Completes an asynchronous read or write request of a file page to or from
the buffer pool. */
UNIV_INTERN
void
buf_page_io_complete(
/*=================*/
......@@ -948,7 +948,7 @@ buf_pool_clock_tic(void);
/* out: new clock value */
/*************************************************************************
Gets the current length of the free list of buffer blocks. */
UNIV_INTERN
ulint
buf_get_free_list_len(void);
/*=======================*/
......
......@@ -16,21 +16,21 @@ Created 11/5/1995 Heikki Tuuri
/************************************************************************
Inserts a modified block into the flush list. */
UNIV_INTERN
void
buf_flush_insert_into_flush_list(
/*=============================*/
buf_page_t* bpage); /* in: block which is modified */
/************************************************************************
Remove a block from the flush list of modified blocks. */
UNIV_INTERN
void
buf_flush_remove(
/*=============*/
buf_page_t* bpage); /* in: pointer to the block in question */
/************************************************************************
Updates the flush system data structures when a write is completed. */
UNIV_INTERN
void
buf_flush_write_complete(
/*=====================*/
......@@ -38,13 +38,13 @@ buf_flush_write_complete(
/*************************************************************************
Flushes pages from the end of the LRU list if there is too small
a margin of replaceable pages there. */
UNIV_INTERN
void
buf_flush_free_margin(void);
/*=======================*/
/************************************************************************
Initializes a page for writing to the tablespace. */
UNIV_INTERN
void
buf_flush_init_for_writing(
/*=======================*/
......@@ -58,7 +58,7 @@ NOTE 1: in the case of an LRU flush the calling thread may own latches to
pages: to avoid deadlocks, this function must be written so that it cannot
end up waiting for these latches! NOTE 2: in the case of a flush list flush,
the calling thread is not allowed to own any latches on pages! */
UNIV_INTERN
ulint
buf_flush_batch(
/*============*/
......@@ -80,7 +80,7 @@ buf_flush_batch(
min_n), otherwise ignored */
/**********************************************************************
Waits until a flush batch of the given type ends */
UNIV_INTERN
void
buf_flush_wait_batch_end(
/*=====================*/
......@@ -109,7 +109,7 @@ buf_flush_recv_note_modification(
/************************************************************************
Returns TRUE if the file page block is immediately suitable for replacement,
i.e., transition FILE_PAGE => NOT_USED allowed. */
UNIV_INTERN
ibool
buf_flush_ready_for_replace(
/*========================*/
......@@ -119,7 +119,7 @@ buf_flush_ready_for_replace(
#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
/**********************************************************************
Validates the flush list. */
UNIV_INTERN
ibool
buf_flush_validate(void);
/*====================*/
......
......@@ -21,7 +21,7 @@ taken out of the buffer pool, and their inserts redirected to the insert
buffer. Otherwise, the flushed blocks could get modified again before read
operations need new buffer blocks, and the i/o work done in flushing would be
wasted. */
UNIV_INTERN
void
buf_LRU_try_free_flushed_blocks(void);
/*==================================*/
......@@ -29,7 +29,7 @@ buf_LRU_try_free_flushed_blocks(void);
Returns TRUE if less than 25 % of the buffer pool is available. This can be
used in heuristics to prevent huge transactions eating up the whole buffer
pool for their locks. */
UNIV_INTERN
ibool
buf_LRU_buf_pool_running_out(void);
/*==============================*/
......@@ -51,7 +51,7 @@ Invalidates all pages belonging to a given tablespace when we are deleting
the data file(s) of that tablespace. A PROBLEM: if readahead is being started,
what guarantees that it will not try to read in pages after this operation has
completed? */
UNIV_INTERN
void
buf_LRU_invalidate_tablespace(
/*==========================*/
......@@ -60,21 +60,21 @@ buf_LRU_invalidate_tablespace(
Gets the minimum LRU_position field for the blocks in an initial segment
(determined by BUF_LRU_INITIAL_RATIO) of the LRU list. The limit is not
guaranteed to be precise, because the ulint_clock may wrap around. */
UNIV_INTERN
ulint
buf_LRU_get_recent_limit(void);
/*==========================*/
/* out: the limit; zero if could not determine it */
/************************************************************************
Insert a compressed block into buf_pool->zip_clean in the LRU order. */
UNIV_INTERN
void
buf_LRU_insert_zip_clean(
/*=====================*/
buf_page_t* bpage); /* in: pointer to the block in question */
/**********************************************************************
Try to free a block. */
UNIV_INTERN
ibool
buf_LRU_free_block(
/*===============*/
......@@ -94,7 +94,7 @@ buf_LRU_free_block(
/**********************************************************************
Look for a replaceable block from the end of the LRU list and put it to
the free list if found. */
UNIV_INTERN
ibool
buf_LRU_search_and_free_block(
/*==========================*/
......@@ -108,7 +108,7 @@ buf_LRU_search_and_free_block(
/**********************************************************************
Returns a free block from the buf_pool. The block is taken off the
free list. If it is empty, returns NULL. */
UNIV_INTERN
buf_block_t*
buf_LRU_get_free_only(void);
/*=======================*/
......@@ -118,7 +118,7 @@ buf_LRU_get_free_only(void);
Returns a free block from the buf_pool. The block is taken off the
free list. If it is empty, blocks are moved from the end of the
LRU list to the free list. */
UNIV_INTERN
buf_block_t*
buf_LRU_get_free_block(
/*===================*/
......@@ -129,14 +129,14 @@ buf_LRU_get_free_block(
/**********************************************************************
Puts a block back to the free list. */
UNIV_INTERN
void
buf_LRU_block_free_non_file_page(
/*=============================*/
buf_block_t* block); /* in: block, must not contain a file page */
/**********************************************************************
Adds a block to the LRU list. */
UNIV_INTERN
void
buf_LRU_add_block(
/*==============*/
......@@ -147,14 +147,14 @@ buf_LRU_add_block(
the start regardless of this parameter */
/**********************************************************************
Moves a block to the start of the LRU list. */
UNIV_INTERN
void
buf_LRU_make_block_young(
/*=====================*/
buf_page_t* bpage); /* in: control block */
/**********************************************************************
Moves a block to the end of the LRU list. */
UNIV_INTERN
void
buf_LRU_make_block_old(
/*===================*/
......@@ -162,7 +162,7 @@ buf_LRU_make_block_old(
#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
/**************************************************************************
Validates the LRU list. */
UNIV_INTERN
ibool
buf_LRU_validate(void);
/*==================*/
......@@ -170,7 +170,7 @@ buf_LRU_validate(void);
#if defined UNIV_DEBUG_PRINT || defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
/**************************************************************************
Prints the LRU list. */
UNIV_INTERN
void
buf_LRU_print(void);
/*===============*/
......
......@@ -18,7 +18,7 @@ buffer buf_pool if it is not already there. Sets the io_fix flag and sets
an exclusive lock on the buffer frame. The flag is cleared and the x-lock
released by the i/o-handler thread. Does a random read-ahead if it seems
sensible. */
UNIV_INTERN
ulint
buf_read_page(
/*==========*/
......@@ -50,7 +50,7 @@ latches!
NOTE 3: the calling thread must want access to the page given: this rule is
set to prevent unintended read-aheads performed by ibuf routines, a situation
which could result in a deadlock if the OS does not support asynchronous io. */
UNIV_INTERN
ulint
buf_read_ahead_linear(
/*==================*/
......@@ -63,7 +63,7 @@ buf_read_ahead_linear(
Issues read requests for pages which the ibuf module wants to read in, in
order to contract the insert buffer tree. Technically, this function is like
a read-ahead function. */
UNIV_INTERN
void
buf_read_ibuf_merge_pages(
/*======================*/
......@@ -88,7 +88,7 @@ buf_read_ibuf_merge_pages(
in the arrays */
/************************************************************************
Issues read requests for pages which recovery wants to read in. */
UNIV_INTERN
void
buf_read_recv_pages(
/*================*/
......
......@@ -146,7 +146,7 @@ dfield_datas_are_binary_equal(
const dfield_t* field2);/* in: field */
/*************************************************************************
Tests if dfield data length and content is equal to the given. */
UNIV_INTERN
ibool
dfield_data_is_binary_equal(
/*========================*/
......@@ -236,7 +236,7 @@ dtuple_from_fields(
/*************************************************************************
Sets number of fields used in a tuple. Normally this is set in
dtuple_create, but if you want later to set it smaller, you can use this. */
UNIV_INTERN
void
dtuple_set_n_fields(
/*================*/
......@@ -272,7 +272,7 @@ dtuple_get_n_ext(
const dtuple_t* tuple); /* in: tuple */
/****************************************************************
Compare two data tuples, respecting the collation of character fields. */
UNIV_INTERN
int
dtuple_coll_cmp(
/*============*/
......@@ -311,7 +311,7 @@ dtuple_contains_null(
const dtuple_t* tuple); /* in: dtuple */
/**************************************************************
Checks that a data field is typed. Asserts an error if not. */
UNIV_INTERN
ibool
dfield_check_typed(
/*===============*/
......@@ -319,7 +319,7 @@ dfield_check_typed(
const dfield_t* field); /* in: data field */
/**************************************************************
Checks that a data tuple is typed. Asserts an error if not. */
UNIV_INTERN
ibool
dtuple_check_typed(
/*===============*/
......@@ -327,7 +327,7 @@ dtuple_check_typed(
const dtuple_t* tuple); /* in: tuple */
/**************************************************************
Checks that a data tuple is typed. */
UNIV_INTERN
ibool
dtuple_check_typed_no_assert(
/*=========================*/
......@@ -337,7 +337,7 @@ dtuple_check_typed_no_assert(
/**************************************************************
Validates the consistency of a tuple which must be complete, i.e,
all fields must have been set. */
UNIV_INTERN
ibool
dtuple_validate(
/*============*/
......@@ -346,7 +346,7 @@ dtuple_validate(
#endif /* UNIV_DEBUG */
/*****************************************************************
Pretty prints a dfield value according to its data type. */
UNIV_INTERN
void
dfield_print(
/*=========*/
......@@ -354,14 +354,14 @@ dfield_print(
/*****************************************************************
Pretty prints a dfield value according to its data type. Also the hex string
is printed if a string contains non-printable characters. */
UNIV_INTERN
void
dfield_print_also_hex(
/*==================*/
const dfield_t* dfield); /* in: dfield */
/**************************************************************
The following function prints the contents of a tuple. */
UNIV_INTERN
void
dtuple_print(
/*=========*/
......@@ -372,7 +372,7 @@ Moves parts of long fields in entry to the big record vector so that
the size of tuple drops below the maximum record size allowed in the
database. Moves data only from those fields which are not necessary
to determine uniquely the insertion place of the tuple in the index. */
UNIV_INTERN
big_rec_t*
dtuple_convert_big_rec(
/*===================*/
......@@ -389,7 +389,7 @@ dtuple_convert_big_rec(
Puts back to entry the data stored in vector. Note that to ensure the
fields in entry can accommodate the data, vector must have been created
from entry with dtuple_convert_big_rec. */
UNIV_INTERN
void
dtuple_convert_back_big_rec(
/*========================*/
......
......@@ -164,7 +164,7 @@ dtype_get_mysql_type(
Determine how many bytes the first n characters of the given string occupy.
If the string is shorter than n characters, returns the number of bytes
the characters in the string occupy. */
UNIV_INTERN
ulint
dtype_get_at_most_n_mbchars(
/*========================*/
......@@ -184,7 +184,7 @@ dtype_get_at_most_n_mbchars(
/*************************************************************************
Checks if a data main type is a string type. Also a BLOB is considered a
string type. */
UNIV_INTERN
ibool
dtype_is_string_type(
/*=================*/
......@@ -194,7 +194,7 @@ dtype_is_string_type(
Checks if a type is a binary string type. Note that for tables created with
< 4.0.14, we do not know if a DATA_BLOB column is a BLOB or a TEXT column. For
those DATA_BLOB columns this function currently returns FALSE. */
UNIV_INTERN
ibool
dtype_is_binary_string_type(
/*========================*/
......@@ -206,7 +206,7 @@ Checks if a type is a non-binary string type. That is, dtype_is_string_type is
TRUE and dtype_is_binary_string_type is FALSE. Note that for tables created
with < 4.0.14, we do not know if a DATA_BLOB column is a BLOB or a TEXT column.
For those DATA_BLOB columns this function currently returns TRUE. */
UNIV_INTERN
ibool
dtype_is_non_binary_string_type(
/*============================*/
......@@ -267,7 +267,7 @@ dtype_get_charset_coll(
/*************************************************************************
Forms a precise type from the < 4.1.2 format precise type plus the
charset-collation code. */
UNIV_INTERN
ulint
dtype_form_prtype(
/*==============*/
......@@ -399,7 +399,7 @@ dtype_new_read_for_order_and_null_size(
/*************************************************************************
Validates a data type structure. */
UNIV_INTERN
ibool
dtype_validate(
/*===========*/
......@@ -407,7 +407,7 @@ dtype_validate(
const dtype_t* type); /* in: type struct to validate */
/*************************************************************************
Prints a data type structure. */
UNIV_INTERN
void
dtype_print(
/*========*/
......
......@@ -22,7 +22,7 @@ typedef byte dict_hdr_t;
/**************************************************************************
Gets a pointer to the dictionary header and x-latches its page. */
UNIV_INTERN
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_INTERN
dulint
dict_hdr_get_new_id(
/*================*/
......@@ -63,13 +63,13 @@ dict_sys_write_row_id(
/*********************************************************************
Initializes the data dictionary memory structures when the database is
started. This function is also called when the data dictionary is created. */
UNIV_INTERN
void
dict_boot(void);
/*===========*/
/*********************************************************************
Creates and initializes the data dictionary at the database creation. */
UNIV_INTERN
void
dict_create(void);
/*=============*/
......
......@@ -18,7 +18,7 @@ Created 1/8/1996 Heikki Tuuri
/*************************************************************************
Creates a table create graph. */
UNIV_INTERN
tab_node_t*
tab_create_graph_create(
/*====================*/
......@@ -28,7 +28,7 @@ tab_create_graph_create(
mem_heap_t* heap); /* in: heap where created */
/*************************************************************************
Creates an index create graph. */
UNIV_INTERN
ind_node_t*
ind_create_graph_create(
/*====================*/
......@@ -38,7 +38,7 @@ ind_create_graph_create(
mem_heap_t* heap); /* in: heap where created */
/***************************************************************
Creates a table. This is a high-level function used in SQL execution graphs. */
UNIV_INTERN
que_thr_t*
dict_create_table_step(
/*===================*/
......@@ -47,7 +47,7 @@ dict_create_table_step(
/***************************************************************
Creates an index. This is a high-level function used in SQL execution
graphs. */
UNIV_INTERN
que_thr_t*
dict_create_index_step(
/*===================*/
......@@ -55,7 +55,7 @@ dict_create_index_step(
que_thr_t* thr); /* in: query thread */
/***********************************************************************
Truncates the index tree associated with a row in SYS_INDEXES table. */
UNIV_INTERN
ulint
dict_truncate_index_tree(
/*=====================*/
......@@ -74,7 +74,7 @@ dict_truncate_index_tree(
committed and restarted in this call. */
/***********************************************************************
Drops the index tree associated with a row in SYS_INDEXES table. */
UNIV_INTERN
void
dict_drop_index_tree(
/*=================*/
......@@ -86,7 +86,7 @@ dict_drop_index_tree(
Creates the foreign key constraints system tables inside InnoDB
at database creation or database start if they are not found or are
not of the right form. */
UNIV_INTERN
ulint
dict_create_or_check_foreign_constraint_tables(void);
/*================================================*/
......@@ -98,7 +98,7 @@ not named by the user. A generated constraint has a name of the format
databasename/tablename_ibfk_<number>, where the numbers start from 1, and are
given locally for this table, that is, the number is not global, as in the
old format constraints < 4.0.18 it used to be. */
UNIV_INTERN
ulint
dict_create_add_foreigns_to_dictionary(
/*===================================*/
......
......@@ -29,7 +29,7 @@ Created 1/8/1996 Heikki Tuuri
#ifndef UNIV_HOTBACKUP
/**********************************************************************
Makes all characters in a NUL-terminated UTF-8 string lower case. */
UNIV_INTERN
void
dict_casedn_str(
/*============*/
......@@ -37,7 +37,7 @@ dict_casedn_str(
#endif /* !UNIV_HOTBACKUP */
/************************************************************************
Get the database name length in a table name. */
UNIV_INTERN
ulint
dict_get_db_name_len(
/*=================*/
......@@ -55,7 +55,7 @@ dict_remove_db_name(
dbname '/' tablename */
/**************************************************************************
Returns a table object based on table id. */
UNIV_INTERN
dict_table_t*
dict_table_get_on_id(
/*=================*/
......@@ -64,7 +64,7 @@ dict_table_get_on_id(
trx_t* trx); /* in: transaction handle */
/************************************************************************
Decrements the count of open MySQL handles to a table. */
UNIV_INTERN
void
dict_table_decrement_handle_count(
/*==============================*/
......@@ -72,7 +72,7 @@ dict_table_decrement_handle_count(
ibool dict_locked); /* in: TRUE=data dictionary locked */
/**************************************************************************
Inits the data dictionary module. */
UNIV_INTERN
void
dict_init(void);
/*===========*/
......@@ -82,7 +82,7 @@ list and a hash table of them to the data dictionary cache. This function
can be called at database startup if we did not need to do a crash recovery.
In crash recovery we must scan the space id's from the .ibd files in MySQL
database directories. */
UNIV_INTERN
void
dict_load_space_id_list(void);
/*=========================*/
......@@ -158,7 +158,7 @@ dict_col_get_clust_pos(
/********************************************************************
If the given column name is reserved for InnoDB system columns, return
TRUE. */
UNIV_INTERN
ibool
dict_col_name_is_reserved(
/*======================*/
......@@ -166,7 +166,7 @@ dict_col_name_is_reserved(
const char* name); /* in: column name */
/************************************************************************
Acquire the autoinc lock.*/
UNIV_INTERN
void
dict_table_autoinc_lock(
/*====================*/
......@@ -174,7 +174,7 @@ dict_table_autoinc_lock(
/************************************************************************
Initializes the autoinc counter. It is not an error to initialize an already
initialized counter. */
UNIV_INTERN
void
dict_table_autoinc_initialize(
/*==========================*/
......@@ -183,7 +183,7 @@ dict_table_autoinc_initialize(
/************************************************************************
Reads the next autoinc value (== autoinc counter value), 0 if not yet
initialized. */
UNIV_INTERN
ib_longlong
dict_table_autoinc_read(
/*====================*/
......@@ -192,7 +192,7 @@ dict_table_autoinc_read(
/************************************************************************
Updates the autoinc counter if the value supplied is equal or bigger than the
current value. If not inited, does nothing. */
UNIV_INTERN
void
dict_table_autoinc_update(
/*======================*/
......@@ -201,14 +201,14 @@ dict_table_autoinc_update(
ib_longlong value); /* in: value which was assigned to a row */
/************************************************************************
Release the autoinc lock.*/
UNIV_INTERN
void
dict_table_autoinc_unlock(
/*======================*/
dict_table_t* table); /* in/out: table */
/**************************************************************************
Adds system columns to a table object. */
UNIV_INTERN
void
dict_table_add_system_columns(
/*==========================*/
......@@ -216,7 +216,7 @@ dict_table_add_system_columns(
mem_heap_t* heap); /* in: temporary heap */
/**************************************************************************
Adds a table object to the dictionary cache. */
UNIV_INTERN
void
dict_table_add_to_cache(
/*====================*/
......@@ -224,14 +224,14 @@ dict_table_add_to_cache(
mem_heap_t* heap); /* in: temporary heap */
/**************************************************************************
Removes a table object from the dictionary cache. */
UNIV_INTERN
void
dict_table_remove_from_cache(
/*=========================*/
dict_table_t* table); /* in, own: table */
/**************************************************************************
Renames a table object. */
UNIV_INTERN
ibool
dict_table_rename_in_cache(
/*=======================*/
......@@ -243,7 +243,7 @@ dict_table_rename_in_cache(
in constraints which reference it */
/**************************************************************************
Removes an index from the dictionary cache. */
UNIV_INTERN
void
dict_index_remove_from_cache(
/*=========================*/
......@@ -252,7 +252,7 @@ dict_index_remove_from_cache(
/**************************************************************************
Change the id of a table object in the dictionary cache. This is used in
DISCARD TABLESPACE. */
UNIV_INTERN
void
dict_table_change_id_in_cache(
/*==========================*/
......@@ -263,7 +263,7 @@ Adds a foreign key constraint object to the dictionary cache. May free
the object if there already is an object with the same identifier in.
At least one of foreign table or referenced table must already be in
the dictionary cache! */
UNIV_INTERN
ulint
dict_foreign_add_to_cache(
/*======================*/
......@@ -274,7 +274,7 @@ dict_foreign_add_to_cache(
/*************************************************************************
Check if the index is referenced by a foreign key, if TRUE return the
matching instance NULL otherwise. */
UNIV_INTERN
dict_foreign_t*
dict_table_get_referenced_constraint(
/*=================================*/
......@@ -284,7 +284,7 @@ dict_table_get_referenced_constraint(
dict_index_t* index); /* in: InnoDB index */
/*************************************************************************
Checks if a table is referenced by foreign keys. */
UNIV_INTERN
ibool
dict_table_is_referenced_by_foreign_key(
/*====================================*/
......@@ -294,7 +294,7 @@ dict_table_is_referenced_by_foreign_key(
/**************************************************************************
Replace the index in the foreign key list that matches this index's
definition with an equivalent index. */
UNIV_INTERN
void
dict_table_replace_index_in_foreign_list(
/*=====================================*/
......@@ -302,7 +302,7 @@ dict_table_replace_index_in_foreign_list(
dict_index_t* index); /* in: index to be replaced */
/**************************************************************************
Determines whether a string starts with the specified keyword. */
UNIV_INTERN
ibool
dict_str_starts_with_keyword(
/*=========================*/
......@@ -315,7 +315,7 @@ dict_str_starts_with_keyword(
Checks if a index is defined for a foreign key constraint. Index is a part
of a foreign key constraint if the index is referenced by foreign key
or index is a foreign key index */
UNIV_INTERN
dict_foreign_t*
dict_table_get_foreign_constraint(
/*==============================*/
......@@ -330,7 +330,7 @@ should be called after the indexes for a table have been created.
Each foreign key constraint must be accompanied with indexes in
bot participating tables. The indexes are allowed to contain more
fields than mentioned in the constraint. */
UNIV_INTERN
ulint
dict_create_foreign_constraints(
/*============================*/
......@@ -352,7 +352,7 @@ dict_create_foreign_constraints(
any foreign keys are found. */
/**************************************************************************
Parses the CONSTRAINT id's to be dropped in an ALTER TABLE statement. */
UNIV_INTERN
ulint
dict_foreign_parse_drop_constraints(
/*================================*/
......@@ -373,7 +373,7 @@ Returns a table object and optionally increment its MySQL open handle count.
NOTE! This is a high-level function to be used mainly from outside the
'dict' directory. Inside this directory dict_table_get_low is usually the
appropriate function. */
UNIV_INTERN
dict_table_t*
dict_table_get(
/*===========*/
......@@ -385,7 +385,7 @@ dict_table_get(
handle count on the table */
/**************************************************************************
Returns a index object, based on table and index id, and memoryfixes it. */
UNIV_INTERN
dict_index_t*
dict_index_get_on_id_low(
/*=====================*/
......@@ -422,7 +422,7 @@ dict_table_get_on_id_low(
/**************************************************************************
Returns an index object by matching on the name and column names and if
more than index is found return the index with the higher id.*/
UNIV_INTERN
dict_index_t*
dict_table_get_index_by_max_id(
/*===========================*/
......@@ -446,28 +446,28 @@ dict_table_get_col_name(
/**************************************************************************
Prints a table definition. */
UNIV_INTERN
void
dict_table_print(
/*=============*/
dict_table_t* table); /* in: table */
/**************************************************************************
Prints a table data. */
UNIV_INTERN
void
dict_table_print_low(
/*=================*/
dict_table_t* table); /* in: table */
/**************************************************************************
Prints a table data when we know the table name. */
UNIV_INTERN
void
dict_table_print_by_name(
/*=====================*/
const char* name);
/**************************************************************************
Outputs info on foreign keys of a table. */
UNIV_INTERN
void
dict_print_info_on_foreign_keys(
/*============================*/
......@@ -481,6 +481,7 @@ dict_print_info_on_foreign_keys(
/**************************************************************************
Outputs info on a foreign key of a table in a format suitable for
CREATE TABLE. */
UNIV_INTERN
void
dict_print_info_on_foreign_key_in_create_format(
/*============================================*/
......@@ -490,6 +491,7 @@ dict_print_info_on_foreign_key_in_create_format(
ibool add_newline); /* in: whether to add a newline */
/************************************************************************
Displays the names of the index and the table. */
UNIV_INTERN
void
dict_index_name_print(
/*==================*/
......@@ -640,7 +642,7 @@ dict_table_zip_size(
/************************************************************************
Checks if a column is in the ordering columns of the clustered index of a
table. Column prefixes are treated like whole columns. */
UNIV_INTERN
ibool
dict_table_col_in_clustered_key(
/*============================*/
......@@ -652,7 +654,7 @@ dict_table_col_in_clustered_key(
Copies types of columns contained in table to tuple and sets all
fields of the tuple to the SQL NULL value. This function should
be called right after dtuple_create(). */
UNIV_INTERN
void
dict_table_copy_types(
/*==================*/
......@@ -662,7 +664,7 @@ dict_table_copy_types(
Looks for an index with the given id. NOTE that we do not reserve
the dictionary mutex: this function is for emergency purposes like
printing info of a corrupt database page! */
UNIV_INTERN
dict_index_t*
dict_index_find_on_id_low(
/*======================*/
......@@ -670,7 +672,7 @@ dict_index_find_on_id_low(
dulint id); /* in: index id */
/**************************************************************************
Adds an index to the dictionary cache. */
UNIV_INTERN
ulint
dict_index_add_to_cache(
/*====================*/
......@@ -681,7 +683,7 @@ dict_index_add_to_cache(
ulint page_no);/* in: root page number of the index */
/**************************************************************************
Removes an index from the dictionary cache. */
UNIV_INTERN
void
dict_index_remove_from_cache(
/*=========================*/
......@@ -766,7 +768,7 @@ dict_index_get_nth_col_no(
ulint pos); /* in: position of the field */
/************************************************************************
Looks for column n in an index. */
UNIV_INTERN
ulint
dict_index_get_nth_col_pos(
/*=======================*/
......@@ -778,7 +780,7 @@ dict_index_get_nth_col_pos(
ulint n); /* in: column number */
/************************************************************************
Returns TRUE if the index contains a column or a prefix of that column. */
UNIV_INTERN
ibool
dict_index_contains_col_or_prefix(
/*==============================*/
......@@ -791,7 +793,7 @@ Looks for a matching field in an index. The column has to be the same. The
column in index must be complete, or must contain a prefix longer than the
column in index2. That is, we must be able to construct the prefix in index2
from the prefix in index. */
UNIV_INTERN
ulint
dict_index_get_nth_field_pos(
/*=========================*/
......@@ -804,7 +806,7 @@ dict_index_get_nth_field_pos(
ulint n); /* in: field number in index2 */
/************************************************************************
Looks for column n position in the clustered index. */
UNIV_INTERN
ulint
dict_table_get_nth_col_pos(
/*=======================*/
......@@ -825,7 +827,7 @@ dict_index_get_sys_col_pos(
ulint type); /* in: DATA_ROW_ID, ... */
/***********************************************************************
Adds a column to index. */
UNIV_INTERN
void
dict_index_add_col(
/*===============*/
......@@ -835,7 +837,7 @@ dict_index_add_col(
ulint prefix_len); /* in: column prefix length */
/***********************************************************************
Copies types of fields contained in index to tuple. */
UNIV_INTERN
void
dict_index_copy_types(
/*==================*/
......@@ -854,7 +856,7 @@ dict_field_get_col(
/**************************************************************************
Returns an index object if it is found in the dictionary cache.
Assumes that dict_sys->mutex is already being held. */
UNIV_INTERN
dict_index_t*
dict_index_get_if_in_cache_low(
/*===========================*/
......@@ -863,7 +865,7 @@ dict_index_get_if_in_cache_low(
#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
/**************************************************************************
Returns an index object if it is found in the dictionary cache. */
UNIV_INTERN
dict_index_t*
dict_index_get_if_in_cache(
/*=======================*/
......@@ -874,7 +876,7 @@ dict_index_get_if_in_cache(
/**************************************************************************
Checks that a tuple has n_fields_cmp value in a sensible range, so that
no comparison can occur with the page number field in a node pointer. */
UNIV_INTERN
ibool
dict_index_check_search_tuple(
/*==========================*/
......@@ -883,7 +885,7 @@ dict_index_check_search_tuple(
const dtuple_t* tuple); /* in: tuple used in a search */
/**************************************************************************
Check for duplicate index entries in a table [using the index name] */
UNIV_INTERN
void
dict_table_check_for_dup_indexes(
/*=============================*/
......@@ -893,7 +895,7 @@ dict_table_check_for_dup_indexes(
#endif /* UNIV_DEBUG */
/**************************************************************************
Builds a node pointer out of a physical record and a page number. */
UNIV_INTERN
dtuple_t*
dict_index_build_node_ptr(
/*======================*/
......@@ -910,7 +912,7 @@ dict_index_build_node_ptr(
/**************************************************************************
Copies an initial segment of a physical record, long enough to specify an
index entry uniquely. */
UNIV_INTERN
rec_t*
dict_index_copy_rec_order_prefix(
/*=============================*/
......@@ -924,7 +926,7 @@ dict_index_copy_rec_order_prefix(
ulint* buf_size);/* in/out: buffer size */
/**************************************************************************
Builds a typed data tuple out of a physical record. */
UNIV_INTERN
dtuple_t*
dict_index_build_data_tuple(
/*========================*/
......@@ -993,7 +995,7 @@ dict_index_get_space_reserve(void);
reserved for updates */
/*************************************************************************
Calculates the minimum record length in an index. */
UNIV_INTERN
ulint
dict_index_calc_min_rec_len(
/*========================*/
......@@ -1001,7 +1003,7 @@ dict_index_calc_min_rec_len(
/*************************************************************************
Calculates new estimates for table and index statistics. The statistics
are used in query optimization. */
UNIV_INTERN
void
dict_update_statistics_low(
/*=======================*/
......@@ -1011,26 +1013,26 @@ dict_update_statistics_low(
/*************************************************************************
Calculates new estimates for table and index statistics. The statistics
are used in query optimization. */
UNIV_INTERN
void
dict_update_statistics(
/*===================*/
dict_table_t* table); /* in/out: table */
/************************************************************************
Reserves the dictionary system mutex for MySQL. */
UNIV_INTERN
void
dict_mutex_enter_for_mysql(void);
/*============================*/
/************************************************************************
Releases the dictionary system mutex for MySQL. */
UNIV_INTERN
void
dict_mutex_exit_for_mysql(void);
/*===========================*/
/************************************************************************
Checks if the database name in two table names is the same. */
UNIV_INTERN
ibool
dict_tables_have_same_db(
/*=====================*/
......@@ -1052,7 +1054,7 @@ dict_scan_to(
const char* string);/* in: look for this */
/*************************************************************************
Removes an index from the cache */
UNIV_INTERN
void
dict_index_remove_from_cache(
/*=========================*/
......@@ -1060,7 +1062,7 @@ dict_index_remove_from_cache(
dict_index_t* index); /* in, own: index */
/**************************************************************************
Get index by name */
UNIV_INTERN
dict_index_t*
dict_table_get_index_on_name(
/*=========================*/
......@@ -1070,7 +1072,7 @@ dict_table_get_index_on_name(
/**************************************************************************
Find and index that is equivalent to the one passed in and is not marked
for deletion. */
UNIV_INTERN
dict_index_t*
dict_table_find_equivalent_index(
/*=============================*/
......@@ -1079,7 +1081,7 @@ dict_table_find_equivalent_index(
/**************************************************************************
In case there is more than one index with the same name return the index
with the min(id). */
UNIV_INTERN
dict_index_t*
dict_table_get_index_on_name_and_min_id(
/*====================================*/
......
......@@ -23,14 +23,14 @@ to what we already read with fil_load_single_table_tablespaces().
In a normal startup, we create the tablespace objects for every table in
InnoDB's data dictionary, if the corresponding .ibd file exists.
We also scan the biggest space id, and store it to fil_system. */
UNIV_INTERN
void
dict_check_tablespaces_and_store_max_id(
/*====================================*/
ibool in_crash_recovery); /* in: are we doing a crash recovery */
/************************************************************************
Finds the first table name in the given database. */
UNIV_INTERN
char*
dict_get_first_table_name_in_db(
/*============================*/
......@@ -43,7 +43,7 @@ Loads a table definition and also all its index definitions, and also
the cluster definition if the table is a member in a cluster. Also loads
all foreign key constraints where the foreign key is in the table or where
a foreign key references columns in this table. */
UNIV_INTERN
dict_table_t*
dict_load_table(
/*============*/
......@@ -56,7 +56,7 @@ dict_load_table(
databasename/tablename format */
/***************************************************************************
Loads a table object based on the table id. */
UNIV_INTERN
dict_table_t*
dict_load_table_on_id(
/*==================*/
......@@ -66,7 +66,7 @@ dict_load_table_on_id(
This function is called when the database is booted.
Loads system table index definitions except for the clustered index which
is added to the dictionary cache at booting before calling this function. */
UNIV_INTERN
void
dict_load_sys_table(
/*================*/
......@@ -78,7 +78,7 @@ holder or where the table is referenced by a foreign key. Adds these
constraints to the data dictionary. Note that we know that the dictionary
cache already contains all constraints where the other relevant table is
already in the dictionary cache. */
UNIV_INTERN
ulint
dict_load_foreigns(
/*===============*/
......@@ -90,7 +90,7 @@ dict_load_foreigns(
/************************************************************************
Prints to the standard output information on all tables found in the data
dictionary system table. */
UNIV_INTERN
void
dict_print(void);
/*============*/
......
......@@ -49,7 +49,7 @@ combination of types */
/**************************************************************************
Creates a table memory object. */
UNIV_INTERN
dict_table_t*
dict_mem_table_create(
/*==================*/
......@@ -63,14 +63,14 @@ dict_mem_table_create(
ulint flags); /* in: table flags */
/********************************************************************
Free a table memory object. */
UNIV_INTERN
void
dict_mem_table_free(
/*================*/
dict_table_t* table); /* in: table */
/**************************************************************************
Adds a column definition to a table. */
UNIV_INTERN
void
dict_mem_table_add_col(
/*===================*/
......@@ -82,7 +82,7 @@ dict_mem_table_add_col(
ulint len); /* in: precision */
/**************************************************************************
Creates an index memory object. */
UNIV_INTERN
dict_index_t*
dict_mem_index_create(
/*==================*/
......@@ -99,7 +99,7 @@ dict_mem_index_create(
Adds a field definition to an index. NOTE: does not take a copy
of the column name if the field is a column. The memory occupied
by the column name may be released only after publishing the index. */
UNIV_INTERN
void
dict_mem_index_add_field(
/*=====================*/
......@@ -110,14 +110,14 @@ dict_mem_index_add_field(
INDEX (textcol(25)) */
/**************************************************************************
Frees an index memory object. */
UNIV_INTERN
void
dict_mem_index_free(
/*================*/
dict_index_t* index); /* in: index */
/**************************************************************************
Creates and initializes a foreign constraint memory object. */
UNIV_INTERN
dict_foreign_t*
dict_mem_foreign_create(void);
/*=========================*/
......
......@@ -19,7 +19,7 @@ Created 12/29/1997 Heikki Tuuri
Free the buffer from global dynamic memory for a value of a que_node,
if it has been allocated in the above function. The freeing for pushed
column values is done in sel_col_prefetch_buf_free. */
UNIV_INTERN
void
eval_node_free_val_buf(
/*===================*/
......@@ -82,7 +82,7 @@ eval_node_get_ibool_val(
que_node_t* node); /* in: query graph node */
/*********************************************************************
Evaluates a comparison node. */
UNIV_INTERN
ibool
eval_cmp(
/*=====*/
......
......@@ -24,7 +24,7 @@ proc_step(
que_thr_t* thr); /* in: query thread */
/**************************************************************************
Performs an execution step of an if-statement node. */
UNIV_INTERN
que_thr_t*
if_step(
/*====*/
......@@ -32,7 +32,7 @@ if_step(
que_thr_t* thr); /* in: query thread */
/**************************************************************************
Performs an execution step of a while-statement node. */
UNIV_INTERN
que_thr_t*
while_step(
/*=======*/
......@@ -40,7 +40,7 @@ while_step(
que_thr_t* thr); /* in: query thread */
/**************************************************************************
Performs an execution step of a for-loop node. */
UNIV_INTERN
que_thr_t*
for_step(
/*=====*/
......@@ -48,7 +48,7 @@ for_step(
que_thr_t* thr); /* in: query thread */
/**************************************************************************
Performs an execution step of an assignment statement node. */
UNIV_INTERN
que_thr_t*
assign_step(
/*========*/
......@@ -64,7 +64,7 @@ proc_eval_step(
que_thr_t* thr); /* in: query thread */
/**************************************************************************
Performs an execution step of an exit statement node. */
UNIV_INTERN
que_thr_t*
exit_step(
/*======*/
......@@ -72,7 +72,7 @@ exit_step(
que_thr_t* thr); /* in: query thread */
/**************************************************************************
Performs an execution step of a return-statement node. */
UNIV_INTERN
que_thr_t*
return_step(
/*========*/
......
......@@ -132,7 +132,7 @@ extern ulint fil_n_pending_tablespace_flushes;
/***********************************************************************
Returns the version number of a tablespace, -1 if not found. */
UNIV_INTERN
ib_longlong
fil_space_get_version(
/*==================*/
......@@ -141,7 +141,7 @@ fil_space_get_version(
ulint id); /* in: space id */
/***********************************************************************
Returns the latch of a file space. */
UNIV_INTERN
rw_lock_t*
fil_space_get_latch(
/*================*/
......@@ -151,7 +151,7 @@ fil_space_get_latch(
0 for uncompressed tablespaces */
/***********************************************************************
Returns the type of a file space. */
UNIV_INTERN
ulint
fil_space_get_type(
/*===============*/
......@@ -159,7 +159,7 @@ fil_space_get_type(
ulint id); /* in: space id */
/***********************************************************************
Returns the ibuf data of a file space. */
UNIV_INTERN
ibuf_data_t*
fil_space_get_ibuf_data(
/*====================*/
......@@ -167,7 +167,7 @@ fil_space_get_ibuf_data(
ulint id); /* in: space id */
/***********************************************************************
Appends a new file to the chain of files of a space. File must be closed. */
UNIV_INTERN
void
fil_node_create(
/*============*/
......@@ -181,7 +181,7 @@ fil_node_create(
/********************************************************************
Drops files from the start of a file space, so that its size is cut by
the amount given. */
UNIV_INTERN
void
fil_space_truncate_start(
/*=====================*/
......@@ -193,7 +193,7 @@ fil_space_truncate_start(
/***********************************************************************
Creates a space memory object and puts it to the 'fil system' hash table. If
there is an error, prints an error message to the .err log. */
UNIV_INTERN
ibool
fil_space_create(
/*=============*/
......@@ -206,7 +206,7 @@ fil_space_create(
/***********************************************************************
Frees a space object from a the tablespace memory cache. Closes the files in
the chain but does not delete them. */
UNIV_INTERN
ibool
fil_space_free(
/*===========*/
......@@ -215,7 +215,7 @@ fil_space_free(
/***********************************************************************
Returns the size of the space in pages. The tablespace must be cached in the
memory cache. */
UNIV_INTERN
ulint
fil_space_get_size(
/*===============*/
......@@ -224,7 +224,7 @@ fil_space_get_size(
/***********************************************************************
Returns the compressed page size of the space, or 0 if the space
is not compressed. The tablespace must be cached in the memory cache. */
UNIV_INTERN
ulint
fil_space_get_zip_size(
/*===================*/
......@@ -234,7 +234,7 @@ fil_space_get_zip_size(
/***********************************************************************
Checks if the pair space, page_no refers to an existing page in a tablespace
file space. The tablespace must be cached in the memory cache. */
UNIV_INTERN
ibool
fil_check_adress_in_tablespace(
/*===========================*/
......@@ -243,7 +243,7 @@ fil_check_adress_in_tablespace(
ulint page_no);/* in: page number */
/********************************************************************
Initializes the tablespace memory cache. */
UNIV_INTERN
void
fil_init(
/*=====*/
......@@ -254,21 +254,21 @@ database server shutdown. This should be called at a server startup after the
space objects for the log and the system tablespace have been created. The
purpose of this operation is to make sure we never run out of file descriptors
if we need to read from the insert buffer or to write to the log. */
UNIV_INTERN
void
fil_open_log_and_system_tablespace_files(void);
/*==========================================*/
/***********************************************************************
Closes all open files. There must not be any pending i/o's or not flushed
modifications in the files. */
UNIV_INTERN
void
fil_close_all_files(void);
/*=====================*/
/***********************************************************************
Sets the max tablespace id counter if the given number is bigger than the
previous value. */
UNIV_INTERN
void
fil_set_max_space_id_if_bigger(
/*===========================*/
......@@ -277,14 +277,14 @@ fil_set_max_space_id_if_bigger(
Initializes the ibuf data structure for space 0 == the system tablespace.
This can be called after the file space headers have been created and the
dictionary system has been initialized. */
UNIV_INTERN
void
fil_ibuf_init_at_db_start(void);
/*===========================*/
/********************************************************************
Writes the flushed lsn and the latest archived log number to the page
header of the first page of each data file in the system tablespace. */
UNIV_INTERN
ulint
fil_write_flushed_lsn_to_data_files(
/*================================*/
......@@ -295,7 +295,7 @@ fil_write_flushed_lsn_to_data_files(
/***********************************************************************
Reads the flushed lsn and arch no fields from a data file at database
startup. */
UNIV_INTERN
void
fil_read_flushed_lsn_and_arch_log_no(
/*=================================*/
......@@ -312,7 +312,7 @@ fil_read_flushed_lsn_and_arch_log_no(
/***********************************************************************
Increments the count of pending insert buffer page merges, if space is not
being deleted. */
UNIV_INTERN
ibool
fil_inc_pending_ibuf_merges(
/*========================*/
......@@ -321,7 +321,7 @@ fil_inc_pending_ibuf_merges(
ulint id); /* in: space id */
/***********************************************************************
Decrements the count of pending insert buffer page merges. */
UNIV_INTERN
void
fil_decr_pending_ibuf_merges(
/*=========================*/
......@@ -338,7 +338,7 @@ created does not exist, then we create the directory, too.
Note that ibbackup --apply-log sets fil_path_to_mysql_datadir to point to the
datadir that we should use in replaying the file operations. */
UNIV_INTERN
byte*
fil_op_log_parse_or_replay(
/*=======================*/
......@@ -356,7 +356,7 @@ fil_op_log_parse_or_replay(
/***********************************************************************
Deletes a single-table tablespace. The tablespace must be cached in the
memory cache. */
UNIV_INTERN
ibool
fil_delete_tablespace(
/*==================*/
......@@ -370,7 +370,7 @@ memory cache. Discarding is like deleting a tablespace, but
TABLE they are only removed gradually in the background;
3) when the user does IMPORT TABLESPACE, the tablespace will have the same id
as it originally had. */
UNIV_INTERN
ibool
fil_discard_tablespace(
/*===================*/
......@@ -379,7 +379,7 @@ fil_discard_tablespace(
/***********************************************************************
Renames a single-table tablespace. The tablespace must be cached in the
tablespace memory cache. */
UNIV_INTERN
ibool
fil_rename_tablespace(
/*==================*/
......@@ -399,7 +399,7 @@ Database directories are under the 'datadir' of MySQL. The datadir is the
directory of a running mysqld program. We can refer to it by simply the
path '.'. Tables created with CREATE TEMPORARY TABLE we place in the temp
dir of the mysqld server. */
UNIV_INTERN
ulint
fil_create_new_single_table_tablespace(
/*===================================*/
......@@ -427,7 +427,7 @@ NOTE that we assume this operation is used either at the database startup
or under the protection of the dictionary mutex, so that two users cannot
race here. This operation does not leave the file associated with the
tablespace open, but closes it after we have looked at the space id in it. */
UNIV_INTERN
ibool
fil_open_single_table_tablespace(
/*=============================*/
......@@ -453,7 +453,7 @@ after it performed these cleanup operations on the .ibd file, so that it at
the shutdown stamped the latest lsn to the FIL_PAGE_FILE_FLUSH_LSN in the
first page of the .ibd file, and we can determine whether we need to reset the
lsn's just by looking at that flush lsn. */
UNIV_INTERN
ibool
fil_reset_too_high_lsns(
/*====================*/
......@@ -470,7 +470,7 @@ single-table tablespaces. We need to know the space id in each of them so that
we know into which file we should look to check the contents of a page stored
in the doublewrite buffer, also to know where to apply log records where the
space id is != 0. */
UNIV_INTERN
ulint
fil_load_single_table_tablespaces(void);
/*===================================*/
......@@ -481,14 +481,14 @@ fil_load_single_table_tablespaces() and dict_load_single_table_tablespaces(),
we can call this function to print an error message of orphaned .ibd files
for which there is not a data dictionary entry with a matching table name
and space id. */
UNIV_INTERN
void
fil_print_orphaned_tablespaces(void);
/*================================*/
/***********************************************************************
Returns TRUE if a single-table tablespace does not exist in the memory cache,
or is being deleted there. */
UNIV_INTERN
ibool
fil_tablespace_deleted_or_being_deleted_in_mem(
/*===========================================*/
......@@ -500,7 +500,7 @@ fil_tablespace_deleted_or_being_deleted_in_mem(
parameter is ignored */
/***********************************************************************
Returns TRUE if a single-table tablespace exists in the memory cache. */
UNIV_INTERN
ibool
fil_tablespace_exists_in_mem(
/*=========================*/
......@@ -510,7 +510,7 @@ fil_tablespace_exists_in_mem(
Returns TRUE if a matching tablespace exists in the InnoDB tablespace memory
cache. Note that if we have not done a crash recovery at the database startup,
there may be many tablespaces which are not yet in the memory cache. */
UNIV_INTERN
ibool
fil_space_for_table_exists_in_mem(
/*==============================*/
......@@ -537,7 +537,7 @@ fil_space_for_table_exists_in_mem(
Tries to extend a data file so that it would accommodate the number of pages
given. The tablespace must be cached in the memory cache. If the space is big
enough already, does nothing. */
UNIV_INTERN
ibool
fil_extend_space_to_desired_size(
/*=============================*/
......@@ -555,14 +555,14 @@ Extends all tablespaces to the size stored in the space header. During the
ibbackup --apply-log phase we extended the spaces on-demand so that log records
could be appllied, but that may have left spaces still too small compared to
the size stored in the space header. */
UNIV_INTERN
void
fil_extend_tablespaces_to_stored_len(void);
/*======================================*/
#endif
/***********************************************************************
Tries to reserve free extents in a file space. */
UNIV_INTERN
ibool
fil_space_reserve_free_extents(
/*===========================*/
......@@ -572,7 +572,7 @@ fil_space_reserve_free_extents(
ulint n_to_reserve); /* in: how many one wants to reserve */
/***********************************************************************
Releases free extents in a file space. */
UNIV_INTERN
void
fil_space_release_free_extents(
/*===========================*/
......@@ -581,14 +581,14 @@ fil_space_release_free_extents(
/***********************************************************************
Gets the number of reserved extents. If the database is silent, this number
should be zero. */
UNIV_INTERN
ulint
fil_space_get_n_reserved_extents(
/*=============================*/
ulint id); /* in: space id */
/************************************************************************
Reads or writes data. This operation is asynchronous (aio). */
UNIV_INTERN
ulint
fil_io(
/*===*/
......@@ -625,7 +625,7 @@ Waits for an aio operation to complete. This function is used to write the
handler for completed requests. The aio array of pending requests is divided
into segments (see os0file.c for more info). The thread specifies which
segment it wants to wait for. */
UNIV_INTERN
void
fil_aio_wait(
/*=========*/
......@@ -634,7 +634,7 @@ fil_aio_wait(
/**************************************************************************
Flushes to disk possible writes cached by the OS. If the space does not exist
or is being dropped, does not do anything. */
UNIV_INTERN
void
fil_flush(
/*======*/
......@@ -643,21 +643,21 @@ fil_flush(
/**************************************************************************
Flushes to disk writes in file spaces of the given type possibly cached by
the OS. */
UNIV_INTERN
void
fil_flush_file_spaces(
/*==================*/
ulint purpose); /* in: FIL_TABLESPACE, FIL_LOG */
/**********************************************************************
Checks the consistency of the tablespace cache. */
UNIV_INTERN
ibool
fil_validate(void);
/*==============*/
/* out: TRUE if ok */
/************************************************************************
Returns TRUE if file address is undefined. */
UNIV_INTERN
ibool
fil_addr_is_null(
/*=============*/
......@@ -665,14 +665,14 @@ fil_addr_is_null(
fil_addr_t addr); /* in: address */
/************************************************************************
Accessor functions for a file page */
UNIV_INTERN
ulint
fil_page_get_prev(const byte* page);
ulint
fil_page_get_next(const byte* page);
/*************************************************************************
Sets the file page type. */
UNIV_INTERN
void
fil_page_set_type(
/*==============*/
......@@ -680,7 +680,7 @@ fil_page_set_type(
ulint type); /* in: type */
/*************************************************************************
Gets the file page type. */
UNIV_INTERN
ulint
fil_page_get_type(
/*==============*/
......
......@@ -41,7 +41,7 @@ typedef byte fseg_header_t;
/**************************************************************************
Initializes the file space system. */
UNIV_INTERN
void
fsp_init(void);
/*==========*/
......@@ -50,7 +50,7 @@ Gets the current free limit of a tablespace. The free limit means the
place of the first page which has never been put to the the free list
for allocation. The space above that address is initialized to zero.
Sets also the global variable log_fsp_current_free_limit. */
UNIV_INTERN
ulint
fsp_header_get_free_limit(
/*======================*/
......@@ -60,7 +60,7 @@ fsp_header_get_free_limit(
Gets the size of the tablespace from the tablespace header. If we do not
have an auto-extending data file, this should be equal to the size of the
data files. If there is an auto-extending data file, this can be smaller. */
UNIV_INTERN
ulint
fsp_header_get_tablespace_size(
/*===========================*/
......@@ -68,7 +68,7 @@ fsp_header_get_tablespace_size(
ulint space); /* in: space id, must be 0 */
/**************************************************************************
Reads the file space size stored in the header page. */
UNIV_INTERN
ulint
fsp_get_size_low(
/*=============*/
......@@ -76,7 +76,7 @@ fsp_get_size_low(
page_t* page); /* in: header page (page 0 in the tablespace) */
/**************************************************************************
Reads the space id from the first page of a tablespace. */
UNIV_INTERN
ulint
fsp_header_get_space_id(
/*====================*/
......@@ -84,7 +84,7 @@ fsp_header_get_space_id(
const page_t* page); /* in: first page of a tablespace */
/**************************************************************************
Reads the compressed page size from the first page of a tablespace. */
UNIV_INTERN
ulint
fsp_header_get_zip_size(
/*====================*/
......@@ -95,7 +95,7 @@ fsp_header_get_zip_size(
Writes the space id and compressed page size to a tablespace header.
This function is used past the buffer pool when we in fil0fil.c create
a new single-table tablespace. */
UNIV_INTERN
void
fsp_header_init_fields(
/*===================*/
......@@ -106,7 +106,7 @@ fsp_header_init_fields(
/**************************************************************************
Initializes the space header of a new created space and creates also the
insert buffer tree root if space == 0. */
UNIV_INTERN
void
fsp_header_init(
/*============*/
......@@ -115,7 +115,7 @@ fsp_header_init(
mtr_t* mtr); /* in: mini-transaction handle */
/**************************************************************************
Increases the space size field of a space. */
UNIV_INTERN
void
fsp_header_inc_size(
/*================*/
......@@ -124,7 +124,7 @@ fsp_header_inc_size(
mtr_t* mtr); /* in: mini-transaction handle */
/**************************************************************************
Creates a new segment. */
UNIV_INTERN
buf_block_t*
fseg_create(
/*========*/
......@@ -141,7 +141,7 @@ fseg_create(
mtr_t* mtr); /* in: mtr */
/**************************************************************************
Creates a new segment. */
UNIV_INTERN
buf_block_t*
fseg_create_general(
/*================*/
......@@ -165,7 +165,7 @@ fseg_create_general(
/**************************************************************************
Calculates the number of pages reserved by a segment, and how many pages are
currently used. */
UNIV_INTERN
ulint
fseg_n_reserved_pages(
/*==================*/
......@@ -177,7 +177,7 @@ fseg_n_reserved_pages(
Allocates a single free page from a segment. This function implements
the intelligent allocation strategy which tries to minimize
file space fragmentation. */
UNIV_INTERN
ulint
fseg_alloc_free_page(
/*=================*/
......@@ -195,7 +195,7 @@ fseg_alloc_free_page(
Allocates a single free page from a segment. This function implements
the intelligent allocation strategy which tries to minimize file space
fragmentation. */
UNIV_INTERN
ulint
fseg_alloc_free_page_general(
/*=========================*/
......@@ -239,7 +239,7 @@ function we would liberally reserve several 64 page extents for every page
split or merge in a B-tree. But we do not want to waste disk space if the table
only occupies < 32 pages. That is why we apply different rules in that special
case, just ensuring that there are 3 free pages available. */
UNIV_INTERN
ibool
fsp_reserve_free_extents(
/*=====================*/
......@@ -256,7 +256,7 @@ This function should be used to get information on how much we still
will be able to insert new data to the database without running out the
tablespace. Only free extents are taken into account and we also subtract
the safety margin required by the above function fsp_reserve_free_extents. */
UNIV_INTERN
ullint
fsp_get_available_space_in_free_extents(
/*====================================*/
......@@ -264,7 +264,7 @@ fsp_get_available_space_in_free_extents(
ulint space); /* in: space id */
/**************************************************************************
Frees a single page of a segment. */
UNIV_INTERN
void
fseg_free_page(
/*===========*/
......@@ -275,7 +275,7 @@ fseg_free_page(
/***********************************************************************
Frees a segment. The freeing is performed in several mini-transactions,
so that there is no danger of bufferfixing too many buffer pages. */
UNIV_INTERN
void
fseg_free(
/*======*/
......@@ -291,7 +291,7 @@ Frees part of a segment. This function can be used to free a segment
by repeatedly calling this function in different mini-transactions.
Doing the freeing in a single mini-transaction might result in
too big a mini-transaction. */
UNIV_INTERN
ibool
fseg_free_step(
/*===========*/
......@@ -304,7 +304,7 @@ fseg_free_step(
/**************************************************************************
Frees part of a segment. Differs from fseg_free_step because this function
leaves the header page unfreed. */
UNIV_INTERN
ibool
fseg_free_step_not_header(
/*======================*/
......@@ -325,7 +325,7 @@ fsp_descr_page(
ulint page_no);/* in: page number */
/***************************************************************
Parses a redo log record of a file page init. */
UNIV_INTERN
byte*
fsp_parse_init_file_page(
/*=====================*/
......@@ -335,7 +335,7 @@ fsp_parse_init_file_page(
buf_block_t* block); /* in: block or NULL */
/***********************************************************************
Validates the file space system and its segments. */
UNIV_INTERN
ibool
fsp_validate(
/*=========*/
......@@ -343,14 +343,14 @@ fsp_validate(
ulint space); /* in: space id */
/***********************************************************************
Prints info of a file space. */
UNIV_INTERN
void
fsp_print(
/*======*/
ulint space); /* in: space id */
/***********************************************************************
Validates a segment. */
UNIV_INTERN
ibool
fseg_validate(
/*==========*/
......@@ -359,7 +359,7 @@ fseg_validate(
mtr_t* mtr2); /* in: mtr */
/***********************************************************************
Writes info of a segment. */
UNIV_INTERN
void
fseg_print(
/*=======*/
......
......@@ -39,7 +39,7 @@ flst_init(
mtr_t* mtr); /* in: mini-transaction handle */
/************************************************************************
Adds a node as the last node in a list. */
UNIV_INTERN
void
flst_add_last(
/*==========*/
......@@ -48,7 +48,7 @@ flst_add_last(
mtr_t* mtr); /* in: mini-transaction handle */
/************************************************************************
Adds a node as the first node in a list. */
UNIV_INTERN
void
flst_add_first(
/*===========*/
......@@ -57,7 +57,7 @@ flst_add_first(
mtr_t* mtr); /* in: mini-transaction handle */
/************************************************************************
Inserts a node after another in a list. */
UNIV_INTERN
void
flst_insert_after(
/*==============*/
......@@ -67,7 +67,7 @@ flst_insert_after(
mtr_t* mtr); /* in: mini-transaction handle */
/************************************************************************
Inserts a node before another in a list. */
UNIV_INTERN
void
flst_insert_before(
/*===============*/
......@@ -77,7 +77,7 @@ flst_insert_before(
mtr_t* mtr); /* in: mini-transaction handle */
/************************************************************************
Removes a node. */
UNIV_INTERN
void
flst_remove(
/*========*/
......@@ -88,7 +88,7 @@ flst_remove(
Cuts off the tail of the list, including the node given. The number of
nodes which will be removed must be provided by the caller, as this function
does not measure the length of the tail. */
UNIV_INTERN
void
flst_cut_end(
/*=========*/
......@@ -101,7 +101,7 @@ flst_cut_end(
Cuts off the tail of the list, not including the given node. The number of
nodes which will be removed must be provided by the caller, as this function
does not measure the length of the tail. */
UNIV_INTERN
void
flst_truncate_end(
/*==============*/
......@@ -174,7 +174,7 @@ flst_read_addr(
mtr_t* mtr); /* in: mini-transaction handle */
/************************************************************************
Validates a file-based list. */
UNIV_INTERN
ibool
flst_validate(
/*==========*/
......@@ -183,7 +183,7 @@ flst_validate(
mtr_t* mtr1); /* in: mtr */
/************************************************************************
Prints info of a file-based list. */
UNIV_INTERN
void
flst_print(
/*=======*/
......
......@@ -29,7 +29,7 @@ ha_search_and_get_data(
/*************************************************************
Looks for an element when we know the pointer to the data and updates
the pointer to data if found. */
UNIV_INTERN
void
ha_search_and_update_if_found_func(
/*===============================*/
......@@ -51,7 +51,7 @@ ha_search_and_update_if_found_func(
/*****************************************************************
Creates a hash table with >= n array cells. The actual number of cells is
chosen to be a prime number slightly bigger than n. */
UNIV_INTERN
hash_table_t*
ha_create_func(
/*===========*/
......@@ -71,7 +71,7 @@ ha_create_func(
/*****************************************************************
Empties a hash table and frees the memory heaps. */
UNIV_INTERN
void
ha_clear(
/*=====*/
......@@ -81,7 +81,7 @@ ha_clear(
Inserts an entry into a hash table. If an entry with the same fold number
is found, its node is updated to point to the new data, and no new node
is inserted. */
UNIV_INTERN
ibool
ha_insert_for_fold_func(
/*====================*/
......@@ -105,7 +105,7 @@ ha_insert_for_fold_func(
/*****************************************************************
Deletes an entry from a hash table. */
UNIV_INTERN
void
ha_delete(
/*======*/
......@@ -127,7 +127,7 @@ ha_search_and_delete_if_found(
/*********************************************************************
Removes from the chain determined by fold all nodes whose data pointer
points to the page given. */
UNIV_INTERN
void
ha_remove_all_nodes_to_page(
/*========================*/
......@@ -136,7 +136,7 @@ ha_remove_all_nodes_to_page(
const page_t* page); /* in: buffer page */
/*****************************************************************
Validates a given range of the cells in hash table. */
UNIV_INTERN
ibool
ha_validate(
/*========*/
......@@ -146,7 +146,7 @@ ha_validate(
ulint end_index); /* in: end index */
/*****************************************************************
Prints info of a hash table. */
UNIV_INTERN
void
ha_print_info(
/*==========*/
......
......@@ -6,7 +6,7 @@ Smart ALTER TABLE
/*****************************************************************
Copies an InnoDB record to table->record[0]. */
UNIV_INTERN
void
innobase_rec_to_mysql(
/*==================*/
......@@ -18,7 +18,7 @@ innobase_rec_to_mysql(
/*****************************************************************
Resets table->record[0]. */
UNIV_INTERN
void
innobase_rec_reset(
/*===============*/
......
......@@ -24,7 +24,7 @@ typedef void* hash_node_t;
/*****************************************************************
Creates a hash table with >= n array cells. The actual number
of cells is chosen to be a prime number slightly bigger than n. */
UNIV_INTERN
hash_table_t*
hash_create(
/*========*/
......@@ -32,7 +32,7 @@ hash_create(
ulint n); /* in: number of array cells */
/*****************************************************************
Creates a mutex array to protect a hash table. */
UNIV_INTERN
void
hash_create_mutexes_func(
/*=====================*/
......@@ -50,7 +50,7 @@ hash_create_mutexes_func(
/*****************************************************************
Frees a hash table. */
UNIV_INTERN
void
hash_table_free(
/*============*/
......@@ -327,7 +327,7 @@ hash_get_mutex(
ulint fold); /* in: fold */
/****************************************************************
Reserves the mutex for a fold value in a hash table. */
UNIV_INTERN
void
hash_mutex_enter(
/*=============*/
......@@ -335,7 +335,7 @@ hash_mutex_enter(
ulint fold); /* in: fold */
/****************************************************************
Releases the mutex for a fold value in a hash table. */
UNIV_INTERN
void
hash_mutex_exit(
/*============*/
......@@ -343,14 +343,14 @@ hash_mutex_exit(
ulint fold); /* in: fold */
/****************************************************************
Reserves all the mutexes of a hash table, in an ascending order. */
UNIV_INTERN
void
hash_mutex_enter_all(
/*=================*/
hash_table_t* table); /* in: hash table */
/****************************************************************
Releases all the mutexes of a hash table. */
UNIV_INTERN
void
hash_mutex_exit_all(
/*================*/
......
......@@ -25,7 +25,7 @@ Creates the insert buffer data struct for a single tablespace. Reads the
root page of the insert buffer tree in the tablespace. This function can
be called only after the dictionary system has been initialized, as this
creates also the insert buffer table and index for this tablespace. */
UNIV_INTERN
ibuf_data_t*
ibuf_data_init_for_space(
/*=====================*/
......@@ -35,20 +35,20 @@ ibuf_data_init_for_space(
/**********************************************************************
Creates the insert buffer data structure at a database startup and
initializes the data structures for the insert buffer of each tablespace. */
UNIV_INTERN
void
ibuf_init_at_db_start(void);
/*=======================*/
/*************************************************************************
Reads the biggest tablespace id from the high end of the insert buffer
tree and updates the counter in fil_system. */
UNIV_INTERN
void
ibuf_update_max_tablespace_id(void);
/*===============================*/
/*************************************************************************
Initializes an ibuf bitmap page. */
UNIV_INTERN
void
ibuf_bitmap_page_init(
/*==================*/
......@@ -59,7 +59,7 @@ Resets the free bits of the page in the ibuf bitmap. This is done in a
separate mini-transaction, hence this operation does not restrict further
work to only ibuf bitmap operations, which would result if the latch to the
bitmap page were kept. */
UNIV_INTERN
void
ibuf_reset_free_bits(
/*=================*/
......@@ -91,7 +91,7 @@ ibuf_update_free_bits_if_full(
Updates the free bits for an uncompressed page to reflect the present state.
Does this in the mtr given, which means that the latching order rules virtually
prevent any further operations for this OS thread until mtr is committed. */
UNIV_INTERN
void
ibuf_update_free_bits_low(
/*======================*/
......@@ -106,7 +106,7 @@ ibuf_update_free_bits_low(
Updates the free bits for a compressed page to reflect the present state.
Does this in the mtr given, which means that the latching order rules virtually
prevent any further operations for this OS thread until mtr is committed. */
UNIV_INTERN
void
ibuf_update_free_bits_zip(
/*======================*/
......@@ -116,7 +116,7 @@ ibuf_update_free_bits_zip(
Updates the free bits for the two pages to reflect the present state. Does
this in the mtr given, which means that the latching order rules virtually
prevent any further operations until mtr is committed. */
UNIV_INTERN
void
ibuf_update_free_bits_for_two_pages_low(
/*====================================*/
......@@ -140,7 +140,7 @@ ibuf_should_try(
/**********************************************************************
Returns TRUE if the current OS thread is performing an insert buffer
routine. */
UNIV_INTERN
ibool
ibuf_inside(void);
/*=============*/
......@@ -158,7 +158,7 @@ ibuf_bitmap_page(
ulint page_no);/* in: page number */
/***************************************************************************
Checks if a page is a level 2 or 3 page in the ibuf hierarchy of pages. */
UNIV_INTERN
ibool
ibuf_page(
/*======*/
......@@ -168,7 +168,7 @@ ibuf_page(
ulint page_no);/* in: page number */
/***************************************************************************
Checks if a page is a level 2 or 3 page in the ibuf hierarchy of pages. */
UNIV_INTERN
ibool
ibuf_page_low(
/*==========*/
......@@ -183,7 +183,7 @@ ibuf_page_low(
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
file segment, and the thread did not own the fsp latch before this call. */
UNIV_INTERN
void
ibuf_free_excess_pages(
/*===================*/
......@@ -192,7 +192,7 @@ ibuf_free_excess_pages(
Makes an index insert to the insert buffer, instead of directly to the disk
page, if this is possible. Does not do insert if the index is clustered
or unique. */
UNIV_INTERN
ibool
ibuf_insert(
/*========*/
......@@ -210,7 +210,7 @@ The entries are deleted from the insert buffer. If the page is not read, but
created in the buffer pool, this function deletes its buffered entries from
the insert buffer; there can exist entries for such a page if the page
belonged to an index which subsequently was dropped. */
UNIV_INTERN
void
ibuf_merge_or_delete_for_page(
/*==========================*/
......@@ -231,14 +231,14 @@ Deletes all entries in the insert buffer for a given space id. This is used
in DISCARD TABLESPACE and IMPORT TABLESPACE.
NOTE: this does not update the page free bitmaps in the space. The space will
become CORRUPT when you call this function! */
UNIV_INTERN
void
ibuf_delete_for_discarded_space(
/*============================*/
ulint space); /* in: space id */
/*************************************************************************
Contracts insert buffer trees by reading pages to the buffer pool. */
UNIV_INTERN
ulint
ibuf_contract(
/*==========*/
......@@ -250,7 +250,7 @@ ibuf_contract(
to complete */
/*************************************************************************
Contracts insert buffer trees by reading pages to the buffer pool. */
UNIV_INTERN
ulint
ibuf_contract_for_n_pages(
/*======================*/
......@@ -265,7 +265,7 @@ ibuf_contract_for_n_pages(
them */
/*************************************************************************
Parses a redo log record of an ibuf bitmap page init. */
UNIV_INTERN
byte*
ibuf_parse_bitmap_init(
/*===================*/
......@@ -277,7 +277,7 @@ ibuf_parse_bitmap_init(
#ifdef UNIV_IBUF_COUNT_DEBUG
/**********************************************************************
Gets the ibuf count for a given page. */
UNIV_INTERN
ulint
ibuf_count_get(
/*===========*/
......@@ -288,14 +288,14 @@ ibuf_count_get(
#endif
/**********************************************************************
Looks if the insert buffer is empty. */
UNIV_INTERN
ibool
ibuf_is_empty(void);
/*===============*/
/* out: TRUE if empty */
/**********************************************************************
Prints info of ibuf. */
UNIV_INTERN
void
ibuf_print(
/*=======*/
......
......@@ -29,7 +29,7 @@ record is stored. It can be undefined (ULINT_UNDEFINED) in two cases:
bit_no is calculated in this function by using
lock_rec_find_set_bit(). There is exactly one bit set in the bitmap
of a wait lock. */
UNIV_INTERN
void
lock_queue_iterator_reset(
/*======================*/
......
......@@ -27,14 +27,14 @@ extern FILE* lock_latest_err_file;
/*************************************************************************
Gets the size of a lock struct. */
UNIV_INTERN
ulint
lock_get_size(void);
/*===============*/
/* out: size in bytes */
/*************************************************************************
Creates the lock system at database start. */
UNIV_INTERN
void
lock_sys_create(
/*============*/
......@@ -66,7 +66,7 @@ Updates the lock table when we have reorganized a page. NOTE: we copy
also the locks set on the infimum of the page; the infimum may carry
locks if an update of a record is occurring on the page, and its locks
were temporarily stored on the infimum. */
UNIV_INTERN
void
lock_move_reorganize_page(
/*======================*/
......@@ -77,7 +77,7 @@ lock_move_reorganize_page(
/*****************************************************************
Moves the explicit locks on user records to another page if a record
list end is moved to another page. */
UNIV_INTERN
void
lock_move_rec_list_end(
/*===================*/
......@@ -88,7 +88,7 @@ lock_move_rec_list_end(
/*****************************************************************
Moves the explicit locks on user records to another page if a record
list start is moved to another page. */
UNIV_INTERN
void
lock_move_rec_list_start(
/*=====================*/
......@@ -104,7 +104,7 @@ lock_move_rec_list_start(
were copied */
/*****************************************************************
Updates the lock table when a page is split to the right. */
UNIV_INTERN
void
lock_update_split_right(
/*====================*/
......@@ -112,7 +112,7 @@ lock_update_split_right(
const buf_block_t* left_block); /* in: left page */
/*****************************************************************
Updates the lock table when a page is merged to the right. */
UNIV_INTERN
void
lock_update_merge_right(
/*====================*/
......@@ -132,7 +132,7 @@ root page, even though they do not make sense on other than leaf
pages: the reason is that in a pessimistic update the infimum record
of the root page will act as a dummy carrier of the locks of the record
to be updated. */
UNIV_INTERN
void
lock_update_root_raise(
/*===================*/
......@@ -141,7 +141,7 @@ lock_update_root_raise(
/*****************************************************************
Updates the lock table when a page is copied to another and the original page
is removed from the chain of leaf pages, except if page is the root! */
UNIV_INTERN
void
lock_update_copy_and_discard(
/*=========================*/
......@@ -151,7 +151,7 @@ lock_update_copy_and_discard(
NOT the root! */
/*****************************************************************
Updates the lock table when a page is split to the left. */
UNIV_INTERN
void
lock_update_split_left(
/*===================*/
......@@ -159,7 +159,7 @@ lock_update_split_left(
const buf_block_t* left_block); /* in: left page */
/*****************************************************************
Updates the lock table when a page is merged to the left. */
UNIV_INTERN
void
lock_update_merge_left(
/*===================*/
......@@ -173,7 +173,7 @@ lock_update_merge_left(
/*****************************************************************
Resets the original locks on heir and replaces them with gap type locks
inherited from rec. */
UNIV_INTERN
void
lock_rec_reset_and_inherit_gap_locks(
/*=================================*/
......@@ -189,7 +189,7 @@ lock_rec_reset_and_inherit_gap_locks(
donating record */
/*****************************************************************
Updates the lock table when a page is discarded. */
UNIV_INTERN
void
lock_update_discard(
/*================*/
......@@ -201,7 +201,7 @@ lock_update_discard(
which will be discarded */
/*****************************************************************
Updates the lock table when a new user record is inserted. */
UNIV_INTERN
void
lock_update_insert(
/*===============*/
......@@ -209,7 +209,7 @@ lock_update_insert(
const rec_t* rec); /* in: the inserted record */
/*****************************************************************
Updates the lock table when a record is removed. */
UNIV_INTERN
void
lock_update_delete(
/*===============*/
......@@ -222,7 +222,7 @@ updated and the size of the record changes in the update. The record
is in such an update moved, perhaps to another page. The infimum record
acts as a dummy carrier record, taking care of lock releases while the
actual record is being moved. */
UNIV_INTERN
void
lock_rec_store_on_page_infimum(
/*===========================*/
......@@ -235,7 +235,7 @@ lock_rec_store_on_page_infimum(
/*************************************************************************
Restores the state of explicit lock requests on a single record, where the
state was stored on the infimum of the page. */
UNIV_INTERN
void
lock_rec_restore_from_page_infimum(
/*===============================*/
......@@ -249,7 +249,7 @@ lock_rec_restore_from_page_infimum(
the infimum */
/*************************************************************************
Returns TRUE if there are explicit record locks on a page. */
UNIV_INTERN
ibool
lock_rec_expl_exist_on_page(
/*========================*/
......@@ -263,7 +263,7 @@ a record. If they do, first tests if the query thread should anyway
be suspended for some reason; if not, then puts the transaction and
the query thread to the lock wait state and inserts a waiting request
for a gap x-lock to the lock queue. */
UNIV_INTERN
ulint
lock_rec_insert_check_and_lock(
/*===========================*/
......@@ -286,7 +286,7 @@ first tests if the query thread should anyway be suspended for some
reason; if not, then puts the transaction and the query thread to the
lock wait state and inserts a waiting request for a record x-lock to the
lock queue. */
UNIV_INTERN
ulint
lock_clust_rec_modify_check_and_lock(
/*=================================*/
......@@ -304,7 +304,7 @@ lock_clust_rec_modify_check_and_lock(
/*************************************************************************
Checks if locks of other transactions prevent an immediate modify
(delete mark or delete unmark) of a secondary index record. */
UNIV_INTERN
ulint
lock_sec_rec_modify_check_and_lock(
/*===============================*/
......@@ -323,7 +323,7 @@ lock_sec_rec_modify_check_and_lock(
/*************************************************************************
Like the counterpart for a clustered index below, but now we read a
secondary index record. */
UNIV_INTERN
ulint
lock_sec_rec_read_check_and_lock(
/*=============================*/
......@@ -354,7 +354,7 @@ if the query thread should anyway be suspended for some reason; if not, then
puts the transaction and the query thread to the lock wait state and inserts a
waiting request for a record lock to the lock queue. Sets the requested mode
lock on the record. */
UNIV_INTERN
ulint
lock_clust_rec_read_check_and_lock(
/*===============================*/
......@@ -387,7 +387,7 @@ waiting request for a record lock to the lock queue. Sets the requested mode
lock on the record. This is an alternative version of
lock_clust_rec_read_check_and_lock() that does not require the parameter
"offsets". */
UNIV_INTERN
ulint
lock_clust_rec_read_check_and_lock_alt(
/*===================================*/
......@@ -412,7 +412,7 @@ lock_clust_rec_read_check_and_lock_alt(
que_thr_t* thr); /* in: query thread */
/*************************************************************************
Checks that a record is seen in a consistent read. */
UNIV_INTERN
ibool
lock_clust_rec_cons_read_sees(
/*==========================*/
......@@ -425,7 +425,7 @@ lock_clust_rec_cons_read_sees(
read_view_t* view); /* in: consistent read view */
/*************************************************************************
Checks that a non-clustered index record is seen in a consistent read. */
UNIV_INTERN
ulint
lock_sec_rec_cons_read_sees(
/*========================*/
......@@ -449,7 +449,7 @@ lock_sec_rec_cons_read_sees(
/*************************************************************************
Locks the specified database table in the mode given. If the lock cannot
be granted immediately, the query thread is put to wait. */
UNIV_INTERN
ulint
lock_table(
/*=======*/
......@@ -462,7 +462,7 @@ lock_table(
que_thr_t* thr); /* in: query thread */
/*************************************************************************
Checks if there are any locks set on the table. */
UNIV_INTERN
ibool
lock_is_on_table(
/*=============*/
......@@ -472,7 +472,7 @@ lock_is_on_table(
Removes a granted record lock of a transaction from the queue and grants
locks to other transactions waiting in the queue if they now are entitled
to a lock. */
UNIV_INTERN
void
lock_rec_unlock(
/*============*/
......@@ -484,7 +484,7 @@ lock_rec_unlock(
/*************************************************************************
Releases a table lock.
Releases possible other transactions waiting for this lock. */
UNIV_INTERN
void
lock_table_unlock(
/*==============*/
......@@ -492,7 +492,7 @@ lock_table_unlock(
/*************************************************************************
Releases an auto-inc lock a transaction possibly has on a table.
Releases possible other transactions waiting for this lock. */
UNIV_INTERN
void
lock_table_unlock_auto_inc(
/*=======================*/
......@@ -500,7 +500,7 @@ lock_table_unlock_auto_inc(
/*************************************************************************
Releases transaction locks, and releases possible other transactions waiting
because of these locks. */
UNIV_INTERN
void
lock_release_off_kernel(
/*====================*/
......@@ -508,7 +508,7 @@ lock_release_off_kernel(
/*************************************************************************
Cancels a waiting lock request and releases possible other transactions
waiting behind it. */
UNIV_INTERN
void
lock_cancel_waiting_and_release(
/*============================*/
......@@ -516,7 +516,7 @@ lock_cancel_waiting_and_release(
/*************************************************************************
Resets all locks, both table and record locks, on a table to be dropped.
No lock is allowed to be a wait lock. */
UNIV_INTERN
void
lock_reset_all_on_table(
/*====================*/
......@@ -546,7 +546,7 @@ lock_rec_hash(
/**************************************************************************
Looks for a set bit in a record lock bitmap. Returns ULINT_UNDEFINED,
if none found. */
UNIV_INTERN
ulint
lock_rec_find_set_bit(
/*==================*/
......@@ -557,7 +557,7 @@ lock_rec_find_set_bit(
/*************************************************************************
Gets the source table of an ALTER TABLE transaction. The table must be
covered by an IX or IS table lock. */
UNIV_INTERN
dict_table_t*
lock_get_src_table(
/*===============*/
......@@ -573,7 +573,7 @@ lock_get_src_table(
Determine if the given table is exclusively "owned" by the given
transaction, i.e., transaction holds LOCK_IX and possibly LOCK_AUTO_INC
on the table. */
UNIV_INTERN
ibool
lock_is_table_exclusive(
/*====================*/
......@@ -583,7 +583,7 @@ lock_is_table_exclusive(
trx_t* trx); /* in: transaction */
/*************************************************************************
Checks if a lock request lock1 has to wait for request lock2. */
UNIV_INTERN
ibool
lock_has_to_wait(
/*=============*/
......@@ -596,7 +596,7 @@ lock_has_to_wait(
locks are record locks */
/*************************************************************************
Checks that a transaction id is sensible, i.e., not in the future. */
UNIV_INTERN
ibool
lock_check_trx_id_sanity(
/*=====================*/
......@@ -609,7 +609,7 @@ lock_check_trx_id_sanity(
kernel mutex */
/*************************************************************************
Prints info of a table lock. */
UNIV_INTERN
void
lock_table_print(
/*=============*/
......@@ -617,7 +617,7 @@ lock_table_print(
const lock_t* lock); /* in: table type lock */
/*************************************************************************
Prints info of a record lock. */
UNIV_INTERN
void
lock_rec_print(
/*===========*/
......@@ -625,14 +625,14 @@ lock_rec_print(
const lock_t* lock); /* in: record type lock */
/*************************************************************************
Prints info of locks for all transactions. */
UNIV_INTERN
void
lock_print_info_summary(
/*====================*/
FILE* file); /* in: file where to print */
/*************************************************************************
Prints info of locks for each transaction. */
UNIV_INTERN
void
lock_print_info_all_transactions(
/*=============================*/
......@@ -641,7 +641,7 @@ lock_print_info_all_transactions(
Return approximate number or record locks (bits set in the bitmap) for
this transaction. Since delete-marked records may be removed, the
record count will not be precise. */
UNIV_INTERN
ulint
lock_number_of_rows_locked(
/*=======================*/
......@@ -650,7 +650,7 @@ lock_number_of_rows_locked(
/***********************************************************************
Gets the type of a lock. Non-inline version for using outside of the
lock module. */
UNIV_INTERN
ulint
lock_get_type(
/*==========*/
......@@ -659,7 +659,7 @@ lock_get_type(
/***********************************************************************
Gets the id of the transaction owning a lock. */
UNIV_INTERN
ullint
lock_get_trx_id(
/*============*/
......@@ -688,7 +688,7 @@ lock_get_type_str(
/***********************************************************************
Gets the id of the table on which the lock is. */
UNIV_INTERN
ullint
lock_get_table_id(
/*==============*/
......@@ -726,7 +726,7 @@ lock_rec_get_index_name(
/***********************************************************************
For a record lock, gets the tablespace number on which the lock is. */
UNIV_INTERN
ulint
lock_rec_get_space_id(
/*==================*/
......@@ -735,7 +735,7 @@ lock_rec_get_space_id(
/***********************************************************************
For a record lock, gets the page number on which the lock is. */
UNIV_INTERN
ulint
lock_rec_get_page_no(
/*=================*/
......
......@@ -34,14 +34,14 @@ extern ibool log_debug_writes;
Sets the global variable log_fsp_current_free_limit. Also makes a checkpoint,
so that we know that the limit has been written to a log checkpoint field
on disk. */
UNIV_INTERN
void
log_fsp_current_free_limit_set_and_checkpoint(
/*==========================================*/
ulint limit); /* in: limit to set */
/***********************************************************************
Calculates where in log files we find a specified lsn. */
UNIV_INTERN
ulint
log_calc_where_lsn_is(
/*==================*/
......@@ -87,7 +87,7 @@ log_free_check(void);
/****************************************************************
Opens the log for log_write_low. The log must be closed with log_close and
released with log_release. */
UNIV_INTERN
ib_uint64_t
log_reserve_and_open(
/*=================*/
......@@ -96,7 +96,7 @@ log_reserve_and_open(
/****************************************************************
Writes to the log the string given. It is assumed that the caller holds the
log mutex. */
UNIV_INTERN
void
log_write_low(
/*==========*/
......@@ -104,7 +104,7 @@ log_write_low(
ulint str_len); /* in: string length */
/****************************************************************
Closes the log. */
UNIV_INTERN
ib_uint64_t
log_close(void);
/*===========*/
......@@ -118,13 +118,13 @@ log_get_lsn(void);
/* out: current lsn */
/**********************************************************
Initializes the log. */
UNIV_INTERN
void
log_init(void);
/*==========*/
/**********************************************************************
Inits a log group to the log system. */
UNIV_INTERN
void
log_group_init(
/*===========*/
......@@ -141,7 +141,7 @@ log_group_init(
used */
/**********************************************************
Completes an i/o to a log file. */
UNIV_INTERN
void
log_io_complete(
/*============*/
......@@ -151,7 +151,7 @@ This function is called, e.g., when a transaction wants to commit. It checks
that the log has been written to the log file up to the last log entry written
by the transaction. If there is a flush running, it waits and checks if the
flush flushed enough. If not, starts a new flush. */
UNIV_INTERN
void
log_write_up_to(
/*============*/
......@@ -165,7 +165,7 @@ log_write_up_to(
also to be flushed to disk */
/********************************************************************
Does a syncronous flush of the log buffer to disk. */
UNIV_INTERN
void
log_buffer_flush_to_disk(void);
/*==========================*/
......@@ -173,7 +173,7 @@ log_buffer_flush_to_disk(void);
Advances the smallest lsn for which there are unflushed dirty blocks in the
buffer pool and also may make a new checkpoint. NOTE: this function may only
be called if the calling thread owns no synchronization objects! */
UNIV_INTERN
ibool
log_preflush_pool_modified_pages(
/*=============================*/
......@@ -192,7 +192,7 @@ Makes a checkpoint. Note that this function does not flush dirty
blocks from the buffer pool: it only checks what is lsn of the oldest
modification in the pool, and writes information about the lsn in
log files. Use log_make_checkpoint_at to flush also the pool. */
UNIV_INTERN
ibool
log_checkpoint(
/*===========*/
......@@ -208,7 +208,7 @@ log_checkpoint(
made to log files */
/********************************************************************
Makes a checkpoint at a given lsn or later. */
UNIV_INTERN
void
log_make_checkpoint_at(
/*===================*/
......@@ -227,13 +227,13 @@ Makes a checkpoint at the latest lsn and writes it to first page of each
data file in the database, so that we know that the file spaces contain
all modifications up to that lsn. This can only be called at database
shutdown. This function also writes all log in log files to the log archive. */
UNIV_INTERN
void
logs_empty_and_mark_files_at_shutdown(void);
/*=======================================*/
/**********************************************************
Reads a checkpoint info from a log group header to log_sys->checkpoint_buf. */
UNIV_INTERN
void
log_group_read_checkpoint_info(
/*===========================*/
......@@ -241,7 +241,7 @@ log_group_read_checkpoint_info(
ulint field); /* in: LOG_CHECKPOINT_1 or LOG_CHECKPOINT_2 */
/***********************************************************************
Gets info from a checkpoint about a log group. */
UNIV_INTERN
void
log_checkpoint_get_nth_group_info(
/*==============================*/
......@@ -251,14 +251,14 @@ log_checkpoint_get_nth_group_info(
ulint* offset);/* out: archived file offset */
/**********************************************************
Writes checkpoint info to groups. */
UNIV_INTERN
void
log_groups_write_checkpoint_info(void);
/*==================================*/
/**********************************************************
Writes info to a buffer of a log group when log files are created in
backup restoration. */
UNIV_INTERN
void
log_reset_first_header_and_checkpoint(
/*==================================*/
......@@ -269,7 +269,7 @@ log_reset_first_header_and_checkpoint(
start + LOG_BLOCK_HDR_SIZE */
/************************************************************************
Starts an archiving operation. */
UNIV_INTERN
ibool
log_archive_do(
/*===========*/
......@@ -284,35 +284,35 @@ called, and stops the archiving. When archiving is started again, the archived
log file numbers start from a number one higher, so that the archiving will
not write again to the archived log files which exist when this function
returns. */
UNIV_INTERN
ulint
log_archive_stop(void);
/*==================*/
/* out: DB_SUCCESS or DB_ERROR */
/********************************************************************
Starts again archiving which has been stopped. */
UNIV_INTERN
ulint
log_archive_start(void);
/*===================*/
/* out: DB_SUCCESS or DB_ERROR */
/********************************************************************
Stop archiving the log so that a gap may occur in the archived log files. */
UNIV_INTERN
ulint
log_archive_noarchivelog(void);
/*==========================*/
/* out: DB_SUCCESS or DB_ERROR */
/********************************************************************
Start archiving the log so that a gap may occur in the archived log files. */
UNIV_INTERN
ulint
log_archive_archivelog(void);
/*========================*/
/* out: DB_SUCCESS or DB_ERROR */
/**********************************************************
Generates an archived log file name. */
UNIV_INTERN
void
log_archived_file_name_gen(
/*=======================*/
......@@ -324,13 +324,13 @@ Checks that there is enough free space in the log to start a new query step.
Flushes the log buffer or makes a new checkpoint if necessary. NOTE: this
function may only be called if the calling thread owns no synchronization
objects! */
UNIV_INTERN
void
log_check_margins(void);
/*===================*/
/**********************************************************
Reads a specified log segment to a buffer. */
UNIV_INTERN
void
log_group_read_log_seg(
/*===================*/
......@@ -341,7 +341,7 @@ log_group_read_log_seg(
ib_uint64_t end_lsn); /* in: read area end */
/**********************************************************
Writes a buffer to a log file group. */
UNIV_INTERN
void
log_group_write_buf(
/*================*/
......@@ -360,7 +360,7 @@ log_group_write_buf(
Sets the field values in group to correspond to a given lsn. For this function
to work, the values must already be correctly initialized to correspond to
some lsn, for instance, a checkpoint lsn. */
UNIV_INTERN
void
log_group_set_fields(
/*=================*/
......@@ -370,7 +370,7 @@ log_group_set_fields(
/**********************************************************
Calculates the data capacity of a log group, when the log file headers are not
included. */
UNIV_INTERN
ulint
log_group_get_capacity(
/*===================*/
......@@ -488,14 +488,14 @@ log_block_convert_lsn_to_no(
ib_uint64_t lsn); /* in: lsn of a byte within the block */
/**********************************************************
Prints info of the log. */
UNIV_INTERN
void
log_print(
/*======*/
FILE* file); /* in: file where to print */
/**********************************************************
Peeks the current lsn. */
UNIV_INTERN
ibool
log_peek_lsn(
/*=========*/
......@@ -504,7 +504,7 @@ log_peek_lsn(
ib_uint64_t* lsn); /* out: if returns TRUE, current lsn is here */
/**************************************************************************
Refreshes the statistics used to print per-second averages. */
UNIV_INTERN
void
log_refresh_stats(void);
/*===================*/
......
......@@ -21,7 +21,7 @@ extern ibool recv_replay_file_ops;
/***********************************************************************
Reads the checkpoint info needed in hot backup. */
UNIV_INTERN
ibool
recv_read_cp_info_for_backup(
/*=========================*/
......@@ -40,7 +40,7 @@ recv_read_cp_info_for_backup(
/***********************************************************************
Scans the log segment and n_bytes_scanned is set to the length of valid
log scanned. */
UNIV_INTERN
void
recv_scan_log_seg_for_backup(
/*=========================*/
......@@ -71,7 +71,7 @@ recv_recovery_from_backup_is_on(void);
Applies the hashed log records to the page, if the page lsn is less than the
lsn of a log record. This can be called when a buffer page has just been
read in, or also for a page already in the buffer pool. */
UNIV_INTERN
void
recv_recover_page(
/*==============*/
......@@ -89,7 +89,7 @@ Recovers from a checkpoint. When this function returns, the database is able
to start processing of new user transactions, but the function
recv_recovery_from_checkpoint_finish should be called later to complete
the recovery and free the resources used in it. */
UNIV_INTERN
ulint
recv_recovery_from_checkpoint_start(
/*================================*/
......@@ -103,14 +103,14 @@ recv_recovery_from_checkpoint_start(
data files */
/************************************************************
Completes recovery from a checkpoint. */
UNIV_INTERN
void
recv_recovery_from_checkpoint_finish(void);
/*======================================*/
/***********************************************************
Scans log from a buffer and stores new log data to the parsing buffer. Parses
and hashes the log records if new data found. */
UNIV_INTERN
ibool
recv_scan_log_recs(
/*===============*/
......@@ -140,7 +140,7 @@ recv_scan_log_recs(
this lsn */
/**********************************************************
Resets the logs. The contents of log files will be lost! */
UNIV_INTERN
void
recv_reset_logs(
/*============*/
......@@ -159,7 +159,7 @@ recv_reset_logs(
#ifdef UNIV_HOTBACKUP
/**********************************************************
Creates new log files after a backup has been restored. */
UNIV_INTERN
void
recv_reset_log_files_for_backup(
/*============================*/
......@@ -171,13 +171,13 @@ recv_reset_log_files_for_backup(
#endif /* UNIV_HOTBACKUP */
/************************************************************
Creates the recovery system. */
UNIV_INTERN
void
recv_sys_create(void);
/*=================*/
/************************************************************
Inits the recovery system for a recovery operation. */
UNIV_INTERN
void
recv_sys_init(
/*==========*/
......@@ -187,7 +187,7 @@ recv_sys_init(
/***********************************************************************
Empties the hash table of stored log records, applying them to appropriate
pages. */
UNIV_INTERN
void
recv_apply_hashed_log_recs(
/*=======================*/
......@@ -201,7 +201,7 @@ recv_apply_hashed_log_recs(
#ifdef UNIV_HOTBACKUP
/***********************************************************************
Applies log records in the hash table to a backup. */
UNIV_INTERN
void
recv_apply_log_recs_for_backup(void);
/*================================*/
......@@ -209,7 +209,7 @@ recv_apply_log_recs_for_backup(void);
#ifdef UNIV_LOG_ARCHIVE
/************************************************************
Recovers from archived log files, and also from log files, if they exist. */
UNIV_INTERN
ulint
recv_recovery_from_archive_start(
/*=============================*/
......@@ -225,7 +225,7 @@ recv_recovery_from_archive_start(
server config file */
/************************************************************
Completes recovery from archive. */
UNIV_INTERN
void
recv_recovery_from_archive_finish(void);
/*===================================*/
......
......@@ -273,7 +273,7 @@ mach_dulint_read_much_compressed(
__attribute__((nonnull, pure));
/*************************************************************
Reads a ulint in a compressed form if the log record fully contains it. */
UNIV_INTERN
byte*
mach_parse_compressed(
/*==================*/
......@@ -284,7 +284,7 @@ mach_parse_compressed(
ulint* val); /* out: read value */
/*************************************************************
Reads a dulint in a compressed form if the log record fully contains it. */
UNIV_INTERN
byte*
mach_dulint_parse_compressed(
/*=========================*/
......
......@@ -37,7 +37,7 @@ Outputs the sum of sizes of buffers given to the user (only in
the debug version), the physical size of the heap and the number of
blocks in the heap. In case of error returns 0 as sizes and number
of blocks. */
UNIV_INTERN
void
mem_heap_validate_or_print(
/*=======================*/
......@@ -62,7 +62,7 @@ mem_heap_validate_or_print(
argument, it is ignored */
/******************************************************************
Validates the contents of a memory heap. */
UNIV_INTERN
ibool
mem_heap_validate(
/*==============*/
......@@ -72,7 +72,7 @@ mem_heap_validate(
#ifdef UNIV_DEBUG
/******************************************************************
Checks that an object is a memory heap (or a block of it) */
UNIV_INTERN
ibool
mem_heap_check(
/*===========*/
......@@ -82,21 +82,21 @@ mem_heap_check(
#ifdef UNIV_MEM_DEBUG
/*********************************************************************
TRUE if no memory is currently allocated. */
UNIV_INTERN
ibool
mem_all_freed(void);
/*===============*/
/* out: TRUE if no heaps exist */
/*********************************************************************
Validates the dynamic memory */
UNIV_INTERN
ibool
mem_validate_no_assert(void);
/*=========================*/
/* out: TRUE if error */
/****************************************************************
Validates the dynamic memory */
UNIV_INTERN
ibool
mem_validate(void);
/*===============*/
......@@ -105,7 +105,7 @@ mem_validate(void);
/****************************************************************
Tries to find neigboring memory allocation blocks and dumps to stderr
the neighborhood of a given pointer. */
UNIV_INTERN
void
mem_analyze_corruption(
/*===================*/
......@@ -113,14 +113,14 @@ mem_analyze_corruption(
/*********************************************************************
Prints information of dynamic memory usage and currently allocated memory
heaps or buffers. Can only be used in the debug version. */
UNIV_INTERN
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. */
UNIV_INTERN
void
mem_print_new_info(void);
/*====================*/
......@@ -59,7 +59,7 @@ is the maximum size for a single allocated buffer: */
/**********************************************************************
Initializes the memory system. */
UNIV_INTERN
void
mem_init(
/*=====*/
......@@ -258,7 +258,7 @@ mem_strdupl(
/**************************************************************************
Duplicates a NUL-terminated string, allocated from a memory heap. */
UNIV_INTERN
char*
mem_heap_strdup(
/*============*/
......@@ -279,7 +279,7 @@ mem_heap_strdupl(
/**************************************************************************
Concatenate two strings and return the result, using a memory heap. */
UNIV_INTERN
char*
mem_heap_strcat(
/*============*/
......@@ -290,7 +290,7 @@ mem_heap_strcat(
/**************************************************************************
Duplicate a block of data, allocated from a memory heap. */
UNIV_INTERN
void*
mem_heap_dup(
/*=========*/
......@@ -301,7 +301,7 @@ mem_heap_dup(
/**************************************************************************
Concatenate two memory blocks and return the result, using a memory heap. */
UNIV_INTERN
void*
mem_heap_cat(
/*=========*/
......@@ -317,7 +317,7 @@ A simple (s)printf replacement that dynamically allocates the space for the
formatted string from the given heap. This supports a very limited set of
the printf syntax: types 's' and 'u' and length modifier 'l' (which is
required for the 'u' type). */
UNIV_INTERN
char*
mem_heap_printf(
/*============*/
......@@ -330,7 +330,7 @@ mem_heap_printf(
/**********************************************************************
Goes through the list of all allocated mem blocks, checks their magic
numbers, and reports possible corruption. */
UNIV_INTERN
void
mem_validate_all_blocks(void);
/*=========================*/
......
......@@ -36,7 +36,7 @@ struct mem_area_struct{
/************************************************************************
Creates a memory pool. */
UNIV_INTERN
mem_pool_t*
mem_pool_create(
/*============*/
......@@ -45,7 +45,7 @@ mem_pool_create(
/************************************************************************
Allocates memory from a pool. NOTE: This low-level function should only be
used in mem0mem.*! */
UNIV_INTERN
void*
mem_area_alloc(
/*===========*/
......@@ -58,7 +58,7 @@ mem_area_alloc(
mem_pool_t* pool); /* in: memory pool */
/************************************************************************
Frees memory to a pool. */
UNIV_INTERN
void
mem_area_free(
/*==========*/
......@@ -67,7 +67,7 @@ mem_area_free(
mem_pool_t* pool); /* in: memory pool */
/************************************************************************
Returns the amount of reserved memory. */
UNIV_INTERN
ulint
mem_pool_get_reserved(
/*==================*/
......@@ -75,19 +75,19 @@ mem_pool_get_reserved(
mem_pool_t* pool); /* in: memory pool */
/************************************************************************
Reserves the mem pool mutex. */
UNIV_INTERN
void
mem_pool_mutex_enter(void);
/*======================*/
/************************************************************************
Releases the mem pool mutex. */
UNIV_INTERN
void
mem_pool_mutex_exit(void);
/*=====================*/
/************************************************************************
Validates a memory pool. */
UNIV_INTERN
ibool
mem_pool_validate(
/*==============*/
......@@ -95,7 +95,7 @@ mem_pool_validate(
mem_pool_t* pool); /* in: memory pool */
/************************************************************************
Prints info of a memory pool. */
UNIV_INTERN
void
mem_pool_print_info(
/*================*/
......
......@@ -16,7 +16,7 @@ Created 12/7/1995 Heikki Tuuri
/************************************************************
Writes 1 - 4 bytes to a file page buffered in the buffer pool.
Writes the corresponding log record to the mini-transaction log. */
UNIV_INTERN
void
mlog_write_ulint(
/*=============*/
......@@ -27,7 +27,7 @@ mlog_write_ulint(
/************************************************************
Writes 8 bytes to a file page buffered in the buffer pool.
Writes the corresponding log record to the mini-transaction log. */
UNIV_INTERN
void
mlog_write_dulint(
/*==============*/
......@@ -37,7 +37,7 @@ mlog_write_dulint(
/************************************************************
Writes a string to a file page buffered in the buffer pool. Writes the
corresponding log record to the mini-transaction log. */
UNIV_INTERN
void
mlog_write_string(
/*==============*/
......@@ -48,7 +48,7 @@ mlog_write_string(
/************************************************************
Logs a write of a string to a file page buffered in the buffer pool.
Writes the corresponding log record to the mini-transaction log. */
UNIV_INTERN
void
mlog_log_string(
/*============*/
......@@ -58,7 +58,7 @@ mlog_log_string(
/************************************************************
Writes initial part of a log record consisting of one-byte item
type and four-byte space and page numbers. */
UNIV_INTERN
void
mlog_write_initial_log_record(
/*==========================*/
......@@ -91,7 +91,7 @@ mlog_catenate_ulint(
ulint type); /* in: MLOG_1BYTE, MLOG_2BYTES, MLOG_4BYTES */
/************************************************************
Catenates n bytes to the mtr log. */
UNIV_INTERN
void
mlog_catenate_string(
/*=================*/
......@@ -150,7 +150,7 @@ mlog_write_initial_log_record_fast(
mtr_t* mtr); /* in: mtr */
/************************************************************
Parses an initial log record written by mlog_write_initial_log_record. */
UNIV_INTERN
byte*
mlog_parse_initial_log_record(
/*==========================*/
......@@ -163,7 +163,7 @@ mlog_parse_initial_log_record(
ulint* page_no);/* out: page number */
/************************************************************
Parses a log record written by mlog_write_ulint or mlog_write_dulint. */
UNIV_INTERN
byte*
mlog_parse_nbytes(
/*==============*/
......@@ -176,7 +176,7 @@ mlog_parse_nbytes(
void* page_zip);/* in/out: compressed page, or NULL */
/************************************************************
Parses a log record written by mlog_write_string. */
UNIV_INTERN
byte*
mlog_parse_string(
/*==============*/
......@@ -193,7 +193,7 @@ Opens a buffer for mlog, writes the initial log record and,
if needed, the field lengths of an index. Reserves space
for further log entries. The log entry must be closed with
mtr_close(). */
UNIV_INTERN
byte*
mlog_open_and_write_index(
/*======================*/
......@@ -208,7 +208,7 @@ mlog_open_and_write_index(
/************************************************************
Parses a log record written by mlog_open_and_write_index. */
UNIV_INTERN
byte*
mlog_parse_index(
/*=============*/
......
......@@ -156,7 +156,7 @@ mtr_start(
mtr_t* mtr); /* in: memory buffer for the mtr buffer */
/*******************************************************************
Commits a mini-transaction. */
UNIV_INTERN
void
mtr_commit(
/*=======*/
......@@ -173,7 +173,7 @@ mtr_set_savepoint(
Releases the latches stored in an mtr memo down to a savepoint.
NOTE! The mtr must not have made changes to buffer pages after the
savepoint, as these can be handled only by mtr_commit. */
UNIV_INTERN
void
mtr_rollback_to_savepoint(
/*======================*/
......@@ -208,7 +208,7 @@ mtr_set_log_mode(
ulint mode); /* in: logging mode: MTR_LOG_NONE, ... */
/************************************************************
Reads 1 - 4 bytes from a file page buffered in the buffer pool. */
UNIV_INTERN
ulint
mtr_read_ulint(
/*===========*/
......@@ -218,7 +218,7 @@ mtr_read_ulint(
mtr_t* mtr); /* in: mini-transaction handle */
/************************************************************
Reads 8 bytes from a file page buffered in the buffer pool. */
UNIV_INTERN
dulint
mtr_read_dulint(
/*============*/
......@@ -258,7 +258,7 @@ mtr_x_lock_func(
/*******************************************************
Releases an object in the memo stack. */
UNIV_INTERN
void
mtr_memo_release(
/*=============*/
......@@ -279,7 +279,7 @@ mtr_memo_contains(
/**************************************************************
Checks if memo contains the given page. */
UNIV_INTERN
ibool
mtr_memo_contains_page(
/*===================*/
......@@ -289,7 +289,7 @@ mtr_memo_contains_page(
ulint type); /* in: type of object */
/*************************************************************
Prints info of an mtr handle. */
UNIV_INTERN
void
mtr_print(
/*======*/
......
......@@ -174,14 +174,14 @@ typedef DIR* os_file_dir_t; /* directory stream */
/***************************************************************************
Gets the operating system version. Currently works only on Windows. */
UNIV_INTERN
ulint
os_get_os_version(void);
/*===================*/
/* out: OS_WIN95, OS_WIN31, OS_WINNT, or OS_WIN2000 */
/********************************************************************
Creates the seek mutexes used in positioned reads and writes. */
UNIV_INTERN
void
os_io_init_simple(void);
/*===================*/
......@@ -200,7 +200,7 @@ The os_file_opendir() function opens a directory stream corresponding to the
directory named by the dirname argument. The directory stream is positioned
at the first entry. In both Unix and Windows we automatically skip the '.'
and '..' items at the start of the directory listing. */
UNIV_INTERN
os_file_dir_t
os_file_opendir(
/*============*/
......@@ -215,7 +215,7 @@ os_file_opendir(
a directory */
/***************************************************************************
Closes a directory stream. */
UNIV_INTERN
int
os_file_closedir(
/*=============*/
......@@ -224,7 +224,7 @@ os_file_closedir(
/***************************************************************************
This function returns information of the next file in the directory. We jump
over the '.' and '..' entries in the directory. */
UNIV_INTERN
int
os_file_readdir_next_file(
/*======================*/
......@@ -238,7 +238,7 @@ This function attempts to create a directory named pathname. The new directory
gets default permissions. On Unix, the permissions are (0770 & ~umask). If the
directory exists already, nothing is done and the call succeeds, unless the
fail_if_exists arguments is true. */
UNIV_INTERN
ibool
os_file_create_directory(
/*=====================*/
......@@ -250,7 +250,7 @@ os_file_create_directory(
is treated as an error. */
/********************************************************************
A simple function to open or create a file. */
UNIV_INTERN
os_file_t
os_file_create_simple(
/*==================*/
......@@ -271,7 +271,7 @@ os_file_create_simple(
ibool* success);/* out: TRUE if succeed, FALSE if error */
/********************************************************************
A simple function to open or create a file. */
UNIV_INTERN
os_file_t
os_file_create_simple_no_error_handling(
/*====================================*/
......@@ -291,7 +291,7 @@ os_file_create_simple_no_error_handling(
ibool* success);/* out: TRUE if succeed, FALSE if error */
/********************************************************************
Opens an existing file or creates a new. */
UNIV_INTERN
os_file_t
os_file_create(
/*===========*/
......@@ -319,7 +319,7 @@ os_file_create(
ibool* success);/* out: TRUE if succeed, FALSE if error */
/***************************************************************************
Deletes a file. The file has to be closed before calling this. */
UNIV_INTERN
ibool
os_file_delete(
/*===========*/
......@@ -328,7 +328,7 @@ os_file_delete(
/***************************************************************************
Deletes a file if it exists. The file has to be closed before calling this. */
UNIV_INTERN
ibool
os_file_delete_if_exists(
/*=====================*/
......@@ -337,7 +337,7 @@ os_file_delete_if_exists(
/***************************************************************************
Renames a file (can also move it to another directory). It is safest that the
file is closed before calling this function. */
UNIV_INTERN
ibool
os_file_rename(
/*===========*/
......@@ -348,7 +348,7 @@ os_file_rename(
/***************************************************************************
Closes a file handle. In case of error, error number can be retrieved with
os_file_get_last_error. */
UNIV_INTERN
ibool
os_file_close(
/*==========*/
......@@ -356,7 +356,7 @@ os_file_close(
os_file_t file); /* in, own: handle to a file */
/***************************************************************************
Closes a file handle. */
UNIV_INTERN
ibool
os_file_close_no_error_handling(
/*============================*/
......@@ -364,7 +364,7 @@ os_file_close_no_error_handling(
os_file_t file); /* in, own: handle to a file */
/***************************************************************************
Gets a file size. */
UNIV_INTERN
ibool
os_file_get_size(
/*=============*/
......@@ -375,7 +375,7 @@ os_file_get_size(
ulint* size_high);/* out: most significant 32 bits of size */
/***************************************************************************
Gets file size as a 64-bit integer ib_longlong. */
UNIV_INTERN
ib_longlong
os_file_get_size_as_iblonglong(
/*===========================*/
......@@ -383,7 +383,7 @@ os_file_get_size_as_iblonglong(
os_file_t file); /* in: handle to a file */
/***************************************************************************
Write the specified number of zeros to a newly created file. */
UNIV_INTERN
ibool
os_file_set_size(
/*=============*/
......@@ -396,7 +396,7 @@ os_file_set_size(
ulint size_high);/* in: most significant 32 bits of size */
/***************************************************************************
Truncates a file at its current position. */
UNIV_INTERN
ibool
os_file_set_eof(
/*============*/
......@@ -404,7 +404,7 @@ os_file_set_eof(
FILE* file); /* in: file to be truncated */
/***************************************************************************
Flushes the write buffers of a given file to the disk. */
UNIV_INTERN
ibool
os_file_flush(
/*==========*/
......@@ -415,7 +415,7 @@ Retrieves the last error number if an error occurs in a file io function.
The number should be retrieved before any other OS calls (because they may
overwrite the error number). If the number is not known to this program,
the OS error number + 100 is returned. */
UNIV_INTERN
ulint
os_file_get_last_error(
/*===================*/
......@@ -425,7 +425,7 @@ os_file_get_last_error(
printed of all errors */
/***********************************************************************
Requests a synchronous read operation. */
UNIV_INTERN
ibool
os_file_read(
/*=========*/
......@@ -442,7 +442,7 @@ os_file_read(
Rewind file to its start, read at most size - 1 bytes from it to str, and
NUL-terminate str. All errors are silently ignored. This function is
mostly meant to be used with temporary files. */
UNIV_INTERN
void
os_file_read_string(
/*================*/
......@@ -452,7 +452,7 @@ os_file_read_string(
/***********************************************************************
Requests a synchronous positioned read operation. This function does not do
any error handling. In case of error it returns FALSE. */
UNIV_INTERN
ibool
os_file_read_no_error_handling(
/*===========================*/
......@@ -468,7 +468,7 @@ os_file_read_no_error_handling(
/***********************************************************************
Requests a synchronous write operation. */
UNIV_INTERN
ibool
os_file_write(
/*==========*/
......@@ -485,7 +485,7 @@ os_file_write(
ulint n); /* in: number of bytes to write */
/***********************************************************************
Check the existence and type of the given file. */
UNIV_INTERN
ibool
os_file_status(
/*===========*/
......@@ -520,7 +520,7 @@ returned by dirname and basename for different paths:
"." "." "."
".." "." ".."
*/
UNIV_INTERN
char*
os_file_dirname(
/*============*/
......@@ -529,7 +529,7 @@ os_file_dirname(
const char* path); /* in: pathname */
/********************************************************************
Creates all missing subdirectories along the given path. */
UNIV_INTERN
ibool
os_file_create_subdirs_if_needed(
/*=============================*/
......@@ -544,7 +544,7 @@ synchronous aio array of the specified size. The combined number of segments
in the three first aio arrays is the parameter n_segments given to the
function. The caller must create an i/o handler thread for each segment in
the four first arrays, but not for the sync aio array. */
UNIV_INTERN
void
os_aio_init(
/*========*/
......@@ -555,7 +555,7 @@ os_aio_init(
ulint n_slots_sync); /* in: number of slots in the sync aio array */
/***********************************************************************
Requests an asynchronous i/o operation. */
UNIV_INTERN
ibool
os_aio(
/*===*/
......@@ -593,20 +593,20 @@ os_aio(
/****************************************************************************
Wakes up all async i/o threads so that they know to exit themselves in
shutdown. */
UNIV_INTERN
void
os_aio_wake_all_threads_at_shutdown(void);
/*=====================================*/
/****************************************************************************
Waits until there are no pending writes in os_aio_write_array. There can
be other, synchronous, pending writes. */
UNIV_INTERN
void
os_aio_wait_until_no_pending_writes(void);
/*=====================================*/
/**************************************************************************
Wakes up simulated aio i/o-handler threads if they have something to do. */
UNIV_INTERN
void
os_aio_simulated_wake_handler_threads(void);
/*=======================================*/
......@@ -615,7 +615,7 @@ This function can be called if one wants to post a batch of reads and
prefers an i/o-handler thread to handle them all at once later. You must
call os_aio_simulated_wake_handler_threads later to ensure the threads
are not left sleeping! */
UNIV_INTERN
void
os_aio_simulated_put_read_threads_to_sleep(void);
/*============================================*/
......@@ -628,7 +628,7 @@ for completed requests. The aio array of pending requests is divided
into segments. The thread specifies which segment or slot it wants to wait
for. NOTE: this function will also take care of freeing the aio slot,
therefore no other thread is allowed to do the freeing! */
UNIV_INTERN
ibool
os_aio_windows_handle(
/*==================*/
......@@ -657,7 +657,7 @@ os_aio_windows_handle(
/**************************************************************************
This function is only used in Posix asynchronous i/o. Waits for an aio
operation to complete. */
UNIV_INTERN
ibool
os_aio_posix_handle(
/*================*/
......@@ -673,7 +673,7 @@ os_aio_posix_handle(
/**************************************************************************
Does simulated aio. This function should be called by an i/o-handler
thread. */
UNIV_INTERN
ibool
os_aio_simulated_handle(
/*====================*/
......@@ -692,21 +692,21 @@ os_aio_simulated_handle(
ulint* type); /* out: OS_FILE_WRITE or ..._READ */
/**************************************************************************
Validates the consistency of the aio system. */
UNIV_INTERN
ibool
os_aio_validate(void);
/*=================*/
/* out: TRUE if ok */
/**************************************************************************
Prints info of the aio arrays. */
UNIV_INTERN
void
os_aio_print(
/*=========*/
FILE* file); /* in: file where to print */
/**************************************************************************
Refreshes the statistics used to print per-second averages. */
UNIV_INTERN
void
os_aio_refresh_stats(void);
/*======================*/
......@@ -715,7 +715,7 @@ os_aio_refresh_stats(void);
/**************************************************************************
Checks that all slots in the system have been freed, that is, there are
no pending io operations. */
UNIV_INTERN
ibool
os_aio_all_slots_free(void);
/*=======================*/
......@@ -723,6 +723,7 @@ os_aio_all_slots_free(void);
/***********************************************************************
This function returns information about the specified file */
UNIV_INTERN
ibool
os_file_get_status(
/*===============*/
......@@ -736,7 +737,7 @@ os_file_get_status(
/*************************************************************************
Creates a temporary file that will be deleted on close.
This function is defined in ha_innodb.cc. */
UNIV_INTERN
int
innobase_mysql_tmpfile(void);
/*========================*/
......
......@@ -29,13 +29,13 @@ Converts the current process id to a number. It is not guaranteed that the
number is unique. In Linux returns the 'process number' of the current
thread. That number is the same as one sees in 'top', for example. In Linux
the thread id is not the same as one sees in 'top'. */
UNIV_INTERN
ulint
os_proc_get_number(void);
/*====================*/
/********************************************************************
Allocates non-cacheable memory. */
UNIV_INTERN
void*
os_mem_alloc_nocache(
/*=================*/
......@@ -43,7 +43,7 @@ os_mem_alloc_nocache(
ulint n); /* in: number of bytes */
/********************************************************************
Allocates large pages memory. */
UNIV_INTERN
void*
os_mem_alloc_large(
/*===============*/
......@@ -51,7 +51,7 @@ os_mem_alloc_large(
ulint* n); /* in/out: number of bytes */
/********************************************************************
Frees large pages memory. */
UNIV_INTERN
void
os_mem_free_large(
/*==============*/
......@@ -62,7 +62,7 @@ os_mem_free_large(
/********************************************************************
Sets the priority boost for threads released from waiting within the current
process. */
UNIV_INTERN
void
os_process_set_priority_boost(
/*==========================*/
......
......@@ -69,13 +69,13 @@ extern ulint os_fast_mutex_count;
/*************************************************************
Initializes global event and OS 'slow' mutex lists. */
UNIV_INTERN
void
os_sync_init(void);
/*==============*/
/*************************************************************
Frees created events and OS 'slow' mutexes. */
UNIV_INTERN
void
os_sync_free(void);
/*==============*/
......@@ -83,7 +83,7 @@ os_sync_free(void);
Creates an event semaphore, i.e., a semaphore which may just have two states:
signaled and nonsignaled. The created event is manual reset: it must be reset
explicitly by calling sync_os_reset_event. */
UNIV_INTERN
os_event_t
os_event_create(
/*============*/
......@@ -94,7 +94,7 @@ os_event_create(
/*************************************************************
Creates an auto-reset event semaphore, i.e., an event which is automatically
reset when a single thread is released. Works only in Windows. */
UNIV_INTERN
os_event_t
os_event_create_auto(
/*=================*/
......@@ -105,7 +105,7 @@ os_event_create_auto(
/**************************************************************
Sets an event semaphore to the signaled state: lets waiting threads
proceed. */
UNIV_INTERN
void
os_event_set(
/*=========*/
......@@ -113,14 +113,14 @@ os_event_set(
/**************************************************************
Resets an event semaphore to the nonsignaled state. Waiting threads will
stop to wait for the event. */
UNIV_INTERN
void
os_event_reset(
/*===========*/
os_event_t event); /* in: event to reset */
/**************************************************************
Frees an event object. */
UNIV_INTERN
void
os_event_free(
/*==========*/
......@@ -130,7 +130,7 @@ Waits for an event object until it is in the signaled state. If
srv_shutdown_state == SRV_SHUTDOWN_EXIT_THREADS this also exits the
waiting thread when the event becomes signaled (or immediately if the
event is already in the signaled state). */
UNIV_INTERN
void
os_event_wait(
/*==========*/
......@@ -138,7 +138,7 @@ os_event_wait(
/**************************************************************
Waits for an event object until it is in the signaled state or
a timeout is exceeded. In Unix the timeout is always infinite. */
UNIV_INTERN
ulint
os_event_wait_time(
/*===============*/
......@@ -152,7 +152,7 @@ os_event_wait_time(
/**************************************************************
Waits for any event in an OS native event array. Returns if even a single
one is signaled or becomes signaled. */
UNIV_INTERN
ulint
os_event_wait_multiple(
/*===================*/
......@@ -167,7 +167,7 @@ os_event_wait_multiple(
/*************************************************************
Creates an operating system mutex semaphore. Because these are slow, the
mutex semaphore of InnoDB itself (mutex_t) should be used where possible. */
UNIV_INTERN
os_mutex_t
os_mutex_create(
/*============*/
......@@ -176,21 +176,21 @@ os_mutex_create(
the mutex is created without a name */
/**************************************************************
Acquires ownership of a mutex semaphore. */
UNIV_INTERN
void
os_mutex_enter(
/*===========*/
os_mutex_t mutex); /* in: mutex to acquire */
/**************************************************************
Releases ownership of a mutex. */
UNIV_INTERN
void
os_mutex_exit(
/*==========*/
os_mutex_t mutex); /* in: mutex to release */
/**************************************************************
Frees an mutex object. */
UNIV_INTERN
void
os_mutex_free(
/*==========*/
......@@ -208,28 +208,28 @@ os_fast_mutex_trylock(
os_fast_mutex_t* fast_mutex); /* in: mutex to acquire */
/**************************************************************
Releases ownership of a fast mutex. */
UNIV_INTERN
void
os_fast_mutex_unlock(
/*=================*/
os_fast_mutex_t* fast_mutex); /* in: mutex to release */
/*************************************************************
Initializes an operating system fast mutex semaphore. */
UNIV_INTERN
void
os_fast_mutex_init(
/*===============*/
os_fast_mutex_t* fast_mutex); /* in: fast mutex */
/**************************************************************
Acquires ownership of a fast mutex. */
UNIV_INTERN
void
os_fast_mutex_lock(
/*===============*/
os_fast_mutex_t* fast_mutex); /* in: mutex to acquire */
/**************************************************************
Frees an mutex object. */
UNIV_INTERN
void
os_fast_mutex_free(
/*===============*/
......
......@@ -41,7 +41,7 @@ typedef void* (*os_posix_f_t) (void*);
/*******************************************************************
Compares two thread ids for equality. */
UNIV_INTERN
ibool
os_thread_eq(
/*=========*/
......@@ -51,7 +51,7 @@ os_thread_eq(
/********************************************************************
Converts an OS thread id to a ulint. It is NOT guaranteed that the ulint is
unique for the thread though! */
UNIV_INTERN
ulint
os_thread_pf(
/*=========*/
......@@ -63,7 +63,7 @@ the function given. The start function takes a void* parameter
and returns a ulint.
NOTE: We count the number of threads in os_thread_exit(). A created
thread should always use that to exit and not use return() to exit. */
UNIV_INTERN
os_thread_t
os_thread_create(
/*=============*/
......@@ -78,13 +78,17 @@ os_thread_create(
function */
os_thread_id_t* thread_id); /* out: id of the created
thread, or NULL */
#ifdef HAVE_PTHREAD_JOIN
UNIV_INTERN
int
os_thread_join(
/*===========*/
os_thread_id_t thread_id); /* in: id of the thread to join */
#endif
/*********************************************************************
Exits the current thread. */
UNIV_INTERN
void
os_thread_exit(
/*===========*/
......@@ -92,32 +96,32 @@ os_thread_exit(
is cast as a DWORD */
/*********************************************************************
Returns the thread identifier of current thread. */
UNIV_INTERN
os_thread_id_t
os_thread_get_curr_id(void);
/*========================*/
/*********************************************************************
Returns handle to the current thread. */
UNIV_INTERN
os_thread_t
os_thread_get_curr(void);
/*====================*/
/*********************************************************************
Advises the os to give up remainder of the thread's time slice. */
UNIV_INTERN
void
os_thread_yield(void);
/*=================*/
/*********************************************************************
The thread sleeps at least the time given in microseconds. */
UNIV_INTERN
void
os_thread_sleep(
/*============*/
ulint tm); /* in: time in microseconds */
/**********************************************************************
Gets a thread priority. */
UNIV_INTERN
ulint
os_thread_get_priority(
/*===================*/
......@@ -125,7 +129,7 @@ os_thread_get_priority(
os_thread_t handle);/* in: OS handle to the thread */
/**********************************************************************
Sets a thread priority. */
UNIV_INTERN
void
os_thread_set_priority(
/*===================*/
......@@ -133,7 +137,7 @@ os_thread_set_priority(
ulint pri); /* in: priority: one of OS_PRIORITY_... */
/**********************************************************************
Gets the last operating system error code for the calling thread. */
UNIV_INTERN
ulint
os_thread_get_last_error(void);
/*==========================*/
......
......@@ -175,7 +175,7 @@ page_cur_rec_insert(
Inserts a record next to page cursor on an uncompressed page.
Returns pointer to inserted record if succeed, i.e., enough
space available, NULL otherwise. The cursor stays at the same position. */
UNIV_INTERN
rec_t*
page_cur_insert_rec_low(
/*====================*/
......@@ -192,7 +192,7 @@ Inserts a record next to page cursor on a compressed and uncompressed
page. Returns pointer to inserted record if succeed, i.e.,
enough space available, NULL otherwise.
The cursor stays at the same position. */
UNIV_INTERN
rec_t*
page_cur_insert_rec_zip(
/*====================*/
......@@ -208,7 +208,7 @@ page_cur_insert_rec_zip(
/*****************************************************************
Copies records from page to a newly created page, from a given record onward,
including that record. Infimum and supremum records are not copied. */
UNIV_INTERN
void
page_copy_rec_list_end_to_created_page(
/*===================================*/
......@@ -219,7 +219,7 @@ page_copy_rec_list_end_to_created_page(
/***************************************************************
Deletes a record at the page cursor. The cursor is moved to the
next record after the deleted one. */
UNIV_INTERN
void
page_cur_delete_rec(
/*================*/
......@@ -244,7 +244,7 @@ page_cur_search(
page_cur_t* cursor);/* out: page cursor */
/********************************************************************
Searches the right position for a page cursor. */
UNIV_INTERN
void
page_cur_search_with_match(
/*=======================*/
......@@ -272,7 +272,7 @@ page_cur_search_with_match(
/***************************************************************
Positions a page cursor on a randomly chosen user record on a page. If there
are no user records, sets the cursor on the infimum record. */
UNIV_INTERN
void
page_cur_open_on_rnd_user_rec(
/*==========================*/
......@@ -280,7 +280,7 @@ page_cur_open_on_rnd_user_rec(
page_cur_t* cursor);/* out: page cursor */
/***************************************************************
Parses a log record of a record insert on a page. */
UNIV_INTERN
byte*
page_cur_parse_insert_rec(
/*======================*/
......@@ -293,7 +293,7 @@ page_cur_parse_insert_rec(
mtr_t* mtr); /* in: mtr or NULL */
/**************************************************************
Parses a log record of copying a record list end to a new created page. */
UNIV_INTERN
byte*
page_parse_copy_rec_list_to_created_page(
/*=====================================*/
......@@ -305,7 +305,7 @@ page_parse_copy_rec_list_to_created_page(
mtr_t* mtr); /* in: mtr or NULL */
/***************************************************************
Parses log record of a record delete on a page. */
UNIV_INTERN
byte*
page_cur_parse_delete_rec(
/*======================*/
......
......@@ -167,7 +167,7 @@ page_get_max_trx_id(
const page_t* page); /* in: page */
/*****************************************************************
Sets the max trx id field value. */
UNIV_INTERN
void
page_set_max_trx_id(
/*================*/
......@@ -262,7 +262,7 @@ page_get_supremum_rec(
/****************************************************************
Returns the middle record of record list. If there are an even number
of records in the list, returns the first record of upper half-list. */
UNIV_INTERN
rec_t*
page_get_middle_rec(
/*================*/
......@@ -322,7 +322,7 @@ page_get_n_recs(
/*******************************************************************
Returns the number of records before the given record in chain.
The number includes infimum and supremum records. */
UNIV_INTERN
ulint
page_rec_get_n_recs_before(
/*=======================*/
......@@ -435,7 +435,7 @@ page_dir_calc_reserved_space(
ulint n_recs); /* in: number of records */
/*******************************************************************
Looks for the directory slot which owns the given record. */
UNIV_INTERN
ulint
page_dir_find_owner_slot(
/*=====================*/
......@@ -596,7 +596,7 @@ page_rec_find_owner_rec(
This is a low-level operation which is used in a database index creation
to update the page number of a created B-tree to a data dictionary
record. */
UNIV_INTERN
void
page_rec_write_index_page_no(
/*=========================*/
......@@ -670,7 +670,7 @@ page_mem_alloc_free(
ulint need); /* in: number of bytes allocated */
/****************************************************************
Allocates a block of memory from the heap of an index page. */
UNIV_INTERN
byte*
page_mem_alloc_heap(
/*================*/
......@@ -698,7 +698,7 @@ page_mem_free(
const ulint* offsets);/* in: array returned by rec_get_offsets() */
/**************************************************************
Create an uncompressed B-tree index page. */
UNIV_INTERN
page_t*
page_create(
/*========*/
......@@ -709,7 +709,7 @@ page_create(
ulint comp); /* in: nonzero=compact page format */
/**************************************************************
Create a compressed B-tree index page. */
UNIV_INTERN
page_t*
page_create_zip(
/*============*/
......@@ -723,7 +723,7 @@ page_create_zip(
/*****************************************************************
Differs from page_copy_rec_list_end, because this function does not
touch the lock table and max trx id on page or compress the page. */
UNIV_INTERN
void
page_copy_rec_list_end_no_locks(
/*============================*/
......@@ -736,7 +736,7 @@ page_copy_rec_list_end_no_locks(
Copies records from page to new_page, from the given record onward,
including that record. Infimum and supremum records are not copied.
The records are copied to the start of the record list on new_page. */
UNIV_INTERN
rec_t*
page_copy_rec_list_end(
/*===================*/
......@@ -754,7 +754,7 @@ page_copy_rec_list_end(
Copies records from page to new_page, up to the given record, NOT
including that record. Infimum and supremum records are not copied.
The records are copied to the end of the record list on new_page. */
UNIV_INTERN
rec_t*
page_copy_rec_list_start(
/*=====================*/
......@@ -771,7 +771,7 @@ page_copy_rec_list_start(
/*****************************************************************
Deletes records from a page from a given record onward, including that record.
The infimum and supremum records are not deleted. */
UNIV_INTERN
void
page_delete_rec_list_end(
/*=====================*/
......@@ -788,7 +788,7 @@ page_delete_rec_list_end(
/*****************************************************************
Deletes records from page, up to the given record, NOT including
that record. Infimum and supremum records are not deleted. */
UNIV_INTERN
void
page_delete_rec_list_start(
/*=======================*/
......@@ -800,7 +800,7 @@ page_delete_rec_list_start(
/*****************************************************************
Moves record list end to another page. Moved records include
split_rec. */
UNIV_INTERN
ibool
page_move_rec_list_end(
/*===================*/
......@@ -816,7 +816,7 @@ page_move_rec_list_end(
/*****************************************************************
Moves record list start to another page. Moved records do not include
split_rec. */
UNIV_INTERN
ibool
page_move_rec_list_start(
/*=====================*/
......@@ -830,7 +830,7 @@ page_move_rec_list_start(
__attribute__((nonnull(1, 2, 4, 5)));
/********************************************************************
Splits a directory slot which owns too many records. */
UNIV_INTERN
void
page_dir_split_slot(
/*================*/
......@@ -844,7 +844,7 @@ Tries to balance the given directory slot with too few records
with the upper neighbor, so that there are at least the minimum number
of records owned by the slot; this may result in the merging of
two slots. */
UNIV_INTERN
void
page_dir_balance_slot(
/*==================*/
......@@ -854,7 +854,7 @@ page_dir_balance_slot(
__attribute__((nonnull(1)));
/**************************************************************
Parses a log record of a record list end or start deletion. */
UNIV_INTERN
byte*
page_parse_delete_rec_list(
/*=======================*/
......@@ -870,7 +870,7 @@ page_parse_delete_rec_list(
mtr_t* mtr); /* in: mtr or NULL */
/***************************************************************
Parses a redo log record of creating a page. */
UNIV_INTERN
byte*
page_parse_create(
/*==============*/
......@@ -883,7 +883,7 @@ page_parse_create(
/****************************************************************
Prints record contents including the data relevant only in
the index page context. */
UNIV_INTERN
void
page_rec_print(
/*===========*/
......@@ -892,7 +892,7 @@ page_rec_print(
/*******************************************************************
This is used to print the contents of the directory for
debugging purposes. */
UNIV_INTERN
void
page_dir_print(
/*===========*/
......@@ -901,7 +901,7 @@ page_dir_print(
/*******************************************************************
This is used to print the contents of the page record list for
debugging purposes. */
UNIV_INTERN
void
page_print_list(
/*============*/
......@@ -910,7 +910,7 @@ page_print_list(
ulint pr_n); /* in: print n first and n last entries */
/*******************************************************************
Prints the info in a page header. */
UNIV_INTERN
void
page_header_print(
/*==============*/
......@@ -918,7 +918,7 @@ page_header_print(
/*******************************************************************
This is used to print the contents of the page for
debugging purposes. */
UNIV_INTERN
void
page_print(
/*=======*/
......@@ -932,7 +932,7 @@ page_print(
The following is used to validate a record on a page. This function
differs from rec_validate as it can also check the n_owned field and
the heap_no field. */
UNIV_INTERN
ibool
page_rec_validate(
/*==============*/
......@@ -943,7 +943,7 @@ page_rec_validate(
Checks that the first directory slot points to the infimum record and
the last to the supremum. This function is intended to track if the
bug fixed in 4.0.14 has caused corruption to users' databases. */
UNIV_INTERN
void
page_check_dir(
/*===========*/
......@@ -952,7 +952,7 @@ page_check_dir(
This function checks the consistency of an index page when we do not
know the index. This is also resilient so that this should never crash
even if the page is total garbage. */
UNIV_INTERN
ibool
page_simple_validate_old(
/*=====================*/
......@@ -962,7 +962,7 @@ page_simple_validate_old(
This function checks the consistency of an index page when we do not
know the index. This is also resilient so that this should never crash
even if the page is total garbage. */
UNIV_INTERN
ibool
page_simple_validate_new(
/*=====================*/
......@@ -970,7 +970,7 @@ page_simple_validate_new(
page_t* block); /* in: new-style index page */
/*******************************************************************
This function checks the consistency of an index page. */
UNIV_INTERN
ibool
page_validate(
/*==========*/
......
......@@ -58,7 +58,7 @@ extern ulint page_zip_decompress_count[8];
/**************************************************************************
Write data to the compressed page. The data must already be written to
the uncompressed page. */
UNIV_INTERN
void
page_zip_write(
/*===========*/
......@@ -73,7 +73,7 @@ page_zip_write(
/**************************************************************************
Write the "deleted" flag of a record on a compressed page. The flag must
already have been written on the uncompressed page. */
UNIV_INTERN
void
page_zip_rec_set_deleted(
/*=====================*/
......@@ -85,7 +85,7 @@ page_zip_rec_set_deleted(
/**************************************************************************
Write the "owned" flag of a record on a compressed page. The n_owned field
must already have been written on the uncompressed page. */
UNIV_INTERN
void
page_zip_rec_set_owned(
/*===================*/
......@@ -96,7 +96,7 @@ page_zip_rec_set_owned(
/**************************************************************************
Shift the dense page directory when a record is deleted. */
UNIV_INTERN
void
page_zip_dir_delete(
/*================*/
......@@ -109,7 +109,7 @@ page_zip_dir_delete(
/**************************************************************************
Add a slot to the dense page directory. */
UNIV_INTERN
void
page_zip_dir_add_slot(
/*==================*/
......
......@@ -53,7 +53,7 @@ page_zip_rec_needs_ext(
/**************************************************************************
Determine the guaranteed free space on an empty page. */
UNIV_INTERN
ulint
page_zip_empty_size(
/*================*/
......@@ -73,7 +73,7 @@ page_zip_des_init(
/**************************************************************************
Configure the zlib allocator to use the given memory heap. */
UNIV_INTERN
void
page_zip_set_alloc(
/*===============*/
......@@ -82,7 +82,7 @@ page_zip_set_alloc(
/**************************************************************************
Compress a page. */
UNIV_INTERN
ibool
page_zip_compress(
/*==============*/
......@@ -99,7 +99,7 @@ page_zip_compress(
Decompress a page. This function should tolerate errors on the compressed
page. Instead of letting assertions fail, it will return FALSE if an
inconsistency is detected. */
UNIV_INTERN
ibool
page_zip_decompress(
/*================*/
......@@ -124,7 +124,7 @@ page_zip_simple_validate(
#ifdef UNIV_ZIP_DEBUG
/**************************************************************************
Check that the compressed and decompressed pages match. */
UNIV_INTERN
ibool
page_zip_validate(
/*==============*/
......@@ -179,7 +179,7 @@ page_zip_write_header(
/**************************************************************************
Write an entire record on the compressed page. The data must already
have been written to the uncompressed page. */
UNIV_INTERN
void
page_zip_write_rec(
/*===============*/
......@@ -192,7 +192,7 @@ page_zip_write_rec(
/***************************************************************
Parses a log record of writing a BLOB pointer of a record. */
UNIV_INTERN
byte*
page_zip_parse_write_blob_ptr(
/*==========================*/
......@@ -205,7 +205,7 @@ page_zip_parse_write_blob_ptr(
/**************************************************************************
Write a BLOB pointer of a record on the leaf page of a clustered index.
The information must already have been updated on the uncompressed page. */
UNIV_INTERN
void
page_zip_write_blob_ptr(
/*====================*/
......@@ -221,7 +221,7 @@ page_zip_write_blob_ptr(
/***************************************************************
Parses a log record of writing the node pointer of a record. */
UNIV_INTERN
byte*
page_zip_parse_write_node_ptr(
/*==========================*/
......@@ -233,7 +233,7 @@ page_zip_parse_write_node_ptr(
/**************************************************************************
Write the node pointer of a record on a non-leaf compressed page. */
UNIV_INTERN
void
page_zip_write_node_ptr(
/*====================*/
......@@ -246,7 +246,7 @@ page_zip_write_node_ptr(
/**************************************************************************
Write the trx_id and roll_ptr of a record on a B-tree leaf node page. */
UNIV_INTERN
void
page_zip_write_trx_id_and_roll_ptr(
/*===============================*/
......@@ -261,7 +261,7 @@ page_zip_write_trx_id_and_roll_ptr(
/**************************************************************************
Write the "deleted" flag of a record on a compressed page. The flag must
already have been written on the uncompressed page. */
UNIV_INTERN
void
page_zip_rec_set_deleted(
/*=====================*/
......@@ -273,7 +273,7 @@ page_zip_rec_set_deleted(
/**************************************************************************
Write the "owned" flag of a record on a compressed page. The n_owned field
must already have been written on the uncompressed page. */
UNIV_INTERN
void
page_zip_rec_set_owned(
/*===================*/
......@@ -284,7 +284,7 @@ page_zip_rec_set_owned(
/**************************************************************************
Insert a record to the dense page directory. */
UNIV_INTERN
void
page_zip_dir_insert(
/*================*/
......@@ -297,7 +297,7 @@ page_zip_dir_insert(
/**************************************************************************
Shift the dense page directory and the array of BLOB pointers
when a record is deleted. */
UNIV_INTERN
void
page_zip_dir_delete(
/*================*/
......@@ -310,7 +310,7 @@ page_zip_dir_delete(
/**************************************************************************
Add a slot to the dense page directory. */
UNIV_INTERN
void
page_zip_dir_add_slot(
/*==================*/
......@@ -321,7 +321,7 @@ page_zip_dir_add_slot(
/***************************************************************
Parses a log record of writing to the header of a page. */
UNIV_INTERN
byte*
page_zip_parse_write_header(
/*========================*/
......@@ -356,7 +356,7 @@ IMPORTANT: if page_zip_reorganize() is invoked on a leaf page of a
non-clustered index, the caller must update the insert buffer free
bits in the same mini-transaction in such a way that the modification
will be redo-logged. */
UNIV_INTERN
ibool
page_zip_reorganize(
/*================*/
......@@ -372,7 +372,7 @@ page_zip_reorganize(
__attribute__((nonnull));
/**************************************************************************
Copy a page byte for byte, except for the file page header and trailer. */
UNIV_INTERN
void
page_zip_copy(
/*==========*/
......@@ -388,7 +388,7 @@ page_zip_copy(
/**************************************************************************
Parses a log record of compressing an index page. */
UNIV_INTERN
byte*
page_zip_parse_compress(
/*====================*/
......@@ -401,7 +401,7 @@ page_zip_parse_compress(
/**************************************************************************
Calculate the compressed page checksum. */
UNIV_INTERN
ulint
page_zip_calc_checksum(
/*===================*/
......
......@@ -20,7 +20,7 @@ Created 12/21/1997 Heikki Tuuri
Optimizes a select. Decides which indexes to tables to use. The tables
are accessed in the order that they were written to the FROM part in the
select statement. */
UNIV_INTERN
void
opt_search_plan(
/*============*/
......@@ -32,7 +32,7 @@ already exist in the list. If the column is already in the list, puts a value
indirection to point to the occurrence in the column list, except if the
column occurrence we are looking at is in the column list, in which case
nothing is done. */
UNIV_INTERN
void
opt_find_all_cols(
/*==============*/
......@@ -45,7 +45,7 @@ opt_find_all_cols(
que_node_t* exp); /* in: expression or condition */
/************************************************************************
Prints info of a query plan. */
UNIV_INTERN
void
opt_print_query_plan(
/*=================*/
......
......@@ -79,7 +79,7 @@ yyparse(void);
/*****************************************************************
Parses an SQL string returning the query graph. */
UNIV_INTERN
que_t*
pars_sql(
/*=====*/
......@@ -88,7 +88,7 @@ pars_sql(
const char* str); /* in: SQL string */
/*****************************************************************
Retrieves characters to the lexical analyzer. */
UNIV_INTERN
void
pars_get_lex_chars(
/*===============*/
......@@ -98,14 +98,14 @@ pars_get_lex_chars(
in the buffer */
/*****************************************************************
Called by yyparse on error. */
UNIV_INTERN
void
yyerror(
/*====*/
const char* s); /* in: error message string */
/*************************************************************************
Parses a variable declaration. */
UNIV_INTERN
sym_node_t*
pars_variable_declaration(
/*======================*/
......@@ -116,7 +116,7 @@ pars_variable_declaration(
pars_res_word_t* type); /* in: pointer to a type token */
/*************************************************************************
Parses a function expression. */
UNIV_INTERN
func_node_t*
pars_func(
/*======*/
......@@ -125,7 +125,7 @@ pars_func(
que_node_t* arg); /* in: first argument in the argument list */
/*************************************************************************
Parses an operator expression. */
UNIV_INTERN
func_node_t*
pars_op(
/*====*/
......@@ -136,7 +136,7 @@ pars_op(
operator */
/*************************************************************************
Parses an ORDER BY clause. Order by a single column only is supported. */
UNIV_INTERN
order_node_t*
pars_order_by(
/*==========*/
......@@ -146,7 +146,7 @@ pars_order_by(
/*************************************************************************
Parses a select list; creates a query graph node for the whole SELECT
statement. */
UNIV_INTERN
sel_node_t*
pars_select_list(
/*=============*/
......@@ -156,7 +156,7 @@ pars_select_list(
sym_node_t* into_list); /* in: variables list or NULL */
/*************************************************************************
Parses a cursor declaration. */
UNIV_INTERN
que_node_t*
pars_cursor_declaration(
/*====================*/
......@@ -166,7 +166,7 @@ pars_cursor_declaration(
sel_node_t* select_node); /* in: select node */
/*************************************************************************
Parses a function declaration. */
UNIV_INTERN
que_node_t*
pars_function_declaration(
/*======================*/
......@@ -175,7 +175,7 @@ pars_function_declaration(
table */
/*************************************************************************
Parses a select statement. */
UNIV_INTERN
sel_node_t*
pars_select_statement(
/*==================*/
......@@ -191,7 +191,7 @@ pars_select_statement(
order_node_t* order_by); /* in: NULL or an order-by node */
/*************************************************************************
Parses a column assignment in an update. */
UNIV_INTERN
col_assign_node_t*
pars_column_assignment(
/*===================*/
......@@ -200,7 +200,7 @@ pars_column_assignment(
que_node_t* exp); /* in: value to assign */
/*************************************************************************
Parses a delete or update statement start. */
UNIV_INTERN
upd_node_t*
pars_update_statement_start(
/*========================*/
......@@ -212,7 +212,7 @@ pars_update_statement_start(
if delete */
/*************************************************************************
Parses an update or delete statement. */
UNIV_INTERN
upd_node_t*
pars_update_statement(
/*==================*/
......@@ -224,7 +224,7 @@ pars_update_statement(
que_node_t* search_cond); /* in: search condition or NULL */
/*************************************************************************
Parses an insert statement. */
UNIV_INTERN
ins_node_t*
pars_insert_statement(
/*==================*/
......@@ -235,7 +235,7 @@ pars_insert_statement(
sel_node_t* select); /* in: select condition or NULL */
/*************************************************************************
Parses a procedure parameter declaration. */
UNIV_INTERN
sym_node_t*
pars_parameter_declaration(
/*=======================*/
......@@ -248,7 +248,7 @@ pars_parameter_declaration(
pars_res_word_t* type); /* in: pointer to a type token */
/*************************************************************************
Parses an elsif element. */
UNIV_INTERN
elsif_node_t*
pars_elsif_element(
/*===============*/
......@@ -257,7 +257,7 @@ pars_elsif_element(
que_node_t* stat_list); /* in: statement list */
/*************************************************************************
Parses an if-statement. */
UNIV_INTERN
if_node_t*
pars_if_statement(
/*==============*/
......@@ -267,7 +267,7 @@ pars_if_statement(
que_node_t* else_part); /* in: else-part statement list */
/*************************************************************************
Parses a for-loop-statement. */
UNIV_INTERN
for_node_t*
pars_for_statement(
/*===============*/
......@@ -278,7 +278,7 @@ pars_for_statement(
que_node_t* stat_list); /* in: statement list */
/*************************************************************************
Parses a while-statement. */
UNIV_INTERN
while_node_t*
pars_while_statement(
/*=================*/
......@@ -287,21 +287,21 @@ pars_while_statement(
que_node_t* stat_list); /* in: statement list */
/*************************************************************************
Parses an exit statement. */
UNIV_INTERN
exit_node_t*
pars_exit_statement(void);
/*=====================*/
/* out: exit statement node */
/*************************************************************************
Parses a return-statement. */
UNIV_INTERN
return_node_t*
pars_return_statement(void);
/*=======================*/
/* out: return-statement node */
/*************************************************************************
Parses a procedure call. */
UNIV_INTERN
func_node_t*
pars_procedure_call(
/*================*/
......@@ -310,7 +310,7 @@ pars_procedure_call(
que_node_t* args); /* in: argument list */
/*************************************************************************
Parses an assignment statement. */
UNIV_INTERN
assign_node_t*
pars_assignment_statement(
/*======================*/
......@@ -320,7 +320,7 @@ pars_assignment_statement(
/*************************************************************************
Parses a fetch statement. into_list or user_func (but not both) must be
non-NULL. */
UNIV_INTERN
fetch_node_t*
pars_fetch_statement(
/*=================*/
......@@ -330,7 +330,7 @@ pars_fetch_statement(
sym_node_t* user_func); /* in: user function name, or NULL */
/*************************************************************************
Parses an open or close cursor statement. */
UNIV_INTERN
open_node_t*
pars_open_statement(
/*================*/
......@@ -340,7 +340,7 @@ pars_open_statement(
sym_node_t* cursor); /* in: cursor node */
/*************************************************************************
Parses a row_printf-statement. */
UNIV_INTERN
row_printf_node_t*
pars_row_printf_statement(
/*======================*/
......@@ -348,19 +348,19 @@ pars_row_printf_statement(
sel_node_t* sel_node); /* in: select node */
/*************************************************************************
Parses a commit statement. */
UNIV_INTERN
commit_node_t*
pars_commit_statement(void);
/*=======================*/
/*************************************************************************
Parses a rollback statement. */
UNIV_INTERN
roll_node_t*
pars_rollback_statement(void);
/*=========================*/
/*************************************************************************
Parses a column definition at a table creation. */
UNIV_INTERN
sym_node_t*
pars_column_def(
/*============*/
......@@ -377,7 +377,7 @@ pars_column_def(
is of type NOT NULL. */
/*************************************************************************
Parses a table creation operation. */
UNIV_INTERN
tab_node_t*
pars_create_table(
/*==============*/
......@@ -397,7 +397,7 @@ pars_create_table(
from disk */
/*************************************************************************
Parses an index creation operation. */
UNIV_INTERN
ind_node_t*
pars_create_index(
/*==============*/
......@@ -411,7 +411,7 @@ pars_create_index(
sym_node_t* column_list); /* in: list of column names */
/*************************************************************************
Parses a procedure definition. */
UNIV_INTERN
que_fork_t*
pars_procedure_definition(
/*======================*/
......@@ -426,7 +426,7 @@ Parses a stored procedure call, when this is not within another stored
procedure, that is, the client issues a procedure call directly.
In MySQL/InnoDB, stored InnoDB procedures are invoked via the
parsed procedure tree, not via InnoDB SQL, so this function is not used. */
UNIV_INTERN
que_fork_t*
pars_stored_procedure_call(
/*=======================*/
......@@ -436,7 +436,7 @@ pars_stored_procedure_call(
Completes a query graph by adding query thread and fork nodes
above it and prepares the graph for running. The fork created is of
type QUE_FORK_MYSQL_INTERFACE. */
UNIV_INTERN
que_thr_t*
pars_complete_graph_for_exec(
/*=========================*/
......@@ -448,7 +448,7 @@ pars_complete_graph_for_exec(
/********************************************************************
Create parser info struct.*/
UNIV_INTERN
pars_info_t*
pars_info_create(void);
/*==================*/
......@@ -456,7 +456,7 @@ pars_info_create(void);
/********************************************************************
Free info struct and everything it contains.*/
UNIV_INTERN
void
pars_info_free(
/*===========*/
......@@ -464,7 +464,7 @@ pars_info_free(
/********************************************************************
Add bound literal. */
UNIV_INTERN
void
pars_info_add_literal(
/*==================*/
......@@ -479,7 +479,7 @@ pars_info_add_literal(
/********************************************************************
Equivalent to pars_info_add_literal(info, name, str, strlen(str),
DATA_VARCHAR, DATA_ENGLISH). */
UNIV_INTERN
void
pars_info_add_str_literal(
/*======================*/
......@@ -496,7 +496,7 @@ pars_info_add_literal(info, name, buf, 4, DATA_INT, 0);
except that the buffer is dynamically allocated from the info struct's
heap. */
UNIV_INTERN
void
pars_info_add_int4_literal(
/*=======================*/
......@@ -513,7 +513,7 @@ pars_info_add_literal(info, name, buf, 8, DATA_BINARY, 0);
except that the buffer is dynamically allocated from the info struct's
heap. */
UNIV_INTERN
void
pars_info_add_dulint_literal(
/*=========================*/
......@@ -522,7 +522,7 @@ pars_info_add_dulint_literal(
dulint val); /* in: value */
/********************************************************************
Add user function. */
UNIV_INTERN
void
pars_info_add_function(
/*===================*/
......@@ -533,7 +533,7 @@ pars_info_add_function(
/********************************************************************
Add bound id. */
UNIV_INTERN
void
pars_info_add_id(
/*=============*/
......@@ -543,7 +543,7 @@ pars_info_add_id(
/********************************************************************
Get user function with the given name.*/
UNIV_INTERN
pars_user_func_t*
pars_info_get_user_func(
/*====================*/
......@@ -554,7 +554,7 @@ pars_info_get_user_func(
/********************************************************************
Get bound literal with the given name.*/
UNIV_INTERN
pars_bound_lit_t*
pars_info_get_bound_lit(
/*====================*/
......@@ -565,7 +565,7 @@ pars_info_get_bound_lit(
/********************************************************************
Get bound id with the given name.*/
UNIV_INTERN
pars_bound_id_t*
pars_info_get_bound_id(
/*===================*/
......
......@@ -18,7 +18,7 @@ Created 12/15/1997 Heikki Tuuri
/**********************************************************************
Creates a symbol table for a single stored procedure or query. */
UNIV_INTERN
sym_tab_t*
sym_tab_create(
/*===========*/
......@@ -28,14 +28,14 @@ sym_tab_create(
Frees the memory allocated dynamically AFTER parsing phase for variables
etc. in the symbol table. Does not free the mem heap where the table was
originally created. Frees also SQL explicit cursor definitions. */
UNIV_INTERN
void
sym_tab_free_private(
/*=================*/
sym_tab_t* sym_tab); /* in, own: symbol table */
/**********************************************************************
Adds an integer literal to a symbol table. */
UNIV_INTERN
sym_node_t*
sym_tab_add_int_lit(
/*================*/
......@@ -44,7 +44,7 @@ sym_tab_add_int_lit(
ulint val); /* in: integer value */
/**********************************************************************
Adds an string literal to a symbol table. */
UNIV_INTERN
sym_node_t*
sym_tab_add_str_lit(
/*================*/
......@@ -55,7 +55,7 @@ sym_tab_add_str_lit(
ulint len); /* in: string length */
/**********************************************************************
Add a bound literal to a symbol table. */
UNIV_INTERN
sym_node_t*
sym_tab_add_bound_lit(
/*==================*/
......@@ -65,7 +65,7 @@ sym_tab_add_bound_lit(
ulint* lit_type); /* out: type of literal (PARS_*_LIT) */
/**********************************************************************
Adds an SQL null literal to a symbol table. */
UNIV_INTERN
sym_node_t*
sym_tab_add_null_lit(
/*=================*/
......@@ -73,7 +73,7 @@ sym_tab_add_null_lit(
sym_tab_t* sym_tab); /* in: symbol table */
/**********************************************************************
Adds an identifier to a symbol table. */
UNIV_INTERN
sym_node_t*
sym_tab_add_id(
/*===========*/
......@@ -84,7 +84,7 @@ sym_tab_add_id(
/**********************************************************************
Add a bound identifier to a symbol table. */
UNIV_INTERN
sym_node_t*
sym_tab_add_bound_id(
/*===========*/
......
......@@ -25,7 +25,7 @@ extern ibool que_trace_on;
/***************************************************************************
Adds a query graph to the session's list of graphs. */
UNIV_INTERN
void
que_graph_publish(
/*==============*/
......@@ -33,7 +33,7 @@ que_graph_publish(
sess_t* sess); /* in: session */
/***************************************************************************
Creates a query graph fork node. */
UNIV_INTERN
que_fork_t*
que_fork_create(
/*============*/
......@@ -68,7 +68,7 @@ que_node_set_parent(
que_node_t* parent);/* in: parent */
/***************************************************************************
Creates a query graph thread node. */
UNIV_INTERN
que_thr_t*
que_thr_create(
/*===========*/
......@@ -79,7 +79,7 @@ que_thr_create(
Checks if the query graph is in a state where it should be freed, and
frees it in that case. If the session is in a state where it should be
closed, also this is done. */
UNIV_INTERN
ibool
que_graph_try_free(
/*===============*/
......@@ -88,14 +88,14 @@ que_graph_try_free(
/**************************************************************************
Frees a query graph, but not the heap where it was created. Does not free
explicit cursor declarations, they are freed in que_graph_free. */
UNIV_INTERN
void
que_graph_free_recursive(
/*=====================*/
que_node_t* node); /* in: query graph node */
/**************************************************************************
Frees a query graph. */
UNIV_INTERN
void
que_graph_free(
/*===========*/
......@@ -108,7 +108,7 @@ que_graph_free(
Stops a query thread if graph or trx is in a state requiring it. The
conditions are tested in the order (1) graph, (2) trx. The kernel mutex has
to be reserved. */
UNIV_INTERN
ibool
que_thr_stop(
/*=========*/
......@@ -117,7 +117,7 @@ que_thr_stop(
/**************************************************************************
Moves a thread from another state to the QUE_THR_RUNNING state. Increments
the n_active_thrs counters of the query graph and transaction. */
UNIV_INTERN
void
que_thr_move_to_run_state_for_mysql(
/*================================*/
......@@ -126,7 +126,7 @@ que_thr_move_to_run_state_for_mysql(
/**************************************************************************
A patch for MySQL used to 'stop' a dummy query thread used in MySQL
select, when there is no error or lock wait. */
UNIV_INTERN
void
que_thr_stop_for_mysql_no_error(
/*============================*/
......@@ -137,14 +137,14 @@ A patch for MySQL used to 'stop' a dummy query thread used in MySQL. The
query thread is stopped and made inactive, except in the case where
it was put to the lock wait state in lock0lock.c, but the lock has already
been granted or the transaction chosen as a victim in deadlock resolution. */
UNIV_INTERN
void
que_thr_stop_for_mysql(
/*===================*/
que_thr_t* thr); /* in: query thread */
/**************************************************************************
Run a query thread. Handles lock waits. */
UNIV_INTERN
void
que_run_threads(
/*============*/
......@@ -153,7 +153,7 @@ que_run_threads(
After signal handling is finished, returns control to a query graph error
handling routine. (Currently, just returns the control to the root of the
graph so that the graph can communicate an error message to the client.) */
UNIV_INTERN
void
que_fork_error_handle(
/*==================*/
......@@ -165,7 +165,7 @@ Moves a suspended query thread to the QUE_THR_RUNNING state and releases
a single worker thread to execute it. This function should be used to end
the wait state of a query thread waiting for a lock or a stored procedure
completion. */
UNIV_INTERN
void
que_thr_end_wait(
/*=============*/
......@@ -180,7 +180,7 @@ que_thr_end_wait(
a new query thread */
/**************************************************************************
Same as que_thr_end_wait, but no parameter next_thr available. */
UNIV_INTERN
void
que_thr_end_wait_no_next_thr(
/*=========================*/
......@@ -193,7 +193,7 @@ Starts execution of a command in a query fork. Picks a query thread which
is not in the QUE_THR_RUNNING state and moves it to that state. If none
can be chosen, a situation which may arise in parallelized fetches, NULL
is returned. */
UNIV_INTERN
que_thr_t*
que_fork_start_command(
/*===================*/
......@@ -265,7 +265,7 @@ que_node_get_parent(
/********************************************************************
Get the first containing loop node (e.g. while_node_t or for_node_t) for the
given node, or NULL if the node is not within a loop. */
UNIV_INTERN
que_node_t*
que_node_get_containing_loop_node(
/*==============================*/
......@@ -311,14 +311,14 @@ que_graph_is_select(
que_t* graph); /* in: graph */
/**************************************************************************
Prints info of an SQL query graph node. */
UNIV_INTERN
void
que_node_print_info(
/*================*/
que_node_t* node); /* in: query graph node */
/*************************************************************************
Evaluate the given SQL */
UNIV_INTERN
ulint
que_eval_sql(
/*=========*/
......
......@@ -20,7 +20,7 @@ Created 2/16/1997 Heikki Tuuri
/*************************************************************************
Opens a read view where exactly the transactions serialized before this
point in time are seen in the view. */
UNIV_INTERN
read_view_t*
read_view_open_now(
/*===============*/
......@@ -33,7 +33,7 @@ read_view_open_now(
/*************************************************************************
Makes a copy of the oldest existing read view, or opens a new. The view
must be closed with ..._close. */
UNIV_INTERN
read_view_t*
read_view_oldest_copy_or_open_new(
/*==============================*/
......@@ -45,7 +45,7 @@ read_view_oldest_copy_or_open_new(
allocated */
/*************************************************************************
Closes a read view. */
UNIV_INTERN
void
read_view_close(
/*============*/
......@@ -53,7 +53,7 @@ read_view_close(
/*************************************************************************
Closes a consistent read view for MySQL. This function is called at an SQL
statement end if the trx isolation level is <= TRX_ISO_READ_COMMITTED. */
UNIV_INTERN
void
read_view_close_for_mysql(
/*======================*/
......@@ -69,7 +69,7 @@ read_view_sees_trx_id(
dulint trx_id);/* in: trx id */
/*************************************************************************
Prints a read view to stderr. */
UNIV_INTERN
void
read_view_print(
/*============*/
......@@ -78,7 +78,7 @@ read_view_print(
Create a consistent cursor view for mysql to be used in cursors. In this
consistent read view modifications done by the creating transaction or future
transactions are not visible. */
UNIV_INTERN
cursor_view_t*
read_cursor_view_create_for_mysql(
/*==============================*/
......@@ -86,7 +86,7 @@ read_cursor_view_create_for_mysql(
/*************************************************************************
Close a given consistent cursor view for mysql and restore global read view
back to a transaction read view. */
UNIV_INTERN
void
read_cursor_view_close_for_mysql(
/*=============================*/
......@@ -96,7 +96,7 @@ read_cursor_view_close_for_mysql(
This function sets a given consistent cursor view to a transaction
read view if given consistent cursor view is not NULL. Otherwise, function
restores a global read view to a transaction read view. */
UNIV_INTERN
void
read_cursor_set_for_mysql(
/*======================*/
......
......@@ -17,7 +17,7 @@ Created 7/1/1994 Heikki Tuuri
/*****************************************************************
Returns TRUE if two columns are equal for comparison purposes. */
UNIV_INTERN
ibool
cmp_cols_are_equal(
/*===============*/
......@@ -47,7 +47,7 @@ cmp_data_data(
/*****************************************************************
This function is used to compare two data fields for which we know the
data type. */
UNIV_INTERN
int
cmp_data_data_slow(
/*===============*/
......@@ -80,7 +80,7 @@ have either m >= n fields, or it must differ from dtuple in some of
the m fields rec has. If rec has an externally stored field we do not
compare it but return with value 0 if such a comparison should be
made. */
UNIV_INTERN
int
cmp_dtuple_rec_with_match(
/*======================*/
......@@ -104,7 +104,7 @@ cmp_dtuple_rec_with_match(
value for current comparison */
/******************************************************************
Compares a data tuple to a physical record. */
UNIV_INTERN
int
cmp_dtuple_rec(
/*===========*/
......@@ -117,7 +117,7 @@ cmp_dtuple_rec(
/******************************************************************
Checks if a dtuple is a prefix of a record. The last field in dtuple
is allowed to be a prefix of the corresponding field in the record. */
UNIV_INTERN
ibool
cmp_dtuple_is_prefix_of_rec(
/*========================*/
......@@ -129,7 +129,7 @@ cmp_dtuple_is_prefix_of_rec(
/*****************************************************************
Compare two physical records that contain the same number of columns,
none of which are stored externally. */
UNIV_INTERN
int
cmp_rec_rec_simple(
/*===============*/
......@@ -145,7 +145,7 @@ cmp_rec_rec_simple(
This function is used to compare two physical records. Only the common
first fields are compared, and if an externally stored field is
encountered, then 0 is returned. */
UNIV_INTERN
int
cmp_rec_rec_with_match(
/*===================*/
......
......@@ -315,7 +315,7 @@ rec_get_1byte_offs_flag(
/**********************************************************
Determine how many of the first n columns in a compact
physical record are stored externally. */
UNIV_INTERN
ulint
rec_get_n_extern_new(
/*=================*/
......@@ -327,7 +327,7 @@ rec_get_n_extern_new(
/**********************************************************
The following function determines the offsets to each field
in the record. It can reuse a previously allocated array. */
UNIV_INTERN
ulint*
rec_get_offsets_func(
/*=================*/
......@@ -352,7 +352,7 @@ rec_get_offsets_func(
Determine the offset to each field in a leaf-page record
in ROW_FORMAT=COMPACT. This is a special case of
rec_init_offsets() and rec_get_offsets_func(). */
UNIV_INTERN
void
rec_init_offsets_comp_ordinary(
/*===========================*/
......@@ -369,7 +369,7 @@ rec_init_offsets_comp_ordinary(
/**********************************************************
The following function determines the offsets to each field
in the record. It can reuse a previously allocated array. */
UNIV_INTERN
void
rec_get_offsets_reverse(
/*====================*/
......@@ -413,7 +413,7 @@ rec_offs_make_valid(
/****************************************************************
The following function is used to get the offset to the nth
data field in an old-style record. */
UNIV_INTERN
ulint
rec_get_nth_field_offs_old(
/*=======================*/
......@@ -621,7 +621,7 @@ rec_copy(
/******************************************************************
Copies the first n fields of a physical record to a new physical record in
a buffer. */
UNIV_INTERN
rec_t*
rec_copy_prefix_to_buf(
/*===================*/
......@@ -652,7 +652,7 @@ rec_fold(
__attribute__((pure));
/*************************************************************
Builds a ROW_FORMAT=COMPACT record out of a data tuple. */
UNIV_INTERN
void
rec_convert_dtuple_to_rec_comp(
/*===========================*/
......@@ -668,7 +668,7 @@ rec_convert_dtuple_to_rec_comp(
/*************************************************************
Builds a physical record out of a data tuple and
stores it into the given buffer. */
UNIV_INTERN
rec_t*
rec_convert_dtuple_to_rec(
/*======================*/
......@@ -694,7 +694,7 @@ rec_get_converted_extra_size(
__attribute__((const));
/**************************************************************
Determines the size of a data tuple in ROW_FORMAT=COMPACT. */
UNIV_INTERN
ulint
rec_get_converted_size_comp(
/*========================*/
......@@ -721,7 +721,7 @@ rec_get_converted_size(
/******************************************************************
Copies the first n fields of a physical record to a data tuple.
The fields are copied to the memory heap. */
UNIV_INTERN
void
rec_copy_prefix_to_dtuple(
/*======================*/
......@@ -733,7 +733,7 @@ rec_copy_prefix_to_dtuple(
mem_heap_t* heap); /* in: memory heap */
/*******************************************************************
Validates the consistency of a physical record. */
UNIV_INTERN
ibool
rec_validate(
/*=========*/
......@@ -742,7 +742,7 @@ rec_validate(
const ulint* offsets);/* in: array returned by rec_get_offsets() */
/*******************************************************************
Prints an old-style physical record. */
UNIV_INTERN
void
rec_print_old(
/*==========*/
......@@ -751,7 +751,7 @@ rec_print_old(
/*******************************************************************
Prints a physical record in ROW_FORMAT=COMPACT. Ignores the
record header. */
UNIV_INTERN
void
rec_print_comp(
/*===========*/
......@@ -760,7 +760,7 @@ rec_print_comp(
const ulint* offsets);/* in: array returned by rec_get_offsets() */
/*******************************************************************
Prints a physical record. */
UNIV_INTERN
void
rec_print_new(
/*==========*/
......@@ -769,7 +769,7 @@ rec_print_new(
const ulint* offsets);/* in: array returned by rec_get_offsets() */
/*******************************************************************
Prints a physical record. */
UNIV_INTERN
void
rec_print(
/*======*/
......
......@@ -16,7 +16,7 @@ Created September 2006 Marko Makela
/************************************************************************
Creates a cache of column prefixes of externally stored columns. */
UNIV_INTERN
row_ext_t*
row_ext_create(
/*===========*/
......
......@@ -20,7 +20,7 @@ Created 4/20/1996 Heikki Tuuri
Checks if foreign key constraint fails for an index entry. Sets shared locks
which lock either the success or the failure of the constraint. NOTE that
the caller must have a shared latch on dict_foreign_key_check_lock. */
UNIV_INTERN
ulint
row_ins_check_foreign_constraint(
/*=============================*/
......@@ -39,7 +39,7 @@ row_ins_check_foreign_constraint(
que_thr_t* thr); /* in: query thread */
/*************************************************************************
Creates an insert node struct. */
UNIV_INTERN
ins_node_t*
ins_node_create(
/*============*/
......@@ -51,7 +51,7 @@ ins_node_create(
Sets a new row to insert for an INS_DIRECT node. This function is only used
if we have constructed the row separately, which is a rare case; this
function is quite slow. */
UNIV_INTERN
void
ins_node_set_new_row(
/*=================*/
......@@ -62,7 +62,7 @@ Inserts an index entry to index. Tries first optimistic, then pessimistic
descent down the tree. If the entry matches enough to a delete marked record,
performs the insert by updating or delete unmarking the delete marked
record. */
UNIV_INTERN
ulint
row_ins_index_entry(
/*================*/
......@@ -76,7 +76,7 @@ row_ins_index_entry(
/***************************************************************
Inserts a row to a table. This is a high-level function used in
SQL execution graphs. */
UNIV_INTERN
que_thr_t*
row_ins_step(
/*=========*/
......@@ -84,7 +84,7 @@ row_ins_step(
que_thr_t* thr); /* in: query thread */
/***************************************************************
Creates an entry template for each index of a table. */
UNIV_INTERN
void
ins_node_create_entry_list(
/*=======================*/
......
......@@ -45,7 +45,7 @@ typedef struct merge_index_def_struct merge_index_def_t;
/*************************************************************************
Sets an exclusive lock on a table, for the duration of creating indexes. */
UNIV_INTERN
ulint
row_merge_lock_table(
/*=================*/
......@@ -55,7 +55,7 @@ row_merge_lock_table(
enum lock_mode mode); /* in: LOCK_X or LOCK_S */
/*************************************************************************
Drop an index from the InnoDB system tables. */
UNIV_INTERN
void
row_merge_drop_index(
/*=================*/
......@@ -65,7 +65,7 @@ row_merge_drop_index(
/*************************************************************************
Drop those indexes which were created before an error occurred
when building an index. */
UNIV_INTERN
void
row_merge_drop_indexes(
/*===================*/
......@@ -75,13 +75,13 @@ row_merge_drop_indexes(
ulint num_created); /* in: number of elements in index[] */
/*************************************************************************
Drop all partially created indexes during crash recovery. */
UNIV_INTERN
void
row_merge_drop_temp_indexes(void);
/*=============================*/
/*************************************************************************
Rename the tables in the data dictionary. */
UNIV_INTERN
ulint
row_merge_rename_tables(
/*====================*/
......@@ -96,7 +96,7 @@ row_merge_rename_tables(
/*************************************************************************
Create a temporary table for creating a primary key, using the definition
of an existing table. */
UNIV_INTERN
dict_table_t*
row_merge_create_temporary_table(
/*=============================*/
......@@ -110,7 +110,7 @@ row_merge_create_temporary_table(
(sets error_state) */
/*************************************************************************
Rename the temporary indexes in the dictionary to permanent ones. */
UNIV_INTERN
ulint
row_merge_rename_indexes(
/*=====================*/
......@@ -119,7 +119,7 @@ row_merge_rename_indexes(
dict_table_t* table); /* in/out: table with new indexes */
/*************************************************************************
Create the index and load in to the dictionary. */
UNIV_INTERN
dict_index_t*
row_merge_create_index(
/*===================*/
......@@ -131,7 +131,7 @@ row_merge_create_index(
#ifdef ROW_MERGE_IS_INDEX_USABLE
/*************************************************************************
Check if a transaction can use an index. */
UNIV_INTERN
ibool
row_merge_is_index_usable(
/*======================*/
......@@ -143,7 +143,7 @@ row_merge_is_index_usable(
/*************************************************************************
If there are views that refer to the old table name then we "attach" to
the new instance of the table else we drop it immediately. */
UNIV_INTERN
ulint
row_merge_drop_table(
/*=================*/
......@@ -155,7 +155,7 @@ row_merge_drop_table(
Build indexes on a table by reading a clustered index,
creating a temporary file containing index entries, merge sorting
these index entries and inserting sorted index entries to indexes. */
UNIV_INTERN
ulint
row_merge_build_indexes(
/*====================*/
......
......@@ -25,7 +25,7 @@ typedef struct row_prebuilt_struct row_prebuilt_t;
/***********************************************************************
Frees the blob heap in prebuilt when no longer needed. */
UNIV_INTERN
void
row_mysql_prebuilt_free_blob_heap(
/*==============================*/
......@@ -34,7 +34,7 @@ row_mysql_prebuilt_free_blob_heap(
/***********************************************************************
Stores a >= 5.0.3 format true VARCHAR length to dest, in the MySQL row
format. */
UNIV_INTERN
byte*
row_mysql_store_true_var_len(
/*=========================*/
......@@ -59,7 +59,7 @@ row_mysql_read_true_varchar(
or 2 bytes */
/***********************************************************************
Stores a reference to a BLOB in the MySQL format. */
UNIV_INTERN
void
row_mysql_store_blob_ref(
/*=====================*/
......@@ -90,7 +90,7 @@ row_mysql_read_blob_ref(
Stores a non-SQL-NULL field given in the MySQL format in the InnoDB format.
The counterpart of this function is row_sel_field_store_in_mysql_format() in
row0sel.c. */
UNIV_INTERN
byte*
row_mysql_store_col_in_innobase_format(
/*===================================*/
......@@ -123,7 +123,7 @@ row_mysql_store_col_in_innobase_format(
ulint comp); /* in: nonzero=compact format */
/********************************************************************
Handles user errors and lock waits detected by the database engine. */
UNIV_INTERN
ibool
row_mysql_handle_errors(
/*====================*/
......@@ -137,7 +137,7 @@ row_mysql_handle_errors(
trx_savept_t* savept);/* in: savepoint */
/************************************************************************
Create a prebuilt struct for a MySQL table handle. */
UNIV_INTERN
row_prebuilt_t*
row_create_prebuilt(
/*================*/
......@@ -145,7 +145,7 @@ row_create_prebuilt(
dict_table_t* table); /* in: Innobase table handle */
/************************************************************************
Free a prebuilt struct for a MySQL table handle. */
UNIV_INTERN
void
row_prebuilt_free(
/*==============*/
......@@ -154,7 +154,7 @@ row_prebuilt_free(
/*************************************************************************
Updates the transaction pointers in query graphs stored in the prebuilt
struct. */
UNIV_INTERN
void
row_update_prebuilt_trx(
/*====================*/
......@@ -164,7 +164,7 @@ row_update_prebuilt_trx(
trx_t* trx); /* in: transaction handle */
/*************************************************************************
Unlocks an AUTO_INC type lock possibly reserved by trx. */
UNIV_INTERN
void
row_unlock_table_autoinc_for_mysql(
/*===============================*/
......@@ -175,7 +175,7 @@ AUTO_INC lock gives exclusive access to the auto-inc counter of the
table. The lock is reserved only for the duration of an SQL statement.
It is not compatible with another AUTO_INC or exclusive lock on the
table. */
UNIV_INTERN
int
row_lock_table_autoinc_for_mysql(
/*=============================*/
......@@ -184,7 +184,7 @@ row_lock_table_autoinc_for_mysql(
table handle */
/*************************************************************************
Sets a table lock on the table mentioned in prebuilt. */
UNIV_INTERN
int
row_lock_table_for_mysql(
/*=====================*/
......@@ -200,7 +200,7 @@ row_lock_table_for_mysql(
/*************************************************************************
Does an insert for MySQL. */
UNIV_INTERN
int
row_insert_for_mysql(
/*=================*/
......@@ -210,7 +210,7 @@ row_insert_for_mysql(
handle */
/*************************************************************************
Builds a dummy query graph used in selects. */
UNIV_INTERN
void
row_prebuild_sel_graph(
/*===================*/
......@@ -220,7 +220,7 @@ row_prebuild_sel_graph(
Gets pointer to a prebuilt update vector used in updates. If the update
graph has not yet been built in the prebuilt struct, then this function
first builds it. */
UNIV_INTERN
upd_t*
row_get_prebuilt_update_vector(
/*===========================*/
......@@ -230,7 +230,7 @@ row_get_prebuilt_update_vector(
/*************************************************************************
Checks if a table is such that we automatically created a clustered
index on it (on row id). */
UNIV_INTERN
ibool
row_table_got_default_clust_index(
/*==============================*/
......@@ -238,14 +238,14 @@ row_table_got_default_clust_index(
/*************************************************************************
Calculates the key number used inside MySQL for an Innobase index. We have
to take into account if we generated a default clustered index for the table */
UNIV_INTERN
ulint
row_get_mysql_key_number_for_index(
/*===============================*/
const dict_index_t* index);
/*************************************************************************
Does an update or delete of a row for MySQL. */
UNIV_INTERN
int
row_update_for_mysql(
/*=================*/
......@@ -265,7 +265,7 @@ in the case of an UPDATE or a DELETE statement, where the row lock is of the
LOCK_X type.
Thus, this implements a 'mini-rollback' that releases the latest record
locks we set. */
UNIV_INTERN
int
row_unlock_for_mysql(
/*=================*/
......@@ -279,7 +279,7 @@ row_unlock_for_mysql(
/*************************************************************************
Creates an query graph node of 'update' type to be used in the MySQL
interface. */
UNIV_INTERN
upd_node_t*
row_create_update_node_for_mysql(
/*=============================*/
......@@ -288,7 +288,7 @@ row_create_update_node_for_mysql(
mem_heap_t* heap); /* in: mem heap from which allocated */
/**************************************************************************
Does a cascaded delete or set null in a foreign key operation. */
UNIV_INTERN
ulint
row_update_cascade_for_mysql(
/*=========================*/
......@@ -300,14 +300,14 @@ row_update_cascade_for_mysql(
/*************************************************************************
Locks the data dictionary exclusively for performing a table create or other
data dictionary modification operation. */
UNIV_INTERN
void
row_mysql_lock_data_dictionary(
/*===========================*/
trx_t* trx); /* in: transaction */
/*************************************************************************
Unlocks the data dictionary exclusive lock. */
UNIV_INTERN
void
row_mysql_unlock_data_dictionary(
/*=============================*/
......@@ -315,14 +315,14 @@ row_mysql_unlock_data_dictionary(
/*************************************************************************
Locks the data dictionary in shared mode from modifications, for performing
foreign key check, rollback, or other operation invisible to MySQL. */
UNIV_INTERN
void
row_mysql_freeze_data_dictionary(
/*=============================*/
trx_t* trx); /* in: transaction */
/*************************************************************************
Unlocks the data dictionary shared lock. */
UNIV_INTERN
void
row_mysql_unfreeze_data_dictionary(
/*===============================*/
......@@ -334,7 +334,7 @@ one of "innodb_monitor", "innodb_lock_monitor", "innodb_tablespace_monitor",
"innodb_table_monitor", then this will also start the printing of monitor
output by the master thread. If the table name ends in "innodb_mem_validate",
InnoDB will try to invoke mem_validate(). */
UNIV_INTERN
int
row_create_table_for_mysql(
/*=======================*/
......@@ -345,7 +345,7 @@ row_create_table_for_mysql(
Does an index creation operation for MySQL. TODO: currently failure
to create an index results in dropping the whole table! This is no problem
currently as all indexes must be created at the same time as the table. */
UNIV_INTERN
int
row_create_index_for_mysql(
/*=======================*/
......@@ -365,7 +365,7 @@ should be called after the indexes for a table have been created.
Each foreign key constraint must be accompanied with indexes in
bot participating tables. The indexes are allowed to contain more
fields than mentioned in the constraint. */
UNIV_INTERN
int
row_table_add_foreign_constraints(
/*==============================*/
......@@ -387,7 +387,7 @@ row_table_add_foreign_constraints(
The master thread in srv0srv.c calls this regularly to drop tables which
we must drop in background after queries to them have ended. Such lazy
dropping of tables is needed in ALTER TABLE on Unix. */
UNIV_INTERN
ulint
row_drop_tables_for_mysql_in_background(void);
/*=========================================*/
......@@ -396,14 +396,14 @@ row_drop_tables_for_mysql_in_background(void);
/*************************************************************************
Get the background drop list length. NOTE: the caller must own the kernel
mutex! */
UNIV_INTERN
ulint
row_get_background_drop_list_len_low(void);
/*======================================*/
/* out: how many tables in list */
/*************************************************************************
Truncates a table for MySQL. */
UNIV_INTERN
int
row_truncate_table_for_mysql(
/*=========================*/
......@@ -415,7 +415,7 @@ Drops a table for MySQL. If the name of the dropped table ends in
one of "innodb_monitor", "innodb_lock_monitor", "innodb_tablespace_monitor",
"innodb_table_monitor", then this will also stop the printing of monitor
output by the master thread. */
UNIV_INTERN
int
row_drop_table_for_mysql(
/*=====================*/
......@@ -430,7 +430,7 @@ name of the dropped table ends in one of "innodb_monitor",
"innodb_lock_monitor", "innodb_tablespace_monitor",
"innodb_table_monitor", then this will also stop the printing of
monitor output by the master thread. */
UNIV_INTERN
int
row_drop_table_for_mysql_no_commit(
/*===============================*/
......@@ -442,7 +442,7 @@ row_drop_table_for_mysql_no_commit(
Discards the tablespace of a table which stored in an .ibd file. Discarding
means that this function deletes the .ibd file and assigns a new table id for
the table. Also the flag table->ibd_file_missing is set TRUE. */
UNIV_INTERN
int
row_discard_tablespace_for_mysql(
/*=============================*/
......@@ -452,7 +452,7 @@ row_discard_tablespace_for_mysql(
/*********************************************************************
Imports a tablespace. The space id in the .ibd file must match the space id
of the table in the data dictionary. */
UNIV_INTERN
int
row_import_tablespace_for_mysql(
/*============================*/
......@@ -461,7 +461,7 @@ row_import_tablespace_for_mysql(
trx_t* trx); /* in: transaction handle */
/*************************************************************************
Drops a database for MySQL. */
UNIV_INTERN
int
row_drop_database_for_mysql(
/*========================*/
......@@ -470,7 +470,7 @@ row_drop_database_for_mysql(
trx_t* trx); /* in: transaction handle */
/*************************************************************************
Renames a table for MySQL. */
UNIV_INTERN
ulint
row_rename_table_for_mysql(
/*=======================*/
......@@ -481,7 +481,7 @@ row_rename_table_for_mysql(
ibool commit); /* in: if TRUE then commit trx */
/*************************************************************************
Checks a table for corruption. */
UNIV_INTERN
ulint
row_check_table_for_mysql(
/*======================*/
......
......@@ -20,7 +20,7 @@ Created 3/14/1997 Heikki Tuuri
/************************************************************************
Creates a purge node to a query graph. */
UNIV_INTERN
purge_node_t*
row_purge_node_create(
/*==================*/
......@@ -30,7 +30,7 @@ row_purge_node_create(
/***************************************************************
Does the purge operation for a single undo log record. This is a high-level
function used in an SQL execution graph. */
UNIV_INTERN
que_thr_t*
row_purge_step(
/*===========*/
......
......@@ -23,7 +23,7 @@ Created 4/20/1996 Heikki Tuuri
/*************************************************************************
Gets the offset of the trx id field, in bytes relative to the origin of
a clustered index record. */
UNIV_INTERN
ulint
row_get_trx_id_offset(
/*==================*/
......@@ -54,7 +54,7 @@ row_get_rec_roll_ptr(
/*********************************************************************
When an insert or purge to a table is performed, this function builds
the entry to be inserted into or purged from an index on the table. */
UNIV_INTERN
dtuple_t*
row_build_index_entry(
/*==================*/
......@@ -73,7 +73,7 @@ row_build_index_entry(
/***********************************************************************
An inverse function to row_build_index_entry. Builds a row from a
record in a clustered index. */
UNIV_INTERN
dtuple_t*
row_build(
/*======*/
......@@ -115,7 +115,7 @@ row_build(
the memory needed is allocated */
/***********************************************************************
Converts an index record to a typed data tuple. */
UNIV_INTERN
dtuple_t*
row_rec_to_index_entry_low(
/*=======================*/
......@@ -132,7 +132,7 @@ row_rec_to_index_entry_low(
/***********************************************************************
Converts an index record to a typed data tuple. NOTE that externally
stored (often big) fields are NOT copied to heap. */
UNIV_INTERN
dtuple_t*
row_rec_to_index_entry(
/*===================*/
......@@ -162,7 +162,7 @@ row_rec_to_index_entry(
/***********************************************************************
Builds from a secondary index record a row reference with which we can
search the clustered index record. */
UNIV_INTERN
dtuple_t*
row_build_row_ref(
/*==============*/
......@@ -185,7 +185,7 @@ row_build_row_ref(
/***********************************************************************
Builds from a secondary index record a row reference with which we can
search the clustered index record. */
UNIV_INTERN
void
row_build_row_ref_in_tuple(
/*=======================*/
......@@ -206,7 +206,7 @@ row_build_row_ref_in_tuple(
/***********************************************************************
From a row build a row reference with which we can search the clustered
index record. */
UNIV_INTERN
void
row_build_row_ref_from_row(
/*=======================*/
......@@ -237,7 +237,7 @@ row_build_row_ref_fast(
/*******************************************************************
Searches the clustered index record for a row, if we have the row
reference. */
UNIV_INTERN
ibool
row_search_on_row_ref(
/*==================*/
......@@ -251,7 +251,7 @@ row_search_on_row_ref(
/*************************************************************************
Fetches the clustered index record for a secondary index record. The latches
on the secondary index record are preserved. */
UNIV_INTERN
rec_t*
row_get_clust_rec(
/*==============*/
......@@ -263,7 +263,7 @@ row_get_clust_rec(
mtr_t* mtr); /* in: mtr */
/*******************************************************************
Searches an index record. */
UNIV_INTERN
ibool
row_search_index_entry(
/*===================*/
......@@ -294,7 +294,7 @@ Not more than "buf_size" bytes are written to "buf".
The result is always '\0'-terminated (provided buf_size > 0) and the
number of bytes that were written to "buf" is returned (including the
terminating '\0'). */
UNIV_INTERN
ulint
row_raw_format(
/*===========*/
......
......@@ -23,7 +23,7 @@ Created 12/19/1997 Heikki Tuuri
/*************************************************************************
Creates a select node struct. */
UNIV_INTERN
sel_node_t*
sel_node_create(
/*============*/
......@@ -32,7 +32,7 @@ sel_node_create(
/*************************************************************************
Frees the memory private to a select node when a query graph is freed,
does not free the heap where the node was originally created. */
UNIV_INTERN
void
sel_node_free_private(
/*==================*/
......@@ -40,7 +40,7 @@ sel_node_free_private(
/*************************************************************************
Frees a prefetch buffer for a column, including the dynamically allocated
memory for data stored there. */
UNIV_INTERN
void
sel_col_prefetch_buf_free(
/*======================*/
......@@ -56,7 +56,7 @@ sel_node_get_nth_plan(
/**************************************************************************
Performs a select step. This is a high-level function used in SQL execution
graphs. */
UNIV_INTERN
que_thr_t*
row_sel_step(
/*=========*/
......@@ -72,7 +72,7 @@ open_step(
que_thr_t* thr); /* in: query thread */
/**************************************************************************
Performs a fetch for a cursor. */
UNIV_INTERN
que_thr_t*
fetch_step(
/*=======*/
......@@ -80,7 +80,7 @@ fetch_step(
que_thr_t* thr); /* in: query thread */
/********************************************************************
Sample callback function for fetch that prints each row.*/
UNIV_INTERN
void*
row_fetch_print(
/*============*/
......@@ -91,7 +91,7 @@ row_fetch_print(
Callback function for fetch that stores an unsigned 4 byte integer to the
location pointed. The column's type must be DATA_INT, DATA_UNSIGNED, length
= 4. */
UNIV_INTERN
void*
row_fetch_store_uint4(
/*==================*/
......@@ -100,7 +100,7 @@ row_fetch_store_uint4(
void* user_arg); /* in: data pointer */
/***************************************************************
Prints a row in a select result. */
UNIV_INTERN
que_thr_t*
row_printf_step(
/*============*/
......@@ -112,7 +112,7 @@ field of the key value may be just a prefix of a fixed length field: hence
the parameter key_len. But currently we do not allow search keys where the
last field is only a prefix of the full key field len and print a warning if
such appears. */
UNIV_INTERN
void
row_sel_convert_mysql_key_to_innobase(
/*==================================*/
......@@ -133,7 +133,7 @@ MySQL. This function opens a cursor, and also implements fetch next
and fetch prev. NOTE that if we do a search with a full key value
from a unique index (ROW_SEL_EXACT), then we will not store the cursor
position and fetch next or fetch prev must not be tried to the cursor! */
UNIV_INTERN
ulint
row_search_for_mysql(
/*=================*/
......@@ -162,7 +162,7 @@ row_search_for_mysql(
/***********************************************************************
Checks if MySQL at the moment is allowed for this table to retrieve a
consistent read result, or store it to the query cache. */
UNIV_INTERN
ibool
row_search_check_if_query_cache_permitted(
/*======================================*/
......@@ -173,7 +173,7 @@ row_search_check_if_query_cache_permitted(
'/' char, table name */
/***********************************************************************
Read the max AUTOINC value from an index. */
UNIV_INTERN
ulint
row_search_max_autoinc(
/*===================*/
......
......@@ -21,7 +21,7 @@ Created 2/25/1997 Heikki Tuuri
Undoes a fresh insert of a row to a table. A fresh insert means that
the same clustered index unique key did not have any record, even delete
marked, at the time of the insert. */
UNIV_INTERN
ulint
row_undo_ins(
/*=========*/
......
......@@ -19,7 +19,7 @@ Created 2/27/1997 Heikki Tuuri
/***************************************************************
Undoes a modify operation on a row of a table. */
UNIV_INTERN
ulint
row_undo_mod(
/*=========*/
......
......@@ -21,7 +21,7 @@ Created 1/8/1997 Heikki Tuuri
/************************************************************************
Creates a row undo node to a query graph. */
UNIV_INTERN
undo_node_t*
row_undo_node_create(
/*=================*/
......@@ -34,7 +34,7 @@ Looks for the clustered index record when node has the row reference.
The pcur in node is used in the search. If found, stores the row to node,
and stores the position of pcur, and detaches it. The pcur must be closed
by the caller in any case. */
UNIV_INTERN
ibool
row_undo_search_clust_to_pcur(
/*==========================*/
......@@ -45,7 +45,7 @@ row_undo_search_clust_to_pcur(
/***************************************************************
Undoes a row operation in a table. This is a high-level function used
in SQL execution graphs. */
UNIV_INTERN
que_thr_t*
row_undo_step(
/*==========*/
......
......@@ -64,7 +64,7 @@ upd_field_set_field_no(
/*************************************************************************
Writes into the redo log the values of trx id and roll ptr and enough info
to determine their positions within a clustered index record. */
UNIV_INTERN
byte*
row_upd_write_sys_vals_to_log(
/*==========================*/
......@@ -91,7 +91,7 @@ row_upd_rec_sys_fields(
dulint roll_ptr);/* in: roll ptr of the undo log record */
/*************************************************************************
Sets the trx id or roll ptr field of a clustered index entry. */
UNIV_INTERN
void
row_upd_index_entry_sys_field(
/*==========================*/
......@@ -104,7 +104,7 @@ row_upd_index_entry_sys_field(
dulint val); /* in: value to write */
/*************************************************************************
Creates an update node for a query graph. */
UNIV_INTERN
upd_node_t*
upd_node_create(
/*============*/
......@@ -112,7 +112,7 @@ upd_node_create(
mem_heap_t* heap); /* in: mem heap where created */
/***************************************************************
Writes to the redo log the new values of the fields occurring in the index. */
UNIV_INTERN
void
row_upd_index_write_log(
/*====================*/
......@@ -125,7 +125,7 @@ row_upd_index_write_log(
/***************************************************************
Returns TRUE if row update changes size of some field in index or if some
field to be updated is stored externally in rec or update. */
UNIV_INTERN
ibool
row_upd_changes_field_size_or_external(
/*===================================*/
......@@ -138,7 +138,7 @@ row_upd_changes_field_size_or_external(
/***************************************************************
Replaces the new column values stored in the update vector to the record
given. No field size changes are allowed. */
UNIV_INTERN
void
row_upd_rec_in_place(
/*=================*/
......@@ -152,7 +152,7 @@ row_upd_rec_in_place(
Builds an update vector from those fields which in a secondary index entry
differ from a record that has the equal ordering fields. NOTE: we compare
the fields as binary strings! */
UNIV_INTERN
upd_t*
row_upd_build_sec_rec_difference_binary(
/*====================================*/
......@@ -167,7 +167,7 @@ row_upd_build_sec_rec_difference_binary(
Builds an update vector from those fields, excluding the roll ptr and
trx id fields, which in an index entry differ from a record that has
the equal ordering fields. NOTE: we compare the fields as binary strings! */
UNIV_INTERN
upd_t*
row_upd_build_difference_binary(
/*============================*/
......@@ -181,7 +181,7 @@ row_upd_build_difference_binary(
/***************************************************************
Replaces the new column values stored in the update vector to the index entry
given. */
UNIV_INTERN
void
row_upd_index_replace_new_col_vals_index_pos(
/*=========================================*/
......@@ -209,7 +209,7 @@ row_upd_index_replace_new_col_vals_index_pos(
/***************************************************************
Replaces the new column values stored in the update vector to the index entry
given. */
UNIV_INTERN
void
row_upd_index_replace_new_col_vals(
/*===============================*/
......@@ -232,7 +232,7 @@ row_upd_index_replace_new_col_vals(
stored columns or column prefixes */
/***************************************************************
Replaces the new column values stored in the update vector. */
UNIV_INTERN
void
row_upd_replace(
/*============*/
......@@ -252,7 +252,7 @@ Checks if an update vector changes an ordering field of an index record.
This function is fast if the update vector is short or the number of ordering
fields in the index is small. Otherwise, this can be quadratic.
NOTE: we compare the fields as binary strings! */
UNIV_INTERN
ibool
row_upd_changes_ord_field_binary(
/*=============================*/
......@@ -273,7 +273,7 @@ Checks if an update vector changes an ordering field of an index record.
This function is fast if the update vector is short or the number of ordering
fields in the index is small. Otherwise, this can be quadratic.
NOTE: we compare the fields as binary strings! */
UNIV_INTERN
ibool
row_upd_changes_some_index_ord_field_binary(
/*========================================*/
......@@ -285,7 +285,7 @@ row_upd_changes_some_index_ord_field_binary(
/***************************************************************
Updates a row in a table. This is a high-level function used
in SQL execution graphs. */
UNIV_INTERN
que_thr_t*
row_upd_step(
/*=========*/
......@@ -294,7 +294,7 @@ row_upd_step(
/*************************************************************************
Performs an in-place update for the current clustered index record in
select. */
UNIV_INTERN
void
row_upd_in_place_in_select(
/*=======================*/
......@@ -303,7 +303,7 @@ row_upd_in_place_in_select(
mtr_t* mtr); /* in: mtr */
/*************************************************************************
Parses the log data of system field values. */
UNIV_INTERN
byte*
row_upd_parse_sys_vals(
/*===================*/
......@@ -316,7 +316,7 @@ row_upd_parse_sys_vals(
/*************************************************************************
Updates the trx id and roll ptr field in a clustered index record in database
recovery. */
UNIV_INTERN
void
row_upd_rec_sys_fields_in_recovery(
/*===============================*/
......@@ -328,7 +328,7 @@ row_upd_rec_sys_fields_in_recovery(
dulint roll_ptr);/* in: roll ptr of the undo log record */
/*************************************************************************
Parses the log data written by row_upd_index_write_log. */
UNIV_INTERN
byte*
row_upd_index_parse(
/*================*/
......
......@@ -22,7 +22,7 @@ Created 2/6/1997 Heikki Tuuri
Finds out if an active transaction has inserted or modified a secondary
index record. NOTE: the kernel mutex is temporarily released in this
function! */
UNIV_INTERN
trx_t*
row_vers_impl_x_locked_off_kernel(
/*==============================*/
......@@ -35,7 +35,7 @@ row_vers_impl_x_locked_off_kernel(
/*********************************************************************
Finds out if we must preserve a delete marked earlier version of a clustered
index record, because it is >= the purge view. */
UNIV_INTERN
ibool
row_vers_must_preserve_del_marked(
/*==============================*/
......@@ -49,7 +49,7 @@ purge view, should have ientry as its secondary index entry. We check
if there is any not delete marked version of the record where the trx
id >= purge view, and the secondary index entry == ientry; exactly in
this case we return TRUE. */
UNIV_INTERN
ibool
row_vers_old_has_index_entry(
/*=========================*/
......@@ -67,7 +67,7 @@ row_vers_old_has_index_entry(
Constructs the version of a clustered index record which a consistent
read should see. We assume that the trx id stored in rec is such that
the consistent read should not see rec in its present version. */
UNIV_INTERN
ulint
row_vers_build_for_consistent_read(
/*===============================*/
......@@ -95,7 +95,7 @@ row_vers_build_for_consistent_read(
/*********************************************************************
Constructs the last committed version of a clustered index record,
which should be seen by a semi-consistent read. */
UNIV_INTERN
ulint
row_vers_build_for_semi_consistent_read(
/*====================================*/
......
......@@ -18,14 +18,14 @@ Checks if there is work to do in the server task queue. If there is, the
thread starts processing a task. Before leaving, it again checks the task
queue and picks a new task if any exists. This is called by a SRV_WORKER
thread. */
UNIV_INTERN
void
srv_que_task_queue_check(void);
/*==========================*/
/**************************************************************************
Performs round-robin on the server tasks. This is called by a SRV_WORKER
thread every second or so. */
UNIV_INTERN
que_thr_t*
srv_que_round_robin(
/*================*/
......@@ -35,7 +35,7 @@ srv_que_round_robin(
/**************************************************************************
Enqueues a task to server task queue and releases a worker thread, if
there exists one suspended. */
UNIV_INTERN
void
srv_que_task_enqueue(
/*=================*/
......@@ -43,7 +43,7 @@ srv_que_task_enqueue(
/**************************************************************************
Enqueues a task to server task queue and releases a worker thread, if
there exists one suspended. */
UNIV_INTERN
void
srv_que_task_enqueue_low(
/*=====================*/
......
......@@ -313,33 +313,33 @@ enum srv_thread_type {
/*************************************************************************
Boots Innobase server. */
UNIV_INTERN
ulint
srv_boot(void);
/*==========*/
/* out: DB_SUCCESS or error code */
/*************************************************************************
Initializes the server. */
UNIV_INTERN
void
srv_init(void);
/*==========*/
/*************************************************************************
Frees the OS fast mutex created in srv_boot(). */
UNIV_INTERN
void
srv_free(void);
/*==========*/
/*************************************************************************
Initializes the synchronization primitives, memory system, and the thread
local storage. */
UNIV_INTERN
void
srv_general_init(void);
/*==================*/
/*************************************************************************
Gets the number of threads in the system. */
UNIV_INTERN
ulint
srv_get_n_threads(void);
/*===================*/
......@@ -352,7 +352,7 @@ srv_get_thread_type(void);
/* out: SRV_COM, ... */
/*************************************************************************
Sets the info describing an i/o thread current state. */
UNIV_INTERN
void
srv_set_io_thread_op_info(
/*======================*/
......@@ -362,7 +362,7 @@ srv_set_io_thread_op_info(
/*************************************************************************
Releases threads of the type given from suspension in the thread table.
NOTE! The server mutex has to be reserved by the caller! */
UNIV_INTERN
ulint
srv_release_threads(
/*================*/
......@@ -374,7 +374,7 @@ srv_release_threads(
ulint n); /* in: number of threads to release */
/*************************************************************************
The master thread controlling the server. */
UNIV_INTERN
os_thread_ret_t
srv_master_thread(
/*==============*/
......@@ -387,20 +387,20 @@ and wakes up the master thread if it is suspended (not sleeping). Used
in the MySQL interface. Note that there is a small chance that the master
thread stays suspended (we do not protect our operation with the kernel
mutex, for performace reasons). */
UNIV_INTERN
void
srv_active_wake_master_thread(void);
/*===============================*/
/***********************************************************************
Wakes up the master thread if it is suspended or being suspended. */
UNIV_INTERN
void
srv_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. */
UNIV_INTERN
void
srv_conc_enter_innodb(
/*==================*/
......@@ -409,7 +409,7 @@ srv_conc_enter_innodb(
/*************************************************************************
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. */
UNIV_INTERN
void
srv_conc_force_enter_innodb(
/*========================*/
......@@ -418,7 +418,7 @@ srv_conc_force_enter_innodb(
/*************************************************************************
This must be called when a thread exits InnoDB in a lock wait or at the
end of an SQL statement. */
UNIV_INTERN
void
srv_conc_force_exit_innodb(
/*=======================*/
......@@ -426,7 +426,7 @@ srv_conc_force_exit_innodb(
thread */
/*************************************************************************
This must be called when a thread exits InnoDB. */
UNIV_INTERN
void
srv_conc_exit_innodb(
/*=================*/
......@@ -438,7 +438,7 @@ occurs during the wait trx->error_state associated with thr is
!= DB_SUCCESS when we return. DB_LOCK_WAIT_TIMEOUT and DB_DEADLOCK
are possible errors. DB_DEADLOCK is returned if selective deadlock
resolution chose this transaction as a victim. */
UNIV_INTERN
void
srv_suspend_mysql_thread(
/*=====================*/
......@@ -447,7 +447,7 @@ srv_suspend_mysql_thread(
/************************************************************************
Releases a MySQL OS thread waiting for a lock to be released, if the
thread is already suspended. */
UNIV_INTERN
void
srv_release_mysql_thread_if_suspended(
/*==================================*/
......@@ -456,7 +456,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. */
UNIV_INTERN
os_thread_ret_t
srv_lock_timeout_and_monitor_thread(
/*================================*/
......@@ -466,7 +466,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. */
UNIV_INTERN
os_thread_ret_t
srv_error_monitor_thread(
/*=====================*/
......@@ -475,7 +475,7 @@ srv_error_monitor_thread(
os_thread_create */
/**********************************************************************
Outputs to a file the output of the InnoDB Monitor. */
UNIV_INTERN
void
srv_printf_innodb_monitor(
/*======================*/
......@@ -487,7 +487,7 @@ srv_printf_innodb_monitor(
/**********************************************************************
Function to pass InnoDB status variables to MySQL */
UNIV_INTERN
void
srv_export_innodb_status(void);
/*=====================*/
......
......@@ -15,7 +15,7 @@ Created 10/10/1995 Heikki Tuuri
/*************************************************************************
Normalizes a directory path for Windows: converts slashes to backslashes. */
UNIV_INTERN
void
srv_normalize_path_for_win(
/*=======================*/
......@@ -23,7 +23,7 @@ srv_normalize_path_for_win(
/*************************************************************************
Reads the data files and their sizes from a character string given in
the .cnf file. */
UNIV_INTERN
ibool
srv_parse_data_file_paths_and_sizes(
/*================================*/
......@@ -45,7 +45,7 @@ srv_parse_data_file_paths_and_sizes(
/*************************************************************************
Reads log group home directories from a character string given in
the .cnf file. */
UNIV_INTERN
ibool
srv_parse_log_group_home_dirs(
/*==========================*/
......@@ -56,7 +56,7 @@ srv_parse_log_group_home_dirs(
/*************************************************************************
Adds a slash or a backslash to the end of a string if it is missing
and the string is not empty. */
UNIV_INTERN
char*
srv_add_path_separator_if_needed(
/*=============================*/
......@@ -67,13 +67,14 @@ srv_add_path_separator_if_needed(
Starts Innobase and creates a new database if database files
are not found and the user wants. Server parameters are
read from a file of name "srv_init" in the ib_home directory. */
UNIV_INTERN
int
innobase_start_or_create_for_mysql(void);
/*====================================*/
/* out: DB_SUCCESS or error code */
/********************************************************************
Shuts down the Innobase database. */
UNIV_INTERN
int
innobase_shutdown_for_mysql(void);
/*=============================*/
......
......@@ -24,7 +24,7 @@ typedef struct sync_array_struct sync_array_t;
Creates a synchronization wait array. It is protected by a mutex
which is automatically reserved when the functions operating on it
are called. */
UNIV_INTERN
sync_array_t*
sync_array_create(
/*==============*/
......@@ -36,7 +36,7 @@ sync_array_create(
of mutex protecting the data structure */
/**********************************************************************
Frees the resources in a wait array. */
UNIV_INTERN
void
sync_array_free(
/*============*/
......@@ -44,7 +44,7 @@ sync_array_free(
/**********************************************************************
Reserves a wait array cell for waiting for an object.
The event of the cell is reset to nonsignalled state. */
UNIV_INTERN
void
sync_array_reserve_cell(
/*====================*/
......@@ -59,7 +59,7 @@ This function should be called when a thread starts to wait on
a wait array cell. In the debug version this function checks
if the wait for a semaphore will result in a deadlock, in which
case prints info and asserts. */
UNIV_INTERN
void
sync_array_wait_event(
/*==================*/
......@@ -68,7 +68,7 @@ sync_array_wait_event(
/**********************************************************************
Frees the cell safely by reserving the sync array mutex and decrementing
n_reserved if necessary. Should only be called from mutex_spin_wait. */
UNIV_INTERN
void
sync_array_free_cell_protected(
/*===========================*/
......@@ -80,7 +80,7 @@ to the wait object specified,
and sets their corresponding events to the signaled state. In this
way releases the threads waiting for the object to contend for the object.
It is possible that no such cell is found, in which case does nothing. */
UNIV_INTERN
void
sync_array_signal_object(
/*=====================*/
......@@ -90,13 +90,13 @@ sync_array_signal_object(
If the wakeup algorithm does not work perfectly at semaphore relases,
this function will do the waking (see the comment in mutex_exit). This
function should be called about every 1 second in the server. */
UNIV_INTERN
void
sync_arr_wake_threads_if_sema_free(void);
/*====================================*/
/**************************************************************************
Prints warnings of long semaphore waits to stderr. */
UNIV_INTERN
ibool
sync_array_print_long_waits(void);
/*=============================*/
......@@ -105,14 +105,14 @@ sync_array_print_long_waits(void);
/************************************************************************
Validates the integrity of the wait array. Checks
that the number of reserved cells equals the count variable. */
UNIV_INTERN
void
sync_array_validate(
/*================*/
sync_array_t* arr); /* in: sync wait array */
/**************************************************************************
Prints info of the wait array. */
UNIV_INTERN
void
sync_array_print_info(
/*==================*/
......
......@@ -79,7 +79,7 @@ Creates, or rather, initializes an rw-lock object in a specified memory
location (which must be appropriately aligned). The rw-lock is initialized
to the non-locked state. Explicit freeing of the rw-lock with rw_lock_free
is necessary only if the memory block containing it is freed. */
UNIV_INTERN
void
rw_lock_create_func(
/*================*/
......@@ -96,7 +96,7 @@ rw_lock_create_func(
Calling this function is obligatory only if the memory buffer containing
the rw-lock is freed. Removes an rw-lock object from the global list. The
rw-lock is checked to be in the non-locked state. */
UNIV_INTERN
void
rw_lock_free(
/*=========*/
......@@ -105,7 +105,7 @@ rw_lock_free(
/**********************************************************************
Checks that the rw-lock has been initialized and that there are no
simultaneous shared and exclusive locks. */
UNIV_INTERN
ibool
rw_lock_validate(
/*=============*/
......@@ -224,7 +224,7 @@ for the lock, before suspending the thread. If the same thread has an x-lock
on the rw-lock, locking succeed, with the following exception: if pass != 0,
only a single x-lock may be taken on the lock. NOTE: If the same thread has
an s-lock, locking does not succeed! */
UNIV_INTERN
void
rw_lock_x_lock_func(
/*================*/
......@@ -293,7 +293,7 @@ read was done. The ownership is moved because we want that the current
thread is able to acquire a second x-latch which is stored in an mtr.
This, in turn, is needed to pass the debug checks of index page
operations. */
UNIV_INTERN
void
rw_lock_x_lock_move_ownership(
/*==========================*/
......@@ -345,7 +345,7 @@ rw_lock_get_reader_count(
/**********************************************************************
Checks if the thread has locked the rw-lock in the specified mode, with
the pass value == 0. */
UNIV_INTERN
ibool
rw_lock_own(
/*========*/
......@@ -355,7 +355,7 @@ rw_lock_own(
#endif /* UNIV_SYNC_DEBUG */
/**********************************************************************
Checks if somebody has locked the rw-lock in the specified mode. */
UNIV_INTERN
ibool
rw_lock_is_locked(
/*==============*/
......@@ -365,14 +365,14 @@ rw_lock_is_locked(
#ifdef UNIV_SYNC_DEBUG
/*******************************************************************
Prints debug info of an rw-lock. */
UNIV_INTERN
void
rw_lock_print(
/*==========*/
rw_lock_t* lock); /* in: rw-lock */
/*******************************************************************
Prints debug info of currently locked rw-locks. */
UNIV_INTERN
void
rw_lock_list_print_info(
/*====================*/
......@@ -380,7 +380,7 @@ rw_lock_list_print_info(
/*******************************************************************
Returns the number of currently locked rw-locks.
Works only in the debug version. */
UNIV_INTERN
ulint
rw_lock_n_locked(void);
/*==================*/
......@@ -393,19 +393,19 @@ because the debug mutex is also acquired in sync0arr while holding the OS
mutex protecting the sync array, and the ordinary mutex_enter might
recursively call routines in sync0arr, leading to a deadlock on the OS
mutex. */
UNIV_INTERN
void
rw_lock_debug_mutex_enter(void);
/*==========================*/
/**********************************************************************
Releases the debug mutex. */
UNIV_INTERN
void
rw_lock_debug_mutex_exit(void);
/*==========================*/
/*************************************************************************
Prints info of a debug struct. */
UNIV_INTERN
void
rw_lock_debug_print(
/*================*/
......
......@@ -23,13 +23,13 @@ extern my_bool timed_mutexes;
/**********************************************************************
Initializes the synchronization data structures. */
UNIV_INTERN
void
sync_init(void);
/*===========*/
/**********************************************************************
Frees the resources in synchronization data structures. */
UNIV_INTERN
void
sync_close(void);
/*===========*/
......@@ -57,7 +57,7 @@ Creates, or rather, initializes a mutex object in a specified memory
location (which must be appropriately aligned). The mutex is initialized
in the reset state. Explicit freeing of the mutex with mutex_free is
necessary only if the memory block containing it is freed. */
UNIV_INTERN
void
mutex_create_func(
/*==============*/
......@@ -70,12 +70,14 @@ mutex_create_func(
#endif /* UNIV_DEBUG */
const char* cfile_name, /* in: file name where created */
ulint cline); /* in: file line where created */
#undef mutex_free /* Fix for MacOS X */
/**********************************************************************
Calling this function is obligatory only if the memory buffer containing
the mutex is freed. Removes a mutex object from the mutex list. The mutex
is checked to be in the reset state. */
#undef mutex_free /* Fix for MacOS X */
UNIV_INTERN
void
mutex_free(
/*=======*/
......@@ -114,7 +116,7 @@ corresponding function. */
NOTE! Use the corresponding macro in the header file, not this function
directly. Tries to lock the mutex for the current thread. If the lock is not
acquired immediately, returns with return value 1. */
UNIV_INTERN
ulint
mutex_enter_nowait_func(
/*====================*/
......@@ -133,7 +135,7 @@ mutex_exit(
/**********************************************************************
Returns TRUE if no mutex or rw-lock is currently locked.
Works only in the debug version. */
UNIV_INTERN
ibool
sync_all_freed(void);
/*================*/
......@@ -141,14 +143,14 @@ sync_all_freed(void);
FUNCTION PROTOTYPES FOR DEBUGGING */
/***********************************************************************
Prints wait info of the sync system. */
UNIV_INTERN
void
sync_print_wait_info(
/*=================*/
FILE* file); /* in: file where to print */
/***********************************************************************
Prints info of the sync system. */
UNIV_INTERN
void
sync_print(
/*=======*/
......@@ -156,7 +158,7 @@ sync_print(
#ifdef UNIV_DEBUG
/**********************************************************************
Checks that the mutex has been initialized. */
UNIV_INTERN
ibool
mutex_validate(
/*===========*/
......@@ -164,7 +166,7 @@ mutex_validate(
/**********************************************************************
Checks that the current thread owns the mutex. Works only
in the debug version. */
UNIV_INTERN
ibool
mutex_own(
/*======*/
......@@ -176,7 +178,7 @@ mutex_own(
Adds a latch and its level in the thread level array. Allocates the memory
for the array if called first time for this OS thread. Makes the checks
against other latch levels stored in the array for this thread. */
UNIV_INTERN
void
sync_thread_add_level(
/*==================*/
......@@ -185,7 +187,7 @@ sync_thread_add_level(
SYNC_LEVEL_VARYING, nothing is done */
/**********************************************************************
Removes a latch from the thread level array if it is found there. */
UNIV_INTERN
ibool
sync_thread_reset_level(
/*====================*/
......@@ -196,14 +198,14 @@ sync_thread_reset_level(
void* latch); /* in: pointer to a mutex or an rw-lock */
/**********************************************************************
Checks that the level array for the current thread is empty. */
UNIV_INTERN
ibool
sync_thread_levels_empty(void);
/*==========================*/
/* out: TRUE if empty */
/**********************************************************************
Checks that the level array for the current thread is empty. */
UNIV_INTERN
ibool
sync_thread_levels_empty_gen(
/*=========================*/
......@@ -215,7 +217,7 @@ sync_thread_levels_empty_gen(
allowed */
/**********************************************************************
Gets the debug information for a reserved mutex. */
UNIV_INTERN
void
mutex_get_debug_info(
/*=================*/
......@@ -226,7 +228,7 @@ mutex_get_debug_info(
the mutex */
/**********************************************************************
Counts currently reserved mutexes. Works only in the debug version. */
UNIV_INTERN
ulint
mutex_n_reserved(void);
/*==================*/
......
......@@ -18,26 +18,26 @@ OS handle to the current thread, or its priority. */
/********************************************************************
Initializes the thread local storage module. */
UNIV_INTERN
void
thr_local_init(void);
/*================*/
/***********************************************************************
Creates a local storage struct for the calling new thread. */
UNIV_INTERN
void
thr_local_create(void);
/*==================*/
/***********************************************************************
Frees the local storage struct for the specified thread. */
UNIV_INTERN
void
thr_local_free(
/*===========*/
os_thread_id_t id); /* in: thread id */
/***********************************************************************
Gets the slot number in the thread table of a thread. */
UNIV_INTERN
ulint
thr_local_get_slot_no(
/*==================*/
......@@ -45,7 +45,7 @@ thr_local_get_slot_no(
os_thread_id_t id); /* in: thread id of the thread */
/***********************************************************************
Sets in the local storage the slot number in the thread table of a thread. */
UNIV_INTERN
void
thr_local_set_slot_no(
/*==================*/
......@@ -54,7 +54,7 @@ thr_local_set_slot_no(
/***********************************************************************
Returns pointer to the 'in_ibuf' field within the current thread local
storage. */
UNIV_INTERN
ibool*
thr_local_get_in_ibuf_field(void);
/*=============================*/
......
......@@ -92,7 +92,7 @@ extern trx_i_s_cache_t* trx_i_s_cache;
/***********************************************************************
Initialize INFORMATION SCHEMA trx related cache. */
UNIV_INTERN
void
trx_i_s_cache_init(
/*===============*/
......@@ -100,7 +100,7 @@ trx_i_s_cache_init(
/***********************************************************************
Issue a shared/read lock on the tables cache. */
UNIV_INTERN
void
trx_i_s_cache_start_read(
/*=====================*/
......@@ -108,7 +108,7 @@ trx_i_s_cache_start_read(
/***********************************************************************
Release a shared/read lock on the tables cache. */
UNIV_INTERN
void
trx_i_s_cache_end_read(
/*===================*/
......@@ -116,7 +116,7 @@ trx_i_s_cache_end_read(
/***********************************************************************
Issue an exclusive/write lock on the tables cache. */
UNIV_INTERN
void
trx_i_s_cache_start_write(
/*======================*/
......@@ -124,7 +124,7 @@ trx_i_s_cache_start_write(
/***********************************************************************
Release an exclusive/write lock on the tables cache. */
UNIV_INTERN
void
trx_i_s_cache_end_write(
/*====================*/
......@@ -134,7 +134,7 @@ trx_i_s_cache_end_write(
/***********************************************************************
Retrieves the number of used rows in the cache for a given
INFORMATION SCHEMA table. */
UNIV_INTERN
ullint
trx_i_s_cache_get_rows_used(
/*========================*/
......@@ -145,7 +145,7 @@ trx_i_s_cache_get_rows_used(
/***********************************************************************
Retrieves the nth row in the cache for a given INFORMATION SCHEMA
table. */
UNIV_INTERN
void*
trx_i_s_cache_get_nth_row(
/*======================*/
......@@ -156,7 +156,7 @@ trx_i_s_cache_get_nth_row(
/***********************************************************************
Update the transactions cache if it has not been read for some time. */
UNIV_INTERN
int
trx_i_s_possibly_fetch_data_into_cache(
/*===================================*/
......@@ -166,7 +166,7 @@ trx_i_s_possibly_fetch_data_into_cache(
/***********************************************************************
Returns TRUE if the data in the cache is truncated due to the memory
limit posed by TRX_I_S_MEM_LIMIT. */
UNIV_INTERN
ibool
trx_i_s_cache_is_truncated(
/*=======================*/
......@@ -183,7 +183,7 @@ Crafts a lock id string from a i_s_locks_row_t object. Returns its
second argument. This function aborts if there is not enough space in
lock_id. Be sure to provide at least TRX_I_S_LOCK_ID_MAX_LEN + 1 if you
want to be 100% sure that it will not abort. */
UNIV_INTERN
char*
trx_i_s_create_lock_id(
/*===================*/
......
......@@ -38,7 +38,7 @@ trx_purge_get_log_from_hist(
/*********************************************************************
Checks if trx_id is >= purge_view: then it is guaranteed that its update
undo log still exists in the system. */
UNIV_INTERN
ibool
trx_purge_update_undo_must_exist(
/*=============================*/
......@@ -49,14 +49,14 @@ trx_purge_update_undo_must_exist(
/************************************************************************
Creates the global purge system control structure and inits the history
mutex. */
UNIV_INTERN
void
trx_purge_sys_create(void);
/*======================*/
/************************************************************************
Adds the update undo log as the first log in the history list. Removes the
update undo log segment from the rseg slot if it is too big for reuse. */
UNIV_INTERN
void
trx_purge_add_update_undo_to_history(
/*=================================*/
......@@ -67,7 +67,7 @@ trx_purge_add_update_undo_to_history(
/************************************************************************
Fetches the next undo log record from the history list to purge. It must be
released with the corresponding release function. */
UNIV_INTERN
trx_undo_rec_t*
trx_purge_fetch_next_rec(
/*=====================*/
......@@ -81,14 +81,14 @@ trx_purge_fetch_next_rec(
mem_heap_t* heap); /* in: memory heap where copied */
/***********************************************************************
Releases a reserved purge undo record. */
UNIV_INTERN
void
trx_purge_rec_release(
/*==================*/
trx_undo_inf_t* cell); /* in: storage cell */
/***********************************************************************
This function runs a purge batch. */
UNIV_INTERN
ulint
trx_purge(void);
/*===========*/
......@@ -96,7 +96,7 @@ trx_purge(void);
the batch */
/**********************************************************************
Prints information of the purge system to stderr. */
UNIV_INTERN
void
trx_purge_sys_print(void);
/*======================*/
......
......@@ -73,7 +73,7 @@ trx_undo_rec_get_ptr(
/**************************************************************************
Reads from an undo log record the general parameters. */
UNIV_INTERN
byte*
trx_undo_rec_get_pars(
/*==================*/
......@@ -90,7 +90,7 @@ trx_undo_rec_get_pars(
dulint* table_id); /* out: table id */
/***********************************************************************
Builds a row reference from an undo log record. */
UNIV_INTERN
byte*
trx_undo_rec_get_row_ref(
/*=====================*/
......@@ -108,7 +108,7 @@ trx_undo_rec_get_row_ref(
needed is allocated */
/***********************************************************************
Skips a row reference from an undo log record. */
UNIV_INTERN
byte*
trx_undo_rec_skip_row_ref(
/*======================*/
......@@ -120,7 +120,7 @@ trx_undo_rec_skip_row_ref(
/**************************************************************************
Reads from an undo log update record the system field values of the old
version. */
UNIV_INTERN
byte*
trx_undo_update_rec_get_sys_cols(
/*=============================*/
......@@ -134,7 +134,7 @@ trx_undo_update_rec_get_sys_cols(
ulint* info_bits); /* out: info bits state */
/***********************************************************************
Builds an update vector based on a remaining part of an undo log record. */
UNIV_INTERN
byte*
trx_undo_update_rec_get_update(
/*===========================*/
......@@ -163,7 +163,7 @@ trx_undo_update_rec_get_update(
/***********************************************************************
Builds a partial row from an update undo log record. It contains the
columns which occur as ordering in any index of the table. */
UNIV_INTERN
byte*
trx_undo_rec_get_partial_row(
/*=========================*/
......@@ -185,7 +185,7 @@ Writes information to an undo log about an insert, update, or a delete marking
of a clustered index record. This information is used in a rollback of the
transaction and in consistent reads that must look to the history of this
transaction. */
UNIV_INTERN
ulint
trx_undo_report_row_operation(
/*==========================*/
......@@ -213,7 +213,7 @@ trx_undo_report_row_operation(
/**********************************************************************
Copies an undo record to heap. This function can be called if we know that
the undo log record exists. */
UNIV_INTERN
trx_undo_rec_t*
trx_undo_get_undo_rec_low(
/*======================*/
......@@ -222,7 +222,7 @@ trx_undo_get_undo_rec_low(
mem_heap_t* heap); /* in: memory heap where copied */
/**********************************************************************
Copies an undo record to heap. */
UNIV_INTERN
ulint
trx_undo_get_undo_rec(
/*==================*/
......@@ -243,7 +243,7 @@ Build a previous version of a clustered index record. This function checks
that the caller has a latch on the index page of the clustered index record
and an s-latch on the purge_view. This guarantees that the stack of versions
is locked. */
UNIV_INTERN
ulint
trx_undo_prev_version_build(
/*========================*/
......@@ -265,7 +265,7 @@ trx_undo_prev_version_build(
history data has been deleted */
/***************************************************************
Parses a redo log record of adding an undo log record. */
UNIV_INTERN
byte*
trx_undo_parse_add_undo_rec(
/*========================*/
......@@ -275,7 +275,7 @@ trx_undo_parse_add_undo_rec(
page_t* page); /* in: page or NULL */
/***************************************************************
Parses a redo log record of erasing of an undo page end. */
UNIV_INTERN
byte*
trx_undo_parse_erase_page_end(
/*==========================*/
......
......@@ -17,7 +17,7 @@ Created 3/26/1996 Heikki Tuuri
/***********************************************************************
Returns a transaction savepoint taken at this point in time. */
UNIV_INTERN
trx_savept_t
trx_savept_take(
/*============*/
......@@ -25,13 +25,13 @@ trx_savept_take(
trx_t* trx); /* in: transaction */
/***********************************************************************
Creates an undo number array. */
UNIV_INTERN
trx_undo_arr_t*
trx_undo_arr_create(void);
/*=====================*/
/***********************************************************************
Frees an undo number array. */
UNIV_INTERN
void
trx_undo_arr_free(
/*==============*/
......@@ -47,7 +47,7 @@ trx_undo_arr_get_nth_info(
ulint n); /* in: position */
/***************************************************************************
Tries truncate the undo logs. */
UNIV_INTERN
void
trx_roll_try_truncate(
/*==================*/
......@@ -58,7 +58,7 @@ as a single stack of records ordered by their undo numbers. Inserts the
undo number of the popped undo record to the array of currently processed
undo numbers in the transaction. When the query thread finishes processing
of this undo record, it must be released with trx_undo_rec_release. */
UNIV_INTERN
trx_undo_rec_t*
trx_roll_pop_top_rec_of_trx(
/*========================*/
......@@ -73,7 +73,7 @@ trx_roll_pop_top_rec_of_trx(
Reserves an undo log record for a query thread to undo. This should be
called if the query thread gets the undo log record not using the pop
function above. */
UNIV_INTERN
ibool
trx_undo_rec_reserve(
/*=================*/
......@@ -82,7 +82,7 @@ trx_undo_rec_reserve(
dulint undo_no);/* in: undo number of the record */
/***********************************************************************
Releases a reserved undo record. */
UNIV_INTERN
void
trx_undo_rec_release(
/*=================*/
......@@ -90,7 +90,7 @@ trx_undo_rec_release(
dulint undo_no);/* in: undo number */
/*************************************************************************
Starts a rollback operation. */
UNIV_INTERN
void
trx_rollback(
/*=========*/
......@@ -107,7 +107,7 @@ encountered in crash recovery. If the 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. */
UNIV_INTERN
os_thread_ret_t
trx_rollback_or_clean_all_recovered(
/*================================*/
......@@ -117,7 +117,7 @@ trx_rollback_or_clean_all_recovered(
os_thread_create */
/********************************************************************
Finishes a transaction rollback. */
UNIV_INTERN
void
trx_finish_rollback_off_kernel(
/*===========================*/
......@@ -134,7 +134,7 @@ Builds an undo 'query' graph for a transaction. The actual rollback is
performed by executing this query graph like a query subprocedure call.
The reply about the completion of the rollback will be sent by this
graph. */
UNIV_INTERN
que_t*
trx_roll_graph_build(
/*=================*/
......@@ -142,7 +142,7 @@ trx_roll_graph_build(
trx_t* trx); /* in: trx handle */
/*************************************************************************
Creates a rollback command node struct. */
UNIV_INTERN
roll_node_t*
roll_node_create(
/*=============*/
......@@ -150,7 +150,7 @@ roll_node_create(
mem_heap_t* heap); /* in: mem heap where created */
/***************************************************************
Performs an execution step for a rollback command node in a query graph. */
UNIV_INTERN
que_thr_t*
trx_rollback_step(
/*==============*/
......@@ -158,7 +158,7 @@ trx_rollback_step(
que_thr_t* thr); /* in: query thread */
/***********************************************************************
Rollback a transaction used in MySQL. */
UNIV_INTERN
int
trx_rollback_for_mysql(
/*===================*/
......@@ -166,7 +166,7 @@ trx_rollback_for_mysql(
trx_t* trx); /* in: transaction handle */
/***********************************************************************
Rollback the latest SQL statement for MySQL. */
UNIV_INTERN
int
trx_rollback_last_sql_stat_for_mysql(
/*=================================*/
......@@ -174,7 +174,7 @@ trx_rollback_last_sql_stat_for_mysql(
trx_t* trx); /* in: transaction handle */
/***********************************************************************
Rollback a transaction used in MySQL. */
UNIV_INTERN
int
trx_general_rollback_for_mysql(
/*===========================*/
......@@ -190,7 +190,7 @@ which are stored in memory. If a lock is 'implicit', that is, a new inserted
row holds a lock where the lock information is carried by the trx id stored in
the row, these locks are naturally released in the rollback. Savepoints which
were set after this savepoint are deleted. */
UNIV_INTERN
ulint
trx_rollback_to_savepoint_for_mysql(
/*================================*/
......@@ -211,7 +211,7 @@ Creates a named savepoint. If the transaction is not yet started, starts it.
If there is already a savepoint of the same name, this call erases that old
savepoint and replaces it with a new. Savepoints are deleted in a transaction
commit or rollback. */
UNIV_INTERN
ulint
trx_savepoint_for_mysql(
/*====================*/
......@@ -226,7 +226,7 @@ trx_savepoint_for_mysql(
/***********************************************************************
Releases a named savepoint. Savepoints which
were set after this savepoint are deleted. */
UNIV_INTERN
ulint
trx_release_savepoint_for_mysql(
/*============================*/
......@@ -239,7 +239,7 @@ trx_release_savepoint_for_mysql(
/***********************************************************************
Frees savepoint structs. */
UNIV_INTERN
void
trx_roll_savepoints_free(
/*=====================*/
......
......@@ -71,7 +71,7 @@ trx_rsegf_undo_find_free(
mtr_t* mtr); /* in: mtr */
/**********************************************************************
Looks for a rollback segment, based on the rollback segment id. */
UNIV_INTERN
trx_rseg_t*
trx_rseg_get_on_id(
/*===============*/
......@@ -80,7 +80,7 @@ trx_rseg_get_on_id(
/********************************************************************
Creates a rollback segment header. This function is called only when
a new rollback segment is created in the database. */
UNIV_INTERN
ulint
trx_rseg_header_create(
/*===================*/
......@@ -95,7 +95,7 @@ trx_rseg_header_create(
/*************************************************************************
Creates the memory copies for rollback segments and initializes the
rseg list and array in trx_sys at a database startup. */
UNIV_INTERN
void
trx_rseg_list_and_array_init(
/*=========================*/
......@@ -103,7 +103,7 @@ trx_rseg_list_and_array_init(
mtr_t* mtr); /* in: mtr */
/********************************************************************
Creates a new rollback segment to the database. */
UNIV_INTERN
trx_rseg_t*
trx_rseg_create(
/*============*/
......
......@@ -52,7 +52,7 @@ extern ibool trx_sys_multiple_tablespace_format;
/********************************************************************
Creates the doublewrite buffer to a new InnoDB installation. The header of the
doublewrite buffer is placed on the trx system header page. */
UNIV_INTERN
void
trx_sys_create_doublewrite_buf(void);
/*================================*/
......@@ -63,7 +63,7 @@ upgrading to an InnoDB version which supports multiple tablespaces, then this
function performs the necessary update operations. If we are in a crash
recovery, this function uses a possible doublewrite buffer to restore
half-written pages in the data files. */
UNIV_INTERN
void
trx_sys_doublewrite_init_or_restore_pages(
/*======================================*/
......@@ -71,13 +71,13 @@ trx_sys_doublewrite_init_or_restore_pages(
/********************************************************************
Marks the trx sys header when we have successfully upgraded to the >= 4.1.x
multiple tablespace format. */
UNIV_INTERN
void
trx_sys_mark_upgraded_to_multiple_tablespaces(void);
/*===============================================*/
/********************************************************************
Determines if a page number is located inside the doublewrite buffer. */
UNIV_INTERN
ibool
trx_doublewrite_page_inside(
/*========================*/
......@@ -96,19 +96,19 @@ trx_sys_hdr_page(
/*********************************************************************
Creates and initializes the central memory structures for the transaction
system. This is called when the database is started. */
UNIV_INTERN
void
trx_sys_init_at_db_start(void);
/*==========================*/
/*********************************************************************
Creates and initializes the transaction system at the database creation. */
UNIV_INTERN
void
trx_sys_create(void);
/*================*/
/********************************************************************
Looks for a free slot for a rollback segment in the trx system file copy. */
UNIV_INTERN
ulint
trx_sysf_rseg_find_free(
/*====================*/
......@@ -252,7 +252,7 @@ trx_is_active(
dulint trx_id);/* in: trx id of the transaction */
/********************************************************************
Checks that trx is in the trx list. */
UNIV_INTERN
ibool
trx_in_trx_list(
/*============*/
......@@ -263,7 +263,7 @@ Updates the offset information about the end of the MySQL binlog entry
which corresponds to the transaction just being committed. In a MySQL
replication slave updates the latest master binlog position up to which
replication has proceeded. */
UNIV_INTERN
void
trx_sys_update_mysql_binlog_offset(
/*===============================*/
......@@ -275,7 +275,7 @@ trx_sys_update_mysql_binlog_offset(
/*********************************************************************
Prints to stderr the MySQL binlog offset info in the trx system header if
the magic number shows it valid. */
UNIV_INTERN
void
trx_sys_print_mysql_binlog_offset(void);
/*===================================*/
......@@ -283,7 +283,7 @@ trx_sys_print_mysql_binlog_offset(void);
/*********************************************************************
Prints to stderr the MySQL binlog info in the system header if the
magic number shows it valid. */
UNIV_INTERN
void
trx_sys_print_mysql_binlog_offset_from_page(
/*========================================*/
......@@ -294,7 +294,7 @@ trx_sys_print_mysql_binlog_offset_from_page(
/*********************************************************************
Prints to stderr the MySQL master log offset info in the trx system header if
the magic number shows it valid. */
UNIV_INTERN
void
trx_sys_print_mysql_master_log_pos(void);
/*====================================*/
......
......@@ -56,13 +56,14 @@ trx_new_rec_locks_contain(
dict_index_t* index); /* in: index */
/************************************************************************
Releases the search latch if trx has reserved it. */
UNIV_INTERN
void
trx_search_latch_release_if_reserved(
/*=================================*/
trx_t* trx); /* in: transaction */
/**********************************************************************
Set detailed error message for the transaction. */
UNIV_INTERN
void
trx_set_detailed_error(
/*===================*/
......@@ -71,7 +72,7 @@ trx_set_detailed_error(
/*****************************************************************
Set detailed error message for the transaction from a file. Note that the
file is rewinded before reading from it. */
UNIV_INTERN
void
trx_set_detailed_error_from_file(
/*=============================*/
......@@ -87,7 +88,7 @@ trx_get_error_info(
const trx_t* trx); /* in: trx object */
/********************************************************************
Creates and initializes a transaction object. */
UNIV_INTERN
trx_t*
trx_create(
/*=======*/
......@@ -96,35 +97,35 @@ trx_create(
__attribute__((nonnull));
/************************************************************************
Creates a transaction object for MySQL. */
UNIV_INTERN
trx_t*
trx_allocate_for_mysql(void);
/*========================*/
/* out, own: transaction object */
/************************************************************************
Creates a transaction object for background operations by the master thread. */
UNIV_INTERN
trx_t*
trx_allocate_for_background(void);
/*=============================*/
/* out, own: transaction object */
/************************************************************************
Frees a transaction object. */
UNIV_INTERN
void
trx_free(
/*=====*/
trx_t* trx); /* in, own: trx object */
/************************************************************************
Frees a transaction object for MySQL. */
UNIV_INTERN
void
trx_free_for_mysql(
/*===============*/
trx_t* trx); /* in, own: trx object */
/************************************************************************
Frees a transaction object of a background operation of the master thread. */
UNIV_INTERN
void
trx_free_for_background(
/*====================*/
......@@ -135,13 +136,13 @@ trx_sys at database start. Rollback segment and undo log lists must
already exist when this function is called, because the lists of
transactions to be rolled back or cleaned up are built based on the
undo log lists. */
UNIV_INTERN
void
trx_lists_init_at_db_start(void);
/*============================*/
/********************************************************************
Starts a new transaction. */
UNIV_INTERN
ibool
trx_start(
/*======*/
......@@ -153,7 +154,7 @@ trx_start(
automatically in a round-robin fashion */
/********************************************************************
Starts a new transaction. */
UNIV_INTERN
ibool
trx_start_low(
/*==========*/
......@@ -179,7 +180,7 @@ trx_start_if_not_started_low(
trx_t* trx); /* in: transaction */
/********************************************************************
Commits a transaction. */
UNIV_INTERN
void
trx_commit_off_kernel(
/*==================*/
......@@ -188,14 +189,14 @@ trx_commit_off_kernel(
Cleans up a transaction at database startup. The cleanup is needed if
the transaction already got to the middle of a commit when the database
crashed, andf we cannot roll it back. */
UNIV_INTERN
void
trx_cleanup_at_db_startup(
/*======================*/
trx_t* trx); /* in: transaction */
/**************************************************************************
Does the transaction commit for MySQL. */
UNIV_INTERN
ulint
trx_commit_for_mysql(
/*=================*/
......@@ -203,7 +204,7 @@ trx_commit_for_mysql(
trx_t* trx); /* in: trx handle */
/**************************************************************************
Does the transaction prepare for MySQL. */
UNIV_INTERN
ulint
trx_prepare_for_mysql(
/*==================*/
......@@ -212,7 +213,7 @@ trx_prepare_for_mysql(
/**************************************************************************
This function is used to find number of prepared transactions and
their transaction objects for a recovery. */
UNIV_INTERN
int
trx_recover_for_mysql(
/*==================*/
......@@ -222,6 +223,7 @@ trx_recover_for_mysql(
/***********************************************************************
This function is used to find one X/Open XA distributed transaction
which is in the prepared state */
UNIV_INTERN
trx_t *
trx_get_trx_by_xid(
/*===============*/
......@@ -230,7 +232,7 @@ trx_get_trx_by_xid(
/**************************************************************************
If required, flushes the log to disk if we called trx_commit_for_mysql()
with trx->flush_log_later == TRUE. */
UNIV_INTERN
ulint
trx_commit_complete_for_mysql(
/*==========================*/
......@@ -238,7 +240,7 @@ trx_commit_complete_for_mysql(
trx_t* trx); /* in: trx handle */
/**************************************************************************
Marks the latest SQL statement ended. */
UNIV_INTERN
void
trx_mark_sql_stat_end(
/*==================*/
......@@ -247,7 +249,7 @@ trx_mark_sql_stat_end(
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
when this function is first called for a new started transaction. */
UNIV_INTERN
read_view_t*
trx_assign_read_view(
/*=================*/
......@@ -257,14 +259,14 @@ trx_assign_read_view(
The transaction must be in the TRX_QUE_LOCK_WAIT state. Puts it to
the TRX_QUE_RUNNING state and releases query threads which were
waiting for a lock in the wait_thrs list. */
UNIV_INTERN
void
trx_end_lock_wait(
/*==============*/
trx_t* trx); /* in: transaction */
/********************************************************************
Sends a signal to a trx object. */
UNIV_INTERN
void
trx_sig_send(
/*=========*/
......@@ -286,7 +288,7 @@ trx_sig_send(
/********************************************************************
Send the reply message when a signal in the queue of the trx has
been handled. */
UNIV_INTERN
void
trx_sig_reply(
/*==========*/
......@@ -298,7 +300,7 @@ trx_sig_reply(
a new query thread */
/********************************************************************
Removes the signal object from a trx signal queue. */
UNIV_INTERN
void
trx_sig_remove(
/*===========*/
......@@ -306,7 +308,7 @@ trx_sig_remove(
trx_sig_t* sig); /* in, own: signal */
/********************************************************************
Starts handling of a trx signal. */
UNIV_INTERN
void
trx_sig_start_handle(
/*=================*/
......@@ -321,14 +323,14 @@ Ends signal handling. If the session is in the error state, and
trx->graph_before_signal_handling != NULL, returns control to the error
handling routine of the graph (currently only returns the control to the
graph root which then sends an error message to the client). */
UNIV_INTERN
void
trx_end_signal_handling(
/*====================*/
trx_t* trx); /* in: trx */
/*************************************************************************
Creates a commit command node struct. */
UNIV_INTERN
commit_node_t*
commit_node_create(
/*===============*/
......@@ -336,7 +338,7 @@ commit_node_create(
mem_heap_t* heap); /* in: mem heap where created */
/***************************************************************
Performs an execution step for a commit type node in a query graph. */
UNIV_INTERN
que_thr_t*
trx_commit_step(
/*============*/
......@@ -348,7 +350,7 @@ Prints info about a transaction to the given file. The caller must own the
kernel mutex and must have called
innobase_mysql_prepare_print_arbitrary_thd(), unless he knows that MySQL
or InnoDB cannot meanwhile change the info printed here. */
UNIV_INTERN
void
trx_print(
/*======*/
......@@ -394,7 +396,7 @@ trx_set_dict_operation(
#ifndef UNIV_HOTBACKUP
/**************************************************************************
Determines if the currently running transaction has been interrupted. */
UNIV_INTERN
ibool
trx_is_interrupted(
/*===============*/
......@@ -416,7 +418,7 @@ is estimated as the number of altered rows + the number of locked rows.
Compares the "weight" (or size) of two transactions. Transactions that
have edited non-transactional tables are considered heavier than ones
that have not. */
UNIV_INTERN
int
trx_weight_cmp(
/*===========*/
......
......@@ -136,7 +136,7 @@ trx_undo_page_get_first_rec(
ulint offset);/* in: undo log header offset on page */
/***************************************************************************
Gets the previous record in an undo log. */
UNIV_INTERN
trx_undo_rec_t*
trx_undo_get_prev_rec(
/*==================*/
......@@ -148,7 +148,7 @@ trx_undo_get_prev_rec(
mtr_t* mtr); /* in: mtr */
/***************************************************************************
Gets the next record in an undo log. */
UNIV_INTERN
trx_undo_rec_t*
trx_undo_get_next_rec(
/*==================*/
......@@ -160,7 +160,7 @@ trx_undo_get_next_rec(
mtr_t* mtr); /* in: mtr */
/***************************************************************************
Gets the first record in an undo log. */
UNIV_INTERN
trx_undo_rec_t*
trx_undo_get_first_rec(
/*===================*/
......@@ -175,7 +175,7 @@ trx_undo_get_first_rec(
mtr_t* mtr); /* in: mtr */
/************************************************************************
Tries to add a page to the undo log segment where the undo log is placed. */
UNIV_INTERN
ulint
trx_undo_add_page(
/*==============*/
......@@ -189,7 +189,7 @@ trx_undo_add_page(
/***************************************************************************
Truncates an undo log from the end. This function is used during a rollback
to free space from an undo log. */
UNIV_INTERN
void
trx_undo_truncate_end(
/*==================*/
......@@ -200,7 +200,7 @@ trx_undo_truncate_end(
/***************************************************************************
Truncates an undo log from the start. This function is used during a purge
operation. */
UNIV_INTERN
void
trx_undo_truncate_start(
/*====================*/
......@@ -217,7 +217,7 @@ trx_undo_truncate_start(
Initializes the undo log lists for a rollback segment memory copy.
This function is only called when the database is started or a new
rollback segment created. */
UNIV_INTERN
ulint
trx_undo_lists_init(
/*================*/
......@@ -227,7 +227,7 @@ trx_undo_lists_init(
/**************************************************************************
Assigns an undo log for a transaction. A new undo log is created or a cached
undo log reused. */
UNIV_INTERN
ulint
trx_undo_assign_undo(
/*=================*/
......@@ -240,7 +240,7 @@ trx_undo_assign_undo(
ulint type); /* in: TRX_UNDO_INSERT or TRX_UNDO_UPDATE */
/**********************************************************************
Sets the state of the undo log segment at a transaction finish. */
UNIV_INTERN
page_t*
trx_undo_set_state_at_finish(
/*=========================*/
......@@ -251,7 +251,7 @@ trx_undo_set_state_at_finish(
mtr_t* mtr); /* in: mtr */
/**********************************************************************
Sets the state of the undo log segment at a transaction prepare. */
UNIV_INTERN
page_t*
trx_undo_set_state_at_prepare(
/*==========================*/
......@@ -265,7 +265,7 @@ trx_undo_set_state_at_prepare(
Adds the update undo log header as the first in the history list, and
frees the memory object, or puts it to the list of cached update undo log
segments. */
UNIV_INTERN
void
trx_undo_update_cleanup(
/*====================*/
......@@ -277,14 +277,14 @@ trx_undo_update_cleanup(
Frees or caches an insert undo log after a transaction commit or rollback.
Knowledge of inserts is not needed after a commit or rollback, therefore
the data can be discarded. */
UNIV_INTERN
void
trx_undo_insert_cleanup(
/*====================*/
trx_t* trx); /* in: transaction handle */
/***************************************************************
Parses the redo log entry of an undo log page initialization. */
UNIV_INTERN
byte*
trx_undo_parse_page_init(
/*=====================*/
......@@ -295,7 +295,7 @@ trx_undo_parse_page_init(
mtr_t* mtr); /* in: mtr or NULL */
/***************************************************************
Parses the redo log entry of an undo log page header create or reuse. */
UNIV_INTERN
byte*
trx_undo_parse_page_header(
/*=======================*/
......@@ -307,7 +307,7 @@ trx_undo_parse_page_header(
mtr_t* mtr); /* in: mtr or NULL */
/***************************************************************
Parses the redo log entry of an undo log page header discard. */
UNIV_INTERN
byte*
trx_undo_parse_discard_latest(
/*==========================*/
......
......@@ -21,7 +21,7 @@ Created 6/25/1996 Heikki Tuuri
/*************************************************************************
Opens a session. */
UNIV_INTERN
sess_t*
sess_open(void);
/*============*/
......@@ -29,7 +29,7 @@ sess_open(void);
/*************************************************************************
Closes a session, freeing the memory occupied by it, if it is in a state
where it should be closed. */
UNIV_INTERN
ibool
sess_try_close(
/*===========*/
......
......@@ -183,11 +183,15 @@ Increments a dulint variable by 1. */
Tests if two dulints are equal. */
#define UT_DULINT_EQ(D1, D2) (((D1).low == (D2).low)\
&& ((D1).high == (D2).high))
#ifdef notdefined
/****************************************************************
Sort function for dulint arrays. */
UNIV_INTERN
void
ut_dulint_sort(dulint* arr, dulint* aux_arr, ulint low, ulint high);
/*===============================================================*/
#endif /* notdefined */
/************************************************************
The following function calculates the value of an integer n rounded
to the least product of align_no which is >= n. align_no has to be a
......
......@@ -23,7 +23,7 @@ extern ulint ut_dbg_zero; /* This is used to eliminate
/*****************************************************************
Report a failed assertion. */
UNIV_INTERN
void
ut_dbg_assertion_failed(
/*====================*/
......@@ -59,7 +59,7 @@ extern ibool ut_dbg_stop_threads;
/*****************************************************************
Stop a thread after assertion failure. */
UNIV_INTERN
void
ut_dbg_stop_thread(
/*===============*/
......@@ -124,7 +124,7 @@ typedef struct speedo_struct {
/***********************************************************************
Resets a speedo (records the current time in it). */
UNIV_INTERN
void
speedo_reset(
/*=========*/
......@@ -133,7 +133,7 @@ speedo_reset(
/***********************************************************************
Shows the time elapsed and usage statistics since the last reset of a
speedo. */
UNIV_INTERN
void
speedo_show(
/*========*/
......
......@@ -31,7 +31,7 @@ typedef struct ib_list_helper_struct ib_list_helper_t;
/********************************************************************
Create a new list using mem_alloc. Lists created with this function must be
freed with ib_list_free. */
UNIV_INTERN
ib_list_t*
ib_list_create(void);
/*=================*/
......@@ -41,7 +41,7 @@ ib_list_create(void);
/********************************************************************
Create a new list using the given heap. ib_list_free MUST NOT BE CALLED for
lists created with this function. */
UNIV_INTERN
ib_list_t*
ib_list_create_heap(
/*================*/
......@@ -50,7 +50,7 @@ ib_list_create_heap(
/********************************************************************
Free a list. */
UNIV_INTERN
void
ib_list_free(
/*=========*/
......@@ -58,7 +58,7 @@ ib_list_free(
/********************************************************************
Add the data to the start of the list. */
UNIV_INTERN
ib_list_node_t*
ib_list_add_first(
/*==============*/
......@@ -69,7 +69,7 @@ ib_list_add_first(
/********************************************************************
Add the data to the end of the list. */
UNIV_INTERN
ib_list_node_t*
ib_list_add_last(
/*=============*/
......@@ -80,7 +80,7 @@ ib_list_add_last(
/********************************************************************
Add the data after the indicated node. */
UNIV_INTERN
ib_list_node_t*
ib_list_add_after(
/*==============*/
......@@ -93,7 +93,7 @@ ib_list_add_after(
/********************************************************************
Remove the node from the list. */
UNIV_INTERN
void
ib_list_remove(
/*===========*/
......
......@@ -32,7 +32,7 @@ ut_memcmp(const void* str1, const void* str2, ulint n);
/**************************************************************************
Allocates memory. Sets it also to zero if UNIV_SET_MEM_TO_ZERO is
defined and set_to_zero is TRUE. */
UNIV_INTERN
void*
ut_malloc_low(
/*==========*/
......@@ -46,7 +46,7 @@ ut_malloc_low(
/**************************************************************************
Allocates memory. Sets it also to zero if UNIV_SET_MEM_TO_ZERO is
defined. */
UNIV_INTERN
void*
ut_malloc(
/*======*/
......@@ -56,7 +56,7 @@ ut_malloc(
Tests if malloc of n bytes would succeed. ut_malloc() asserts if memory runs
out. It cannot be used if we want to return an error message. Prints to
stderr a message if fails. */
UNIV_INTERN
ibool
ut_test_malloc(
/*===========*/
......@@ -64,7 +64,7 @@ ut_test_malloc(
ulint n); /* in: try to allocate this many bytes */
/**************************************************************************
Frees a memory block allocated with ut_malloc. */
UNIV_INTERN
void
ut_free(
/*====*/
......@@ -93,7 +93,7 @@ RETURN VALUE
be passed to free() is returned. If realloc() fails the
original block is left untouched - it is not freed or
moved. */
UNIV_INTERN
void*
ut_realloc(
/*=======*/
......@@ -102,7 +102,7 @@ ut_realloc(
ulint size); /* in: desired size */
/**************************************************************************
Frees in shutdown all allocated memory not freed yet. */
UNIV_INTERN
void
ut_free_all_mem(void);
/*=================*/
......@@ -123,7 +123,7 @@ ut_strcmp(const char* str1, const char* str2);
Copies up to size - 1 characters from the NUL-terminated string src to
dst, NUL-terminating the result. Returns strlen(src), so truncation
occurred if the return value >= size. */
UNIV_INTERN
ulint
ut_strlcpy(
/*=======*/
......@@ -135,7 +135,7 @@ ut_strlcpy(
/**************************************************************************
Like ut_strlcpy, but if src doesn't fit in dst completely, copies the last
(size - 1) bytes of src, not the first. */
UNIV_INTERN
ulint
ut_strlcpy_rev(
/*===========*/
......@@ -158,7 +158,7 @@ ut_strlenq(
Make a quoted copy of a NUL-terminated string. Leading and trailing
quotes will not be included; only embedded quotes will be escaped.
See also ut_strlenq() and ut_memcpyq(). */
UNIV_INTERN
char*
ut_strcpyq(
/*=======*/
......@@ -171,7 +171,7 @@ ut_strcpyq(
Make a quoted copy of a fixed-length string. Leading and trailing
quotes will not be included; only embedded quotes will be escaped.
See also ut_strlenq() and ut_strcpyq(). */
UNIV_INTERN
char*
ut_memcpyq(
/*=======*/
......@@ -184,7 +184,7 @@ ut_memcpyq(
/**************************************************************************
Return the number of times s2 occurs in s1. Overlapping instances of s2
are only counted once. */
UNIV_INTERN
ulint
ut_strcount(
/*========*/
......@@ -195,7 +195,7 @@ ut_strcount(
/**************************************************************************
Replace every occurrence of s1 in str with s2. Overlapping instances of s1
are only replaced once. */
UNIV_INTERN
char*
ut_strreplace(
/*==========*/
......
......@@ -110,7 +110,7 @@ ut_fold_binary(
/***************************************************************
Looks for a prime number slightly greater than the given argument.
The prime is chosen so that it is not near any power of 2. */
UNIV_INTERN
ulint
ut_find_prime(
/*==========*/
......
......@@ -39,7 +39,7 @@ do { \
Gets the high 32 bits in a ulint. That is makes a shift >> 32,
but since there seem to be compiler bugs in both gcc and Visual C++,
we do this by a special conversion. */
UNIV_INTERN
ulint
ut_get_high32(
/*==========*/
......@@ -140,7 +140,7 @@ ut_2_exp(
ulint n); /* in: number */
/*****************************************************************
Calculates fast the number rounded up to the nearest power of 2. */
UNIV_INTERN
ulint
ut_2_power_up(
/*==========*/
......@@ -155,13 +155,13 @@ store the given number of bits. */
/**************************************************************
Returns system time. We do not specify the format of the time returned:
the only way to manipulate it is to use the function ut_difftime. */
UNIV_INTERN
ib_time_t
ut_time(void);
/*=========*/
/**************************************************************
Returns system time. */
UNIV_INTERN
void
ut_usectime(
/*========*/
......@@ -172,7 +172,7 @@ ut_usectime(
Returns the number of microseconds since epoch. Similar to
time(3), the return value is also stored in *tloc, provided
that tloc is non-NULL. */
UNIV_INTERN
ullint
ut_time_us(
/*=======*/
......@@ -181,7 +181,7 @@ ut_time_us(
/**************************************************************
Returns the difference of two times in seconds. */
UNIV_INTERN
double
ut_difftime(
/*========*/
......@@ -190,14 +190,14 @@ ut_difftime(
ib_time_t time1); /* in: time */
/**************************************************************
Prints a timestamp to a file. */
UNIV_INTERN
void
ut_print_timestamp(
/*===============*/
FILE* file); /* in: file where to print */
/**************************************************************
Sprintfs a timestamp to a buffer, 13..14 chars plus terminating NUL. */
UNIV_INTERN
void
ut_sprintf_timestamp(
/*=================*/
......@@ -205,14 +205,14 @@ ut_sprintf_timestamp(
/**************************************************************
Sprintfs a timestamp to a buffer with no spaces and with ':' characters
replaced by '_'. */
UNIV_INTERN
void
ut_sprintf_timestamp_without_extra_chars(
/*=====================================*/
char* buf); /* in: buffer where to sprintf */
/**************************************************************
Returns current year, month, day. */
UNIV_INTERN
void
ut_get_year_month_day(
/*==================*/
......@@ -222,7 +222,7 @@ ut_get_year_month_day(
/*****************************************************************
Runs an idle loop on CPU. The argument gives the desired delay
in microseconds on 100 MHz Pentium + Visual C++. */
UNIV_INTERN
ulint
ut_delay(
/*=====*/
......@@ -230,7 +230,7 @@ ut_delay(
ulint delay); /* in: delay in microseconds on 100 MHz Pentium */
/*****************************************************************
Prints the contents of a memory buffer in hex and ascii. */
UNIV_INTERN
void
ut_print_buf(
/*=========*/
......@@ -240,7 +240,7 @@ ut_print_buf(
/**************************************************************************
Outputs a NUL-terminated file name, quoted with apostrophes. */
UNIV_INTERN
void
ut_print_filename(
/*==============*/
......@@ -255,7 +255,7 @@ Outputs a fixed-length string, quoted as an SQL identifier.
If the string contains a slash '/', the string will be
output as two identifiers separated by a period (.),
as in SQL database_name.identifier. */
UNIV_INTERN
void
ut_print_name(
/*==========*/
......@@ -270,7 +270,7 @@ Outputs a fixed-length string, quoted as an SQL identifier.
If the string contains a slash '/', the string will be
output as two identifiers separated by a period (.),
as in SQL database_name.identifier. */
UNIV_INTERN
void
ut_print_namel(
/*===========*/
......@@ -283,7 +283,7 @@ ut_print_namel(
/**************************************************************************
Catenate files. */
UNIV_INTERN
void
ut_copy_file(
/*=========*/
......
......@@ -22,7 +22,7 @@ typedef struct ib_vector_struct ib_vector_t;
/********************************************************************
Create a new vector with the given initial size. */
UNIV_INTERN
ib_vector_t*
ib_vector_create(
/*=============*/
......@@ -32,7 +32,7 @@ ib_vector_create(
/********************************************************************
Push a new element to the vector, increasing its size if necessary. */
UNIV_INTERN
void
ib_vector_push(
/*===========*/
......
......@@ -17,7 +17,7 @@ typedef struct ib_wqueue_struct ib_wqueue_t;
/********************************************************************
Create a new work queue. */
UNIV_INTERN
ib_wqueue_t*
ib_wqueue_create(void);
/*===================*/
......@@ -25,7 +25,7 @@ ib_wqueue_create(void);
/********************************************************************
Free a work queue. */
UNIV_INTERN
void
ib_wqueue_free(
/*===========*/
......@@ -33,7 +33,7 @@ ib_wqueue_free(
/********************************************************************
Add a work item to the queue. */
UNIV_INTERN
void
ib_wqueue_add(
/*==========*/
......@@ -44,7 +44,7 @@ ib_wqueue_add(
/********************************************************************
Wait for a work item to appear in the queue. */
UNIV_INTERN
void*
ib_wqueue_wait(
/* out: work item */
......
......@@ -23,6 +23,7 @@ UNIV_INTERN const dulint ut_dulint_max = {0xFFFFFFFFUL, 0xFFFFFFFFUL};
/****************************************************************
Sort function for dulint arrays. */
UNIV_INTERN
void
ut_dulint_sort(dulint* arr, dulint* aux_arr, ulint low, ulint high)
/*===============================================================*/
......
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