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 */ ...@@ -57,7 +57,7 @@ insert buffer to speed up inserts */
/****************************************************************** /******************************************************************
Gets the root node of a tree and x-latches it. */ Gets the root node of a tree and x-latches it. */
UNIV_INTERN
page_t* page_t*
btr_root_get( btr_root_get(
/*=========*/ /*=========*/
...@@ -134,7 +134,7 @@ btr_page_get_prev( ...@@ -134,7 +134,7 @@ btr_page_get_prev(
/***************************************************************** /*****************************************************************
Gets pointer to the previous user record in the tree. It is assumed 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. */ that the caller has appropriate latches on the page and its neighbor. */
UNIV_INTERN
rec_t* rec_t*
btr_get_prev_user_rec( btr_get_prev_user_rec(
/*==================*/ /*==================*/
...@@ -145,7 +145,7 @@ 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 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. */ that the caller has appropriate latches on the page and its neighbor. */
UNIV_INTERN
rec_t* rec_t*
btr_get_next_user_rec( btr_get_next_user_rec(
/*==================*/ /*==================*/
...@@ -174,7 +174,7 @@ btr_node_ptr_get_child_page_no( ...@@ -174,7 +174,7 @@ btr_node_ptr_get_child_page_no(
const ulint* offsets);/* in: array returned by rec_get_offsets() */ const ulint* offsets);/* in: array returned by rec_get_offsets() */
/**************************************************************** /****************************************************************
Creates the root node for a new index tree. */ Creates the root node for a new index tree. */
UNIV_INTERN
ulint ulint
btr_create( btr_create(
/*=======*/ /*=======*/
...@@ -190,7 +190,7 @@ btr_create( ...@@ -190,7 +190,7 @@ btr_create(
/**************************************************************** /****************************************************************
Frees a B-tree except the root page, which MUST be freed after this Frees a B-tree except the root page, which MUST be freed after this
by calling btr_free_root. */ by calling btr_free_root. */
UNIV_INTERN
void void
btr_free_but_not_root( btr_free_but_not_root(
/*==================*/ /*==================*/
...@@ -200,7 +200,7 @@ btr_free_but_not_root( ...@@ -200,7 +200,7 @@ btr_free_but_not_root(
ulint root_page_no); /* in: root page number */ ulint root_page_no); /* in: root page number */
/**************************************************************** /****************************************************************
Frees the B-tree root page. Other tree MUST already have been freed. */ Frees the B-tree root page. Other tree MUST already have been freed. */
UNIV_INTERN
void void
btr_free_root( btr_free_root(
/*==========*/ /*==========*/
...@@ -216,7 +216,7 @@ the tuple. It is assumed that mtr contains an x-latch on the tree. ...@@ -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, NOTE that the operation of this function must always succeed,
we cannot reverse it: therefore enough free disk space must be we cannot reverse it: therefore enough free disk space must be
guaranteed to be available before this function is called. */ guaranteed to be available before this function is called. */
UNIV_INTERN
rec_t* rec_t*
btr_root_raise_and_insert( btr_root_raise_and_insert(
/*======================*/ /*======================*/
...@@ -234,7 +234,7 @@ IMPORTANT: if btr_page_reorganize() is invoked on a compressed leaf ...@@ -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 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 buffer free bits in the same mini-transaction in such a way that the
modification will be redo-logged. */ modification will be redo-logged. */
UNIV_INTERN
ibool ibool
btr_page_reorganize( btr_page_reorganize(
/*================*/ /*================*/
...@@ -245,7 +245,7 @@ btr_page_reorganize( ...@@ -245,7 +245,7 @@ btr_page_reorganize(
/***************************************************************** /*****************************************************************
Decides if the page should be split at the convergence point of Decides if the page should be split at the convergence point of
inserts converging to left. */ inserts converging to left. */
UNIV_INTERN
ibool ibool
btr_page_get_split_rec_to_left( btr_page_get_split_rec_to_left(
/*===========================*/ /*===========================*/
...@@ -257,7 +257,7 @@ 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 Decides if the page should be split at the convergence point of
inserts converging to right. */ inserts converging to right. */
UNIV_INTERN
ibool ibool
btr_page_get_split_rec_to_right( btr_page_get_split_rec_to_right(
/*============================*/ /*============================*/
...@@ -273,7 +273,7 @@ is released within this function! NOTE that the operation of this ...@@ -273,7 +273,7 @@ is released within this function! NOTE that the operation of this
function must always succeed, we cannot reverse it: therefore function must always succeed, we cannot reverse it: therefore
enough free disk space must be guaranteed to be available before enough free disk space must be guaranteed to be available before
this function is called. */ this function is called. */
UNIV_INTERN
rec_t* rec_t*
btr_page_split_and_insert( btr_page_split_and_insert(
/*======================*/ /*======================*/
...@@ -289,7 +289,7 @@ 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 Inserts a data tuple to a tree on a non-leaf level. It is assumed
that mtr holds an x-latch on the tree. */ that mtr holds an x-latch on the tree. */
UNIV_INTERN
void void
btr_insert_on_non_leaf_level( btr_insert_on_non_leaf_level(
/*=========================*/ /*=========================*/
...@@ -299,7 +299,7 @@ btr_insert_on_non_leaf_level( ...@@ -299,7 +299,7 @@ btr_insert_on_non_leaf_level(
mtr_t* mtr); /* in: mtr */ mtr_t* mtr); /* in: mtr */
/******************************************************************** /********************************************************************
Sets a record as the predefined minimum record. */ Sets a record as the predefined minimum record. */
UNIV_INTERN
void void
btr_set_min_rec_mark( btr_set_min_rec_mark(
/*=================*/ /*=================*/
...@@ -307,7 +307,7 @@ btr_set_min_rec_mark( ...@@ -307,7 +307,7 @@ btr_set_min_rec_mark(
mtr_t* mtr); /* in: mtr */ mtr_t* mtr); /* in: mtr */
/***************************************************************** /*****************************************************************
Deletes on the upper level the node pointer to a page. */ Deletes on the upper level the node pointer to a page. */
UNIV_INTERN
void void
btr_node_ptr_delete( btr_node_ptr_delete(
/*================*/ /*================*/
...@@ -317,7 +317,7 @@ btr_node_ptr_delete( ...@@ -317,7 +317,7 @@ btr_node_ptr_delete(
#ifdef UNIV_DEBUG #ifdef UNIV_DEBUG
/**************************************************************** /****************************************************************
Checks that the node pointer to a page is appropriate. */ Checks that the node pointer to a page is appropriate. */
UNIV_INTERN
ibool ibool
btr_check_node_ptr( btr_check_node_ptr(
/*===============*/ /*===============*/
...@@ -335,7 +335,7 @@ level lifts the records of the page to the father page, thus reducing the ...@@ -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 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 page. If cursor is on the leaf level, mtr must also hold x-latches to
the brothers, if they exist. */ the brothers, if they exist. */
UNIV_INTERN
ibool ibool
btr_compress( btr_compress(
/*=========*/ /*=========*/
...@@ -349,7 +349,7 @@ btr_compress( ...@@ -349,7 +349,7 @@ btr_compress(
Discards a page from a B-tree. This is used to remove the last record from 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 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. */ be used for the root page, which is allowed to be empty. */
UNIV_INTERN
void void
btr_discard_page( btr_discard_page(
/*=============*/ /*=============*/
...@@ -359,7 +359,7 @@ btr_discard_page( ...@@ -359,7 +359,7 @@ btr_discard_page(
/******************************************************************** /********************************************************************
Parses the redo log record for setting an index record as the predefined Parses the redo log record for setting an index record as the predefined
minimum record. */ minimum record. */
UNIV_INTERN
byte* byte*
btr_parse_set_min_rec_mark( btr_parse_set_min_rec_mark(
/*=======================*/ /*=======================*/
...@@ -371,7 +371,7 @@ btr_parse_set_min_rec_mark( ...@@ -371,7 +371,7 @@ btr_parse_set_min_rec_mark(
mtr_t* mtr); /* in: mtr or NULL */ mtr_t* mtr); /* in: mtr or NULL */
/*************************************************************** /***************************************************************
Parses a redo log record of reorganizing a page. */ Parses a redo log record of reorganizing a page. */
UNIV_INTERN
byte* byte*
btr_parse_page_reorganize( btr_parse_page_reorganize(
/*======================*/ /*======================*/
...@@ -383,7 +383,7 @@ btr_parse_page_reorganize( ...@@ -383,7 +383,7 @@ btr_parse_page_reorganize(
mtr_t* mtr); /* in: mtr or NULL */ mtr_t* mtr); /* in: mtr or NULL */
/****************************************************************** /******************************************************************
Gets the number of pages in a B-tree. */ Gets the number of pages in a B-tree. */
UNIV_INTERN
ulint ulint
btr_get_size( btr_get_size(
/*=========*/ /*=========*/
...@@ -393,7 +393,7 @@ 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 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! */ that the caller has made the reservation for free extents! */
UNIV_INTERN
buf_block_t* buf_block_t*
btr_page_alloc( btr_page_alloc(
/*===========*/ /*===========*/
...@@ -409,7 +409,7 @@ btr_page_alloc( ...@@ -409,7 +409,7 @@ btr_page_alloc(
/****************************************************************** /******************************************************************
Frees a file page used in an index tree. NOTE: cannot free field external 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. */ storage pages because the page must contain info on its level. */
UNIV_INTERN
void void
btr_page_free( btr_page_free(
/*==========*/ /*==========*/
...@@ -420,7 +420,7 @@ 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 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 external storage pages, because the page level 0 can be given as an
argument. */ argument. */
UNIV_INTERN
void void
btr_page_free_low( btr_page_free_low(
/*==============*/ /*==============*/
...@@ -431,14 +431,14 @@ btr_page_free_low( ...@@ -431,14 +431,14 @@ btr_page_free_low(
#ifdef UNIV_BTR_PRINT #ifdef UNIV_BTR_PRINT
/***************************************************************** /*****************************************************************
Prints size info of a B-tree. */ Prints size info of a B-tree. */
UNIV_INTERN
void void
btr_print_size( btr_print_size(
/*===========*/ /*===========*/
dict_index_t* index); /* in: index tree */ dict_index_t* index); /* in: index tree */
/****************************************************************** /******************************************************************
Prints directories and other info of all nodes in the index. */ Prints directories and other info of all nodes in the index. */
UNIV_INTERN
void void
btr_print_index( btr_print_index(
/*============*/ /*============*/
...@@ -449,7 +449,7 @@ 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 Checks the size and number of fields in a record based on the definition of
the index. */ the index. */
UNIV_INTERN
ibool ibool
btr_index_rec_validate( btr_index_rec_validate(
/*===================*/ /*===================*/
...@@ -461,7 +461,7 @@ btr_index_rec_validate( ...@@ -461,7 +461,7 @@ btr_index_rec_validate(
and page on error */ and page on error */
/****************************************************************** /******************************************************************
Checks the consistency of an index tree. */ Checks the consistency of an index tree. */
UNIV_INTERN
ibool ibool
btr_validate_index( btr_validate_index(
/*===============*/ /*===============*/
......
...@@ -105,7 +105,7 @@ to node pointer page number fields on the upper levels of the tree! ...@@ -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 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. 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. */ If mode is PAGE_CUR_GE, then up_match will a have a sensible value. */
UNIV_INTERN
void void
btr_cur_search_to_nth_level( btr_cur_search_to_nth_level(
/*========================*/ /*========================*/
...@@ -139,7 +139,7 @@ btr_cur_search_to_nth_level( ...@@ -139,7 +139,7 @@ btr_cur_search_to_nth_level(
mtr_t* mtr); /* in: mtr */ mtr_t* mtr); /* in: mtr */
/********************************************************************* /*********************************************************************
Opens a cursor at either end of an index. */ Opens a cursor at either end of an index. */
UNIV_INTERN
void void
btr_cur_open_at_index_side( btr_cur_open_at_index_side(
/*=======================*/ /*=======================*/
...@@ -151,7 +151,7 @@ btr_cur_open_at_index_side( ...@@ -151,7 +151,7 @@ btr_cur_open_at_index_side(
mtr_t* mtr); /* in: mtr */ mtr_t* mtr); /* in: mtr */
/************************************************************************** /**************************************************************************
Positions a cursor at a randomly chosen position within a B-tree. */ Positions a cursor at a randomly chosen position within a B-tree. */
UNIV_INTERN
void void
btr_cur_open_at_rnd_pos( 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 ...@@ -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 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 one record on the page, the insert will always succeed; this is to
prevent trying to split a page with just one record. */ prevent trying to split a page with just one record. */
UNIV_INTERN
ulint ulint
btr_cur_optimistic_insert( btr_cur_optimistic_insert(
/*======================*/ /*======================*/
...@@ -194,7 +194,7 @@ Performs an insert on a page of an index tree. It is assumed that mtr ...@@ -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 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 made on the leaf level, to avoid deadlocks, mtr must also own x-latches
to brothers of page, if those brothers exist. */ to brothers of page, if those brothers exist. */
UNIV_INTERN
ulint ulint
btr_cur_pessimistic_insert( btr_cur_pessimistic_insert(
/*=======================*/ /*=======================*/
...@@ -218,7 +218,7 @@ btr_cur_pessimistic_insert( ...@@ -218,7 +218,7 @@ btr_cur_pessimistic_insert(
mtr_t* mtr); /* in: mtr */ mtr_t* mtr); /* in: mtr */
/***************************************************************** /*****************************************************************
Updates a record when the update causes no size changes in its fields. */ Updates a record when the update causes no size changes in its fields. */
UNIV_INTERN
ulint ulint
btr_cur_update_in_place( 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 ...@@ -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 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, little space on the page or if the update would result in too empty a page,
so that tree compression is recommended. */ so that tree compression is recommended. */
UNIV_INTERN
ulint ulint
btr_cur_optimistic_update( btr_cur_optimistic_update(
/*======================*/ /*======================*/
...@@ -263,7 +263,7 @@ Performs an update of a record on a page of a tree. It is assumed ...@@ -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 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 update is made on the leaf level, to avoid deadlocks, mtr must also
own x-latches to brothers of page, if those brothers exist. */ own x-latches to brothers of page, if those brothers exist. */
UNIV_INTERN
ulint ulint
btr_cur_pessimistic_update( btr_cur_pessimistic_update(
/*=======================*/ /*=======================*/
...@@ -287,7 +287,7 @@ Marks a clustered index record deleted. Writes an undo log record to ...@@ -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 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 of the deleting transaction, and in the roll ptr field pointer to the
undo log record created. */ undo log record created. */
UNIV_INTERN
ulint ulint
btr_cur_del_mark_set_clust_rec( btr_cur_del_mark_set_clust_rec(
/*===========================*/ /*===========================*/
...@@ -300,7 +300,7 @@ btr_cur_del_mark_set_clust_rec( ...@@ -300,7 +300,7 @@ btr_cur_del_mark_set_clust_rec(
mtr_t* mtr); /* in: mtr */ mtr_t* mtr); /* in: mtr */
/*************************************************************** /***************************************************************
Sets a secondary index record delete mark to TRUE or FALSE. */ Sets a secondary index record delete mark to TRUE or FALSE. */
UNIV_INTERN
ulint ulint
btr_cur_del_mark_set_sec_rec( btr_cur_del_mark_set_sec_rec(
/*=========================*/ /*=========================*/
...@@ -314,7 +314,7 @@ 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 Sets a secondary index record delete mark to FALSE. This function is
only used by the insert buffer insert merge mechanism. */ only used by the insert buffer insert merge mechanism. */
UNIV_INTERN
void void
btr_cur_del_unmark_for_ibuf( 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 ...@@ -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 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 brothers exist. NOTE: it is assumed that the caller has reserved enough
free extents so that the compression will always succeed if done! */ free extents so that the compression will always succeed if done! */
UNIV_INTERN
ibool ibool
btr_cur_compress_if_useful( btr_cur_compress_if_useful(
/*=======================*/ /*=======================*/
...@@ -343,7 +343,7 @@ 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 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, that the mtr has an x-latch on the page where the cursor is positioned,
but no latch on the whole tree. */ but no latch on the whole tree. */
UNIV_INTERN
ibool ibool
btr_cur_optimistic_delete( btr_cur_optimistic_delete(
/*======================*/ /*======================*/
...@@ -361,7 +361,7 @@ or if it is the only page on the level. It is assumed that mtr holds ...@@ -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, 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 mtr must also own x-latches to brothers of page, if those brothers
exist. */ exist. */
UNIV_INTERN
ibool ibool
btr_cur_pessimistic_delete( btr_cur_pessimistic_delete(
/*=======================*/ /*=======================*/
...@@ -383,7 +383,7 @@ btr_cur_pessimistic_delete( ...@@ -383,7 +383,7 @@ btr_cur_pessimistic_delete(
mtr_t* mtr); /* in: mtr */ mtr_t* mtr); /* in: mtr */
/*************************************************************** /***************************************************************
Parses a redo log record of updating a record in-place. */ Parses a redo log record of updating a record in-place. */
UNIV_INTERN
byte* byte*
btr_cur_parse_update_in_place( btr_cur_parse_update_in_place(
/*==========================*/ /*==========================*/
...@@ -396,7 +396,7 @@ 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 Parses the redo log record for delete marking or unmarking of a clustered
index record. */ index record. */
UNIV_INTERN
byte* byte*
btr_cur_parse_del_mark_set_clust_rec( btr_cur_parse_del_mark_set_clust_rec(
/*=================================*/ /*=================================*/
...@@ -409,7 +409,7 @@ 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 Parses the redo log record for delete marking or unmarking of a secondary
index record. */ index record. */
UNIV_INTERN
byte* byte*
btr_cur_parse_del_mark_set_sec_rec( btr_cur_parse_del_mark_set_sec_rec(
/*===============================*/ /*===============================*/
...@@ -420,7 +420,7 @@ 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 */ page_zip_des_t* page_zip);/* in/out: compressed page, or NULL */
/*********************************************************************** /***********************************************************************
Estimates the number of rows in a given index range. */ Estimates the number of rows in a given index range. */
UNIV_INTERN
ib_longlong ib_longlong
btr_estimate_n_rows_in_range( btr_estimate_n_rows_in_range(
/*=========================*/ /*=========================*/
...@@ -434,7 +434,7 @@ 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 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). 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. */ The estimates are stored in the array index->stat_n_diff_key_vals. */
UNIV_INTERN
void void
btr_estimate_number_of_different_key_vals( btr_estimate_number_of_different_key_vals(
/*======================================*/ /*======================================*/
...@@ -444,7 +444,7 @@ Marks not updated extern fields as not-owned by this record. The ownership ...@@ -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 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 index tree. In purge only the owner of externally stored field is allowed
to free the field. */ to free the field. */
UNIV_INTERN
void void
btr_cur_mark_extern_inherited_fields( btr_cur_mark_extern_inherited_fields(
/*=================================*/ /*=================================*/
...@@ -459,7 +459,7 @@ 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 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 some externally stored fields from a record. We must mark them as inherited
in entry, so that they are not freed in a rollback. */ in entry, so that they are not freed in a rollback. */
UNIV_INTERN
void void
btr_cur_mark_dtuple_inherited_extern( btr_cur_mark_dtuple_inherited_extern(
/*=================================*/ /*=================================*/
...@@ -468,7 +468,7 @@ btr_cur_mark_dtuple_inherited_extern( ...@@ -468,7 +468,7 @@ btr_cur_mark_dtuple_inherited_extern(
const upd_t* update); /* in: update vector */ const upd_t* update); /* in: update vector */
/*********************************************************************** /***********************************************************************
Marks all extern fields in a dtuple as owned by the record. */ Marks all extern fields in a dtuple as owned by the record. */
UNIV_INTERN
void void
btr_cur_unmark_dtuple_extern_fields( btr_cur_unmark_dtuple_extern_fields(
/*================================*/ /*================================*/
...@@ -478,7 +478,7 @@ Stores the fields in big_rec_vec to the tablespace and puts pointers to ...@@ -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. them in rec. The extern flags in rec will have to be set beforehand.
The fields are stored on pages allocated from leaf node The fields are stored on pages allocated from leaf node
file segment of the index tree. */ file segment of the index tree. */
UNIV_INTERN
ulint ulint
btr_store_big_rec_extern_fields( btr_store_big_rec_extern_fields(
/*============================*/ /*============================*/
...@@ -500,7 +500,7 @@ Frees the space in an externally stored field to the file space ...@@ -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, 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 in a rollback we may have the additional condition that the field must
not be inherited. */ not be inherited. */
UNIV_INTERN
void void
btr_free_externally_stored_field( btr_free_externally_stored_field(
/*=============================*/ /*=============================*/
...@@ -530,7 +530,7 @@ 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 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. */ clustered index record must be protected by a lock or a page latch. */
UNIV_INTERN
ulint ulint
btr_copy_externally_stored_field_prefix( btr_copy_externally_stored_field_prefix(
/*====================================*/ /*====================================*/
...@@ -546,7 +546,7 @@ 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 */ ulint local_len);/* in: length of data, in bytes */
/*********************************************************************** /***********************************************************************
Copies an externally stored field of a record to mem heap. */ Copies an externally stored field of a record to mem heap. */
UNIV_INTERN
byte* byte*
btr_rec_copy_externally_stored_field( btr_rec_copy_externally_stored_field(
/*=================================*/ /*=================================*/
...@@ -563,7 +563,7 @@ 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 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 update vector. We use this function to remember which fields we must
mark as extern storage in a record inserted for an update. */ mark as extern storage in a record inserted for an update. */
UNIV_INTERN
ulint ulint
btr_push_update_extern_fields( btr_push_update_extern_fields(
/*==========================*/ /*==========================*/
......
...@@ -31,21 +31,21 @@ of a scroll cursor easier */ ...@@ -31,21 +31,21 @@ of a scroll cursor easier */
/****************************************************************** /******************************************************************
Allocates memory for a persistent cursor object and initializes the cursor. */ Allocates memory for a persistent cursor object and initializes the cursor. */
UNIV_INTERN
btr_pcur_t* btr_pcur_t*
btr_pcur_create_for_mysql(void); btr_pcur_create_for_mysql(void);
/*============================*/ /*============================*/
/* out, own: persistent cursor */ /* out, own: persistent cursor */
/****************************************************************** /******************************************************************
Frees the memory for a persistent cursor object. */ Frees the memory for a persistent cursor object. */
UNIV_INTERN
void void
btr_pcur_free_for_mysql( btr_pcur_free_for_mysql(
/*====================*/ /*====================*/
btr_pcur_t* cursor); /* in, own: persistent cursor */ btr_pcur_t* cursor); /* in, own: persistent cursor */
/****************************************************************** /******************************************************************
Copies the stored position of a pcur to another pcur. */ Copies the stored position of a pcur to another pcur. */
UNIV_INTERN
void void
btr_pcur_copy_stored_position( btr_pcur_copy_stored_position(
/*==========================*/ /*==========================*/
...@@ -143,7 +143,7 @@ PAGE_CUR_LE, on the last user record. If no such user record exists, then ...@@ -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 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 before first in tree. The latching mode must be BTR_SEARCH_LEAF or
BTR_MODIFY_LEAF. */ BTR_MODIFY_LEAF. */
UNIV_INTERN
void void
btr_pcur_open_on_user_rec( btr_pcur_open_on_user_rec(
/*======================*/ /*======================*/
...@@ -180,7 +180,7 @@ cursor data structure, or just setting a flag if the cursor id before the ...@@ -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 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 page where the cursor is positioned must not be empty if the index tree is
not totally empty! */ not totally empty! */
UNIV_INTERN
void void
btr_pcur_store_position( btr_pcur_store_position(
/*====================*/ /*====================*/
...@@ -198,7 +198,7 @@ infimum; ...@@ -198,7 +198,7 @@ infimum;
GREATER than the user record which was the predecessor of the supremum. 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: (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. */ restores to before first or after the last in the tree. */
UNIV_INTERN
ibool ibool
btr_pcur_restore_position( btr_pcur_restore_position(
/*======================*/ /*======================*/
...@@ -216,7 +216,7 @@ releases the page latch and bufferfix reserved by the cursor. ...@@ -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 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 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. */ cursor latch, as then the latch must not be released until mtr_commit. */
UNIV_INTERN
void void
btr_pcur_release_leaf( btr_pcur_release_leaf(
/*==================*/ /*==================*/
...@@ -288,7 +288,7 @@ btr_pcur_move_to_next( ...@@ -288,7 +288,7 @@ btr_pcur_move_to_next(
/************************************************************* /*************************************************************
Moves the persistent cursor to the previous record in the tree. If no records Moves the persistent cursor to the previous record in the tree. If no records
are left, the cursor stays 'before first in tree'. */ are left, the cursor stays 'before first in tree'. */
UNIV_INTERN
ibool ibool
btr_pcur_move_to_prev( btr_pcur_move_to_prev(
/*==================*/ /*==================*/
...@@ -322,7 +322,7 @@ Moves the persistent cursor to the first record on the next page. ...@@ -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. Releases the latch on the current page, and bufferunfixes it.
Note that there must not be modifications on the current page, Note that there must not be modifications on the current page,
as then the x-latch can be released only in mtr_commit. */ as then the x-latch can be released only in mtr_commit. */
UNIV_INTERN
void void
btr_pcur_move_to_next_page( btr_pcur_move_to_next_page(
/*=======================*/ /*=======================*/
...@@ -339,7 +339,7 @@ The alphabetical position of the cursor is guaranteed to be sensible ...@@ -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 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 last record of any page, because the structure of the tree may have
changed while the cursor had no latches. */ changed while the cursor had no latches. */
UNIV_INTERN
void void
btr_pcur_move_backward_from_page( btr_pcur_move_backward_from_page(
/*=============================*/ /*=============================*/
......
...@@ -19,7 +19,7 @@ Created 2/17/1996 Heikki Tuuri ...@@ -19,7 +19,7 @@ Created 2/17/1996 Heikki Tuuri
/********************************************************************* /*********************************************************************
Creates and initializes the adaptive search system at a database start. */ Creates and initializes the adaptive search system at a database start. */
UNIV_INTERN
void void
btr_search_sys_create( btr_search_sys_create(
/*==================*/ /*==================*/
...@@ -27,13 +27,13 @@ btr_search_sys_create( ...@@ -27,13 +27,13 @@ btr_search_sys_create(
/************************************************************************ /************************************************************************
Disable the adaptive hash search system and empty the index. */ Disable the adaptive hash search system and empty the index. */
UNIV_INTERN
void void
btr_search_disable(void); btr_search_disable(void);
/*====================*/ /*====================*/
/************************************************************************ /************************************************************************
Enable the adaptive hash search system. */ Enable the adaptive hash search system. */
UNIV_INTERN
void void
btr_search_enable(void); btr_search_enable(void);
/*====================*/ /*====================*/
...@@ -48,7 +48,7 @@ btr_search_get_info( ...@@ -48,7 +48,7 @@ btr_search_get_info(
dict_index_t* index); /* in: index */ dict_index_t* index); /* in: index */
/********************************************************************* /*********************************************************************
Creates and initializes a search info struct. */ Creates and initializes a search info struct. */
UNIV_INTERN
btr_search_t* btr_search_t*
btr_search_info_create( btr_search_info_create(
/*===================*/ /*===================*/
...@@ -67,7 +67,7 @@ Tries to guess the right search position based on the hash search info ...@@ -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, 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 and the function returns TRUE, then cursor->up_match and cursor->low_match
both have sensible values. */ both have sensible values. */
UNIV_INTERN
ibool ibool
btr_search_guess_on_hash( btr_search_guess_on_hash(
/*=====================*/ /*=====================*/
...@@ -87,7 +87,7 @@ Moves or deletes hash entries for moved records. If new_page is already hashed, ...@@ -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, 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 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). */ parameters as page (this often happens when a page is split). */
UNIV_INTERN
void void
btr_search_move_or_delete_hash_entries( btr_search_move_or_delete_hash_entries(
/*===================================*/ /*===================================*/
...@@ -100,7 +100,7 @@ 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 */ dict_index_t* index); /* in: record descriptor */
/************************************************************************ /************************************************************************
Drops a page hash index. */ Drops a page hash index. */
UNIV_INTERN
void void
btr_search_drop_page_hash_index( btr_search_drop_page_hash_index(
/*============================*/ /*============================*/
...@@ -111,7 +111,7 @@ 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 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. */ Drops possible hash index if the page happens to be in the buffer pool. */
UNIV_INTERN
void void
btr_search_drop_page_hash_when_freed( btr_search_drop_page_hash_when_freed(
/*=================================*/ /*=================================*/
...@@ -121,7 +121,7 @@ btr_search_drop_page_hash_when_freed( ...@@ -121,7 +121,7 @@ btr_search_drop_page_hash_when_freed(
ulint page_no); /* in: page number */ ulint page_no); /* in: page number */
/************************************************************************ /************************************************************************
Updates the page hash index when a single record is inserted on a page. */ Updates the page hash index when a single record is inserted on a page. */
UNIV_INTERN
void void
btr_search_update_hash_node_on_insert( btr_search_update_hash_node_on_insert(
/*==================================*/ /*==================================*/
...@@ -131,7 +131,7 @@ btr_search_update_hash_node_on_insert( ...@@ -131,7 +131,7 @@ btr_search_update_hash_node_on_insert(
to the cursor */ to the cursor */
/************************************************************************ /************************************************************************
Updates the page hash index when a single record is inserted on a page. */ Updates the page hash index when a single record is inserted on a page. */
UNIV_INTERN
void void
btr_search_update_hash_on_insert( btr_search_update_hash_on_insert(
/*=============================*/ /*=============================*/
...@@ -141,7 +141,7 @@ btr_search_update_hash_on_insert( ...@@ -141,7 +141,7 @@ btr_search_update_hash_on_insert(
to the cursor */ to the cursor */
/************************************************************************ /************************************************************************
Updates the page hash index when a single record is deleted from a page. */ Updates the page hash index when a single record is deleted from a page. */
UNIV_INTERN
void void
btr_search_update_hash_on_delete( btr_search_update_hash_on_delete(
/*=============================*/ /*=============================*/
...@@ -150,7 +150,7 @@ btr_search_update_hash_on_delete( ...@@ -150,7 +150,7 @@ btr_search_update_hash_on_delete(
the record is not yet deleted */ the record is not yet deleted */
/************************************************************************ /************************************************************************
Validates the search system. */ Validates the search system. */
UNIV_INTERN
ibool ibool
btr_search_validate(void); btr_search_validate(void);
/*======================*/ /*======================*/
......
...@@ -80,7 +80,7 @@ enum buf_page_state { ...@@ -80,7 +80,7 @@ enum buf_page_state {
/************************************************************************ /************************************************************************
Creates the buffer pool. */ Creates the buffer pool. */
UNIV_INTERN
buf_pool_t* buf_pool_t*
buf_pool_init(void); buf_pool_init(void);
/*===============*/ /*===============*/
...@@ -89,7 +89,7 @@ buf_pool_init(void); ...@@ -89,7 +89,7 @@ buf_pool_init(void);
/************************************************************************ /************************************************************************
Frees the buffer pool at shutdown. This must not be invoked before Frees the buffer pool at shutdown. This must not be invoked before
freeing all mutexes. */ freeing all mutexes. */
UNIV_INTERN
void void
buf_pool_free(void); buf_pool_free(void);
/*===============*/ /*===============*/
...@@ -97,7 +97,7 @@ buf_pool_free(void); ...@@ -97,7 +97,7 @@ buf_pool_free(void);
/************************************************************************ /************************************************************************
Relocate a buffer control block. Relocates the block on the LRU list Relocate a buffer control block. Relocates the block on the LRU list
and in buf_pool->page_hash. Does not relocate bpage->list. */ and in buf_pool->page_hash. Does not relocate bpage->list. */
UNIV_INTERN
void void
buf_relocate( buf_relocate(
/*=========*/ /*=========*/
...@@ -106,7 +106,7 @@ buf_relocate( ...@@ -106,7 +106,7 @@ buf_relocate(
__attribute__((nonnull)); __attribute__((nonnull));
/************************************************************************ /************************************************************************
Resizes the buffer pool. */ Resizes the buffer pool. */
UNIV_INTERN
void void
buf_pool_resize(void); buf_pool_resize(void);
/*=================*/ /*=================*/
...@@ -183,7 +183,7 @@ RW_X_LATCH are allowed as LA! */ ...@@ -183,7 +183,7 @@ RW_X_LATCH are allowed as LA! */
/************************************************************************ /************************************************************************
This is the general function used to get optimistic access to a database This is the general function used to get optimistic access to a database
page. */ page. */
UNIV_INTERN
ibool ibool
buf_page_optimistic_get_func( buf_page_optimistic_get_func(
/*=========================*/ /*=========================*/
...@@ -198,7 +198,7 @@ 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 This is used to get access to a known database page, when no waiting can be
done. */ done. */
UNIV_INTERN
ibool ibool
buf_page_get_known_nowait( buf_page_get_known_nowait(
/*======================*/ /*======================*/
...@@ -235,7 +235,7 @@ NOTE: the page is not protected by any latch. Mutual exclusion has to ...@@ -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 be implemented at a higher level. In other words, all possible
accesses to a given page through this function must be protected by accesses to a given page through this function must be protected by
the same set of mutexes or latches. */ the same set of mutexes or latches. */
UNIV_INTERN
buf_page_t* buf_page_t*
buf_page_get_zip( buf_page_get_zip(
/*=============*/ /*=============*/
...@@ -246,7 +246,7 @@ buf_page_get_zip( ...@@ -246,7 +246,7 @@ buf_page_get_zip(
ulint offset);/* in: page number */ ulint offset);/* in: page number */
/************************************************************************ /************************************************************************
This is the general function used to get access to a database page. */ This is the general function used to get access to a database page. */
UNIV_INTERN
buf_block_t* buf_block_t*
buf_page_get_gen( buf_page_get_gen(
/*=============*/ /*=============*/
...@@ -267,7 +267,7 @@ Initializes a page to the buffer buf_pool. The page is usually not read ...@@ -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 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 => of the functions which perform to a block a state transition NOT_USED =>
FILE_PAGE (the other is buf_page_get_gen). */ FILE_PAGE (the other is buf_page_get_gen). */
UNIV_INTERN
buf_block_t* buf_block_t*
buf_page_create( buf_page_create(
/*============*/ /*============*/
...@@ -280,7 +280,7 @@ buf_page_create( ...@@ -280,7 +280,7 @@ buf_page_create(
#ifdef UNIV_HOTBACKUP #ifdef UNIV_HOTBACKUP
/************************************************************************ /************************************************************************
Inits a page to the buffer buf_pool, for use in ibbackup --restore. */ Inits a page to the buffer buf_pool, for use in ibbackup --restore. */
UNIV_INTERN
void void
buf_page_init_for_backup_restore( buf_page_init_for_backup_restore(
/*=============================*/ /*=============================*/
...@@ -313,7 +313,7 @@ buf_page_release( ...@@ -313,7 +313,7 @@ buf_page_release(
Moves a page to the start of the buffer pool LRU list. This high-level 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 function can be used to prevent an important page from from slipping out of
the buffer pool. */ the buffer pool. */
UNIV_INTERN
void void
buf_page_make_young( buf_page_make_young(
/*================*/ /*================*/
...@@ -333,7 +333,7 @@ buf_page_peek( ...@@ -333,7 +333,7 @@ buf_page_peek(
/************************************************************************ /************************************************************************
Resets the check_index_page_at_flush field of a page if found in the buffer Resets the check_index_page_at_flush field of a page if found in the buffer
pool. */ pool. */
UNIV_INTERN
void void
buf_reset_check_index_page_at_flush( 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. ...@@ -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 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 debug version to check that it is not accessed any more unless
reallocated. */ reallocated. */
UNIV_INTERN
buf_page_t* buf_page_t*
buf_page_set_file_page_was_freed( 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. ...@@ -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 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 debug version to check that it is not accessed any more unless
reallocated. */ reallocated. */
UNIV_INTERN
buf_page_t* buf_page_t*
buf_page_reset_file_page_was_freed( buf_page_reset_file_page_was_freed(
/*===============================*/ /*===============================*/
...@@ -401,7 +401,7 @@ buf_page_peek_if_too_old( ...@@ -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 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 not in the pool. NOTE that this operation does not fix the page in the
pool if it is found there. */ pool if it is found there. */
UNIV_INTERN
ibool ibool
buf_page_peek_if_search_hashed( buf_page_peek_if_search_hashed(
/*===========================*/ /*===========================*/
...@@ -441,7 +441,7 @@ buf_block_get_modify_clock( ...@@ -441,7 +441,7 @@ buf_block_get_modify_clock(
Calculates a page checksum which is stored to the page when it is written 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 to a file. Note that we must be careful to calculate the same value
on 32-bit and 64-bit architectures. */ on 32-bit and 64-bit architectures. */
UNIV_INTERN
ulint ulint
buf_calc_page_new_checksum( buf_calc_page_new_checksum(
/*=======================*/ /*=======================*/
...@@ -454,7 +454,7 @@ checksum. ...@@ -454,7 +454,7 @@ checksum.
NOTE: we must first store the new formula checksum to NOTE: we must first store the new formula checksum to
FIL_PAGE_SPACE_OR_CHKSUM before calculating and storing this old checksum FIL_PAGE_SPACE_OR_CHKSUM before calculating and storing this old checksum
because this takes that field as an input! */ because this takes that field as an input! */
UNIV_INTERN
ulint ulint
buf_calc_page_old_checksum( buf_calc_page_old_checksum(
/*=======================*/ /*=======================*/
...@@ -462,7 +462,7 @@ buf_calc_page_old_checksum( ...@@ -462,7 +462,7 @@ buf_calc_page_old_checksum(
const byte* page); /* in: buffer page */ const byte* page); /* in: buffer page */
/************************************************************************ /************************************************************************
Checks if a page is corrupt. */ Checks if a page is corrupt. */
UNIV_INTERN
ibool ibool
buf_page_is_corrupted( buf_page_is_corrupted(
/*==================*/ /*==================*/
...@@ -494,7 +494,7 @@ buf_block_get_lock_hash_val( ...@@ -494,7 +494,7 @@ buf_block_get_lock_hash_val(
/************************************************************************* /*************************************************************************
Finds a block in the buffer pool that points to a Finds a block in the buffer pool that points to a
given compressed page. */ given compressed page. */
UNIV_INTERN
buf_block_t* buf_block_t*
buf_pool_contains_zip( buf_pool_contains_zip(
/*==================*/ /*==================*/
...@@ -505,7 +505,7 @@ buf_pool_contains_zip( ...@@ -505,7 +505,7 @@ buf_pool_contains_zip(
#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
/************************************************************************* /*************************************************************************
Validates the buffer pool data structure. */ Validates the buffer pool data structure. */
UNIV_INTERN
ibool ibool
buf_validate(void); buf_validate(void);
/*==============*/ /*==============*/
...@@ -513,14 +513,14 @@ buf_validate(void); ...@@ -513,14 +513,14 @@ buf_validate(void);
#if defined UNIV_DEBUG_PRINT || defined UNIV_DEBUG || defined UNIV_BUF_DEBUG #if defined UNIV_DEBUG_PRINT || defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
/************************************************************************* /*************************************************************************
Prints info of the buffer pool data structure. */ Prints info of the buffer pool data structure. */
UNIV_INTERN
void void
buf_print(void); buf_print(void);
/*============*/ /*============*/
#endif /* UNIV_DEBUG_PRINT || UNIV_DEBUG || UNIV_BUF_DEBUG */ #endif /* UNIV_DEBUG_PRINT || UNIV_DEBUG || UNIV_BUF_DEBUG */
/************************************************************************ /************************************************************************
Prints a page to stderr. */ Prints a page to stderr. */
UNIV_INTERN
void void
buf_page_print( buf_page_print(
/*===========*/ /*===========*/
...@@ -529,19 +529,19 @@ buf_page_print( ...@@ -529,19 +529,19 @@ buf_page_print(
0 for uncompressed pages */ 0 for uncompressed pages */
/************************************************************************* /*************************************************************************
Returns the number of latched pages in the buffer pool. */ Returns the number of latched pages in the buffer pool. */
UNIV_INTERN
ulint ulint
buf_get_latched_pages_number(void); buf_get_latched_pages_number(void);
/*==============================*/ /*==============================*/
/************************************************************************* /*************************************************************************
Returns the number of pending buf pool ios. */ Returns the number of pending buf pool ios. */
UNIV_INTERN
ulint ulint
buf_get_n_pending_ios(void); buf_get_n_pending_ios(void);
/*=======================*/ /*=======================*/
/************************************************************************* /*************************************************************************
Prints info of the buffer i/o. */ Prints info of the buffer i/o. */
UNIV_INTERN
void void
buf_print_io( buf_print_io(
/*=========*/ /*=========*/
...@@ -549,26 +549,26 @@ buf_print_io( ...@@ -549,26 +549,26 @@ buf_print_io(
/************************************************************************* /*************************************************************************
Returns the ratio in percents of modified pages in the buffer pool / Returns the ratio in percents of modified pages in the buffer pool /
database pages in the buffer pool. */ database pages in the buffer pool. */
UNIV_INTERN
ulint ulint
buf_get_modified_ratio_pct(void); buf_get_modified_ratio_pct(void);
/*============================*/ /*============================*/
/************************************************************************** /**************************************************************************
Refreshes the statistics used to print per-second averages. */ Refreshes the statistics used to print per-second averages. */
UNIV_INTERN
void void
buf_refresh_io_stats(void); buf_refresh_io_stats(void);
/*======================*/ /*======================*/
/************************************************************************* /*************************************************************************
Checks that all file pages in the buffer are in a replaceable state. */ Checks that all file pages in the buffer are in a replaceable state. */
UNIV_INTERN
ibool ibool
buf_all_freed(void); buf_all_freed(void);
/*===============*/ /*===============*/
/************************************************************************* /*************************************************************************
Checks that there currently are no pending i/o-operations for the buffer Checks that there currently are no pending i/o-operations for the buffer
pool. */ pool. */
UNIV_INTERN
ibool ibool
buf_pool_check_no_pending_io(void); buf_pool_check_no_pending_io(void);
/*==============================*/ /*==============================*/
...@@ -577,7 +577,7 @@ 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 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 completed. All the file pages buffered must be in a replaceable state when
this function is called: not latched and not modified. */ this function is called: not latched and not modified. */
UNIV_INTERN
void void
buf_pool_invalidate(void); buf_pool_invalidate(void);
/*=====================*/ /*=====================*/
...@@ -886,7 +886,7 @@ then this function does nothing. ...@@ -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 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 on the buffer frame. The io-handler must take care that the flag is cleared
and the lock released later. */ and the lock released later. */
UNIV_INTERN
buf_page_t* buf_page_t*
buf_page_init_for_read( buf_page_init_for_read(
/*===================*/ /*===================*/
...@@ -903,7 +903,7 @@ 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 Completes an asynchronous read or write request of a file page to or from
the buffer pool. */ the buffer pool. */
UNIV_INTERN
void void
buf_page_io_complete( buf_page_io_complete(
/*=================*/ /*=================*/
...@@ -948,7 +948,7 @@ buf_pool_clock_tic(void); ...@@ -948,7 +948,7 @@ buf_pool_clock_tic(void);
/* out: new clock value */ /* out: new clock value */
/************************************************************************* /*************************************************************************
Gets the current length of the free list of buffer blocks. */ Gets the current length of the free list of buffer blocks. */
UNIV_INTERN
ulint ulint
buf_get_free_list_len(void); buf_get_free_list_len(void);
/*=======================*/ /*=======================*/
......
...@@ -16,21 +16,21 @@ Created 11/5/1995 Heikki Tuuri ...@@ -16,21 +16,21 @@ Created 11/5/1995 Heikki Tuuri
/************************************************************************ /************************************************************************
Inserts a modified block into the flush list. */ Inserts a modified block into the flush list. */
UNIV_INTERN
void void
buf_flush_insert_into_flush_list( buf_flush_insert_into_flush_list(
/*=============================*/ /*=============================*/
buf_page_t* bpage); /* in: block which is modified */ buf_page_t* bpage); /* in: block which is modified */
/************************************************************************ /************************************************************************
Remove a block from the flush list of modified blocks. */ Remove a block from the flush list of modified blocks. */
UNIV_INTERN
void void
buf_flush_remove( buf_flush_remove(
/*=============*/ /*=============*/
buf_page_t* bpage); /* in: pointer to the block in question */ buf_page_t* bpage); /* in: pointer to the block in question */
/************************************************************************ /************************************************************************
Updates the flush system data structures when a write is completed. */ Updates the flush system data structures when a write is completed. */
UNIV_INTERN
void void
buf_flush_write_complete( buf_flush_write_complete(
/*=====================*/ /*=====================*/
...@@ -38,13 +38,13 @@ 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 Flushes pages from the end of the LRU list if there is too small
a margin of replaceable pages there. */ a margin of replaceable pages there. */
UNIV_INTERN
void void
buf_flush_free_margin(void); buf_flush_free_margin(void);
/*=======================*/ /*=======================*/
/************************************************************************ /************************************************************************
Initializes a page for writing to the tablespace. */ Initializes a page for writing to the tablespace. */
UNIV_INTERN
void void
buf_flush_init_for_writing( 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 ...@@ -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 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, 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! */ the calling thread is not allowed to own any latches on pages! */
UNIV_INTERN
ulint ulint
buf_flush_batch( buf_flush_batch(
/*============*/ /*============*/
...@@ -80,7 +80,7 @@ buf_flush_batch( ...@@ -80,7 +80,7 @@ buf_flush_batch(
min_n), otherwise ignored */ min_n), otherwise ignored */
/********************************************************************** /**********************************************************************
Waits until a flush batch of the given type ends */ Waits until a flush batch of the given type ends */
UNIV_INTERN
void void
buf_flush_wait_batch_end( buf_flush_wait_batch_end(
/*=====================*/ /*=====================*/
...@@ -109,7 +109,7 @@ buf_flush_recv_note_modification( ...@@ -109,7 +109,7 @@ buf_flush_recv_note_modification(
/************************************************************************ /************************************************************************
Returns TRUE if the file page block is immediately suitable for replacement, Returns TRUE if the file page block is immediately suitable for replacement,
i.e., transition FILE_PAGE => NOT_USED allowed. */ i.e., transition FILE_PAGE => NOT_USED allowed. */
UNIV_INTERN
ibool ibool
buf_flush_ready_for_replace( buf_flush_ready_for_replace(
/*========================*/ /*========================*/
...@@ -119,7 +119,7 @@ buf_flush_ready_for_replace( ...@@ -119,7 +119,7 @@ buf_flush_ready_for_replace(
#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
/********************************************************************** /**********************************************************************
Validates the flush list. */ Validates the flush list. */
UNIV_INTERN
ibool ibool
buf_flush_validate(void); buf_flush_validate(void);
/*====================*/ /*====================*/
......
...@@ -21,7 +21,7 @@ taken out of the buffer pool, and their inserts redirected to the insert ...@@ -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 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 operations need new buffer blocks, and the i/o work done in flushing would be
wasted. */ wasted. */
UNIV_INTERN
void void
buf_LRU_try_free_flushed_blocks(void); buf_LRU_try_free_flushed_blocks(void);
/*==================================*/ /*==================================*/
...@@ -29,7 +29,7 @@ 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 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 used in heuristics to prevent huge transactions eating up the whole buffer
pool for their locks. */ pool for their locks. */
UNIV_INTERN
ibool ibool
buf_LRU_buf_pool_running_out(void); buf_LRU_buf_pool_running_out(void);
/*==============================*/ /*==============================*/
...@@ -51,7 +51,7 @@ Invalidates all pages belonging to a given tablespace when we are deleting ...@@ -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, 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 what guarantees that it will not try to read in pages after this operation has
completed? */ completed? */
UNIV_INTERN
void void
buf_LRU_invalidate_tablespace( buf_LRU_invalidate_tablespace(
/*==========================*/ /*==========================*/
...@@ -60,21 +60,21 @@ 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 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 (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. */ guaranteed to be precise, because the ulint_clock may wrap around. */
UNIV_INTERN
ulint ulint
buf_LRU_get_recent_limit(void); buf_LRU_get_recent_limit(void);
/*==========================*/ /*==========================*/
/* out: the limit; zero if could not determine it */ /* out: the limit; zero if could not determine it */
/************************************************************************ /************************************************************************
Insert a compressed block into buf_pool->zip_clean in the LRU order. */ Insert a compressed block into buf_pool->zip_clean in the LRU order. */
UNIV_INTERN
void void
buf_LRU_insert_zip_clean( buf_LRU_insert_zip_clean(
/*=====================*/ /*=====================*/
buf_page_t* bpage); /* in: pointer to the block in question */ buf_page_t* bpage); /* in: pointer to the block in question */
/********************************************************************** /**********************************************************************
Try to free a block. */ Try to free a block. */
UNIV_INTERN
ibool ibool
buf_LRU_free_block( buf_LRU_free_block(
/*===============*/ /*===============*/
...@@ -94,7 +94,7 @@ 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 Look for a replaceable block from the end of the LRU list and put it to
the free list if found. */ the free list if found. */
UNIV_INTERN
ibool ibool
buf_LRU_search_and_free_block( buf_LRU_search_and_free_block(
/*==========================*/ /*==========================*/
...@@ -108,7 +108,7 @@ 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 Returns a free block from the buf_pool. The block is taken off the
free list. If it is empty, returns NULL. */ free list. If it is empty, returns NULL. */
UNIV_INTERN
buf_block_t* buf_block_t*
buf_LRU_get_free_only(void); buf_LRU_get_free_only(void);
/*=======================*/ /*=======================*/
...@@ -118,7 +118,7 @@ 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 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 free list. If it is empty, blocks are moved from the end of the
LRU list to the free list. */ LRU list to the free list. */
UNIV_INTERN
buf_block_t* buf_block_t*
buf_LRU_get_free_block( buf_LRU_get_free_block(
/*===================*/ /*===================*/
...@@ -129,14 +129,14 @@ buf_LRU_get_free_block( ...@@ -129,14 +129,14 @@ buf_LRU_get_free_block(
/********************************************************************** /**********************************************************************
Puts a block back to the free list. */ Puts a block back to the free list. */
UNIV_INTERN
void void
buf_LRU_block_free_non_file_page( buf_LRU_block_free_non_file_page(
/*=============================*/ /*=============================*/
buf_block_t* block); /* in: block, must not contain a file page */ buf_block_t* block); /* in: block, must not contain a file page */
/********************************************************************** /**********************************************************************
Adds a block to the LRU list. */ Adds a block to the LRU list. */
UNIV_INTERN
void void
buf_LRU_add_block( buf_LRU_add_block(
/*==============*/ /*==============*/
...@@ -147,14 +147,14 @@ buf_LRU_add_block( ...@@ -147,14 +147,14 @@ buf_LRU_add_block(
the start regardless of this parameter */ the start regardless of this parameter */
/********************************************************************** /**********************************************************************
Moves a block to the start of the LRU list. */ Moves a block to the start of the LRU list. */
UNIV_INTERN
void void
buf_LRU_make_block_young( buf_LRU_make_block_young(
/*=====================*/ /*=====================*/
buf_page_t* bpage); /* in: control block */ buf_page_t* bpage); /* in: control block */
/********************************************************************** /**********************************************************************
Moves a block to the end of the LRU list. */ Moves a block to the end of the LRU list. */
UNIV_INTERN
void void
buf_LRU_make_block_old( buf_LRU_make_block_old(
/*===================*/ /*===================*/
...@@ -162,7 +162,7 @@ buf_LRU_make_block_old( ...@@ -162,7 +162,7 @@ buf_LRU_make_block_old(
#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
/************************************************************************** /**************************************************************************
Validates the LRU list. */ Validates the LRU list. */
UNIV_INTERN
ibool ibool
buf_LRU_validate(void); buf_LRU_validate(void);
/*==================*/ /*==================*/
...@@ -170,7 +170,7 @@ buf_LRU_validate(void); ...@@ -170,7 +170,7 @@ buf_LRU_validate(void);
#if defined UNIV_DEBUG_PRINT || defined UNIV_DEBUG || defined UNIV_BUF_DEBUG #if defined UNIV_DEBUG_PRINT || defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
/************************************************************************** /**************************************************************************
Prints the LRU list. */ Prints the LRU list. */
UNIV_INTERN
void void
buf_LRU_print(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 ...@@ -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 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 released by the i/o-handler thread. Does a random read-ahead if it seems
sensible. */ sensible. */
UNIV_INTERN
ulint ulint
buf_read_page( buf_read_page(
/*==========*/ /*==========*/
...@@ -50,7 +50,7 @@ latches! ...@@ -50,7 +50,7 @@ latches!
NOTE 3: the calling thread must want access to the page given: this rule is 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 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. */ which could result in a deadlock if the OS does not support asynchronous io. */
UNIV_INTERN
ulint ulint
buf_read_ahead_linear( buf_read_ahead_linear(
/*==================*/ /*==================*/
...@@ -63,7 +63,7 @@ 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 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 order to contract the insert buffer tree. Technically, this function is like
a read-ahead function. */ a read-ahead function. */
UNIV_INTERN
void void
buf_read_ibuf_merge_pages( buf_read_ibuf_merge_pages(
/*======================*/ /*======================*/
...@@ -88,7 +88,7 @@ buf_read_ibuf_merge_pages( ...@@ -88,7 +88,7 @@ buf_read_ibuf_merge_pages(
in the arrays */ in the arrays */
/************************************************************************ /************************************************************************
Issues read requests for pages which recovery wants to read in. */ Issues read requests for pages which recovery wants to read in. */
UNIV_INTERN
void void
buf_read_recv_pages( buf_read_recv_pages(
/*================*/ /*================*/
......
...@@ -146,7 +146,7 @@ dfield_datas_are_binary_equal( ...@@ -146,7 +146,7 @@ dfield_datas_are_binary_equal(
const dfield_t* field2);/* in: field */ const dfield_t* field2);/* in: field */
/************************************************************************* /*************************************************************************
Tests if dfield data length and content is equal to the given. */ Tests if dfield data length and content is equal to the given. */
UNIV_INTERN
ibool ibool
dfield_data_is_binary_equal( dfield_data_is_binary_equal(
/*========================*/ /*========================*/
...@@ -236,7 +236,7 @@ dtuple_from_fields( ...@@ -236,7 +236,7 @@ dtuple_from_fields(
/************************************************************************* /*************************************************************************
Sets number of fields used in a tuple. Normally this is set in 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. */ dtuple_create, but if you want later to set it smaller, you can use this. */
UNIV_INTERN
void void
dtuple_set_n_fields( dtuple_set_n_fields(
/*================*/ /*================*/
...@@ -272,7 +272,7 @@ dtuple_get_n_ext( ...@@ -272,7 +272,7 @@ dtuple_get_n_ext(
const dtuple_t* tuple); /* in: tuple */ const dtuple_t* tuple); /* in: tuple */
/**************************************************************** /****************************************************************
Compare two data tuples, respecting the collation of character fields. */ Compare two data tuples, respecting the collation of character fields. */
UNIV_INTERN
int int
dtuple_coll_cmp( dtuple_coll_cmp(
/*============*/ /*============*/
...@@ -311,7 +311,7 @@ dtuple_contains_null( ...@@ -311,7 +311,7 @@ dtuple_contains_null(
const dtuple_t* tuple); /* in: dtuple */ const dtuple_t* tuple); /* in: dtuple */
/************************************************************** /**************************************************************
Checks that a data field is typed. Asserts an error if not. */ Checks that a data field is typed. Asserts an error if not. */
UNIV_INTERN
ibool ibool
dfield_check_typed( dfield_check_typed(
/*===============*/ /*===============*/
...@@ -319,7 +319,7 @@ dfield_check_typed( ...@@ -319,7 +319,7 @@ dfield_check_typed(
const dfield_t* field); /* in: data field */ const dfield_t* field); /* in: data field */
/************************************************************** /**************************************************************
Checks that a data tuple is typed. Asserts an error if not. */ Checks that a data tuple is typed. Asserts an error if not. */
UNIV_INTERN
ibool ibool
dtuple_check_typed( dtuple_check_typed(
/*===============*/ /*===============*/
...@@ -327,7 +327,7 @@ dtuple_check_typed( ...@@ -327,7 +327,7 @@ dtuple_check_typed(
const dtuple_t* tuple); /* in: tuple */ const dtuple_t* tuple); /* in: tuple */
/************************************************************** /**************************************************************
Checks that a data tuple is typed. */ Checks that a data tuple is typed. */
UNIV_INTERN
ibool ibool
dtuple_check_typed_no_assert( dtuple_check_typed_no_assert(
/*=========================*/ /*=========================*/
...@@ -337,7 +337,7 @@ 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, Validates the consistency of a tuple which must be complete, i.e,
all fields must have been set. */ all fields must have been set. */
UNIV_INTERN
ibool ibool
dtuple_validate( dtuple_validate(
/*============*/ /*============*/
...@@ -346,7 +346,7 @@ dtuple_validate( ...@@ -346,7 +346,7 @@ dtuple_validate(
#endif /* UNIV_DEBUG */ #endif /* UNIV_DEBUG */
/***************************************************************** /*****************************************************************
Pretty prints a dfield value according to its data type. */ Pretty prints a dfield value according to its data type. */
UNIV_INTERN
void void
dfield_print( dfield_print(
/*=========*/ /*=========*/
...@@ -354,14 +354,14 @@ dfield_print( ...@@ -354,14 +354,14 @@ dfield_print(
/***************************************************************** /*****************************************************************
Pretty prints a dfield value according to its data type. Also the hex string Pretty prints a dfield value according to its data type. Also the hex string
is printed if a string contains non-printable characters. */ is printed if a string contains non-printable characters. */
UNIV_INTERN
void void
dfield_print_also_hex( dfield_print_also_hex(
/*==================*/ /*==================*/
const dfield_t* dfield); /* in: dfield */ const dfield_t* dfield); /* in: dfield */
/************************************************************** /**************************************************************
The following function prints the contents of a tuple. */ The following function prints the contents of a tuple. */
UNIV_INTERN
void void
dtuple_print( dtuple_print(
/*=========*/ /*=========*/
...@@ -372,7 +372,7 @@ Moves parts of long fields in entry to the big record vector so that ...@@ -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 the size of tuple drops below the maximum record size allowed in the
database. Moves data only from those fields which are not necessary database. Moves data only from those fields which are not necessary
to determine uniquely the insertion place of the tuple in the index. */ to determine uniquely the insertion place of the tuple in the index. */
UNIV_INTERN
big_rec_t* big_rec_t*
dtuple_convert_big_rec( dtuple_convert_big_rec(
/*===================*/ /*===================*/
...@@ -389,7 +389,7 @@ 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 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 fields in entry can accommodate the data, vector must have been created
from entry with dtuple_convert_big_rec. */ from entry with dtuple_convert_big_rec. */
UNIV_INTERN
void void
dtuple_convert_back_big_rec( dtuple_convert_back_big_rec(
/*========================*/ /*========================*/
......
...@@ -164,7 +164,7 @@ dtype_get_mysql_type( ...@@ -164,7 +164,7 @@ dtype_get_mysql_type(
Determine how many bytes the first n characters of the given string occupy. 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 If the string is shorter than n characters, returns the number of bytes
the characters in the string occupy. */ the characters in the string occupy. */
UNIV_INTERN
ulint ulint
dtype_get_at_most_n_mbchars( dtype_get_at_most_n_mbchars(
/*========================*/ /*========================*/
...@@ -184,7 +184,7 @@ 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 Checks if a data main type is a string type. Also a BLOB is considered a
string type. */ string type. */
UNIV_INTERN
ibool ibool
dtype_is_string_type( dtype_is_string_type(
/*=================*/ /*=================*/
...@@ -194,7 +194,7 @@ 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 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 < 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. */ those DATA_BLOB columns this function currently returns FALSE. */
UNIV_INTERN
ibool ibool
dtype_is_binary_string_type( 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 ...@@ -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 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. 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. */ For those DATA_BLOB columns this function currently returns TRUE. */
UNIV_INTERN
ibool ibool
dtype_is_non_binary_string_type( dtype_is_non_binary_string_type(
/*============================*/ /*============================*/
...@@ -267,7 +267,7 @@ dtype_get_charset_coll( ...@@ -267,7 +267,7 @@ dtype_get_charset_coll(
/************************************************************************* /*************************************************************************
Forms a precise type from the < 4.1.2 format precise type plus the Forms a precise type from the < 4.1.2 format precise type plus the
charset-collation code. */ charset-collation code. */
UNIV_INTERN
ulint ulint
dtype_form_prtype( dtype_form_prtype(
/*==============*/ /*==============*/
...@@ -399,7 +399,7 @@ dtype_new_read_for_order_and_null_size( ...@@ -399,7 +399,7 @@ dtype_new_read_for_order_and_null_size(
/************************************************************************* /*************************************************************************
Validates a data type structure. */ Validates a data type structure. */
UNIV_INTERN
ibool ibool
dtype_validate( dtype_validate(
/*===========*/ /*===========*/
...@@ -407,7 +407,7 @@ dtype_validate( ...@@ -407,7 +407,7 @@ dtype_validate(
const dtype_t* type); /* in: type struct to validate */ const dtype_t* type); /* in: type struct to validate */
/************************************************************************* /*************************************************************************
Prints a data type structure. */ Prints a data type structure. */
UNIV_INTERN
void void
dtype_print( dtype_print(
/*========*/ /*========*/
......
...@@ -22,7 +22,7 @@ typedef byte dict_hdr_t; ...@@ -22,7 +22,7 @@ typedef byte dict_hdr_t;
/************************************************************************** /**************************************************************************
Gets a pointer to the dictionary header and x-latches its page. */ Gets a pointer to the dictionary header and x-latches its page. */
UNIV_INTERN
dict_hdr_t* dict_hdr_t*
dict_hdr_get( dict_hdr_get(
/*=========*/ /*=========*/
...@@ -31,7 +31,7 @@ dict_hdr_get( ...@@ -31,7 +31,7 @@ dict_hdr_get(
mtr_t* mtr); /* in: mtr */ mtr_t* mtr); /* in: mtr */
/************************************************************************** /**************************************************************************
Returns a new row, table, index, or tree id. */ Returns a new row, table, index, or tree id. */
UNIV_INTERN
dulint dulint
dict_hdr_get_new_id( dict_hdr_get_new_id(
/*================*/ /*================*/
...@@ -63,13 +63,13 @@ dict_sys_write_row_id( ...@@ -63,13 +63,13 @@ dict_sys_write_row_id(
/********************************************************************* /*********************************************************************
Initializes the data dictionary memory structures when the database is Initializes the data dictionary memory structures when the database is
started. This function is also called when the data dictionary is created. */ started. This function is also called when the data dictionary is created. */
UNIV_INTERN
void void
dict_boot(void); dict_boot(void);
/*===========*/ /*===========*/
/********************************************************************* /*********************************************************************
Creates and initializes the data dictionary at the database creation. */ Creates and initializes the data dictionary at the database creation. */
UNIV_INTERN
void void
dict_create(void); dict_create(void);
/*=============*/ /*=============*/
......
...@@ -18,7 +18,7 @@ Created 1/8/1996 Heikki Tuuri ...@@ -18,7 +18,7 @@ Created 1/8/1996 Heikki Tuuri
/************************************************************************* /*************************************************************************
Creates a table create graph. */ Creates a table create graph. */
UNIV_INTERN
tab_node_t* tab_node_t*
tab_create_graph_create( tab_create_graph_create(
/*====================*/ /*====================*/
...@@ -28,7 +28,7 @@ tab_create_graph_create( ...@@ -28,7 +28,7 @@ tab_create_graph_create(
mem_heap_t* heap); /* in: heap where created */ mem_heap_t* heap); /* in: heap where created */
/************************************************************************* /*************************************************************************
Creates an index create graph. */ Creates an index create graph. */
UNIV_INTERN
ind_node_t* ind_node_t*
ind_create_graph_create( ind_create_graph_create(
/*====================*/ /*====================*/
...@@ -38,7 +38,7 @@ ind_create_graph_create( ...@@ -38,7 +38,7 @@ ind_create_graph_create(
mem_heap_t* heap); /* in: heap where created */ mem_heap_t* heap); /* in: heap where created */
/*************************************************************** /***************************************************************
Creates a table. This is a high-level function used in SQL execution graphs. */ Creates a table. This is a high-level function used in SQL execution graphs. */
UNIV_INTERN
que_thr_t* que_thr_t*
dict_create_table_step( dict_create_table_step(
/*===================*/ /*===================*/
...@@ -47,7 +47,7 @@ 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 Creates an index. This is a high-level function used in SQL execution
graphs. */ graphs. */
UNIV_INTERN
que_thr_t* que_thr_t*
dict_create_index_step( dict_create_index_step(
/*===================*/ /*===================*/
...@@ -55,7 +55,7 @@ dict_create_index_step( ...@@ -55,7 +55,7 @@ dict_create_index_step(
que_thr_t* thr); /* in: query thread */ que_thr_t* thr); /* in: query thread */
/*********************************************************************** /***********************************************************************
Truncates the index tree associated with a row in SYS_INDEXES table. */ Truncates the index tree associated with a row in SYS_INDEXES table. */
UNIV_INTERN
ulint ulint
dict_truncate_index_tree( dict_truncate_index_tree(
/*=====================*/ /*=====================*/
...@@ -74,7 +74,7 @@ dict_truncate_index_tree( ...@@ -74,7 +74,7 @@ dict_truncate_index_tree(
committed and restarted in this call. */ committed and restarted in this call. */
/*********************************************************************** /***********************************************************************
Drops the index tree associated with a row in SYS_INDEXES table. */ Drops the index tree associated with a row in SYS_INDEXES table. */
UNIV_INTERN
void void
dict_drop_index_tree( dict_drop_index_tree(
/*=================*/ /*=================*/
...@@ -86,7 +86,7 @@ dict_drop_index_tree( ...@@ -86,7 +86,7 @@ dict_drop_index_tree(
Creates the foreign key constraints system tables inside InnoDB Creates the foreign key constraints system tables inside InnoDB
at database creation or database start if they are not found or are at database creation or database start if they are not found or are
not of the right form. */ not of the right form. */
UNIV_INTERN
ulint ulint
dict_create_or_check_foreign_constraint_tables(void); 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 ...@@ -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 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 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. */ old format constraints < 4.0.18 it used to be. */
UNIV_INTERN
ulint ulint
dict_create_add_foreigns_to_dictionary( dict_create_add_foreigns_to_dictionary(
/*===================================*/ /*===================================*/
......
This diff is collapsed.
...@@ -23,14 +23,14 @@ to what we already read with fil_load_single_table_tablespaces(). ...@@ -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 In a normal startup, we create the tablespace objects for every table in
InnoDB's data dictionary, if the corresponding .ibd file exists. InnoDB's data dictionary, if the corresponding .ibd file exists.
We also scan the biggest space id, and store it to fil_system. */ We also scan the biggest space id, and store it to fil_system. */
UNIV_INTERN
void void
dict_check_tablespaces_and_store_max_id( dict_check_tablespaces_and_store_max_id(
/*====================================*/ /*====================================*/
ibool in_crash_recovery); /* in: are we doing a crash recovery */ ibool in_crash_recovery); /* in: are we doing a crash recovery */
/************************************************************************ /************************************************************************
Finds the first table name in the given database. */ Finds the first table name in the given database. */
UNIV_INTERN
char* char*
dict_get_first_table_name_in_db( dict_get_first_table_name_in_db(
/*============================*/ /*============================*/
...@@ -43,7 +43,7 @@ Loads a table definition and also all its index definitions, and also ...@@ -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 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 all foreign key constraints where the foreign key is in the table or where
a foreign key references columns in this table. */ a foreign key references columns in this table. */
UNIV_INTERN
dict_table_t* dict_table_t*
dict_load_table( dict_load_table(
/*============*/ /*============*/
...@@ -56,7 +56,7 @@ dict_load_table( ...@@ -56,7 +56,7 @@ dict_load_table(
databasename/tablename format */ databasename/tablename format */
/*************************************************************************** /***************************************************************************
Loads a table object based on the table id. */ Loads a table object based on the table id. */
UNIV_INTERN
dict_table_t* dict_table_t*
dict_load_table_on_id( dict_load_table_on_id(
/*==================*/ /*==================*/
...@@ -66,7 +66,7 @@ dict_load_table_on_id( ...@@ -66,7 +66,7 @@ dict_load_table_on_id(
This function is called when the database is booted. This function is called when the database is booted.
Loads system table index definitions except for the clustered index which Loads system table index definitions except for the clustered index which
is added to the dictionary cache at booting before calling this function. */ is added to the dictionary cache at booting before calling this function. */
UNIV_INTERN
void void
dict_load_sys_table( dict_load_sys_table(
/*================*/ /*================*/
...@@ -78,7 +78,7 @@ holder or where the table is referenced by a foreign key. Adds these ...@@ -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 constraints to the data dictionary. Note that we know that the dictionary
cache already contains all constraints where the other relevant table is cache already contains all constraints where the other relevant table is
already in the dictionary cache. */ already in the dictionary cache. */
UNIV_INTERN
ulint ulint
dict_load_foreigns( dict_load_foreigns(
/*===============*/ /*===============*/
...@@ -90,7 +90,7 @@ dict_load_foreigns( ...@@ -90,7 +90,7 @@ dict_load_foreigns(
/************************************************************************ /************************************************************************
Prints to the standard output information on all tables found in the data Prints to the standard output information on all tables found in the data
dictionary system table. */ dictionary system table. */
UNIV_INTERN
void void
dict_print(void); dict_print(void);
/*============*/ /*============*/
......
...@@ -49,7 +49,7 @@ combination of types */ ...@@ -49,7 +49,7 @@ combination of types */
/************************************************************************** /**************************************************************************
Creates a table memory object. */ Creates a table memory object. */
UNIV_INTERN
dict_table_t* dict_table_t*
dict_mem_table_create( dict_mem_table_create(
/*==================*/ /*==================*/
...@@ -63,14 +63,14 @@ dict_mem_table_create( ...@@ -63,14 +63,14 @@ dict_mem_table_create(
ulint flags); /* in: table flags */ ulint flags); /* in: table flags */
/******************************************************************** /********************************************************************
Free a table memory object. */ Free a table memory object. */
UNIV_INTERN
void void
dict_mem_table_free( dict_mem_table_free(
/*================*/ /*================*/
dict_table_t* table); /* in: table */ dict_table_t* table); /* in: table */
/************************************************************************** /**************************************************************************
Adds a column definition to a table. */ Adds a column definition to a table. */
UNIV_INTERN
void void
dict_mem_table_add_col( dict_mem_table_add_col(
/*===================*/ /*===================*/
...@@ -82,7 +82,7 @@ dict_mem_table_add_col( ...@@ -82,7 +82,7 @@ dict_mem_table_add_col(
ulint len); /* in: precision */ ulint len); /* in: precision */
/************************************************************************** /**************************************************************************
Creates an index memory object. */ Creates an index memory object. */
UNIV_INTERN
dict_index_t* dict_index_t*
dict_mem_index_create( dict_mem_index_create(
/*==================*/ /*==================*/
...@@ -99,7 +99,7 @@ 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 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 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. */ by the column name may be released only after publishing the index. */
UNIV_INTERN
void void
dict_mem_index_add_field( dict_mem_index_add_field(
/*=====================*/ /*=====================*/
...@@ -110,14 +110,14 @@ dict_mem_index_add_field( ...@@ -110,14 +110,14 @@ dict_mem_index_add_field(
INDEX (textcol(25)) */ INDEX (textcol(25)) */
/************************************************************************** /**************************************************************************
Frees an index memory object. */ Frees an index memory object. */
UNIV_INTERN
void void
dict_mem_index_free( dict_mem_index_free(
/*================*/ /*================*/
dict_index_t* index); /* in: index */ dict_index_t* index); /* in: index */
/************************************************************************** /**************************************************************************
Creates and initializes a foreign constraint memory object. */ Creates and initializes a foreign constraint memory object. */
UNIV_INTERN
dict_foreign_t* dict_foreign_t*
dict_mem_foreign_create(void); dict_mem_foreign_create(void);
/*=========================*/ /*=========================*/
......
...@@ -19,7 +19,7 @@ Created 12/29/1997 Heikki Tuuri ...@@ -19,7 +19,7 @@ Created 12/29/1997 Heikki Tuuri
Free the buffer from global dynamic memory for a value of a que_node, 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 if it has been allocated in the above function. The freeing for pushed
column values is done in sel_col_prefetch_buf_free. */ column values is done in sel_col_prefetch_buf_free. */
UNIV_INTERN
void void
eval_node_free_val_buf( eval_node_free_val_buf(
/*===================*/ /*===================*/
...@@ -82,7 +82,7 @@ eval_node_get_ibool_val( ...@@ -82,7 +82,7 @@ eval_node_get_ibool_val(
que_node_t* node); /* in: query graph node */ que_node_t* node); /* in: query graph node */
/********************************************************************* /*********************************************************************
Evaluates a comparison node. */ Evaluates a comparison node. */
UNIV_INTERN
ibool ibool
eval_cmp( eval_cmp(
/*=====*/ /*=====*/
......
...@@ -24,7 +24,7 @@ proc_step( ...@@ -24,7 +24,7 @@ proc_step(
que_thr_t* thr); /* in: query thread */ que_thr_t* thr); /* in: query thread */
/************************************************************************** /**************************************************************************
Performs an execution step of an if-statement node. */ Performs an execution step of an if-statement node. */
UNIV_INTERN
que_thr_t* que_thr_t*
if_step( if_step(
/*====*/ /*====*/
...@@ -32,7 +32,7 @@ if_step( ...@@ -32,7 +32,7 @@ if_step(
que_thr_t* thr); /* in: query thread */ que_thr_t* thr); /* in: query thread */
/************************************************************************** /**************************************************************************
Performs an execution step of a while-statement node. */ Performs an execution step of a while-statement node. */
UNIV_INTERN
que_thr_t* que_thr_t*
while_step( while_step(
/*=======*/ /*=======*/
...@@ -40,7 +40,7 @@ while_step( ...@@ -40,7 +40,7 @@ while_step(
que_thr_t* thr); /* in: query thread */ que_thr_t* thr); /* in: query thread */
/************************************************************************** /**************************************************************************
Performs an execution step of a for-loop node. */ Performs an execution step of a for-loop node. */
UNIV_INTERN
que_thr_t* que_thr_t*
for_step( for_step(
/*=====*/ /*=====*/
...@@ -48,7 +48,7 @@ for_step( ...@@ -48,7 +48,7 @@ for_step(
que_thr_t* thr); /* in: query thread */ que_thr_t* thr); /* in: query thread */
/************************************************************************** /**************************************************************************
Performs an execution step of an assignment statement node. */ Performs an execution step of an assignment statement node. */
UNIV_INTERN
que_thr_t* que_thr_t*
assign_step( assign_step(
/*========*/ /*========*/
...@@ -64,7 +64,7 @@ proc_eval_step( ...@@ -64,7 +64,7 @@ proc_eval_step(
que_thr_t* thr); /* in: query thread */ que_thr_t* thr); /* in: query thread */
/************************************************************************** /**************************************************************************
Performs an execution step of an exit statement node. */ Performs an execution step of an exit statement node. */
UNIV_INTERN
que_thr_t* que_thr_t*
exit_step( exit_step(
/*======*/ /*======*/
...@@ -72,7 +72,7 @@ exit_step( ...@@ -72,7 +72,7 @@ exit_step(
que_thr_t* thr); /* in: query thread */ que_thr_t* thr); /* in: query thread */
/************************************************************************** /**************************************************************************
Performs an execution step of a return-statement node. */ Performs an execution step of a return-statement node. */
UNIV_INTERN
que_thr_t* que_thr_t*
return_step( return_step(
/*========*/ /*========*/
......
This diff is collapsed.
...@@ -41,7 +41,7 @@ typedef byte fseg_header_t; ...@@ -41,7 +41,7 @@ typedef byte fseg_header_t;
/************************************************************************** /**************************************************************************
Initializes the file space system. */ Initializes the file space system. */
UNIV_INTERN
void void
fsp_init(void); fsp_init(void);
/*==========*/ /*==========*/
...@@ -50,7 +50,7 @@ Gets the current free limit of a tablespace. The free limit means the ...@@ -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 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. for allocation. The space above that address is initialized to zero.
Sets also the global variable log_fsp_current_free_limit. */ Sets also the global variable log_fsp_current_free_limit. */
UNIV_INTERN
ulint ulint
fsp_header_get_free_limit( fsp_header_get_free_limit(
/*======================*/ /*======================*/
...@@ -60,7 +60,7 @@ 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 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 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. */ data files. If there is an auto-extending data file, this can be smaller. */
UNIV_INTERN
ulint ulint
fsp_header_get_tablespace_size( fsp_header_get_tablespace_size(
/*===========================*/ /*===========================*/
...@@ -68,7 +68,7 @@ fsp_header_get_tablespace_size( ...@@ -68,7 +68,7 @@ fsp_header_get_tablespace_size(
ulint space); /* in: space id, must be 0 */ ulint space); /* in: space id, must be 0 */
/************************************************************************** /**************************************************************************
Reads the file space size stored in the header page. */ Reads the file space size stored in the header page. */
UNIV_INTERN
ulint ulint
fsp_get_size_low( fsp_get_size_low(
/*=============*/ /*=============*/
...@@ -76,7 +76,7 @@ fsp_get_size_low( ...@@ -76,7 +76,7 @@ fsp_get_size_low(
page_t* page); /* in: header page (page 0 in the tablespace) */ page_t* page); /* in: header page (page 0 in the tablespace) */
/************************************************************************** /**************************************************************************
Reads the space id from the first page of a tablespace. */ Reads the space id from the first page of a tablespace. */
UNIV_INTERN
ulint ulint
fsp_header_get_space_id( fsp_header_get_space_id(
/*====================*/ /*====================*/
...@@ -84,7 +84,7 @@ fsp_header_get_space_id( ...@@ -84,7 +84,7 @@ fsp_header_get_space_id(
const page_t* page); /* in: first page of a tablespace */ const page_t* page); /* in: first page of a tablespace */
/************************************************************************** /**************************************************************************
Reads the compressed page size from the first page of a tablespace. */ Reads the compressed page size from the first page of a tablespace. */
UNIV_INTERN
ulint ulint
fsp_header_get_zip_size( fsp_header_get_zip_size(
/*====================*/ /*====================*/
...@@ -95,7 +95,7 @@ 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. 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 This function is used past the buffer pool when we in fil0fil.c create
a new single-table tablespace. */ a new single-table tablespace. */
UNIV_INTERN
void void
fsp_header_init_fields( fsp_header_init_fields(
/*===================*/ /*===================*/
...@@ -106,7 +106,7 @@ 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 Initializes the space header of a new created space and creates also the
insert buffer tree root if space == 0. */ insert buffer tree root if space == 0. */
UNIV_INTERN
void void
fsp_header_init( fsp_header_init(
/*============*/ /*============*/
...@@ -115,7 +115,7 @@ fsp_header_init( ...@@ -115,7 +115,7 @@ fsp_header_init(
mtr_t* mtr); /* in: mini-transaction handle */ mtr_t* mtr); /* in: mini-transaction handle */
/************************************************************************** /**************************************************************************
Increases the space size field of a space. */ Increases the space size field of a space. */
UNIV_INTERN
void void
fsp_header_inc_size( fsp_header_inc_size(
/*================*/ /*================*/
...@@ -124,7 +124,7 @@ fsp_header_inc_size( ...@@ -124,7 +124,7 @@ fsp_header_inc_size(
mtr_t* mtr); /* in: mini-transaction handle */ mtr_t* mtr); /* in: mini-transaction handle */
/************************************************************************** /**************************************************************************
Creates a new segment. */ Creates a new segment. */
UNIV_INTERN
buf_block_t* buf_block_t*
fseg_create( fseg_create(
/*========*/ /*========*/
...@@ -141,7 +141,7 @@ fseg_create( ...@@ -141,7 +141,7 @@ fseg_create(
mtr_t* mtr); /* in: mtr */ mtr_t* mtr); /* in: mtr */
/************************************************************************** /**************************************************************************
Creates a new segment. */ Creates a new segment. */
UNIV_INTERN
buf_block_t* buf_block_t*
fseg_create_general( fseg_create_general(
/*================*/ /*================*/
...@@ -165,7 +165,7 @@ fseg_create_general( ...@@ -165,7 +165,7 @@ fseg_create_general(
/************************************************************************** /**************************************************************************
Calculates the number of pages reserved by a segment, and how many pages are Calculates the number of pages reserved by a segment, and how many pages are
currently used. */ currently used. */
UNIV_INTERN
ulint ulint
fseg_n_reserved_pages( fseg_n_reserved_pages(
/*==================*/ /*==================*/
...@@ -177,7 +177,7 @@ fseg_n_reserved_pages( ...@@ -177,7 +177,7 @@ fseg_n_reserved_pages(
Allocates a single free page from a segment. This function implements Allocates a single free page from a segment. This function implements
the intelligent allocation strategy which tries to minimize the intelligent allocation strategy which tries to minimize
file space fragmentation. */ file space fragmentation. */
UNIV_INTERN
ulint ulint
fseg_alloc_free_page( fseg_alloc_free_page(
/*=================*/ /*=================*/
...@@ -195,7 +195,7 @@ fseg_alloc_free_page( ...@@ -195,7 +195,7 @@ fseg_alloc_free_page(
Allocates a single free page from a segment. This function implements Allocates a single free page from a segment. This function implements
the intelligent allocation strategy which tries to minimize file space the intelligent allocation strategy which tries to minimize file space
fragmentation. */ fragmentation. */
UNIV_INTERN
ulint ulint
fseg_alloc_free_page_general( fseg_alloc_free_page_general(
/*=========================*/ /*=========================*/
...@@ -239,7 +239,7 @@ function we would liberally reserve several 64 page extents for every page ...@@ -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 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 only occupies < 32 pages. That is why we apply different rules in that special
case, just ensuring that there are 3 free pages available. */ case, just ensuring that there are 3 free pages available. */
UNIV_INTERN
ibool ibool
fsp_reserve_free_extents( fsp_reserve_free_extents(
/*=====================*/ /*=====================*/
...@@ -256,7 +256,7 @@ This function should be used to get information on how much we still ...@@ -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 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 tablespace. Only free extents are taken into account and we also subtract
the safety margin required by the above function fsp_reserve_free_extents. */ the safety margin required by the above function fsp_reserve_free_extents. */
UNIV_INTERN
ullint ullint
fsp_get_available_space_in_free_extents( fsp_get_available_space_in_free_extents(
/*====================================*/ /*====================================*/
...@@ -264,7 +264,7 @@ fsp_get_available_space_in_free_extents( ...@@ -264,7 +264,7 @@ fsp_get_available_space_in_free_extents(
ulint space); /* in: space id */ ulint space); /* in: space id */
/************************************************************************** /**************************************************************************
Frees a single page of a segment. */ Frees a single page of a segment. */
UNIV_INTERN
void void
fseg_free_page( fseg_free_page(
/*===========*/ /*===========*/
...@@ -275,7 +275,7 @@ fseg_free_page( ...@@ -275,7 +275,7 @@ fseg_free_page(
/*********************************************************************** /***********************************************************************
Frees a segment. The freeing is performed in several mini-transactions, Frees a segment. The freeing is performed in several mini-transactions,
so that there is no danger of bufferfixing too many buffer pages. */ so that there is no danger of bufferfixing too many buffer pages. */
UNIV_INTERN
void void
fseg_free( fseg_free(
/*======*/ /*======*/
...@@ -291,7 +291,7 @@ Frees part of a segment. This function can be used to free a segment ...@@ -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. by repeatedly calling this function in different mini-transactions.
Doing the freeing in a single mini-transaction might result in Doing the freeing in a single mini-transaction might result in
too big a mini-transaction. */ too big a mini-transaction. */
UNIV_INTERN
ibool ibool
fseg_free_step( fseg_free_step(
/*===========*/ /*===========*/
...@@ -304,7 +304,7 @@ fseg_free_step( ...@@ -304,7 +304,7 @@ fseg_free_step(
/************************************************************************** /**************************************************************************
Frees part of a segment. Differs from fseg_free_step because this function Frees part of a segment. Differs from fseg_free_step because this function
leaves the header page unfreed. */ leaves the header page unfreed. */
UNIV_INTERN
ibool ibool
fseg_free_step_not_header( fseg_free_step_not_header(
/*======================*/ /*======================*/
...@@ -325,7 +325,7 @@ fsp_descr_page( ...@@ -325,7 +325,7 @@ fsp_descr_page(
ulint page_no);/* in: page number */ ulint page_no);/* in: page number */
/*************************************************************** /***************************************************************
Parses a redo log record of a file page init. */ Parses a redo log record of a file page init. */
UNIV_INTERN
byte* byte*
fsp_parse_init_file_page( fsp_parse_init_file_page(
/*=====================*/ /*=====================*/
...@@ -335,7 +335,7 @@ fsp_parse_init_file_page( ...@@ -335,7 +335,7 @@ fsp_parse_init_file_page(
buf_block_t* block); /* in: block or NULL */ buf_block_t* block); /* in: block or NULL */
/*********************************************************************** /***********************************************************************
Validates the file space system and its segments. */ Validates the file space system and its segments. */
UNIV_INTERN
ibool ibool
fsp_validate( fsp_validate(
/*=========*/ /*=========*/
...@@ -343,14 +343,14 @@ fsp_validate( ...@@ -343,14 +343,14 @@ fsp_validate(
ulint space); /* in: space id */ ulint space); /* in: space id */
/*********************************************************************** /***********************************************************************
Prints info of a file space. */ Prints info of a file space. */
UNIV_INTERN
void void
fsp_print( fsp_print(
/*======*/ /*======*/
ulint space); /* in: space id */ ulint space); /* in: space id */
/*********************************************************************** /***********************************************************************
Validates a segment. */ Validates a segment. */
UNIV_INTERN
ibool ibool
fseg_validate( fseg_validate(
/*==========*/ /*==========*/
...@@ -359,7 +359,7 @@ fseg_validate( ...@@ -359,7 +359,7 @@ fseg_validate(
mtr_t* mtr2); /* in: mtr */ mtr_t* mtr2); /* in: mtr */
/*********************************************************************** /***********************************************************************
Writes info of a segment. */ Writes info of a segment. */
UNIV_INTERN
void void
fseg_print( fseg_print(
/*=======*/ /*=======*/
......
...@@ -39,7 +39,7 @@ flst_init( ...@@ -39,7 +39,7 @@ flst_init(
mtr_t* mtr); /* in: mini-transaction handle */ mtr_t* mtr); /* in: mini-transaction handle */
/************************************************************************ /************************************************************************
Adds a node as the last node in a list. */ Adds a node as the last node in a list. */
UNIV_INTERN
void void
flst_add_last( flst_add_last(
/*==========*/ /*==========*/
...@@ -48,7 +48,7 @@ flst_add_last( ...@@ -48,7 +48,7 @@ flst_add_last(
mtr_t* mtr); /* in: mini-transaction handle */ mtr_t* mtr); /* in: mini-transaction handle */
/************************************************************************ /************************************************************************
Adds a node as the first node in a list. */ Adds a node as the first node in a list. */
UNIV_INTERN
void void
flst_add_first( flst_add_first(
/*===========*/ /*===========*/
...@@ -57,7 +57,7 @@ flst_add_first( ...@@ -57,7 +57,7 @@ flst_add_first(
mtr_t* mtr); /* in: mini-transaction handle */ mtr_t* mtr); /* in: mini-transaction handle */
/************************************************************************ /************************************************************************
Inserts a node after another in a list. */ Inserts a node after another in a list. */
UNIV_INTERN
void void
flst_insert_after( flst_insert_after(
/*==============*/ /*==============*/
...@@ -67,7 +67,7 @@ flst_insert_after( ...@@ -67,7 +67,7 @@ flst_insert_after(
mtr_t* mtr); /* in: mini-transaction handle */ mtr_t* mtr); /* in: mini-transaction handle */
/************************************************************************ /************************************************************************
Inserts a node before another in a list. */ Inserts a node before another in a list. */
UNIV_INTERN
void void
flst_insert_before( flst_insert_before(
/*===============*/ /*===============*/
...@@ -77,7 +77,7 @@ flst_insert_before( ...@@ -77,7 +77,7 @@ flst_insert_before(
mtr_t* mtr); /* in: mini-transaction handle */ mtr_t* mtr); /* in: mini-transaction handle */
/************************************************************************ /************************************************************************
Removes a node. */ Removes a node. */
UNIV_INTERN
void void
flst_remove( flst_remove(
/*========*/ /*========*/
...@@ -88,7 +88,7 @@ flst_remove( ...@@ -88,7 +88,7 @@ flst_remove(
Cuts off the tail of the list, including the node given. The number of 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 nodes which will be removed must be provided by the caller, as this function
does not measure the length of the tail. */ does not measure the length of the tail. */
UNIV_INTERN
void void
flst_cut_end( flst_cut_end(
/*=========*/ /*=========*/
...@@ -101,7 +101,7 @@ 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 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 nodes which will be removed must be provided by the caller, as this function
does not measure the length of the tail. */ does not measure the length of the tail. */
UNIV_INTERN
void void
flst_truncate_end( flst_truncate_end(
/*==============*/ /*==============*/
...@@ -174,7 +174,7 @@ flst_read_addr( ...@@ -174,7 +174,7 @@ flst_read_addr(
mtr_t* mtr); /* in: mini-transaction handle */ mtr_t* mtr); /* in: mini-transaction handle */
/************************************************************************ /************************************************************************
Validates a file-based list. */ Validates a file-based list. */
UNIV_INTERN
ibool ibool
flst_validate( flst_validate(
/*==========*/ /*==========*/
...@@ -183,7 +183,7 @@ flst_validate( ...@@ -183,7 +183,7 @@ flst_validate(
mtr_t* mtr1); /* in: mtr */ mtr_t* mtr1); /* in: mtr */
/************************************************************************ /************************************************************************
Prints info of a file-based list. */ Prints info of a file-based list. */
UNIV_INTERN
void void
flst_print( flst_print(
/*=======*/ /*=======*/
......
...@@ -29,7 +29,7 @@ ha_search_and_get_data( ...@@ -29,7 +29,7 @@ ha_search_and_get_data(
/************************************************************* /*************************************************************
Looks for an element when we know the pointer to the data and updates Looks for an element when we know the pointer to the data and updates
the pointer to data if found. */ the pointer to data if found. */
UNIV_INTERN
void void
ha_search_and_update_if_found_func( ha_search_and_update_if_found_func(
/*===============================*/ /*===============================*/
...@@ -51,7 +51,7 @@ 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 Creates a hash table with >= n array cells. The actual number of cells is
chosen to be a prime number slightly bigger than n. */ chosen to be a prime number slightly bigger than n. */
UNIV_INTERN
hash_table_t* hash_table_t*
ha_create_func( ha_create_func(
/*===========*/ /*===========*/
...@@ -71,7 +71,7 @@ ha_create_func( ...@@ -71,7 +71,7 @@ ha_create_func(
/***************************************************************** /*****************************************************************
Empties a hash table and frees the memory heaps. */ Empties a hash table and frees the memory heaps. */
UNIV_INTERN
void void
ha_clear( ha_clear(
/*=====*/ /*=====*/
...@@ -81,7 +81,7 @@ ha_clear( ...@@ -81,7 +81,7 @@ ha_clear(
Inserts an entry into a hash table. If an entry with the same fold number 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 found, its node is updated to point to the new data, and no new node
is inserted. */ is inserted. */
UNIV_INTERN
ibool ibool
ha_insert_for_fold_func( ha_insert_for_fold_func(
/*====================*/ /*====================*/
...@@ -105,7 +105,7 @@ ha_insert_for_fold_func( ...@@ -105,7 +105,7 @@ ha_insert_for_fold_func(
/***************************************************************** /*****************************************************************
Deletes an entry from a hash table. */ Deletes an entry from a hash table. */
UNIV_INTERN
void void
ha_delete( ha_delete(
/*======*/ /*======*/
...@@ -127,7 +127,7 @@ ha_search_and_delete_if_found( ...@@ -127,7 +127,7 @@ ha_search_and_delete_if_found(
/********************************************************************* /*********************************************************************
Removes from the chain determined by fold all nodes whose data pointer Removes from the chain determined by fold all nodes whose data pointer
points to the page given. */ points to the page given. */
UNIV_INTERN
void void
ha_remove_all_nodes_to_page( ha_remove_all_nodes_to_page(
/*========================*/ /*========================*/
...@@ -136,7 +136,7 @@ ha_remove_all_nodes_to_page( ...@@ -136,7 +136,7 @@ ha_remove_all_nodes_to_page(
const page_t* page); /* in: buffer page */ const page_t* page); /* in: buffer page */
/***************************************************************** /*****************************************************************
Validates a given range of the cells in hash table. */ Validates a given range of the cells in hash table. */
UNIV_INTERN
ibool ibool
ha_validate( ha_validate(
/*========*/ /*========*/
...@@ -146,7 +146,7 @@ ha_validate( ...@@ -146,7 +146,7 @@ ha_validate(
ulint end_index); /* in: end index */ ulint end_index); /* in: end index */
/***************************************************************** /*****************************************************************
Prints info of a hash table. */ Prints info of a hash table. */
UNIV_INTERN
void void
ha_print_info( ha_print_info(
/*==========*/ /*==========*/
......
...@@ -6,7 +6,7 @@ Smart ALTER TABLE ...@@ -6,7 +6,7 @@ Smart ALTER TABLE
/***************************************************************** /*****************************************************************
Copies an InnoDB record to table->record[0]. */ Copies an InnoDB record to table->record[0]. */
UNIV_INTERN
void void
innobase_rec_to_mysql( innobase_rec_to_mysql(
/*==================*/ /*==================*/
...@@ -18,7 +18,7 @@ innobase_rec_to_mysql( ...@@ -18,7 +18,7 @@ innobase_rec_to_mysql(
/***************************************************************** /*****************************************************************
Resets table->record[0]. */ Resets table->record[0]. */
UNIV_INTERN
void void
innobase_rec_reset( innobase_rec_reset(
/*===============*/ /*===============*/
......
...@@ -24,7 +24,7 @@ typedef void* hash_node_t; ...@@ -24,7 +24,7 @@ typedef void* hash_node_t;
/***************************************************************** /*****************************************************************
Creates a hash table with >= n array cells. The actual number Creates a hash table with >= n array cells. The actual number
of cells is chosen to be a prime number slightly bigger than n. */ of cells is chosen to be a prime number slightly bigger than n. */
UNIV_INTERN
hash_table_t* hash_table_t*
hash_create( hash_create(
/*========*/ /*========*/
...@@ -32,7 +32,7 @@ hash_create( ...@@ -32,7 +32,7 @@ hash_create(
ulint n); /* in: number of array cells */ ulint n); /* in: number of array cells */
/***************************************************************** /*****************************************************************
Creates a mutex array to protect a hash table. */ Creates a mutex array to protect a hash table. */
UNIV_INTERN
void void
hash_create_mutexes_func( hash_create_mutexes_func(
/*=====================*/ /*=====================*/
...@@ -50,7 +50,7 @@ hash_create_mutexes_func( ...@@ -50,7 +50,7 @@ hash_create_mutexes_func(
/***************************************************************** /*****************************************************************
Frees a hash table. */ Frees a hash table. */
UNIV_INTERN
void void
hash_table_free( hash_table_free(
/*============*/ /*============*/
...@@ -327,7 +327,7 @@ hash_get_mutex( ...@@ -327,7 +327,7 @@ hash_get_mutex(
ulint fold); /* in: fold */ ulint fold); /* in: fold */
/**************************************************************** /****************************************************************
Reserves the mutex for a fold value in a hash table. */ Reserves the mutex for a fold value in a hash table. */
UNIV_INTERN
void void
hash_mutex_enter( hash_mutex_enter(
/*=============*/ /*=============*/
...@@ -335,7 +335,7 @@ hash_mutex_enter( ...@@ -335,7 +335,7 @@ hash_mutex_enter(
ulint fold); /* in: fold */ ulint fold); /* in: fold */
/**************************************************************** /****************************************************************
Releases the mutex for a fold value in a hash table. */ Releases the mutex for a fold value in a hash table. */
UNIV_INTERN
void void
hash_mutex_exit( hash_mutex_exit(
/*============*/ /*============*/
...@@ -343,14 +343,14 @@ hash_mutex_exit( ...@@ -343,14 +343,14 @@ hash_mutex_exit(
ulint fold); /* in: fold */ ulint fold); /* in: fold */
/**************************************************************** /****************************************************************
Reserves all the mutexes of a hash table, in an ascending order. */ Reserves all the mutexes of a hash table, in an ascending order. */
UNIV_INTERN
void void
hash_mutex_enter_all( hash_mutex_enter_all(
/*=================*/ /*=================*/
hash_table_t* table); /* in: hash table */ hash_table_t* table); /* in: hash table */
/**************************************************************** /****************************************************************
Releases all the mutexes of a hash table. */ Releases all the mutexes of a hash table. */
UNIV_INTERN
void void
hash_mutex_exit_all( hash_mutex_exit_all(
/*================*/ /*================*/
......
...@@ -25,7 +25,7 @@ Creates the insert buffer data struct for a single tablespace. Reads the ...@@ -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 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 be called only after the dictionary system has been initialized, as this
creates also the insert buffer table and index for this tablespace. */ creates also the insert buffer table and index for this tablespace. */
UNIV_INTERN
ibuf_data_t* ibuf_data_t*
ibuf_data_init_for_space( ibuf_data_init_for_space(
/*=====================*/ /*=====================*/
...@@ -35,20 +35,20 @@ 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 Creates the insert buffer data structure at a database startup and
initializes the data structures for the insert buffer of each tablespace. */ initializes the data structures for the insert buffer of each tablespace. */
UNIV_INTERN
void void
ibuf_init_at_db_start(void); ibuf_init_at_db_start(void);
/*=======================*/ /*=======================*/
/************************************************************************* /*************************************************************************
Reads the biggest tablespace id from the high end of the insert buffer Reads the biggest tablespace id from the high end of the insert buffer
tree and updates the counter in fil_system. */ tree and updates the counter in fil_system. */
UNIV_INTERN
void void
ibuf_update_max_tablespace_id(void); ibuf_update_max_tablespace_id(void);
/*===============================*/ /*===============================*/
/************************************************************************* /*************************************************************************
Initializes an ibuf bitmap page. */ Initializes an ibuf bitmap page. */
UNIV_INTERN
void void
ibuf_bitmap_page_init( ibuf_bitmap_page_init(
/*==================*/ /*==================*/
...@@ -59,7 +59,7 @@ Resets the free bits of the page in the ibuf bitmap. This is done in a ...@@ -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 separate mini-transaction, hence this operation does not restrict further
work to only ibuf bitmap operations, which would result if the latch to the work to only ibuf bitmap operations, which would result if the latch to the
bitmap page were kept. */ bitmap page were kept. */
UNIV_INTERN
void void
ibuf_reset_free_bits( ibuf_reset_free_bits(
/*=================*/ /*=================*/
...@@ -91,7 +91,7 @@ ibuf_update_free_bits_if_full( ...@@ -91,7 +91,7 @@ ibuf_update_free_bits_if_full(
Updates the free bits for an uncompressed page to reflect the present state. 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 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. */ prevent any further operations for this OS thread until mtr is committed. */
UNIV_INTERN
void void
ibuf_update_free_bits_low( ibuf_update_free_bits_low(
/*======================*/ /*======================*/
...@@ -106,7 +106,7 @@ 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. 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 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. */ prevent any further operations for this OS thread until mtr is committed. */
UNIV_INTERN
void void
ibuf_update_free_bits_zip( ibuf_update_free_bits_zip(
/*======================*/ /*======================*/
...@@ -116,7 +116,7 @@ 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 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 this in the mtr given, which means that the latching order rules virtually
prevent any further operations until mtr is committed. */ prevent any further operations until mtr is committed. */
UNIV_INTERN
void void
ibuf_update_free_bits_for_two_pages_low( ibuf_update_free_bits_for_two_pages_low(
/*====================================*/ /*====================================*/
...@@ -140,7 +140,7 @@ ibuf_should_try( ...@@ -140,7 +140,7 @@ ibuf_should_try(
/********************************************************************** /**********************************************************************
Returns TRUE if the current OS thread is performing an insert buffer Returns TRUE if the current OS thread is performing an insert buffer
routine. */ routine. */
UNIV_INTERN
ibool ibool
ibuf_inside(void); ibuf_inside(void);
/*=============*/ /*=============*/
...@@ -158,7 +158,7 @@ ibuf_bitmap_page( ...@@ -158,7 +158,7 @@ ibuf_bitmap_page(
ulint page_no);/* in: page number */ ulint page_no);/* in: page number */
/*************************************************************************** /***************************************************************************
Checks if a page is a level 2 or 3 page in the ibuf hierarchy of pages. */ Checks if a page is a level 2 or 3 page in the ibuf hierarchy of pages. */
UNIV_INTERN
ibool ibool
ibuf_page( ibuf_page(
/*======*/ /*======*/
...@@ -168,7 +168,7 @@ ibuf_page( ...@@ -168,7 +168,7 @@ ibuf_page(
ulint page_no);/* in: page number */ ulint page_no);/* in: page number */
/*************************************************************************** /***************************************************************************
Checks if a page is a level 2 or 3 page in the ibuf hierarchy of pages. */ Checks if a page is a level 2 or 3 page in the ibuf hierarchy of pages. */
UNIV_INTERN
ibool ibool
ibuf_page_low( ibuf_page_low(
/*==========*/ /*==========*/
...@@ -183,7 +183,7 @@ 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 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 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. */ file segment, and the thread did not own the fsp latch before this call. */
UNIV_INTERN
void void
ibuf_free_excess_pages( ibuf_free_excess_pages(
/*===================*/ /*===================*/
...@@ -192,7 +192,7 @@ 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 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 page, if this is possible. Does not do insert if the index is clustered
or unique. */ or unique. */
UNIV_INTERN
ibool ibool
ibuf_insert( ibuf_insert(
/*========*/ /*========*/
...@@ -210,7 +210,7 @@ The entries are deleted from the insert buffer. If the page is not read, but ...@@ -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 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 the insert buffer; there can exist entries for such a page if the page
belonged to an index which subsequently was dropped. */ belonged to an index which subsequently was dropped. */
UNIV_INTERN
void void
ibuf_merge_or_delete_for_page( 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 ...@@ -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. in DISCARD TABLESPACE and IMPORT TABLESPACE.
NOTE: this does not update the page free bitmaps in the space. The space will NOTE: this does not update the page free bitmaps in the space. The space will
become CORRUPT when you call this function! */ become CORRUPT when you call this function! */
UNIV_INTERN
void void
ibuf_delete_for_discarded_space( ibuf_delete_for_discarded_space(
/*============================*/ /*============================*/
ulint space); /* in: space id */ ulint space); /* in: space id */
/************************************************************************* /*************************************************************************
Contracts insert buffer trees by reading pages to the buffer pool. */ Contracts insert buffer trees by reading pages to the buffer pool. */
UNIV_INTERN
ulint ulint
ibuf_contract( ibuf_contract(
/*==========*/ /*==========*/
...@@ -250,7 +250,7 @@ ibuf_contract( ...@@ -250,7 +250,7 @@ ibuf_contract(
to complete */ to complete */
/************************************************************************* /*************************************************************************
Contracts insert buffer trees by reading pages to the buffer pool. */ Contracts insert buffer trees by reading pages to the buffer pool. */
UNIV_INTERN
ulint ulint
ibuf_contract_for_n_pages( ibuf_contract_for_n_pages(
/*======================*/ /*======================*/
...@@ -265,7 +265,7 @@ ibuf_contract_for_n_pages( ...@@ -265,7 +265,7 @@ ibuf_contract_for_n_pages(
them */ them */
/************************************************************************* /*************************************************************************
Parses a redo log record of an ibuf bitmap page init. */ Parses a redo log record of an ibuf bitmap page init. */
UNIV_INTERN
byte* byte*
ibuf_parse_bitmap_init( ibuf_parse_bitmap_init(
/*===================*/ /*===================*/
...@@ -277,7 +277,7 @@ ibuf_parse_bitmap_init( ...@@ -277,7 +277,7 @@ ibuf_parse_bitmap_init(
#ifdef UNIV_IBUF_COUNT_DEBUG #ifdef UNIV_IBUF_COUNT_DEBUG
/********************************************************************** /**********************************************************************
Gets the ibuf count for a given page. */ Gets the ibuf count for a given page. */
UNIV_INTERN
ulint ulint
ibuf_count_get( ibuf_count_get(
/*===========*/ /*===========*/
...@@ -288,14 +288,14 @@ ibuf_count_get( ...@@ -288,14 +288,14 @@ ibuf_count_get(
#endif #endif
/********************************************************************** /**********************************************************************
Looks if the insert buffer is empty. */ Looks if the insert buffer is empty. */
UNIV_INTERN
ibool ibool
ibuf_is_empty(void); ibuf_is_empty(void);
/*===============*/ /*===============*/
/* out: TRUE if empty */ /* out: TRUE if empty */
/********************************************************************** /**********************************************************************
Prints info of ibuf. */ Prints info of ibuf. */
UNIV_INTERN
void void
ibuf_print( ibuf_print(
/*=======*/ /*=======*/
......
...@@ -29,7 +29,7 @@ record is stored. It can be undefined (ULINT_UNDEFINED) in two cases: ...@@ -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 bit_no is calculated in this function by using
lock_rec_find_set_bit(). There is exactly one bit set in the bitmap lock_rec_find_set_bit(). There is exactly one bit set in the bitmap
of a wait lock. */ of a wait lock. */
UNIV_INTERN
void void
lock_queue_iterator_reset( lock_queue_iterator_reset(
/*======================*/ /*======================*/
......
This diff is collapsed.
...@@ -34,14 +34,14 @@ extern ibool log_debug_writes; ...@@ -34,14 +34,14 @@ extern ibool log_debug_writes;
Sets the global variable log_fsp_current_free_limit. Also makes a checkpoint, 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 so that we know that the limit has been written to a log checkpoint field
on disk. */ on disk. */
UNIV_INTERN
void void
log_fsp_current_free_limit_set_and_checkpoint( log_fsp_current_free_limit_set_and_checkpoint(
/*==========================================*/ /*==========================================*/
ulint limit); /* in: limit to set */ ulint limit); /* in: limit to set */
/*********************************************************************** /***********************************************************************
Calculates where in log files we find a specified lsn. */ Calculates where in log files we find a specified lsn. */
UNIV_INTERN
ulint ulint
log_calc_where_lsn_is( log_calc_where_lsn_is(
/*==================*/ /*==================*/
...@@ -87,7 +87,7 @@ log_free_check(void); ...@@ -87,7 +87,7 @@ log_free_check(void);
/**************************************************************** /****************************************************************
Opens the log for log_write_low. The log must be closed with log_close and Opens the log for log_write_low. The log must be closed with log_close and
released with log_release. */ released with log_release. */
UNIV_INTERN
ib_uint64_t ib_uint64_t
log_reserve_and_open( log_reserve_and_open(
/*=================*/ /*=================*/
...@@ -96,7 +96,7 @@ 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 Writes to the log the string given. It is assumed that the caller holds the
log mutex. */ log mutex. */
UNIV_INTERN
void void
log_write_low( log_write_low(
/*==========*/ /*==========*/
...@@ -104,7 +104,7 @@ log_write_low( ...@@ -104,7 +104,7 @@ log_write_low(
ulint str_len); /* in: string length */ ulint str_len); /* in: string length */
/**************************************************************** /****************************************************************
Closes the log. */ Closes the log. */
UNIV_INTERN
ib_uint64_t ib_uint64_t
log_close(void); log_close(void);
/*===========*/ /*===========*/
...@@ -118,13 +118,13 @@ log_get_lsn(void); ...@@ -118,13 +118,13 @@ log_get_lsn(void);
/* out: current lsn */ /* out: current lsn */
/********************************************************** /**********************************************************
Initializes the log. */ Initializes the log. */
UNIV_INTERN
void void
log_init(void); log_init(void);
/*==========*/ /*==========*/
/********************************************************************** /**********************************************************************
Inits a log group to the log system. */ Inits a log group to the log system. */
UNIV_INTERN
void void
log_group_init( log_group_init(
/*===========*/ /*===========*/
...@@ -141,7 +141,7 @@ log_group_init( ...@@ -141,7 +141,7 @@ log_group_init(
used */ used */
/********************************************************** /**********************************************************
Completes an i/o to a log file. */ Completes an i/o to a log file. */
UNIV_INTERN
void void
log_io_complete( log_io_complete(
/*============*/ /*============*/
...@@ -151,7 +151,7 @@ This function is called, e.g., when a transaction wants to commit. It checks ...@@ -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 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 by the transaction. If there is a flush running, it waits and checks if the
flush flushed enough. If not, starts a new flush. */ flush flushed enough. If not, starts a new flush. */
UNIV_INTERN
void void
log_write_up_to( log_write_up_to(
/*============*/ /*============*/
...@@ -165,7 +165,7 @@ log_write_up_to( ...@@ -165,7 +165,7 @@ log_write_up_to(
also to be flushed to disk */ also to be flushed to disk */
/******************************************************************** /********************************************************************
Does a syncronous flush of the log buffer to disk. */ Does a syncronous flush of the log buffer to disk. */
UNIV_INTERN
void void
log_buffer_flush_to_disk(void); log_buffer_flush_to_disk(void);
/*==========================*/ /*==========================*/
...@@ -173,7 +173,7 @@ 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 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 buffer pool and also may make a new checkpoint. NOTE: this function may only
be called if the calling thread owns no synchronization objects! */ be called if the calling thread owns no synchronization objects! */
UNIV_INTERN
ibool ibool
log_preflush_pool_modified_pages( log_preflush_pool_modified_pages(
/*=============================*/ /*=============================*/
...@@ -192,7 +192,7 @@ Makes a checkpoint. Note that this function does not flush dirty ...@@ -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 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 modification in the pool, and writes information about the lsn in
log files. Use log_make_checkpoint_at to flush also the pool. */ log files. Use log_make_checkpoint_at to flush also the pool. */
UNIV_INTERN
ibool ibool
log_checkpoint( log_checkpoint(
/*===========*/ /*===========*/
...@@ -208,7 +208,7 @@ log_checkpoint( ...@@ -208,7 +208,7 @@ log_checkpoint(
made to log files */ made to log files */
/******************************************************************** /********************************************************************
Makes a checkpoint at a given lsn or later. */ Makes a checkpoint at a given lsn or later. */
UNIV_INTERN
void void
log_make_checkpoint_at( log_make_checkpoint_at(
/*===================*/ /*===================*/
...@@ -227,13 +227,13 @@ Makes a checkpoint at the latest lsn and writes it to first page of each ...@@ -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 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 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. */ shutdown. This function also writes all log in log files to the log archive. */
UNIV_INTERN
void void
logs_empty_and_mark_files_at_shutdown(void); logs_empty_and_mark_files_at_shutdown(void);
/*=======================================*/ /*=======================================*/
/********************************************************** /**********************************************************
Reads a checkpoint info from a log group header to log_sys->checkpoint_buf. */ Reads a checkpoint info from a log group header to log_sys->checkpoint_buf. */
UNIV_INTERN
void void
log_group_read_checkpoint_info( log_group_read_checkpoint_info(
/*===========================*/ /*===========================*/
...@@ -241,7 +241,7 @@ log_group_read_checkpoint_info( ...@@ -241,7 +241,7 @@ log_group_read_checkpoint_info(
ulint field); /* in: LOG_CHECKPOINT_1 or LOG_CHECKPOINT_2 */ ulint field); /* in: LOG_CHECKPOINT_1 or LOG_CHECKPOINT_2 */
/*********************************************************************** /***********************************************************************
Gets info from a checkpoint about a log group. */ Gets info from a checkpoint about a log group. */
UNIV_INTERN
void void
log_checkpoint_get_nth_group_info( log_checkpoint_get_nth_group_info(
/*==============================*/ /*==============================*/
...@@ -251,14 +251,14 @@ log_checkpoint_get_nth_group_info( ...@@ -251,14 +251,14 @@ log_checkpoint_get_nth_group_info(
ulint* offset);/* out: archived file offset */ ulint* offset);/* out: archived file offset */
/********************************************************** /**********************************************************
Writes checkpoint info to groups. */ Writes checkpoint info to groups. */
UNIV_INTERN
void void
log_groups_write_checkpoint_info(void); log_groups_write_checkpoint_info(void);
/*==================================*/ /*==================================*/
/********************************************************** /**********************************************************
Writes info to a buffer of a log group when log files are created in Writes info to a buffer of a log group when log files are created in
backup restoration. */ backup restoration. */
UNIV_INTERN
void void
log_reset_first_header_and_checkpoint( log_reset_first_header_and_checkpoint(
/*==================================*/ /*==================================*/
...@@ -269,7 +269,7 @@ log_reset_first_header_and_checkpoint( ...@@ -269,7 +269,7 @@ log_reset_first_header_and_checkpoint(
start + LOG_BLOCK_HDR_SIZE */ start + LOG_BLOCK_HDR_SIZE */
/************************************************************************ /************************************************************************
Starts an archiving operation. */ Starts an archiving operation. */
UNIV_INTERN
ibool ibool
log_archive_do( log_archive_do(
/*===========*/ /*===========*/
...@@ -284,35 +284,35 @@ called, and stops the archiving. When archiving is started again, the archived ...@@ -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 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 not write again to the archived log files which exist when this function
returns. */ returns. */
UNIV_INTERN
ulint ulint
log_archive_stop(void); log_archive_stop(void);
/*==================*/ /*==================*/
/* out: DB_SUCCESS or DB_ERROR */ /* out: DB_SUCCESS or DB_ERROR */
/******************************************************************** /********************************************************************
Starts again archiving which has been stopped. */ Starts again archiving which has been stopped. */
UNIV_INTERN
ulint ulint
log_archive_start(void); log_archive_start(void);
/*===================*/ /*===================*/
/* out: DB_SUCCESS or DB_ERROR */ /* out: DB_SUCCESS or DB_ERROR */
/******************************************************************** /********************************************************************
Stop archiving the log so that a gap may occur in the archived log files. */ Stop archiving the log so that a gap may occur in the archived log files. */
UNIV_INTERN
ulint ulint
log_archive_noarchivelog(void); log_archive_noarchivelog(void);
/*==========================*/ /*==========================*/
/* out: DB_SUCCESS or DB_ERROR */ /* out: DB_SUCCESS or DB_ERROR */
/******************************************************************** /********************************************************************
Start archiving the log so that a gap may occur in the archived log files. */ Start archiving the log so that a gap may occur in the archived log files. */
UNIV_INTERN
ulint ulint
log_archive_archivelog(void); log_archive_archivelog(void);
/*========================*/ /*========================*/
/* out: DB_SUCCESS or DB_ERROR */ /* out: DB_SUCCESS or DB_ERROR */
/********************************************************** /**********************************************************
Generates an archived log file name. */ Generates an archived log file name. */
UNIV_INTERN
void void
log_archived_file_name_gen( 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. ...@@ -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 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 function may only be called if the calling thread owns no synchronization
objects! */ objects! */
UNIV_INTERN
void void
log_check_margins(void); log_check_margins(void);
/*===================*/ /*===================*/
/********************************************************** /**********************************************************
Reads a specified log segment to a buffer. */ Reads a specified log segment to a buffer. */
UNIV_INTERN
void void
log_group_read_log_seg( log_group_read_log_seg(
/*===================*/ /*===================*/
...@@ -341,7 +341,7 @@ log_group_read_log_seg( ...@@ -341,7 +341,7 @@ log_group_read_log_seg(
ib_uint64_t end_lsn); /* in: read area end */ ib_uint64_t end_lsn); /* in: read area end */
/********************************************************** /**********************************************************
Writes a buffer to a log file group. */ Writes a buffer to a log file group. */
UNIV_INTERN
void void
log_group_write_buf( log_group_write_buf(
/*================*/ /*================*/
...@@ -360,7 +360,7 @@ 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 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 to work, the values must already be correctly initialized to correspond to
some lsn, for instance, a checkpoint lsn. */ some lsn, for instance, a checkpoint lsn. */
UNIV_INTERN
void void
log_group_set_fields( log_group_set_fields(
/*=================*/ /*=================*/
...@@ -370,7 +370,7 @@ 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 Calculates the data capacity of a log group, when the log file headers are not
included. */ included. */
UNIV_INTERN
ulint ulint
log_group_get_capacity( log_group_get_capacity(
/*===================*/ /*===================*/
...@@ -488,14 +488,14 @@ log_block_convert_lsn_to_no( ...@@ -488,14 +488,14 @@ log_block_convert_lsn_to_no(
ib_uint64_t lsn); /* in: lsn of a byte within the block */ ib_uint64_t lsn); /* in: lsn of a byte within the block */
/********************************************************** /**********************************************************
Prints info of the log. */ Prints info of the log. */
UNIV_INTERN
void void
log_print( log_print(
/*======*/ /*======*/
FILE* file); /* in: file where to print */ FILE* file); /* in: file where to print */
/********************************************************** /**********************************************************
Peeks the current lsn. */ Peeks the current lsn. */
UNIV_INTERN
ibool ibool
log_peek_lsn( log_peek_lsn(
/*=========*/ /*=========*/
...@@ -504,7 +504,7 @@ log_peek_lsn( ...@@ -504,7 +504,7 @@ log_peek_lsn(
ib_uint64_t* lsn); /* out: if returns TRUE, current lsn is here */ ib_uint64_t* lsn); /* out: if returns TRUE, current lsn is here */
/************************************************************************** /**************************************************************************
Refreshes the statistics used to print per-second averages. */ Refreshes the statistics used to print per-second averages. */
UNIV_INTERN
void void
log_refresh_stats(void); log_refresh_stats(void);
/*===================*/ /*===================*/
......
...@@ -21,7 +21,7 @@ extern ibool recv_replay_file_ops; ...@@ -21,7 +21,7 @@ extern ibool recv_replay_file_ops;
/*********************************************************************** /***********************************************************************
Reads the checkpoint info needed in hot backup. */ Reads the checkpoint info needed in hot backup. */
UNIV_INTERN
ibool ibool
recv_read_cp_info_for_backup( recv_read_cp_info_for_backup(
/*=========================*/ /*=========================*/
...@@ -40,7 +40,7 @@ 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 Scans the log segment and n_bytes_scanned is set to the length of valid
log scanned. */ log scanned. */
UNIV_INTERN
void void
recv_scan_log_seg_for_backup( recv_scan_log_seg_for_backup(
/*=========================*/ /*=========================*/
...@@ -71,7 +71,7 @@ recv_recovery_from_backup_is_on(void); ...@@ -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 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 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. */ read in, or also for a page already in the buffer pool. */
UNIV_INTERN
void void
recv_recover_page( recv_recover_page(
/*==============*/ /*==============*/
...@@ -89,7 +89,7 @@ Recovers from a checkpoint. When this function returns, the database is able ...@@ -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 to start processing of new user transactions, but the function
recv_recovery_from_checkpoint_finish should be called later to complete recv_recovery_from_checkpoint_finish should be called later to complete
the recovery and free the resources used in it. */ the recovery and free the resources used in it. */
UNIV_INTERN
ulint ulint
recv_recovery_from_checkpoint_start( recv_recovery_from_checkpoint_start(
/*================================*/ /*================================*/
...@@ -103,14 +103,14 @@ recv_recovery_from_checkpoint_start( ...@@ -103,14 +103,14 @@ recv_recovery_from_checkpoint_start(
data files */ data files */
/************************************************************ /************************************************************
Completes recovery from a checkpoint. */ Completes recovery from a checkpoint. */
UNIV_INTERN
void void
recv_recovery_from_checkpoint_finish(void); recv_recovery_from_checkpoint_finish(void);
/*======================================*/ /*======================================*/
/*********************************************************** /***********************************************************
Scans log from a buffer and stores new log data to the parsing buffer. Parses Scans log from a buffer and stores new log data to the parsing buffer. Parses
and hashes the log records if new data found. */ and hashes the log records if new data found. */
UNIV_INTERN
ibool ibool
recv_scan_log_recs( recv_scan_log_recs(
/*===============*/ /*===============*/
...@@ -140,7 +140,7 @@ recv_scan_log_recs( ...@@ -140,7 +140,7 @@ recv_scan_log_recs(
this lsn */ this lsn */
/********************************************************** /**********************************************************
Resets the logs. The contents of log files will be lost! */ Resets the logs. The contents of log files will be lost! */
UNIV_INTERN
void void
recv_reset_logs( recv_reset_logs(
/*============*/ /*============*/
...@@ -159,7 +159,7 @@ recv_reset_logs( ...@@ -159,7 +159,7 @@ recv_reset_logs(
#ifdef UNIV_HOTBACKUP #ifdef UNIV_HOTBACKUP
/********************************************************** /**********************************************************
Creates new log files after a backup has been restored. */ Creates new log files after a backup has been restored. */
UNIV_INTERN
void void
recv_reset_log_files_for_backup( recv_reset_log_files_for_backup(
/*============================*/ /*============================*/
...@@ -171,13 +171,13 @@ recv_reset_log_files_for_backup( ...@@ -171,13 +171,13 @@ recv_reset_log_files_for_backup(
#endif /* UNIV_HOTBACKUP */ #endif /* UNIV_HOTBACKUP */
/************************************************************ /************************************************************
Creates the recovery system. */ Creates the recovery system. */
UNIV_INTERN
void void
recv_sys_create(void); recv_sys_create(void);
/*=================*/ /*=================*/
/************************************************************ /************************************************************
Inits the recovery system for a recovery operation. */ Inits the recovery system for a recovery operation. */
UNIV_INTERN
void void
recv_sys_init( recv_sys_init(
/*==========*/ /*==========*/
...@@ -187,7 +187,7 @@ recv_sys_init( ...@@ -187,7 +187,7 @@ recv_sys_init(
/*********************************************************************** /***********************************************************************
Empties the hash table of stored log records, applying them to appropriate Empties the hash table of stored log records, applying them to appropriate
pages. */ pages. */
UNIV_INTERN
void void
recv_apply_hashed_log_recs( recv_apply_hashed_log_recs(
/*=======================*/ /*=======================*/
...@@ -201,7 +201,7 @@ recv_apply_hashed_log_recs( ...@@ -201,7 +201,7 @@ recv_apply_hashed_log_recs(
#ifdef UNIV_HOTBACKUP #ifdef UNIV_HOTBACKUP
/*********************************************************************** /***********************************************************************
Applies log records in the hash table to a backup. */ Applies log records in the hash table to a backup. */
UNIV_INTERN
void void
recv_apply_log_recs_for_backup(void); recv_apply_log_recs_for_backup(void);
/*================================*/ /*================================*/
...@@ -209,7 +209,7 @@ recv_apply_log_recs_for_backup(void); ...@@ -209,7 +209,7 @@ recv_apply_log_recs_for_backup(void);
#ifdef UNIV_LOG_ARCHIVE #ifdef UNIV_LOG_ARCHIVE
/************************************************************ /************************************************************
Recovers from archived log files, and also from log files, if they exist. */ Recovers from archived log files, and also from log files, if they exist. */
UNIV_INTERN
ulint ulint
recv_recovery_from_archive_start( recv_recovery_from_archive_start(
/*=============================*/ /*=============================*/
...@@ -225,7 +225,7 @@ recv_recovery_from_archive_start( ...@@ -225,7 +225,7 @@ recv_recovery_from_archive_start(
server config file */ server config file */
/************************************************************ /************************************************************
Completes recovery from archive. */ Completes recovery from archive. */
UNIV_INTERN
void void
recv_recovery_from_archive_finish(void); recv_recovery_from_archive_finish(void);
/*===================================*/ /*===================================*/
......
...@@ -273,7 +273,7 @@ mach_dulint_read_much_compressed( ...@@ -273,7 +273,7 @@ mach_dulint_read_much_compressed(
__attribute__((nonnull, pure)); __attribute__((nonnull, pure));
/************************************************************* /*************************************************************
Reads a ulint in a compressed form if the log record fully contains it. */ Reads a ulint in a compressed form if the log record fully contains it. */
UNIV_INTERN
byte* byte*
mach_parse_compressed( mach_parse_compressed(
/*==================*/ /*==================*/
...@@ -284,7 +284,7 @@ mach_parse_compressed( ...@@ -284,7 +284,7 @@ mach_parse_compressed(
ulint* val); /* out: read value */ ulint* val); /* out: read value */
/************************************************************* /*************************************************************
Reads a dulint in a compressed form if the log record fully contains it. */ Reads a dulint in a compressed form if the log record fully contains it. */
UNIV_INTERN
byte* byte*
mach_dulint_parse_compressed( mach_dulint_parse_compressed(
/*=========================*/ /*=========================*/
......
...@@ -37,7 +37,7 @@ Outputs the sum of sizes of buffers given to the user (only in ...@@ -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 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 blocks in the heap. In case of error returns 0 as sizes and number
of blocks. */ of blocks. */
UNIV_INTERN
void void
mem_heap_validate_or_print( mem_heap_validate_or_print(
/*=======================*/ /*=======================*/
...@@ -62,7 +62,7 @@ mem_heap_validate_or_print( ...@@ -62,7 +62,7 @@ mem_heap_validate_or_print(
argument, it is ignored */ argument, it is ignored */
/****************************************************************** /******************************************************************
Validates the contents of a memory heap. */ Validates the contents of a memory heap. */
UNIV_INTERN
ibool ibool
mem_heap_validate( mem_heap_validate(
/*==============*/ /*==============*/
...@@ -72,7 +72,7 @@ mem_heap_validate( ...@@ -72,7 +72,7 @@ mem_heap_validate(
#ifdef UNIV_DEBUG #ifdef UNIV_DEBUG
/****************************************************************** /******************************************************************
Checks that an object is a memory heap (or a block of it) */ Checks that an object is a memory heap (or a block of it) */
UNIV_INTERN
ibool ibool
mem_heap_check( mem_heap_check(
/*===========*/ /*===========*/
...@@ -82,21 +82,21 @@ mem_heap_check( ...@@ -82,21 +82,21 @@ mem_heap_check(
#ifdef UNIV_MEM_DEBUG #ifdef UNIV_MEM_DEBUG
/********************************************************************* /*********************************************************************
TRUE if no memory is currently allocated. */ TRUE if no memory is currently allocated. */
UNIV_INTERN
ibool ibool
mem_all_freed(void); mem_all_freed(void);
/*===============*/ /*===============*/
/* out: TRUE if no heaps exist */ /* out: TRUE if no heaps exist */
/********************************************************************* /*********************************************************************
Validates the dynamic memory */ Validates the dynamic memory */
UNIV_INTERN
ibool ibool
mem_validate_no_assert(void); mem_validate_no_assert(void);
/*=========================*/ /*=========================*/
/* out: TRUE if error */ /* out: TRUE if error */
/**************************************************************** /****************************************************************
Validates the dynamic memory */ Validates the dynamic memory */
UNIV_INTERN
ibool ibool
mem_validate(void); mem_validate(void);
/*===============*/ /*===============*/
...@@ -105,7 +105,7 @@ mem_validate(void); ...@@ -105,7 +105,7 @@ mem_validate(void);
/**************************************************************** /****************************************************************
Tries to find neigboring memory allocation blocks and dumps to stderr Tries to find neigboring memory allocation blocks and dumps to stderr
the neighborhood of a given pointer. */ the neighborhood of a given pointer. */
UNIV_INTERN
void void
mem_analyze_corruption( mem_analyze_corruption(
/*===================*/ /*===================*/
...@@ -113,14 +113,14 @@ mem_analyze_corruption( ...@@ -113,14 +113,14 @@ mem_analyze_corruption(
/********************************************************************* /*********************************************************************
Prints information of dynamic memory usage and currently allocated memory Prints information of dynamic memory usage and currently allocated memory
heaps or buffers. Can only be used in the debug version. */ heaps or buffers. Can only be used in the debug version. */
UNIV_INTERN
void void
mem_print_info(void); mem_print_info(void);
/*================*/ /*================*/
/********************************************************************* /*********************************************************************
Prints information of dynamic memory usage and currently allocated memory Prints information of dynamic memory usage and currently allocated memory
heaps or buffers since the last ..._print_info or..._print_new_info. */ heaps or buffers since the last ..._print_info or..._print_new_info. */
UNIV_INTERN
void void
mem_print_new_info(void); mem_print_new_info(void);
/*====================*/ /*====================*/
...@@ -59,7 +59,7 @@ is the maximum size for a single allocated buffer: */ ...@@ -59,7 +59,7 @@ is the maximum size for a single allocated buffer: */
/********************************************************************** /**********************************************************************
Initializes the memory system. */ Initializes the memory system. */
UNIV_INTERN
void void
mem_init( mem_init(
/*=====*/ /*=====*/
...@@ -258,7 +258,7 @@ mem_strdupl( ...@@ -258,7 +258,7 @@ mem_strdupl(
/************************************************************************** /**************************************************************************
Duplicates a NUL-terminated string, allocated from a memory heap. */ Duplicates a NUL-terminated string, allocated from a memory heap. */
UNIV_INTERN
char* char*
mem_heap_strdup( mem_heap_strdup(
/*============*/ /*============*/
...@@ -279,7 +279,7 @@ mem_heap_strdupl( ...@@ -279,7 +279,7 @@ mem_heap_strdupl(
/************************************************************************** /**************************************************************************
Concatenate two strings and return the result, using a memory heap. */ Concatenate two strings and return the result, using a memory heap. */
UNIV_INTERN
char* char*
mem_heap_strcat( mem_heap_strcat(
/*============*/ /*============*/
...@@ -290,7 +290,7 @@ mem_heap_strcat( ...@@ -290,7 +290,7 @@ mem_heap_strcat(
/************************************************************************** /**************************************************************************
Duplicate a block of data, allocated from a memory heap. */ Duplicate a block of data, allocated from a memory heap. */
UNIV_INTERN
void* void*
mem_heap_dup( mem_heap_dup(
/*=========*/ /*=========*/
...@@ -301,7 +301,7 @@ mem_heap_dup( ...@@ -301,7 +301,7 @@ mem_heap_dup(
/************************************************************************** /**************************************************************************
Concatenate two memory blocks and return the result, using a memory heap. */ Concatenate two memory blocks and return the result, using a memory heap. */
UNIV_INTERN
void* void*
mem_heap_cat( mem_heap_cat(
/*=========*/ /*=========*/
...@@ -317,7 +317,7 @@ A simple (s)printf replacement that dynamically allocates the space for the ...@@ -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 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 the printf syntax: types 's' and 'u' and length modifier 'l' (which is
required for the 'u' type). */ required for the 'u' type). */
UNIV_INTERN
char* char*
mem_heap_printf( mem_heap_printf(
/*============*/ /*============*/
...@@ -330,7 +330,7 @@ mem_heap_printf( ...@@ -330,7 +330,7 @@ mem_heap_printf(
/********************************************************************** /**********************************************************************
Goes through the list of all allocated mem blocks, checks their magic Goes through the list of all allocated mem blocks, checks their magic
numbers, and reports possible corruption. */ numbers, and reports possible corruption. */
UNIV_INTERN
void void
mem_validate_all_blocks(void); mem_validate_all_blocks(void);
/*=========================*/ /*=========================*/
......
...@@ -36,7 +36,7 @@ struct mem_area_struct{ ...@@ -36,7 +36,7 @@ struct mem_area_struct{
/************************************************************************ /************************************************************************
Creates a memory pool. */ Creates a memory pool. */
UNIV_INTERN
mem_pool_t* mem_pool_t*
mem_pool_create( mem_pool_create(
/*============*/ /*============*/
...@@ -45,7 +45,7 @@ mem_pool_create( ...@@ -45,7 +45,7 @@ mem_pool_create(
/************************************************************************ /************************************************************************
Allocates memory from a pool. NOTE: This low-level function should only be Allocates memory from a pool. NOTE: This low-level function should only be
used in mem0mem.*! */ used in mem0mem.*! */
UNIV_INTERN
void* void*
mem_area_alloc( mem_area_alloc(
/*===========*/ /*===========*/
...@@ -58,7 +58,7 @@ mem_area_alloc( ...@@ -58,7 +58,7 @@ mem_area_alloc(
mem_pool_t* pool); /* in: memory pool */ mem_pool_t* pool); /* in: memory pool */
/************************************************************************ /************************************************************************
Frees memory to a pool. */ Frees memory to a pool. */
UNIV_INTERN
void void
mem_area_free( mem_area_free(
/*==========*/ /*==========*/
...@@ -67,7 +67,7 @@ mem_area_free( ...@@ -67,7 +67,7 @@ mem_area_free(
mem_pool_t* pool); /* in: memory pool */ mem_pool_t* pool); /* in: memory pool */
/************************************************************************ /************************************************************************
Returns the amount of reserved memory. */ Returns the amount of reserved memory. */
UNIV_INTERN
ulint ulint
mem_pool_get_reserved( mem_pool_get_reserved(
/*==================*/ /*==================*/
...@@ -75,19 +75,19 @@ mem_pool_get_reserved( ...@@ -75,19 +75,19 @@ mem_pool_get_reserved(
mem_pool_t* pool); /* in: memory pool */ mem_pool_t* pool); /* in: memory pool */
/************************************************************************ /************************************************************************
Reserves the mem pool mutex. */ Reserves the mem pool mutex. */
UNIV_INTERN
void void
mem_pool_mutex_enter(void); mem_pool_mutex_enter(void);
/*======================*/ /*======================*/
/************************************************************************ /************************************************************************
Releases the mem pool mutex. */ Releases the mem pool mutex. */
UNIV_INTERN
void void
mem_pool_mutex_exit(void); mem_pool_mutex_exit(void);
/*=====================*/ /*=====================*/
/************************************************************************ /************************************************************************
Validates a memory pool. */ Validates a memory pool. */
UNIV_INTERN
ibool ibool
mem_pool_validate( mem_pool_validate(
/*==============*/ /*==============*/
...@@ -95,7 +95,7 @@ mem_pool_validate( ...@@ -95,7 +95,7 @@ mem_pool_validate(
mem_pool_t* pool); /* in: memory pool */ mem_pool_t* pool); /* in: memory pool */
/************************************************************************ /************************************************************************
Prints info of a memory pool. */ Prints info of a memory pool. */
UNIV_INTERN
void void
mem_pool_print_info( mem_pool_print_info(
/*================*/ /*================*/
......
...@@ -16,7 +16,7 @@ Created 12/7/1995 Heikki Tuuri ...@@ -16,7 +16,7 @@ Created 12/7/1995 Heikki Tuuri
/************************************************************ /************************************************************
Writes 1 - 4 bytes to a file page buffered in the buffer pool. Writes 1 - 4 bytes to a file page buffered in the buffer pool.
Writes the corresponding log record to the mini-transaction log. */ Writes the corresponding log record to the mini-transaction log. */
UNIV_INTERN
void void
mlog_write_ulint( mlog_write_ulint(
/*=============*/ /*=============*/
...@@ -27,7 +27,7 @@ mlog_write_ulint( ...@@ -27,7 +27,7 @@ mlog_write_ulint(
/************************************************************ /************************************************************
Writes 8 bytes to a file page buffered in the buffer pool. Writes 8 bytes to a file page buffered in the buffer pool.
Writes the corresponding log record to the mini-transaction log. */ Writes the corresponding log record to the mini-transaction log. */
UNIV_INTERN
void void
mlog_write_dulint( mlog_write_dulint(
/*==============*/ /*==============*/
...@@ -37,7 +37,7 @@ mlog_write_dulint( ...@@ -37,7 +37,7 @@ mlog_write_dulint(
/************************************************************ /************************************************************
Writes a string to a file page buffered in the buffer pool. Writes the Writes a string to a file page buffered in the buffer pool. Writes the
corresponding log record to the mini-transaction log. */ corresponding log record to the mini-transaction log. */
UNIV_INTERN
void void
mlog_write_string( mlog_write_string(
/*==============*/ /*==============*/
...@@ -48,7 +48,7 @@ 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. 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. */ Writes the corresponding log record to the mini-transaction log. */
UNIV_INTERN
void void
mlog_log_string( mlog_log_string(
/*============*/ /*============*/
...@@ -58,7 +58,7 @@ mlog_log_string( ...@@ -58,7 +58,7 @@ mlog_log_string(
/************************************************************ /************************************************************
Writes initial part of a log record consisting of one-byte item Writes initial part of a log record consisting of one-byte item
type and four-byte space and page numbers. */ type and four-byte space and page numbers. */
UNIV_INTERN
void void
mlog_write_initial_log_record( mlog_write_initial_log_record(
/*==========================*/ /*==========================*/
...@@ -91,7 +91,7 @@ mlog_catenate_ulint( ...@@ -91,7 +91,7 @@ mlog_catenate_ulint(
ulint type); /* in: MLOG_1BYTE, MLOG_2BYTES, MLOG_4BYTES */ ulint type); /* in: MLOG_1BYTE, MLOG_2BYTES, MLOG_4BYTES */
/************************************************************ /************************************************************
Catenates n bytes to the mtr log. */ Catenates n bytes to the mtr log. */
UNIV_INTERN
void void
mlog_catenate_string( mlog_catenate_string(
/*=================*/ /*=================*/
...@@ -150,7 +150,7 @@ mlog_write_initial_log_record_fast( ...@@ -150,7 +150,7 @@ mlog_write_initial_log_record_fast(
mtr_t* mtr); /* in: mtr */ mtr_t* mtr); /* in: mtr */
/************************************************************ /************************************************************
Parses an initial log record written by mlog_write_initial_log_record. */ Parses an initial log record written by mlog_write_initial_log_record. */
UNIV_INTERN
byte* byte*
mlog_parse_initial_log_record( mlog_parse_initial_log_record(
/*==========================*/ /*==========================*/
...@@ -163,7 +163,7 @@ mlog_parse_initial_log_record( ...@@ -163,7 +163,7 @@ mlog_parse_initial_log_record(
ulint* page_no);/* out: page number */ ulint* page_no);/* out: page number */
/************************************************************ /************************************************************
Parses a log record written by mlog_write_ulint or mlog_write_dulint. */ Parses a log record written by mlog_write_ulint or mlog_write_dulint. */
UNIV_INTERN
byte* byte*
mlog_parse_nbytes( mlog_parse_nbytes(
/*==============*/ /*==============*/
...@@ -176,7 +176,7 @@ mlog_parse_nbytes( ...@@ -176,7 +176,7 @@ mlog_parse_nbytes(
void* page_zip);/* in/out: compressed page, or NULL */ void* page_zip);/* in/out: compressed page, or NULL */
/************************************************************ /************************************************************
Parses a log record written by mlog_write_string. */ Parses a log record written by mlog_write_string. */
UNIV_INTERN
byte* byte*
mlog_parse_string( mlog_parse_string(
/*==============*/ /*==============*/
...@@ -193,7 +193,7 @@ Opens a buffer for mlog, writes the initial log record and, ...@@ -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 if needed, the field lengths of an index. Reserves space
for further log entries. The log entry must be closed with for further log entries. The log entry must be closed with
mtr_close(). */ mtr_close(). */
UNIV_INTERN
byte* byte*
mlog_open_and_write_index( mlog_open_and_write_index(
/*======================*/ /*======================*/
...@@ -208,7 +208,7 @@ 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. */ Parses a log record written by mlog_open_and_write_index. */
UNIV_INTERN
byte* byte*
mlog_parse_index( mlog_parse_index(
/*=============*/ /*=============*/
......
...@@ -156,7 +156,7 @@ mtr_start( ...@@ -156,7 +156,7 @@ mtr_start(
mtr_t* mtr); /* in: memory buffer for the mtr buffer */ mtr_t* mtr); /* in: memory buffer for the mtr buffer */
/******************************************************************* /*******************************************************************
Commits a mini-transaction. */ Commits a mini-transaction. */
UNIV_INTERN
void void
mtr_commit( mtr_commit(
/*=======*/ /*=======*/
...@@ -173,7 +173,7 @@ mtr_set_savepoint( ...@@ -173,7 +173,7 @@ mtr_set_savepoint(
Releases the latches stored in an mtr memo down to a 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 NOTE! The mtr must not have made changes to buffer pages after the
savepoint, as these can be handled only by mtr_commit. */ savepoint, as these can be handled only by mtr_commit. */
UNIV_INTERN
void void
mtr_rollback_to_savepoint( mtr_rollback_to_savepoint(
/*======================*/ /*======================*/
...@@ -208,7 +208,7 @@ mtr_set_log_mode( ...@@ -208,7 +208,7 @@ mtr_set_log_mode(
ulint mode); /* in: logging mode: MTR_LOG_NONE, ... */ ulint mode); /* in: logging mode: MTR_LOG_NONE, ... */
/************************************************************ /************************************************************
Reads 1 - 4 bytes from a file page buffered in the buffer pool. */ Reads 1 - 4 bytes from a file page buffered in the buffer pool. */
UNIV_INTERN
ulint ulint
mtr_read_ulint( mtr_read_ulint(
/*===========*/ /*===========*/
...@@ -218,7 +218,7 @@ mtr_read_ulint( ...@@ -218,7 +218,7 @@ mtr_read_ulint(
mtr_t* mtr); /* in: mini-transaction handle */ mtr_t* mtr); /* in: mini-transaction handle */
/************************************************************ /************************************************************
Reads 8 bytes from a file page buffered in the buffer pool. */ Reads 8 bytes from a file page buffered in the buffer pool. */
UNIV_INTERN
dulint dulint
mtr_read_dulint( mtr_read_dulint(
/*============*/ /*============*/
...@@ -258,7 +258,7 @@ mtr_x_lock_func( ...@@ -258,7 +258,7 @@ mtr_x_lock_func(
/******************************************************* /*******************************************************
Releases an object in the memo stack. */ Releases an object in the memo stack. */
UNIV_INTERN
void void
mtr_memo_release( mtr_memo_release(
/*=============*/ /*=============*/
...@@ -279,7 +279,7 @@ mtr_memo_contains( ...@@ -279,7 +279,7 @@ mtr_memo_contains(
/************************************************************** /**************************************************************
Checks if memo contains the given page. */ Checks if memo contains the given page. */
UNIV_INTERN
ibool ibool
mtr_memo_contains_page( mtr_memo_contains_page(
/*===================*/ /*===================*/
...@@ -289,7 +289,7 @@ mtr_memo_contains_page( ...@@ -289,7 +289,7 @@ mtr_memo_contains_page(
ulint type); /* in: type of object */ ulint type); /* in: type of object */
/************************************************************* /*************************************************************
Prints info of an mtr handle. */ Prints info of an mtr handle. */
UNIV_INTERN
void void
mtr_print( mtr_print(
/*======*/ /*======*/
......
This diff is collapsed.
...@@ -29,13 +29,13 @@ Converts the current process id to a number. It is not guaranteed that the ...@@ -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 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 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'. */ the thread id is not the same as one sees in 'top'. */
UNIV_INTERN
ulint ulint
os_proc_get_number(void); os_proc_get_number(void);
/*====================*/ /*====================*/
/******************************************************************** /********************************************************************
Allocates non-cacheable memory. */ Allocates non-cacheable memory. */
UNIV_INTERN
void* void*
os_mem_alloc_nocache( os_mem_alloc_nocache(
/*=================*/ /*=================*/
...@@ -43,7 +43,7 @@ os_mem_alloc_nocache( ...@@ -43,7 +43,7 @@ os_mem_alloc_nocache(
ulint n); /* in: number of bytes */ ulint n); /* in: number of bytes */
/******************************************************************** /********************************************************************
Allocates large pages memory. */ Allocates large pages memory. */
UNIV_INTERN
void* void*
os_mem_alloc_large( os_mem_alloc_large(
/*===============*/ /*===============*/
...@@ -51,7 +51,7 @@ os_mem_alloc_large( ...@@ -51,7 +51,7 @@ os_mem_alloc_large(
ulint* n); /* in/out: number of bytes */ ulint* n); /* in/out: number of bytes */
/******************************************************************** /********************************************************************
Frees large pages memory. */ Frees large pages memory. */
UNIV_INTERN
void void
os_mem_free_large( os_mem_free_large(
/*==============*/ /*==============*/
...@@ -62,7 +62,7 @@ os_mem_free_large( ...@@ -62,7 +62,7 @@ os_mem_free_large(
/******************************************************************** /********************************************************************
Sets the priority boost for threads released from waiting within the current Sets the priority boost for threads released from waiting within the current
process. */ process. */
UNIV_INTERN
void void
os_process_set_priority_boost( os_process_set_priority_boost(
/*==========================*/ /*==========================*/
......
...@@ -69,13 +69,13 @@ extern ulint os_fast_mutex_count; ...@@ -69,13 +69,13 @@ extern ulint os_fast_mutex_count;
/************************************************************* /*************************************************************
Initializes global event and OS 'slow' mutex lists. */ Initializes global event and OS 'slow' mutex lists. */
UNIV_INTERN
void void
os_sync_init(void); os_sync_init(void);
/*==============*/ /*==============*/
/************************************************************* /*************************************************************
Frees created events and OS 'slow' mutexes. */ Frees created events and OS 'slow' mutexes. */
UNIV_INTERN
void void
os_sync_free(void); os_sync_free(void);
/*==============*/ /*==============*/
...@@ -83,7 +83,7 @@ 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: 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 signaled and nonsignaled. The created event is manual reset: it must be reset
explicitly by calling sync_os_reset_event. */ explicitly by calling sync_os_reset_event. */
UNIV_INTERN
os_event_t os_event_t
os_event_create( os_event_create(
/*============*/ /*============*/
...@@ -94,7 +94,7 @@ os_event_create( ...@@ -94,7 +94,7 @@ os_event_create(
/************************************************************* /*************************************************************
Creates an auto-reset event semaphore, i.e., an event which is automatically Creates an auto-reset event semaphore, i.e., an event which is automatically
reset when a single thread is released. Works only in Windows. */ reset when a single thread is released. Works only in Windows. */
UNIV_INTERN
os_event_t os_event_t
os_event_create_auto( os_event_create_auto(
/*=================*/ /*=================*/
...@@ -105,7 +105,7 @@ os_event_create_auto( ...@@ -105,7 +105,7 @@ os_event_create_auto(
/************************************************************** /**************************************************************
Sets an event semaphore to the signaled state: lets waiting threads Sets an event semaphore to the signaled state: lets waiting threads
proceed. */ proceed. */
UNIV_INTERN
void void
os_event_set( os_event_set(
/*=========*/ /*=========*/
...@@ -113,14 +113,14 @@ os_event_set( ...@@ -113,14 +113,14 @@ os_event_set(
/************************************************************** /**************************************************************
Resets an event semaphore to the nonsignaled state. Waiting threads will Resets an event semaphore to the nonsignaled state. Waiting threads will
stop to wait for the event. */ stop to wait for the event. */
UNIV_INTERN
void void
os_event_reset( os_event_reset(
/*===========*/ /*===========*/
os_event_t event); /* in: event to reset */ os_event_t event); /* in: event to reset */
/************************************************************** /**************************************************************
Frees an event object. */ Frees an event object. */
UNIV_INTERN
void void
os_event_free( os_event_free(
/*==========*/ /*==========*/
...@@ -130,7 +130,7 @@ Waits for an event object until it is in the signaled state. If ...@@ -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 srv_shutdown_state == SRV_SHUTDOWN_EXIT_THREADS this also exits the
waiting thread when the event becomes signaled (or immediately if the waiting thread when the event becomes signaled (or immediately if the
event is already in the signaled state). */ event is already in the signaled state). */
UNIV_INTERN
void void
os_event_wait( os_event_wait(
/*==========*/ /*==========*/
...@@ -138,7 +138,7 @@ os_event_wait( ...@@ -138,7 +138,7 @@ os_event_wait(
/************************************************************** /**************************************************************
Waits for an event object until it is in the signaled state or Waits for an event object until it is in the signaled state or
a timeout is exceeded. In Unix the timeout is always infinite. */ a timeout is exceeded. In Unix the timeout is always infinite. */
UNIV_INTERN
ulint ulint
os_event_wait_time( os_event_wait_time(
/*===============*/ /*===============*/
...@@ -152,7 +152,7 @@ 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 Waits for any event in an OS native event array. Returns if even a single
one is signaled or becomes signaled. */ one is signaled or becomes signaled. */
UNIV_INTERN
ulint ulint
os_event_wait_multiple( os_event_wait_multiple(
/*===================*/ /*===================*/
...@@ -167,7 +167,7 @@ os_event_wait_multiple( ...@@ -167,7 +167,7 @@ os_event_wait_multiple(
/************************************************************* /*************************************************************
Creates an operating system mutex semaphore. Because these are slow, the Creates an operating system mutex semaphore. Because these are slow, the
mutex semaphore of InnoDB itself (mutex_t) should be used where possible. */ mutex semaphore of InnoDB itself (mutex_t) should be used where possible. */
UNIV_INTERN
os_mutex_t os_mutex_t
os_mutex_create( os_mutex_create(
/*============*/ /*============*/
...@@ -176,21 +176,21 @@ os_mutex_create( ...@@ -176,21 +176,21 @@ os_mutex_create(
the mutex is created without a name */ the mutex is created without a name */
/************************************************************** /**************************************************************
Acquires ownership of a mutex semaphore. */ Acquires ownership of a mutex semaphore. */
UNIV_INTERN
void void
os_mutex_enter( os_mutex_enter(
/*===========*/ /*===========*/
os_mutex_t mutex); /* in: mutex to acquire */ os_mutex_t mutex); /* in: mutex to acquire */
/************************************************************** /**************************************************************
Releases ownership of a mutex. */ Releases ownership of a mutex. */
UNIV_INTERN
void void
os_mutex_exit( os_mutex_exit(
/*==========*/ /*==========*/
os_mutex_t mutex); /* in: mutex to release */ os_mutex_t mutex); /* in: mutex to release */
/************************************************************** /**************************************************************
Frees an mutex object. */ Frees an mutex object. */
UNIV_INTERN
void void
os_mutex_free( os_mutex_free(
/*==========*/ /*==========*/
...@@ -208,28 +208,28 @@ os_fast_mutex_trylock( ...@@ -208,28 +208,28 @@ os_fast_mutex_trylock(
os_fast_mutex_t* fast_mutex); /* in: mutex to acquire */ os_fast_mutex_t* fast_mutex); /* in: mutex to acquire */
/************************************************************** /**************************************************************
Releases ownership of a fast mutex. */ Releases ownership of a fast mutex. */
UNIV_INTERN
void void
os_fast_mutex_unlock( os_fast_mutex_unlock(
/*=================*/ /*=================*/
os_fast_mutex_t* fast_mutex); /* in: mutex to release */ os_fast_mutex_t* fast_mutex); /* in: mutex to release */
/************************************************************* /*************************************************************
Initializes an operating system fast mutex semaphore. */ Initializes an operating system fast mutex semaphore. */
UNIV_INTERN
void void
os_fast_mutex_init( os_fast_mutex_init(
/*===============*/ /*===============*/
os_fast_mutex_t* fast_mutex); /* in: fast mutex */ os_fast_mutex_t* fast_mutex); /* in: fast mutex */
/************************************************************** /**************************************************************
Acquires ownership of a fast mutex. */ Acquires ownership of a fast mutex. */
UNIV_INTERN
void void
os_fast_mutex_lock( os_fast_mutex_lock(
/*===============*/ /*===============*/
os_fast_mutex_t* fast_mutex); /* in: mutex to acquire */ os_fast_mutex_t* fast_mutex); /* in: mutex to acquire */
/************************************************************** /**************************************************************
Frees an mutex object. */ Frees an mutex object. */
UNIV_INTERN
void void
os_fast_mutex_free( os_fast_mutex_free(
/*===============*/ /*===============*/
......
...@@ -41,7 +41,7 @@ typedef void* (*os_posix_f_t) (void*); ...@@ -41,7 +41,7 @@ typedef void* (*os_posix_f_t) (void*);
/******************************************************************* /*******************************************************************
Compares two thread ids for equality. */ Compares two thread ids for equality. */
UNIV_INTERN
ibool ibool
os_thread_eq( os_thread_eq(
/*=========*/ /*=========*/
...@@ -51,7 +51,7 @@ 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 Converts an OS thread id to a ulint. It is NOT guaranteed that the ulint is
unique for the thread though! */ unique for the thread though! */
UNIV_INTERN
ulint ulint
os_thread_pf( os_thread_pf(
/*=========*/ /*=========*/
...@@ -63,7 +63,7 @@ the function given. The start function takes a void* parameter ...@@ -63,7 +63,7 @@ the function given. The start function takes a void* parameter
and returns a ulint. and returns a ulint.
NOTE: We count the number of threads in os_thread_exit(). A created 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. */ thread should always use that to exit and not use return() to exit. */
UNIV_INTERN
os_thread_t os_thread_t
os_thread_create( os_thread_create(
/*=============*/ /*=============*/
...@@ -78,13 +78,17 @@ os_thread_create( ...@@ -78,13 +78,17 @@ os_thread_create(
function */ function */
os_thread_id_t* thread_id); /* out: id of the created os_thread_id_t* thread_id); /* out: id of the created
thread, or NULL */ thread, or NULL */
#ifdef HAVE_PTHREAD_JOIN
UNIV_INTERN
int int
os_thread_join( os_thread_join(
/*===========*/ /*===========*/
os_thread_id_t thread_id); /* in: id of the thread to join */ os_thread_id_t thread_id); /* in: id of the thread to join */
#endif
/********************************************************************* /*********************************************************************
Exits the current thread. */ Exits the current thread. */
UNIV_INTERN
void void
os_thread_exit( os_thread_exit(
/*===========*/ /*===========*/
...@@ -92,32 +96,32 @@ os_thread_exit( ...@@ -92,32 +96,32 @@ os_thread_exit(
is cast as a DWORD */ is cast as a DWORD */
/********************************************************************* /*********************************************************************
Returns the thread identifier of current thread. */ Returns the thread identifier of current thread. */
UNIV_INTERN
os_thread_id_t os_thread_id_t
os_thread_get_curr_id(void); os_thread_get_curr_id(void);
/*========================*/ /*========================*/
/********************************************************************* /*********************************************************************
Returns handle to the current thread. */ Returns handle to the current thread. */
UNIV_INTERN
os_thread_t os_thread_t
os_thread_get_curr(void); os_thread_get_curr(void);
/*====================*/ /*====================*/
/********************************************************************* /*********************************************************************
Advises the os to give up remainder of the thread's time slice. */ Advises the os to give up remainder of the thread's time slice. */
UNIV_INTERN
void void
os_thread_yield(void); os_thread_yield(void);
/*=================*/ /*=================*/
/********************************************************************* /*********************************************************************
The thread sleeps at least the time given in microseconds. */ The thread sleeps at least the time given in microseconds. */
UNIV_INTERN
void void
os_thread_sleep( os_thread_sleep(
/*============*/ /*============*/
ulint tm); /* in: time in microseconds */ ulint tm); /* in: time in microseconds */
/********************************************************************** /**********************************************************************
Gets a thread priority. */ Gets a thread priority. */
UNIV_INTERN
ulint ulint
os_thread_get_priority( os_thread_get_priority(
/*===================*/ /*===================*/
...@@ -125,7 +129,7 @@ os_thread_get_priority( ...@@ -125,7 +129,7 @@ os_thread_get_priority(
os_thread_t handle);/* in: OS handle to the thread */ os_thread_t handle);/* in: OS handle to the thread */
/********************************************************************** /**********************************************************************
Sets a thread priority. */ Sets a thread priority. */
UNIV_INTERN
void void
os_thread_set_priority( os_thread_set_priority(
/*===================*/ /*===================*/
...@@ -133,7 +137,7 @@ os_thread_set_priority( ...@@ -133,7 +137,7 @@ os_thread_set_priority(
ulint pri); /* in: priority: one of OS_PRIORITY_... */ ulint pri); /* in: priority: one of OS_PRIORITY_... */
/********************************************************************** /**********************************************************************
Gets the last operating system error code for the calling thread. */ Gets the last operating system error code for the calling thread. */
UNIV_INTERN
ulint ulint
os_thread_get_last_error(void); os_thread_get_last_error(void);
/*==========================*/ /*==========================*/
......
...@@ -175,7 +175,7 @@ page_cur_rec_insert( ...@@ -175,7 +175,7 @@ page_cur_rec_insert(
Inserts a record next to page cursor on an uncompressed page. Inserts a record next to page cursor on an uncompressed page.
Returns pointer to inserted record if succeed, i.e., enough Returns pointer to inserted record if succeed, i.e., enough
space available, NULL otherwise. The cursor stays at the same position. */ space available, NULL otherwise. The cursor stays at the same position. */
UNIV_INTERN
rec_t* rec_t*
page_cur_insert_rec_low( page_cur_insert_rec_low(
/*====================*/ /*====================*/
...@@ -192,7 +192,7 @@ Inserts a record next to page cursor on a compressed and uncompressed ...@@ -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., page. Returns pointer to inserted record if succeed, i.e.,
enough space available, NULL otherwise. enough space available, NULL otherwise.
The cursor stays at the same position. */ The cursor stays at the same position. */
UNIV_INTERN
rec_t* rec_t*
page_cur_insert_rec_zip( page_cur_insert_rec_zip(
/*====================*/ /*====================*/
...@@ -208,7 +208,7 @@ 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, Copies records from page to a newly created page, from a given record onward,
including that record. Infimum and supremum records are not copied. */ including that record. Infimum and supremum records are not copied. */
UNIV_INTERN
void void
page_copy_rec_list_end_to_created_page( page_copy_rec_list_end_to_created_page(
/*===================================*/ /*===================================*/
...@@ -219,7 +219,7 @@ 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 Deletes a record at the page cursor. The cursor is moved to the
next record after the deleted one. */ next record after the deleted one. */
UNIV_INTERN
void void
page_cur_delete_rec( page_cur_delete_rec(
/*================*/ /*================*/
...@@ -244,7 +244,7 @@ page_cur_search( ...@@ -244,7 +244,7 @@ page_cur_search(
page_cur_t* cursor);/* out: page cursor */ page_cur_t* cursor);/* out: page cursor */
/******************************************************************** /********************************************************************
Searches the right position for a page cursor. */ Searches the right position for a page cursor. */
UNIV_INTERN
void void
page_cur_search_with_match( page_cur_search_with_match(
/*=======================*/ /*=======================*/
...@@ -272,7 +272,7 @@ 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 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. */ are no user records, sets the cursor on the infimum record. */
UNIV_INTERN
void void
page_cur_open_on_rnd_user_rec( page_cur_open_on_rnd_user_rec(
/*==========================*/ /*==========================*/
...@@ -280,7 +280,7 @@ 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 */ page_cur_t* cursor);/* out: page cursor */
/*************************************************************** /***************************************************************
Parses a log record of a record insert on a page. */ Parses a log record of a record insert on a page. */
UNIV_INTERN
byte* byte*
page_cur_parse_insert_rec( page_cur_parse_insert_rec(
/*======================*/ /*======================*/
...@@ -293,7 +293,7 @@ page_cur_parse_insert_rec( ...@@ -293,7 +293,7 @@ page_cur_parse_insert_rec(
mtr_t* mtr); /* in: mtr or NULL */ mtr_t* mtr); /* in: mtr or NULL */
/************************************************************** /**************************************************************
Parses a log record of copying a record list end to a new created page. */ Parses a log record of copying a record list end to a new created page. */
UNIV_INTERN
byte* byte*
page_parse_copy_rec_list_to_created_page( page_parse_copy_rec_list_to_created_page(
/*=====================================*/ /*=====================================*/
...@@ -305,7 +305,7 @@ 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 */ mtr_t* mtr); /* in: mtr or NULL */
/*************************************************************** /***************************************************************
Parses log record of a record delete on a page. */ Parses log record of a record delete on a page. */
UNIV_INTERN
byte* byte*
page_cur_parse_delete_rec( page_cur_parse_delete_rec(
/*======================*/ /*======================*/
......
...@@ -167,7 +167,7 @@ page_get_max_trx_id( ...@@ -167,7 +167,7 @@ page_get_max_trx_id(
const page_t* page); /* in: page */ const page_t* page); /* in: page */
/***************************************************************** /*****************************************************************
Sets the max trx id field value. */ Sets the max trx id field value. */
UNIV_INTERN
void void
page_set_max_trx_id( page_set_max_trx_id(
/*================*/ /*================*/
...@@ -262,7 +262,7 @@ page_get_supremum_rec( ...@@ -262,7 +262,7 @@ page_get_supremum_rec(
/**************************************************************** /****************************************************************
Returns the middle record of record list. If there are an even number 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. */ of records in the list, returns the first record of upper half-list. */
UNIV_INTERN
rec_t* rec_t*
page_get_middle_rec( page_get_middle_rec(
/*================*/ /*================*/
...@@ -322,7 +322,7 @@ page_get_n_recs( ...@@ -322,7 +322,7 @@ page_get_n_recs(
/******************************************************************* /*******************************************************************
Returns the number of records before the given record in chain. Returns the number of records before the given record in chain.
The number includes infimum and supremum records. */ The number includes infimum and supremum records. */
UNIV_INTERN
ulint ulint
page_rec_get_n_recs_before( page_rec_get_n_recs_before(
/*=======================*/ /*=======================*/
...@@ -435,7 +435,7 @@ page_dir_calc_reserved_space( ...@@ -435,7 +435,7 @@ page_dir_calc_reserved_space(
ulint n_recs); /* in: number of records */ ulint n_recs); /* in: number of records */
/******************************************************************* /*******************************************************************
Looks for the directory slot which owns the given record. */ Looks for the directory slot which owns the given record. */
UNIV_INTERN
ulint ulint
page_dir_find_owner_slot( page_dir_find_owner_slot(
/*=====================*/ /*=====================*/
...@@ -596,7 +596,7 @@ page_rec_find_owner_rec( ...@@ -596,7 +596,7 @@ page_rec_find_owner_rec(
This is a low-level operation which is used in a database index creation 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 to update the page number of a created B-tree to a data dictionary
record. */ record. */
UNIV_INTERN
void void
page_rec_write_index_page_no( page_rec_write_index_page_no(
/*=========================*/ /*=========================*/
...@@ -670,7 +670,7 @@ page_mem_alloc_free( ...@@ -670,7 +670,7 @@ page_mem_alloc_free(
ulint need); /* in: number of bytes allocated */ ulint need); /* in: number of bytes allocated */
/**************************************************************** /****************************************************************
Allocates a block of memory from the heap of an index page. */ Allocates a block of memory from the heap of an index page. */
UNIV_INTERN
byte* byte*
page_mem_alloc_heap( page_mem_alloc_heap(
/*================*/ /*================*/
...@@ -698,7 +698,7 @@ page_mem_free( ...@@ -698,7 +698,7 @@ page_mem_free(
const ulint* offsets);/* in: array returned by rec_get_offsets() */ const ulint* offsets);/* in: array returned by rec_get_offsets() */
/************************************************************** /**************************************************************
Create an uncompressed B-tree index page. */ Create an uncompressed B-tree index page. */
UNIV_INTERN
page_t* page_t*
page_create( page_create(
/*========*/ /*========*/
...@@ -709,7 +709,7 @@ page_create( ...@@ -709,7 +709,7 @@ page_create(
ulint comp); /* in: nonzero=compact page format */ ulint comp); /* in: nonzero=compact page format */
/************************************************************** /**************************************************************
Create a compressed B-tree index page. */ Create a compressed B-tree index page. */
UNIV_INTERN
page_t* page_t*
page_create_zip( page_create_zip(
/*============*/ /*============*/
...@@ -723,7 +723,7 @@ page_create_zip( ...@@ -723,7 +723,7 @@ page_create_zip(
/***************************************************************** /*****************************************************************
Differs from page_copy_rec_list_end, because this function does not 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. */ touch the lock table and max trx id on page or compress the page. */
UNIV_INTERN
void void
page_copy_rec_list_end_no_locks( page_copy_rec_list_end_no_locks(
/*============================*/ /*============================*/
...@@ -736,7 +736,7 @@ 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, Copies records from page to new_page, from the given record onward,
including that record. Infimum and supremum records are not copied. including that record. Infimum and supremum records are not copied.
The records are copied to the start of the record list on new_page. */ The records are copied to the start of the record list on new_page. */
UNIV_INTERN
rec_t* rec_t*
page_copy_rec_list_end( page_copy_rec_list_end(
/*===================*/ /*===================*/
...@@ -754,7 +754,7 @@ 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 Copies records from page to new_page, up to the given record, NOT
including that record. Infimum and supremum records are not copied. including that record. Infimum and supremum records are not copied.
The records are copied to the end of the record list on new_page. */ The records are copied to the end of the record list on new_page. */
UNIV_INTERN
rec_t* rec_t*
page_copy_rec_list_start( page_copy_rec_list_start(
/*=====================*/ /*=====================*/
...@@ -771,7 +771,7 @@ 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. Deletes records from a page from a given record onward, including that record.
The infimum and supremum records are not deleted. */ The infimum and supremum records are not deleted. */
UNIV_INTERN
void void
page_delete_rec_list_end( page_delete_rec_list_end(
/*=====================*/ /*=====================*/
...@@ -788,7 +788,7 @@ 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 Deletes records from page, up to the given record, NOT including
that record. Infimum and supremum records are not deleted. */ that record. Infimum and supremum records are not deleted. */
UNIV_INTERN
void void
page_delete_rec_list_start( page_delete_rec_list_start(
/*=======================*/ /*=======================*/
...@@ -800,7 +800,7 @@ page_delete_rec_list_start( ...@@ -800,7 +800,7 @@ page_delete_rec_list_start(
/***************************************************************** /*****************************************************************
Moves record list end to another page. Moved records include Moves record list end to another page. Moved records include
split_rec. */ split_rec. */
UNIV_INTERN
ibool ibool
page_move_rec_list_end( page_move_rec_list_end(
/*===================*/ /*===================*/
...@@ -816,7 +816,7 @@ 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 Moves record list start to another page. Moved records do not include
split_rec. */ split_rec. */
UNIV_INTERN
ibool ibool
page_move_rec_list_start( page_move_rec_list_start(
/*=====================*/ /*=====================*/
...@@ -830,7 +830,7 @@ page_move_rec_list_start( ...@@ -830,7 +830,7 @@ page_move_rec_list_start(
__attribute__((nonnull(1, 2, 4, 5))); __attribute__((nonnull(1, 2, 4, 5)));
/******************************************************************** /********************************************************************
Splits a directory slot which owns too many records. */ Splits a directory slot which owns too many records. */
UNIV_INTERN
void void
page_dir_split_slot( page_dir_split_slot(
/*================*/ /*================*/
...@@ -844,7 +844,7 @@ Tries to balance the given directory slot with too few records ...@@ -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 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 of records owned by the slot; this may result in the merging of
two slots. */ two slots. */
UNIV_INTERN
void void
page_dir_balance_slot( page_dir_balance_slot(
/*==================*/ /*==================*/
...@@ -854,7 +854,7 @@ page_dir_balance_slot( ...@@ -854,7 +854,7 @@ page_dir_balance_slot(
__attribute__((nonnull(1))); __attribute__((nonnull(1)));
/************************************************************** /**************************************************************
Parses a log record of a record list end or start deletion. */ Parses a log record of a record list end or start deletion. */
UNIV_INTERN
byte* byte*
page_parse_delete_rec_list( page_parse_delete_rec_list(
/*=======================*/ /*=======================*/
...@@ -870,7 +870,7 @@ page_parse_delete_rec_list( ...@@ -870,7 +870,7 @@ page_parse_delete_rec_list(
mtr_t* mtr); /* in: mtr or NULL */ mtr_t* mtr); /* in: mtr or NULL */
/*************************************************************** /***************************************************************
Parses a redo log record of creating a page. */ Parses a redo log record of creating a page. */
UNIV_INTERN
byte* byte*
page_parse_create( page_parse_create(
/*==============*/ /*==============*/
...@@ -883,7 +883,7 @@ page_parse_create( ...@@ -883,7 +883,7 @@ page_parse_create(
/**************************************************************** /****************************************************************
Prints record contents including the data relevant only in Prints record contents including the data relevant only in
the index page context. */ the index page context. */
UNIV_INTERN
void void
page_rec_print( page_rec_print(
/*===========*/ /*===========*/
...@@ -892,7 +892,7 @@ page_rec_print( ...@@ -892,7 +892,7 @@ page_rec_print(
/******************************************************************* /*******************************************************************
This is used to print the contents of the directory for This is used to print the contents of the directory for
debugging purposes. */ debugging purposes. */
UNIV_INTERN
void void
page_dir_print( page_dir_print(
/*===========*/ /*===========*/
...@@ -901,7 +901,7 @@ page_dir_print( ...@@ -901,7 +901,7 @@ page_dir_print(
/******************************************************************* /*******************************************************************
This is used to print the contents of the page record list for This is used to print the contents of the page record list for
debugging purposes. */ debugging purposes. */
UNIV_INTERN
void void
page_print_list( page_print_list(
/*============*/ /*============*/
...@@ -910,7 +910,7 @@ page_print_list( ...@@ -910,7 +910,7 @@ page_print_list(
ulint pr_n); /* in: print n first and n last entries */ ulint pr_n); /* in: print n first and n last entries */
/******************************************************************* /*******************************************************************
Prints the info in a page header. */ Prints the info in a page header. */
UNIV_INTERN
void void
page_header_print( page_header_print(
/*==============*/ /*==============*/
...@@ -918,7 +918,7 @@ page_header_print( ...@@ -918,7 +918,7 @@ page_header_print(
/******************************************************************* /*******************************************************************
This is used to print the contents of the page for This is used to print the contents of the page for
debugging purposes. */ debugging purposes. */
UNIV_INTERN
void void
page_print( page_print(
/*=======*/ /*=======*/
...@@ -932,7 +932,7 @@ page_print( ...@@ -932,7 +932,7 @@ page_print(
The following is used to validate a record on a page. This function 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 differs from rec_validate as it can also check the n_owned field and
the heap_no field. */ the heap_no field. */
UNIV_INTERN
ibool ibool
page_rec_validate( page_rec_validate(
/*==============*/ /*==============*/
...@@ -943,7 +943,7 @@ page_rec_validate( ...@@ -943,7 +943,7 @@ page_rec_validate(
Checks that the first directory slot points to the infimum record and 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 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. */ bug fixed in 4.0.14 has caused corruption to users' databases. */
UNIV_INTERN
void void
page_check_dir( page_check_dir(
/*===========*/ /*===========*/
...@@ -952,7 +952,7 @@ page_check_dir( ...@@ -952,7 +952,7 @@ page_check_dir(
This function checks the consistency of an index page when we do not 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 know the index. This is also resilient so that this should never crash
even if the page is total garbage. */ even if the page is total garbage. */
UNIV_INTERN
ibool ibool
page_simple_validate_old( page_simple_validate_old(
/*=====================*/ /*=====================*/
...@@ -962,7 +962,7 @@ 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 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 know the index. This is also resilient so that this should never crash
even if the page is total garbage. */ even if the page is total garbage. */
UNIV_INTERN
ibool ibool
page_simple_validate_new( page_simple_validate_new(
/*=====================*/ /*=====================*/
...@@ -970,7 +970,7 @@ page_simple_validate_new( ...@@ -970,7 +970,7 @@ page_simple_validate_new(
page_t* block); /* in: new-style index page */ page_t* block); /* in: new-style index page */
/******************************************************************* /*******************************************************************
This function checks the consistency of an index page. */ This function checks the consistency of an index page. */
UNIV_INTERN
ibool ibool
page_validate( page_validate(
/*==========*/ /*==========*/
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -16,7 +16,7 @@ Created September 2006 Marko Makela ...@@ -16,7 +16,7 @@ Created September 2006 Marko Makela
/************************************************************************ /************************************************************************
Creates a cache of column prefixes of externally stored columns. */ Creates a cache of column prefixes of externally stored columns. */
UNIV_INTERN
row_ext_t* row_ext_t*
row_ext_create( row_ext_create(
/*===========*/ /*===========*/
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -23,6 +23,7 @@ UNIV_INTERN const dulint ut_dulint_max = {0xFFFFFFFFUL, 0xFFFFFFFFUL}; ...@@ -23,6 +23,7 @@ UNIV_INTERN const dulint ut_dulint_max = {0xFFFFFFFFUL, 0xFFFFFFFFUL};
/**************************************************************** /****************************************************************
Sort function for dulint arrays. */ Sort function for dulint arrays. */
UNIV_INTERN
void void
ut_dulint_sort(dulint* arr, dulint* aux_arr, ulint low, ulint high) 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