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(
/*===================================*/ /*===================================*/
......
...@@ -29,7 +29,7 @@ Created 1/8/1996 Heikki Tuuri ...@@ -29,7 +29,7 @@ Created 1/8/1996 Heikki Tuuri
#ifndef UNIV_HOTBACKUP #ifndef UNIV_HOTBACKUP
/********************************************************************** /**********************************************************************
Makes all characters in a NUL-terminated UTF-8 string lower case. */ Makes all characters in a NUL-terminated UTF-8 string lower case. */
UNIV_INTERN
void void
dict_casedn_str( dict_casedn_str(
/*============*/ /*============*/
...@@ -37,7 +37,7 @@ dict_casedn_str( ...@@ -37,7 +37,7 @@ dict_casedn_str(
#endif /* !UNIV_HOTBACKUP */ #endif /* !UNIV_HOTBACKUP */
/************************************************************************ /************************************************************************
Get the database name length in a table name. */ Get the database name length in a table name. */
UNIV_INTERN
ulint ulint
dict_get_db_name_len( dict_get_db_name_len(
/*=================*/ /*=================*/
...@@ -55,7 +55,7 @@ dict_remove_db_name( ...@@ -55,7 +55,7 @@ dict_remove_db_name(
dbname '/' tablename */ dbname '/' tablename */
/************************************************************************** /**************************************************************************
Returns a table object based on table id. */ Returns a table object based on table id. */
UNIV_INTERN
dict_table_t* dict_table_t*
dict_table_get_on_id( dict_table_get_on_id(
/*=================*/ /*=================*/
...@@ -64,7 +64,7 @@ dict_table_get_on_id( ...@@ -64,7 +64,7 @@ dict_table_get_on_id(
trx_t* trx); /* in: transaction handle */ trx_t* trx); /* in: transaction handle */
/************************************************************************ /************************************************************************
Decrements the count of open MySQL handles to a table. */ Decrements the count of open MySQL handles to a table. */
UNIV_INTERN
void void
dict_table_decrement_handle_count( dict_table_decrement_handle_count(
/*==============================*/ /*==============================*/
...@@ -72,7 +72,7 @@ dict_table_decrement_handle_count( ...@@ -72,7 +72,7 @@ dict_table_decrement_handle_count(
ibool dict_locked); /* in: TRUE=data dictionary locked */ ibool dict_locked); /* in: TRUE=data dictionary locked */
/************************************************************************** /**************************************************************************
Inits the data dictionary module. */ Inits the data dictionary module. */
UNIV_INTERN
void void
dict_init(void); dict_init(void);
/*===========*/ /*===========*/
...@@ -82,7 +82,7 @@ list and a hash table of them to the data dictionary cache. This function ...@@ -82,7 +82,7 @@ list and a hash table of them to the data dictionary cache. This function
can be called at database startup if we did not need to do a crash recovery. can be called at database startup if we did not need to do a crash recovery.
In crash recovery we must scan the space id's from the .ibd files in MySQL In crash recovery we must scan the space id's from the .ibd files in MySQL
database directories. */ database directories. */
UNIV_INTERN
void void
dict_load_space_id_list(void); dict_load_space_id_list(void);
/*=========================*/ /*=========================*/
...@@ -158,7 +158,7 @@ dict_col_get_clust_pos( ...@@ -158,7 +158,7 @@ dict_col_get_clust_pos(
/******************************************************************** /********************************************************************
If the given column name is reserved for InnoDB system columns, return If the given column name is reserved for InnoDB system columns, return
TRUE. */ TRUE. */
UNIV_INTERN
ibool ibool
dict_col_name_is_reserved( dict_col_name_is_reserved(
/*======================*/ /*======================*/
...@@ -166,7 +166,7 @@ dict_col_name_is_reserved( ...@@ -166,7 +166,7 @@ dict_col_name_is_reserved(
const char* name); /* in: column name */ const char* name); /* in: column name */
/************************************************************************ /************************************************************************
Acquire the autoinc lock.*/ Acquire the autoinc lock.*/
UNIV_INTERN
void void
dict_table_autoinc_lock( dict_table_autoinc_lock(
/*====================*/ /*====================*/
...@@ -174,7 +174,7 @@ dict_table_autoinc_lock( ...@@ -174,7 +174,7 @@ dict_table_autoinc_lock(
/************************************************************************ /************************************************************************
Initializes the autoinc counter. It is not an error to initialize an already Initializes the autoinc counter. It is not an error to initialize an already
initialized counter. */ initialized counter. */
UNIV_INTERN
void void
dict_table_autoinc_initialize( dict_table_autoinc_initialize(
/*==========================*/ /*==========================*/
...@@ -183,7 +183,7 @@ dict_table_autoinc_initialize( ...@@ -183,7 +183,7 @@ dict_table_autoinc_initialize(
/************************************************************************ /************************************************************************
Reads the next autoinc value (== autoinc counter value), 0 if not yet Reads the next autoinc value (== autoinc counter value), 0 if not yet
initialized. */ initialized. */
UNIV_INTERN
ib_longlong ib_longlong
dict_table_autoinc_read( dict_table_autoinc_read(
/*====================*/ /*====================*/
...@@ -192,7 +192,7 @@ dict_table_autoinc_read( ...@@ -192,7 +192,7 @@ dict_table_autoinc_read(
/************************************************************************ /************************************************************************
Updates the autoinc counter if the value supplied is equal or bigger than the Updates the autoinc counter if the value supplied is equal or bigger than the
current value. If not inited, does nothing. */ current value. If not inited, does nothing. */
UNIV_INTERN
void void
dict_table_autoinc_update( dict_table_autoinc_update(
/*======================*/ /*======================*/
...@@ -201,14 +201,14 @@ dict_table_autoinc_update( ...@@ -201,14 +201,14 @@ dict_table_autoinc_update(
ib_longlong value); /* in: value which was assigned to a row */ ib_longlong value); /* in: value which was assigned to a row */
/************************************************************************ /************************************************************************
Release the autoinc lock.*/ Release the autoinc lock.*/
UNIV_INTERN
void void
dict_table_autoinc_unlock( dict_table_autoinc_unlock(
/*======================*/ /*======================*/
dict_table_t* table); /* in/out: table */ dict_table_t* table); /* in/out: table */
/************************************************************************** /**************************************************************************
Adds system columns to a table object. */ Adds system columns to a table object. */
UNIV_INTERN
void void
dict_table_add_system_columns( dict_table_add_system_columns(
/*==========================*/ /*==========================*/
...@@ -216,7 +216,7 @@ dict_table_add_system_columns( ...@@ -216,7 +216,7 @@ dict_table_add_system_columns(
mem_heap_t* heap); /* in: temporary heap */ mem_heap_t* heap); /* in: temporary heap */
/************************************************************************** /**************************************************************************
Adds a table object to the dictionary cache. */ Adds a table object to the dictionary cache. */
UNIV_INTERN
void void
dict_table_add_to_cache( dict_table_add_to_cache(
/*====================*/ /*====================*/
...@@ -224,14 +224,14 @@ dict_table_add_to_cache( ...@@ -224,14 +224,14 @@ dict_table_add_to_cache(
mem_heap_t* heap); /* in: temporary heap */ mem_heap_t* heap); /* in: temporary heap */
/************************************************************************** /**************************************************************************
Removes a table object from the dictionary cache. */ Removes a table object from the dictionary cache. */
UNIV_INTERN
void void
dict_table_remove_from_cache( dict_table_remove_from_cache(
/*=========================*/ /*=========================*/
dict_table_t* table); /* in, own: table */ dict_table_t* table); /* in, own: table */
/************************************************************************** /**************************************************************************
Renames a table object. */ Renames a table object. */
UNIV_INTERN
ibool ibool
dict_table_rename_in_cache( dict_table_rename_in_cache(
/*=======================*/ /*=======================*/
...@@ -243,7 +243,7 @@ dict_table_rename_in_cache( ...@@ -243,7 +243,7 @@ dict_table_rename_in_cache(
in constraints which reference it */ in constraints which reference it */
/************************************************************************** /**************************************************************************
Removes an index from the dictionary cache. */ Removes an index from the dictionary cache. */
UNIV_INTERN
void void
dict_index_remove_from_cache( dict_index_remove_from_cache(
/*=========================*/ /*=========================*/
...@@ -252,7 +252,7 @@ dict_index_remove_from_cache( ...@@ -252,7 +252,7 @@ dict_index_remove_from_cache(
/************************************************************************** /**************************************************************************
Change the id of a table object in the dictionary cache. This is used in Change the id of a table object in the dictionary cache. This is used in
DISCARD TABLESPACE. */ DISCARD TABLESPACE. */
UNIV_INTERN
void void
dict_table_change_id_in_cache( dict_table_change_id_in_cache(
/*==========================*/ /*==========================*/
...@@ -263,7 +263,7 @@ Adds a foreign key constraint object to the dictionary cache. May free ...@@ -263,7 +263,7 @@ Adds a foreign key constraint object to the dictionary cache. May free
the object if there already is an object with the same identifier in. the object if there already is an object with the same identifier in.
At least one of foreign table or referenced table must already be in At least one of foreign table or referenced table must already be in
the dictionary cache! */ the dictionary cache! */
UNIV_INTERN
ulint ulint
dict_foreign_add_to_cache( dict_foreign_add_to_cache(
/*======================*/ /*======================*/
...@@ -274,7 +274,7 @@ dict_foreign_add_to_cache( ...@@ -274,7 +274,7 @@ dict_foreign_add_to_cache(
/************************************************************************* /*************************************************************************
Check if the index is referenced by a foreign key, if TRUE return the Check if the index is referenced by a foreign key, if TRUE return the
matching instance NULL otherwise. */ matching instance NULL otherwise. */
UNIV_INTERN
dict_foreign_t* dict_foreign_t*
dict_table_get_referenced_constraint( dict_table_get_referenced_constraint(
/*=================================*/ /*=================================*/
...@@ -284,7 +284,7 @@ dict_table_get_referenced_constraint( ...@@ -284,7 +284,7 @@ dict_table_get_referenced_constraint(
dict_index_t* index); /* in: InnoDB index */ dict_index_t* index); /* in: InnoDB index */
/************************************************************************* /*************************************************************************
Checks if a table is referenced by foreign keys. */ Checks if a table is referenced by foreign keys. */
UNIV_INTERN
ibool ibool
dict_table_is_referenced_by_foreign_key( dict_table_is_referenced_by_foreign_key(
/*====================================*/ /*====================================*/
...@@ -294,7 +294,7 @@ dict_table_is_referenced_by_foreign_key( ...@@ -294,7 +294,7 @@ dict_table_is_referenced_by_foreign_key(
/************************************************************************** /**************************************************************************
Replace the index in the foreign key list that matches this index's Replace the index in the foreign key list that matches this index's
definition with an equivalent index. */ definition with an equivalent index. */
UNIV_INTERN
void void
dict_table_replace_index_in_foreign_list( dict_table_replace_index_in_foreign_list(
/*=====================================*/ /*=====================================*/
...@@ -302,7 +302,7 @@ dict_table_replace_index_in_foreign_list( ...@@ -302,7 +302,7 @@ dict_table_replace_index_in_foreign_list(
dict_index_t* index); /* in: index to be replaced */ dict_index_t* index); /* in: index to be replaced */
/************************************************************************** /**************************************************************************
Determines whether a string starts with the specified keyword. */ Determines whether a string starts with the specified keyword. */
UNIV_INTERN
ibool ibool
dict_str_starts_with_keyword( dict_str_starts_with_keyword(
/*=========================*/ /*=========================*/
...@@ -315,7 +315,7 @@ dict_str_starts_with_keyword( ...@@ -315,7 +315,7 @@ dict_str_starts_with_keyword(
Checks if a index is defined for a foreign key constraint. Index is a part Checks if a index is defined for a foreign key constraint. Index is a part
of a foreign key constraint if the index is referenced by foreign key of a foreign key constraint if the index is referenced by foreign key
or index is a foreign key index */ or index is a foreign key index */
UNIV_INTERN
dict_foreign_t* dict_foreign_t*
dict_table_get_foreign_constraint( dict_table_get_foreign_constraint(
/*==============================*/ /*==============================*/
...@@ -330,7 +330,7 @@ should be called after the indexes for a table have been created. ...@@ -330,7 +330,7 @@ should be called after the indexes for a table have been created.
Each foreign key constraint must be accompanied with indexes in Each foreign key constraint must be accompanied with indexes in
bot participating tables. The indexes are allowed to contain more bot participating tables. The indexes are allowed to contain more
fields than mentioned in the constraint. */ fields than mentioned in the constraint. */
UNIV_INTERN
ulint ulint
dict_create_foreign_constraints( dict_create_foreign_constraints(
/*============================*/ /*============================*/
...@@ -352,7 +352,7 @@ dict_create_foreign_constraints( ...@@ -352,7 +352,7 @@ dict_create_foreign_constraints(
any foreign keys are found. */ any foreign keys are found. */
/************************************************************************** /**************************************************************************
Parses the CONSTRAINT id's to be dropped in an ALTER TABLE statement. */ Parses the CONSTRAINT id's to be dropped in an ALTER TABLE statement. */
UNIV_INTERN
ulint ulint
dict_foreign_parse_drop_constraints( dict_foreign_parse_drop_constraints(
/*================================*/ /*================================*/
...@@ -373,7 +373,7 @@ Returns a table object and optionally increment its MySQL open handle count. ...@@ -373,7 +373,7 @@ Returns a table object and optionally increment its MySQL open handle count.
NOTE! This is a high-level function to be used mainly from outside the NOTE! This is a high-level function to be used mainly from outside the
'dict' directory. Inside this directory dict_table_get_low is usually the 'dict' directory. Inside this directory dict_table_get_low is usually the
appropriate function. */ appropriate function. */
UNIV_INTERN
dict_table_t* dict_table_t*
dict_table_get( dict_table_get(
/*===========*/ /*===========*/
...@@ -385,7 +385,7 @@ dict_table_get( ...@@ -385,7 +385,7 @@ dict_table_get(
handle count on the table */ handle count on the table */
/************************************************************************** /**************************************************************************
Returns a index object, based on table and index id, and memoryfixes it. */ Returns a index object, based on table and index id, and memoryfixes it. */
UNIV_INTERN
dict_index_t* dict_index_t*
dict_index_get_on_id_low( dict_index_get_on_id_low(
/*=====================*/ /*=====================*/
...@@ -422,7 +422,7 @@ dict_table_get_on_id_low( ...@@ -422,7 +422,7 @@ dict_table_get_on_id_low(
/************************************************************************** /**************************************************************************
Returns an index object by matching on the name and column names and if Returns an index object by matching on the name and column names and if
more than index is found return the index with the higher id.*/ more than index is found return the index with the higher id.*/
UNIV_INTERN
dict_index_t* dict_index_t*
dict_table_get_index_by_max_id( dict_table_get_index_by_max_id(
/*===========================*/ /*===========================*/
...@@ -446,28 +446,28 @@ dict_table_get_col_name( ...@@ -446,28 +446,28 @@ dict_table_get_col_name(
/************************************************************************** /**************************************************************************
Prints a table definition. */ Prints a table definition. */
UNIV_INTERN
void void
dict_table_print( dict_table_print(
/*=============*/ /*=============*/
dict_table_t* table); /* in: table */ dict_table_t* table); /* in: table */
/************************************************************************** /**************************************************************************
Prints a table data. */ Prints a table data. */
UNIV_INTERN
void void
dict_table_print_low( dict_table_print_low(
/*=================*/ /*=================*/
dict_table_t* table); /* in: table */ dict_table_t* table); /* in: table */
/************************************************************************** /**************************************************************************
Prints a table data when we know the table name. */ Prints a table data when we know the table name. */
UNIV_INTERN
void void
dict_table_print_by_name( dict_table_print_by_name(
/*=====================*/ /*=====================*/
const char* name); const char* name);
/************************************************************************** /**************************************************************************
Outputs info on foreign keys of a table. */ Outputs info on foreign keys of a table. */
UNIV_INTERN
void void
dict_print_info_on_foreign_keys( dict_print_info_on_foreign_keys(
/*============================*/ /*============================*/
...@@ -481,6 +481,7 @@ dict_print_info_on_foreign_keys( ...@@ -481,6 +481,7 @@ dict_print_info_on_foreign_keys(
/************************************************************************** /**************************************************************************
Outputs info on a foreign key of a table in a format suitable for Outputs info on a foreign key of a table in a format suitable for
CREATE TABLE. */ CREATE TABLE. */
UNIV_INTERN
void void
dict_print_info_on_foreign_key_in_create_format( dict_print_info_on_foreign_key_in_create_format(
/*============================================*/ /*============================================*/
...@@ -490,6 +491,7 @@ dict_print_info_on_foreign_key_in_create_format( ...@@ -490,6 +491,7 @@ dict_print_info_on_foreign_key_in_create_format(
ibool add_newline); /* in: whether to add a newline */ ibool add_newline); /* in: whether to add a newline */
/************************************************************************ /************************************************************************
Displays the names of the index and the table. */ Displays the names of the index and the table. */
UNIV_INTERN
void void
dict_index_name_print( dict_index_name_print(
/*==================*/ /*==================*/
...@@ -640,7 +642,7 @@ dict_table_zip_size( ...@@ -640,7 +642,7 @@ dict_table_zip_size(
/************************************************************************ /************************************************************************
Checks if a column is in the ordering columns of the clustered index of a Checks if a column is in the ordering columns of the clustered index of a
table. Column prefixes are treated like whole columns. */ table. Column prefixes are treated like whole columns. */
UNIV_INTERN
ibool ibool
dict_table_col_in_clustered_key( dict_table_col_in_clustered_key(
/*============================*/ /*============================*/
...@@ -652,7 +654,7 @@ dict_table_col_in_clustered_key( ...@@ -652,7 +654,7 @@ dict_table_col_in_clustered_key(
Copies types of columns contained in table to tuple and sets all Copies types of columns contained in table to tuple and sets all
fields of the tuple to the SQL NULL value. This function should fields of the tuple to the SQL NULL value. This function should
be called right after dtuple_create(). */ be called right after dtuple_create(). */
UNIV_INTERN
void void
dict_table_copy_types( dict_table_copy_types(
/*==================*/ /*==================*/
...@@ -662,7 +664,7 @@ dict_table_copy_types( ...@@ -662,7 +664,7 @@ dict_table_copy_types(
Looks for an index with the given id. NOTE that we do not reserve Looks for an index with the given id. NOTE that we do not reserve
the dictionary mutex: this function is for emergency purposes like the dictionary mutex: this function is for emergency purposes like
printing info of a corrupt database page! */ printing info of a corrupt database page! */
UNIV_INTERN
dict_index_t* dict_index_t*
dict_index_find_on_id_low( dict_index_find_on_id_low(
/*======================*/ /*======================*/
...@@ -670,7 +672,7 @@ dict_index_find_on_id_low( ...@@ -670,7 +672,7 @@ dict_index_find_on_id_low(
dulint id); /* in: index id */ dulint id); /* in: index id */
/************************************************************************** /**************************************************************************
Adds an index to the dictionary cache. */ Adds an index to the dictionary cache. */
UNIV_INTERN
ulint ulint
dict_index_add_to_cache( dict_index_add_to_cache(
/*====================*/ /*====================*/
...@@ -681,7 +683,7 @@ dict_index_add_to_cache( ...@@ -681,7 +683,7 @@ dict_index_add_to_cache(
ulint page_no);/* in: root page number of the index */ ulint page_no);/* in: root page number of the index */
/************************************************************************** /**************************************************************************
Removes an index from the dictionary cache. */ Removes an index from the dictionary cache. */
UNIV_INTERN
void void
dict_index_remove_from_cache( dict_index_remove_from_cache(
/*=========================*/ /*=========================*/
...@@ -766,7 +768,7 @@ dict_index_get_nth_col_no( ...@@ -766,7 +768,7 @@ dict_index_get_nth_col_no(
ulint pos); /* in: position of the field */ ulint pos); /* in: position of the field */
/************************************************************************ /************************************************************************
Looks for column n in an index. */ Looks for column n in an index. */
UNIV_INTERN
ulint ulint
dict_index_get_nth_col_pos( dict_index_get_nth_col_pos(
/*=======================*/ /*=======================*/
...@@ -778,7 +780,7 @@ dict_index_get_nth_col_pos( ...@@ -778,7 +780,7 @@ dict_index_get_nth_col_pos(
ulint n); /* in: column number */ ulint n); /* in: column number */
/************************************************************************ /************************************************************************
Returns TRUE if the index contains a column or a prefix of that column. */ Returns TRUE if the index contains a column or a prefix of that column. */
UNIV_INTERN
ibool ibool
dict_index_contains_col_or_prefix( dict_index_contains_col_or_prefix(
/*==============================*/ /*==============================*/
...@@ -791,7 +793,7 @@ Looks for a matching field in an index. The column has to be the same. The ...@@ -791,7 +793,7 @@ Looks for a matching field in an index. The column has to be the same. The
column in index must be complete, or must contain a prefix longer than the column in index must be complete, or must contain a prefix longer than the
column in index2. That is, we must be able to construct the prefix in index2 column in index2. That is, we must be able to construct the prefix in index2
from the prefix in index. */ from the prefix in index. */
UNIV_INTERN
ulint ulint
dict_index_get_nth_field_pos( dict_index_get_nth_field_pos(
/*=========================*/ /*=========================*/
...@@ -804,7 +806,7 @@ dict_index_get_nth_field_pos( ...@@ -804,7 +806,7 @@ dict_index_get_nth_field_pos(
ulint n); /* in: field number in index2 */ ulint n); /* in: field number in index2 */
/************************************************************************ /************************************************************************
Looks for column n position in the clustered index. */ Looks for column n position in the clustered index. */
UNIV_INTERN
ulint ulint
dict_table_get_nth_col_pos( dict_table_get_nth_col_pos(
/*=======================*/ /*=======================*/
...@@ -825,7 +827,7 @@ dict_index_get_sys_col_pos( ...@@ -825,7 +827,7 @@ dict_index_get_sys_col_pos(
ulint type); /* in: DATA_ROW_ID, ... */ ulint type); /* in: DATA_ROW_ID, ... */
/*********************************************************************** /***********************************************************************
Adds a column to index. */ Adds a column to index. */
UNIV_INTERN
void void
dict_index_add_col( dict_index_add_col(
/*===============*/ /*===============*/
...@@ -835,7 +837,7 @@ dict_index_add_col( ...@@ -835,7 +837,7 @@ dict_index_add_col(
ulint prefix_len); /* in: column prefix length */ ulint prefix_len); /* in: column prefix length */
/*********************************************************************** /***********************************************************************
Copies types of fields contained in index to tuple. */ Copies types of fields contained in index to tuple. */
UNIV_INTERN
void void
dict_index_copy_types( dict_index_copy_types(
/*==================*/ /*==================*/
...@@ -854,7 +856,7 @@ dict_field_get_col( ...@@ -854,7 +856,7 @@ dict_field_get_col(
/************************************************************************** /**************************************************************************
Returns an index object if it is found in the dictionary cache. Returns an index object if it is found in the dictionary cache.
Assumes that dict_sys->mutex is already being held. */ Assumes that dict_sys->mutex is already being held. */
UNIV_INTERN
dict_index_t* dict_index_t*
dict_index_get_if_in_cache_low( dict_index_get_if_in_cache_low(
/*===========================*/ /*===========================*/
...@@ -863,7 +865,7 @@ dict_index_get_if_in_cache_low( ...@@ -863,7 +865,7 @@ dict_index_get_if_in_cache_low(
#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
/************************************************************************** /**************************************************************************
Returns an index object if it is found in the dictionary cache. */ Returns an index object if it is found in the dictionary cache. */
UNIV_INTERN
dict_index_t* dict_index_t*
dict_index_get_if_in_cache( dict_index_get_if_in_cache(
/*=======================*/ /*=======================*/
...@@ -874,7 +876,7 @@ dict_index_get_if_in_cache( ...@@ -874,7 +876,7 @@ dict_index_get_if_in_cache(
/************************************************************************** /**************************************************************************
Checks that a tuple has n_fields_cmp value in a sensible range, so that Checks that a tuple has n_fields_cmp value in a sensible range, so that
no comparison can occur with the page number field in a node pointer. */ no comparison can occur with the page number field in a node pointer. */
UNIV_INTERN
ibool ibool
dict_index_check_search_tuple( dict_index_check_search_tuple(
/*==========================*/ /*==========================*/
...@@ -883,7 +885,7 @@ dict_index_check_search_tuple( ...@@ -883,7 +885,7 @@ dict_index_check_search_tuple(
const dtuple_t* tuple); /* in: tuple used in a search */ const dtuple_t* tuple); /* in: tuple used in a search */
/************************************************************************** /**************************************************************************
Check for duplicate index entries in a table [using the index name] */ Check for duplicate index entries in a table [using the index name] */
UNIV_INTERN
void void
dict_table_check_for_dup_indexes( dict_table_check_for_dup_indexes(
/*=============================*/ /*=============================*/
...@@ -893,7 +895,7 @@ dict_table_check_for_dup_indexes( ...@@ -893,7 +895,7 @@ dict_table_check_for_dup_indexes(
#endif /* UNIV_DEBUG */ #endif /* UNIV_DEBUG */
/************************************************************************** /**************************************************************************
Builds a node pointer out of a physical record and a page number. */ Builds a node pointer out of a physical record and a page number. */
UNIV_INTERN
dtuple_t* dtuple_t*
dict_index_build_node_ptr( dict_index_build_node_ptr(
/*======================*/ /*======================*/
...@@ -910,7 +912,7 @@ dict_index_build_node_ptr( ...@@ -910,7 +912,7 @@ dict_index_build_node_ptr(
/************************************************************************** /**************************************************************************
Copies an initial segment of a physical record, long enough to specify an Copies an initial segment of a physical record, long enough to specify an
index entry uniquely. */ index entry uniquely. */
UNIV_INTERN
rec_t* rec_t*
dict_index_copy_rec_order_prefix( dict_index_copy_rec_order_prefix(
/*=============================*/ /*=============================*/
...@@ -924,7 +926,7 @@ dict_index_copy_rec_order_prefix( ...@@ -924,7 +926,7 @@ dict_index_copy_rec_order_prefix(
ulint* buf_size);/* in/out: buffer size */ ulint* buf_size);/* in/out: buffer size */
/************************************************************************** /**************************************************************************
Builds a typed data tuple out of a physical record. */ Builds a typed data tuple out of a physical record. */
UNIV_INTERN
dtuple_t* dtuple_t*
dict_index_build_data_tuple( dict_index_build_data_tuple(
/*========================*/ /*========================*/
...@@ -993,7 +995,7 @@ dict_index_get_space_reserve(void); ...@@ -993,7 +995,7 @@ dict_index_get_space_reserve(void);
reserved for updates */ reserved for updates */
/************************************************************************* /*************************************************************************
Calculates the minimum record length in an index. */ Calculates the minimum record length in an index. */
UNIV_INTERN
ulint ulint
dict_index_calc_min_rec_len( dict_index_calc_min_rec_len(
/*========================*/ /*========================*/
...@@ -1001,7 +1003,7 @@ dict_index_calc_min_rec_len( ...@@ -1001,7 +1003,7 @@ dict_index_calc_min_rec_len(
/************************************************************************* /*************************************************************************
Calculates new estimates for table and index statistics. The statistics Calculates new estimates for table and index statistics. The statistics
are used in query optimization. */ are used in query optimization. */
UNIV_INTERN
void void
dict_update_statistics_low( dict_update_statistics_low(
/*=======================*/ /*=======================*/
...@@ -1011,26 +1013,26 @@ dict_update_statistics_low( ...@@ -1011,26 +1013,26 @@ dict_update_statistics_low(
/************************************************************************* /*************************************************************************
Calculates new estimates for table and index statistics. The statistics Calculates new estimates for table and index statistics. The statistics
are used in query optimization. */ are used in query optimization. */
UNIV_INTERN
void void
dict_update_statistics( dict_update_statistics(
/*===================*/ /*===================*/
dict_table_t* table); /* in/out: table */ dict_table_t* table); /* in/out: table */
/************************************************************************ /************************************************************************
Reserves the dictionary system mutex for MySQL. */ Reserves the dictionary system mutex for MySQL. */
UNIV_INTERN
void void
dict_mutex_enter_for_mysql(void); dict_mutex_enter_for_mysql(void);
/*============================*/ /*============================*/
/************************************************************************ /************************************************************************
Releases the dictionary system mutex for MySQL. */ Releases the dictionary system mutex for MySQL. */
UNIV_INTERN
void void
dict_mutex_exit_for_mysql(void); dict_mutex_exit_for_mysql(void);
/*===========================*/ /*===========================*/
/************************************************************************ /************************************************************************
Checks if the database name in two table names is the same. */ Checks if the database name in two table names is the same. */
UNIV_INTERN
ibool ibool
dict_tables_have_same_db( dict_tables_have_same_db(
/*=====================*/ /*=====================*/
...@@ -1052,7 +1054,7 @@ dict_scan_to( ...@@ -1052,7 +1054,7 @@ dict_scan_to(
const char* string);/* in: look for this */ const char* string);/* in: look for this */
/************************************************************************* /*************************************************************************
Removes an index from the cache */ Removes an index from the cache */
UNIV_INTERN
void void
dict_index_remove_from_cache( dict_index_remove_from_cache(
/*=========================*/ /*=========================*/
...@@ -1060,7 +1062,7 @@ dict_index_remove_from_cache( ...@@ -1060,7 +1062,7 @@ dict_index_remove_from_cache(
dict_index_t* index); /* in, own: index */ dict_index_t* index); /* in, own: index */
/************************************************************************** /**************************************************************************
Get index by name */ Get index by name */
UNIV_INTERN
dict_index_t* dict_index_t*
dict_table_get_index_on_name( dict_table_get_index_on_name(
/*=========================*/ /*=========================*/
...@@ -1070,7 +1072,7 @@ dict_table_get_index_on_name( ...@@ -1070,7 +1072,7 @@ dict_table_get_index_on_name(
/************************************************************************** /**************************************************************************
Find and index that is equivalent to the one passed in and is not marked Find and index that is equivalent to the one passed in and is not marked
for deletion. */ for deletion. */
UNIV_INTERN
dict_index_t* dict_index_t*
dict_table_find_equivalent_index( dict_table_find_equivalent_index(
/*=============================*/ /*=============================*/
...@@ -1079,7 +1081,7 @@ dict_table_find_equivalent_index( ...@@ -1079,7 +1081,7 @@ dict_table_find_equivalent_index(
/************************************************************************** /**************************************************************************
In case there is more than one index with the same name return the index In case there is more than one index with the same name return the index
with the min(id). */ with the min(id). */
UNIV_INTERN
dict_index_t* dict_index_t*
dict_table_get_index_on_name_and_min_id( dict_table_get_index_on_name_and_min_id(
/*====================================*/ /*====================================*/
......
...@@ -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(
/*========*/ /*========*/
......
...@@ -132,7 +132,7 @@ extern ulint fil_n_pending_tablespace_flushes; ...@@ -132,7 +132,7 @@ extern ulint fil_n_pending_tablespace_flushes;
/*********************************************************************** /***********************************************************************
Returns the version number of a tablespace, -1 if not found. */ Returns the version number of a tablespace, -1 if not found. */
UNIV_INTERN
ib_longlong ib_longlong
fil_space_get_version( fil_space_get_version(
/*==================*/ /*==================*/
...@@ -141,7 +141,7 @@ fil_space_get_version( ...@@ -141,7 +141,7 @@ fil_space_get_version(
ulint id); /* in: space id */ ulint id); /* in: space id */
/*********************************************************************** /***********************************************************************
Returns the latch of a file space. */ Returns the latch of a file space. */
UNIV_INTERN
rw_lock_t* rw_lock_t*
fil_space_get_latch( fil_space_get_latch(
/*================*/ /*================*/
...@@ -151,7 +151,7 @@ fil_space_get_latch( ...@@ -151,7 +151,7 @@ fil_space_get_latch(
0 for uncompressed tablespaces */ 0 for uncompressed tablespaces */
/*********************************************************************** /***********************************************************************
Returns the type of a file space. */ Returns the type of a file space. */
UNIV_INTERN
ulint ulint
fil_space_get_type( fil_space_get_type(
/*===============*/ /*===============*/
...@@ -159,7 +159,7 @@ fil_space_get_type( ...@@ -159,7 +159,7 @@ fil_space_get_type(
ulint id); /* in: space id */ ulint id); /* in: space id */
/*********************************************************************** /***********************************************************************
Returns the ibuf data of a file space. */ Returns the ibuf data of a file space. */
UNIV_INTERN
ibuf_data_t* ibuf_data_t*
fil_space_get_ibuf_data( fil_space_get_ibuf_data(
/*====================*/ /*====================*/
...@@ -167,7 +167,7 @@ fil_space_get_ibuf_data( ...@@ -167,7 +167,7 @@ fil_space_get_ibuf_data(
ulint id); /* in: space id */ ulint id); /* in: space id */
/*********************************************************************** /***********************************************************************
Appends a new file to the chain of files of a space. File must be closed. */ Appends a new file to the chain of files of a space. File must be closed. */
UNIV_INTERN
void void
fil_node_create( fil_node_create(
/*============*/ /*============*/
...@@ -181,7 +181,7 @@ fil_node_create( ...@@ -181,7 +181,7 @@ fil_node_create(
/******************************************************************** /********************************************************************
Drops files from the start of a file space, so that its size is cut by Drops files from the start of a file space, so that its size is cut by
the amount given. */ the amount given. */
UNIV_INTERN
void void
fil_space_truncate_start( fil_space_truncate_start(
/*=====================*/ /*=====================*/
...@@ -193,7 +193,7 @@ fil_space_truncate_start( ...@@ -193,7 +193,7 @@ fil_space_truncate_start(
/*********************************************************************** /***********************************************************************
Creates a space memory object and puts it to the 'fil system' hash table. If Creates a space memory object and puts it to the 'fil system' hash table. If
there is an error, prints an error message to the .err log. */ there is an error, prints an error message to the .err log. */
UNIV_INTERN
ibool ibool
fil_space_create( fil_space_create(
/*=============*/ /*=============*/
...@@ -206,7 +206,7 @@ fil_space_create( ...@@ -206,7 +206,7 @@ fil_space_create(
/*********************************************************************** /***********************************************************************
Frees a space object from a the tablespace memory cache. Closes the files in Frees a space object from a the tablespace memory cache. Closes the files in
the chain but does not delete them. */ the chain but does not delete them. */
UNIV_INTERN
ibool ibool
fil_space_free( fil_space_free(
/*===========*/ /*===========*/
...@@ -215,7 +215,7 @@ fil_space_free( ...@@ -215,7 +215,7 @@ fil_space_free(
/*********************************************************************** /***********************************************************************
Returns the size of the space in pages. The tablespace must be cached in the Returns the size of the space in pages. The tablespace must be cached in the
memory cache. */ memory cache. */
UNIV_INTERN
ulint ulint
fil_space_get_size( fil_space_get_size(
/*===============*/ /*===============*/
...@@ -224,7 +224,7 @@ fil_space_get_size( ...@@ -224,7 +224,7 @@ fil_space_get_size(
/*********************************************************************** /***********************************************************************
Returns the compressed page size of the space, or 0 if the space Returns the compressed page size of the space, or 0 if the space
is not compressed. The tablespace must be cached in the memory cache. */ is not compressed. The tablespace must be cached in the memory cache. */
UNIV_INTERN
ulint ulint
fil_space_get_zip_size( fil_space_get_zip_size(
/*===================*/ /*===================*/
...@@ -234,7 +234,7 @@ fil_space_get_zip_size( ...@@ -234,7 +234,7 @@ fil_space_get_zip_size(
/*********************************************************************** /***********************************************************************
Checks if the pair space, page_no refers to an existing page in a tablespace Checks if the pair space, page_no refers to an existing page in a tablespace
file space. The tablespace must be cached in the memory cache. */ file space. The tablespace must be cached in the memory cache. */
UNIV_INTERN
ibool ibool
fil_check_adress_in_tablespace( fil_check_adress_in_tablespace(
/*===========================*/ /*===========================*/
...@@ -243,7 +243,7 @@ fil_check_adress_in_tablespace( ...@@ -243,7 +243,7 @@ fil_check_adress_in_tablespace(
ulint page_no);/* in: page number */ ulint page_no);/* in: page number */
/******************************************************************** /********************************************************************
Initializes the tablespace memory cache. */ Initializes the tablespace memory cache. */
UNIV_INTERN
void void
fil_init( fil_init(
/*=====*/ /*=====*/
...@@ -254,21 +254,21 @@ database server shutdown. This should be called at a server startup after the ...@@ -254,21 +254,21 @@ database server shutdown. This should be called at a server startup after the
space objects for the log and the system tablespace have been created. The space objects for the log and the system tablespace have been created. The
purpose of this operation is to make sure we never run out of file descriptors purpose of this operation is to make sure we never run out of file descriptors
if we need to read from the insert buffer or to write to the log. */ if we need to read from the insert buffer or to write to the log. */
UNIV_INTERN
void void
fil_open_log_and_system_tablespace_files(void); fil_open_log_and_system_tablespace_files(void);
/*==========================================*/ /*==========================================*/
/*********************************************************************** /***********************************************************************
Closes all open files. There must not be any pending i/o's or not flushed Closes all open files. There must not be any pending i/o's or not flushed
modifications in the files. */ modifications in the files. */
UNIV_INTERN
void void
fil_close_all_files(void); fil_close_all_files(void);
/*=====================*/ /*=====================*/
/*********************************************************************** /***********************************************************************
Sets the max tablespace id counter if the given number is bigger than the Sets the max tablespace id counter if the given number is bigger than the
previous value. */ previous value. */
UNIV_INTERN
void void
fil_set_max_space_id_if_bigger( fil_set_max_space_id_if_bigger(
/*===========================*/ /*===========================*/
...@@ -277,14 +277,14 @@ fil_set_max_space_id_if_bigger( ...@@ -277,14 +277,14 @@ fil_set_max_space_id_if_bigger(
Initializes the ibuf data structure for space 0 == the system tablespace. Initializes the ibuf data structure for space 0 == the system tablespace.
This can be called after the file space headers have been created and the This can be called after the file space headers have been created and the
dictionary system has been initialized. */ dictionary system has been initialized. */
UNIV_INTERN
void void
fil_ibuf_init_at_db_start(void); fil_ibuf_init_at_db_start(void);
/*===========================*/ /*===========================*/
/******************************************************************** /********************************************************************
Writes the flushed lsn and the latest archived log number to the page Writes the flushed lsn and the latest archived log number to the page
header of the first page of each data file in the system tablespace. */ header of the first page of each data file in the system tablespace. */
UNIV_INTERN
ulint ulint
fil_write_flushed_lsn_to_data_files( fil_write_flushed_lsn_to_data_files(
/*================================*/ /*================================*/
...@@ -295,7 +295,7 @@ fil_write_flushed_lsn_to_data_files( ...@@ -295,7 +295,7 @@ fil_write_flushed_lsn_to_data_files(
/*********************************************************************** /***********************************************************************
Reads the flushed lsn and arch no fields from a data file at database Reads the flushed lsn and arch no fields from a data file at database
startup. */ startup. */
UNIV_INTERN
void void
fil_read_flushed_lsn_and_arch_log_no( fil_read_flushed_lsn_and_arch_log_no(
/*=================================*/ /*=================================*/
...@@ -312,7 +312,7 @@ fil_read_flushed_lsn_and_arch_log_no( ...@@ -312,7 +312,7 @@ fil_read_flushed_lsn_and_arch_log_no(
/*********************************************************************** /***********************************************************************
Increments the count of pending insert buffer page merges, if space is not Increments the count of pending insert buffer page merges, if space is not
being deleted. */ being deleted. */
UNIV_INTERN
ibool ibool
fil_inc_pending_ibuf_merges( fil_inc_pending_ibuf_merges(
/*========================*/ /*========================*/
...@@ -321,7 +321,7 @@ fil_inc_pending_ibuf_merges( ...@@ -321,7 +321,7 @@ fil_inc_pending_ibuf_merges(
ulint id); /* in: space id */ ulint id); /* in: space id */
/*********************************************************************** /***********************************************************************
Decrements the count of pending insert buffer page merges. */ Decrements the count of pending insert buffer page merges. */
UNIV_INTERN
void void
fil_decr_pending_ibuf_merges( fil_decr_pending_ibuf_merges(
/*=========================*/ /*=========================*/
...@@ -338,7 +338,7 @@ created does not exist, then we create the directory, too. ...@@ -338,7 +338,7 @@ created does not exist, then we create the directory, too.
Note that ibbackup --apply-log sets fil_path_to_mysql_datadir to point to the Note that ibbackup --apply-log sets fil_path_to_mysql_datadir to point to the
datadir that we should use in replaying the file operations. */ datadir that we should use in replaying the file operations. */
UNIV_INTERN
byte* byte*
fil_op_log_parse_or_replay( fil_op_log_parse_or_replay(
/*=======================*/ /*=======================*/
...@@ -356,7 +356,7 @@ fil_op_log_parse_or_replay( ...@@ -356,7 +356,7 @@ fil_op_log_parse_or_replay(
/*********************************************************************** /***********************************************************************
Deletes a single-table tablespace. The tablespace must be cached in the Deletes a single-table tablespace. The tablespace must be cached in the
memory cache. */ memory cache. */
UNIV_INTERN
ibool ibool
fil_delete_tablespace( fil_delete_tablespace(
/*==================*/ /*==================*/
...@@ -370,7 +370,7 @@ memory cache. Discarding is like deleting a tablespace, but ...@@ -370,7 +370,7 @@ memory cache. Discarding is like deleting a tablespace, but
TABLE they are only removed gradually in the background; TABLE they are only removed gradually in the background;
3) when the user does IMPORT TABLESPACE, the tablespace will have the same id 3) when the user does IMPORT TABLESPACE, the tablespace will have the same id
as it originally had. */ as it originally had. */
UNIV_INTERN
ibool ibool
fil_discard_tablespace( fil_discard_tablespace(
/*===================*/ /*===================*/
...@@ -379,7 +379,7 @@ fil_discard_tablespace( ...@@ -379,7 +379,7 @@ fil_discard_tablespace(
/*********************************************************************** /***********************************************************************
Renames a single-table tablespace. The tablespace must be cached in the Renames a single-table tablespace. The tablespace must be cached in the
tablespace memory cache. */ tablespace memory cache. */
UNIV_INTERN
ibool ibool
fil_rename_tablespace( fil_rename_tablespace(
/*==================*/ /*==================*/
...@@ -399,7 +399,7 @@ Database directories are under the 'datadir' of MySQL. The datadir is the ...@@ -399,7 +399,7 @@ Database directories are under the 'datadir' of MySQL. The datadir is the
directory of a running mysqld program. We can refer to it by simply the directory of a running mysqld program. We can refer to it by simply the
path '.'. Tables created with CREATE TEMPORARY TABLE we place in the temp path '.'. Tables created with CREATE TEMPORARY TABLE we place in the temp
dir of the mysqld server. */ dir of the mysqld server. */
UNIV_INTERN
ulint ulint
fil_create_new_single_table_tablespace( fil_create_new_single_table_tablespace(
/*===================================*/ /*===================================*/
...@@ -427,7 +427,7 @@ NOTE that we assume this operation is used either at the database startup ...@@ -427,7 +427,7 @@ NOTE that we assume this operation is used either at the database startup
or under the protection of the dictionary mutex, so that two users cannot or under the protection of the dictionary mutex, so that two users cannot
race here. This operation does not leave the file associated with the race here. This operation does not leave the file associated with the
tablespace open, but closes it after we have looked at the space id in it. */ tablespace open, but closes it after we have looked at the space id in it. */
UNIV_INTERN
ibool ibool
fil_open_single_table_tablespace( fil_open_single_table_tablespace(
/*=============================*/ /*=============================*/
...@@ -453,7 +453,7 @@ after it performed these cleanup operations on the .ibd file, so that it at ...@@ -453,7 +453,7 @@ after it performed these cleanup operations on the .ibd file, so that it at
the shutdown stamped the latest lsn to the FIL_PAGE_FILE_FLUSH_LSN in the the shutdown stamped the latest lsn to the FIL_PAGE_FILE_FLUSH_LSN in the
first page of the .ibd file, and we can determine whether we need to reset the first page of the .ibd file, and we can determine whether we need to reset the
lsn's just by looking at that flush lsn. */ lsn's just by looking at that flush lsn. */
UNIV_INTERN
ibool ibool
fil_reset_too_high_lsns( fil_reset_too_high_lsns(
/*====================*/ /*====================*/
...@@ -470,7 +470,7 @@ single-table tablespaces. We need to know the space id in each of them so that ...@@ -470,7 +470,7 @@ single-table tablespaces. We need to know the space id in each of them so that
we know into which file we should look to check the contents of a page stored we know into which file we should look to check the contents of a page stored
in the doublewrite buffer, also to know where to apply log records where the in the doublewrite buffer, also to know where to apply log records where the
space id is != 0. */ space id is != 0. */
UNIV_INTERN
ulint ulint
fil_load_single_table_tablespaces(void); fil_load_single_table_tablespaces(void);
/*===================================*/ /*===================================*/
...@@ -481,14 +481,14 @@ fil_load_single_table_tablespaces() and dict_load_single_table_tablespaces(), ...@@ -481,14 +481,14 @@ fil_load_single_table_tablespaces() and dict_load_single_table_tablespaces(),
we can call this function to print an error message of orphaned .ibd files we can call this function to print an error message of orphaned .ibd files
for which there is not a data dictionary entry with a matching table name for which there is not a data dictionary entry with a matching table name
and space id. */ and space id. */
UNIV_INTERN
void void
fil_print_orphaned_tablespaces(void); fil_print_orphaned_tablespaces(void);
/*================================*/ /*================================*/
/*********************************************************************** /***********************************************************************
Returns TRUE if a single-table tablespace does not exist in the memory cache, Returns TRUE if a single-table tablespace does not exist in the memory cache,
or is being deleted there. */ or is being deleted there. */
UNIV_INTERN
ibool ibool
fil_tablespace_deleted_or_being_deleted_in_mem( fil_tablespace_deleted_or_being_deleted_in_mem(
/*===========================================*/ /*===========================================*/
...@@ -500,7 +500,7 @@ fil_tablespace_deleted_or_being_deleted_in_mem( ...@@ -500,7 +500,7 @@ fil_tablespace_deleted_or_being_deleted_in_mem(
parameter is ignored */ parameter is ignored */
/*********************************************************************** /***********************************************************************
Returns TRUE if a single-table tablespace exists in the memory cache. */ Returns TRUE if a single-table tablespace exists in the memory cache. */
UNIV_INTERN
ibool ibool
fil_tablespace_exists_in_mem( fil_tablespace_exists_in_mem(
/*=========================*/ /*=========================*/
...@@ -510,7 +510,7 @@ fil_tablespace_exists_in_mem( ...@@ -510,7 +510,7 @@ fil_tablespace_exists_in_mem(
Returns TRUE if a matching tablespace exists in the InnoDB tablespace memory Returns TRUE if a matching tablespace exists in the InnoDB tablespace memory
cache. Note that if we have not done a crash recovery at the database startup, cache. Note that if we have not done a crash recovery at the database startup,
there may be many tablespaces which are not yet in the memory cache. */ there may be many tablespaces which are not yet in the memory cache. */
UNIV_INTERN
ibool ibool
fil_space_for_table_exists_in_mem( fil_space_for_table_exists_in_mem(
/*==============================*/ /*==============================*/
...@@ -537,7 +537,7 @@ fil_space_for_table_exists_in_mem( ...@@ -537,7 +537,7 @@ fil_space_for_table_exists_in_mem(
Tries to extend a data file so that it would accommodate the number of pages Tries to extend a data file so that it would accommodate the number of pages
given. The tablespace must be cached in the memory cache. If the space is big given. The tablespace must be cached in the memory cache. If the space is big
enough already, does nothing. */ enough already, does nothing. */
UNIV_INTERN
ibool ibool
fil_extend_space_to_desired_size( fil_extend_space_to_desired_size(
/*=============================*/ /*=============================*/
...@@ -555,14 +555,14 @@ Extends all tablespaces to the size stored in the space header. During the ...@@ -555,14 +555,14 @@ Extends all tablespaces to the size stored in the space header. During the
ibbackup --apply-log phase we extended the spaces on-demand so that log records ibbackup --apply-log phase we extended the spaces on-demand so that log records
could be appllied, but that may have left spaces still too small compared to could be appllied, but that may have left spaces still too small compared to
the size stored in the space header. */ the size stored in the space header. */
UNIV_INTERN
void void
fil_extend_tablespaces_to_stored_len(void); fil_extend_tablespaces_to_stored_len(void);
/*======================================*/ /*======================================*/
#endif #endif
/*********************************************************************** /***********************************************************************
Tries to reserve free extents in a file space. */ Tries to reserve free extents in a file space. */
UNIV_INTERN
ibool ibool
fil_space_reserve_free_extents( fil_space_reserve_free_extents(
/*===========================*/ /*===========================*/
...@@ -572,7 +572,7 @@ fil_space_reserve_free_extents( ...@@ -572,7 +572,7 @@ fil_space_reserve_free_extents(
ulint n_to_reserve); /* in: how many one wants to reserve */ ulint n_to_reserve); /* in: how many one wants to reserve */
/*********************************************************************** /***********************************************************************
Releases free extents in a file space. */ Releases free extents in a file space. */
UNIV_INTERN
void void
fil_space_release_free_extents( fil_space_release_free_extents(
/*===========================*/ /*===========================*/
...@@ -581,14 +581,14 @@ fil_space_release_free_extents( ...@@ -581,14 +581,14 @@ fil_space_release_free_extents(
/*********************************************************************** /***********************************************************************
Gets the number of reserved extents. If the database is silent, this number Gets the number of reserved extents. If the database is silent, this number
should be zero. */ should be zero. */
UNIV_INTERN
ulint ulint
fil_space_get_n_reserved_extents( fil_space_get_n_reserved_extents(
/*=============================*/ /*=============================*/
ulint id); /* in: space id */ ulint id); /* in: space id */
/************************************************************************ /************************************************************************
Reads or writes data. This operation is asynchronous (aio). */ Reads or writes data. This operation is asynchronous (aio). */
UNIV_INTERN
ulint ulint
fil_io( fil_io(
/*===*/ /*===*/
...@@ -625,7 +625,7 @@ Waits for an aio operation to complete. This function is used to write the ...@@ -625,7 +625,7 @@ Waits for an aio operation to complete. This function is used to write the
handler for completed requests. The aio array of pending requests is divided handler for completed requests. The aio array of pending requests is divided
into segments (see os0file.c for more info). The thread specifies which into segments (see os0file.c for more info). The thread specifies which
segment it wants to wait for. */ segment it wants to wait for. */
UNIV_INTERN
void void
fil_aio_wait( fil_aio_wait(
/*=========*/ /*=========*/
...@@ -634,7 +634,7 @@ fil_aio_wait( ...@@ -634,7 +634,7 @@ fil_aio_wait(
/************************************************************************** /**************************************************************************
Flushes to disk possible writes cached by the OS. If the space does not exist Flushes to disk possible writes cached by the OS. If the space does not exist
or is being dropped, does not do anything. */ or is being dropped, does not do anything. */
UNIV_INTERN
void void
fil_flush( fil_flush(
/*======*/ /*======*/
...@@ -643,21 +643,21 @@ fil_flush( ...@@ -643,21 +643,21 @@ fil_flush(
/************************************************************************** /**************************************************************************
Flushes to disk writes in file spaces of the given type possibly cached by Flushes to disk writes in file spaces of the given type possibly cached by
the OS. */ the OS. */
UNIV_INTERN
void void
fil_flush_file_spaces( fil_flush_file_spaces(
/*==================*/ /*==================*/
ulint purpose); /* in: FIL_TABLESPACE, FIL_LOG */ ulint purpose); /* in: FIL_TABLESPACE, FIL_LOG */
/********************************************************************** /**********************************************************************
Checks the consistency of the tablespace cache. */ Checks the consistency of the tablespace cache. */
UNIV_INTERN
ibool ibool
fil_validate(void); fil_validate(void);
/*==============*/ /*==============*/
/* out: TRUE if ok */ /* out: TRUE if ok */
/************************************************************************ /************************************************************************
Returns TRUE if file address is undefined. */ Returns TRUE if file address is undefined. */
UNIV_INTERN
ibool ibool
fil_addr_is_null( fil_addr_is_null(
/*=============*/ /*=============*/
...@@ -665,14 +665,14 @@ fil_addr_is_null( ...@@ -665,14 +665,14 @@ fil_addr_is_null(
fil_addr_t addr); /* in: address */ fil_addr_t addr); /* in: address */
/************************************************************************ /************************************************************************
Accessor functions for a file page */ Accessor functions for a file page */
UNIV_INTERN
ulint ulint
fil_page_get_prev(const byte* page); fil_page_get_prev(const byte* page);
ulint ulint
fil_page_get_next(const byte* page); fil_page_get_next(const byte* page);
/************************************************************************* /*************************************************************************
Sets the file page type. */ Sets the file page type. */
UNIV_INTERN
void void
fil_page_set_type( fil_page_set_type(
/*==============*/ /*==============*/
...@@ -680,7 +680,7 @@ fil_page_set_type( ...@@ -680,7 +680,7 @@ fil_page_set_type(
ulint type); /* in: type */ ulint type); /* in: type */
/************************************************************************* /*************************************************************************
Gets the file page type. */ Gets the file page type. */
UNIV_INTERN
ulint ulint
fil_page_get_type( fil_page_get_type(
/*==============*/ /*==============*/
......
...@@ -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(
/*======================*/ /*======================*/
......
...@@ -27,14 +27,14 @@ extern FILE* lock_latest_err_file; ...@@ -27,14 +27,14 @@ extern FILE* lock_latest_err_file;
/************************************************************************* /*************************************************************************
Gets the size of a lock struct. */ Gets the size of a lock struct. */
UNIV_INTERN
ulint ulint
lock_get_size(void); lock_get_size(void);
/*===============*/ /*===============*/
/* out: size in bytes */ /* out: size in bytes */
/************************************************************************* /*************************************************************************
Creates the lock system at database start. */ Creates the lock system at database start. */
UNIV_INTERN
void void
lock_sys_create( lock_sys_create(
/*============*/ /*============*/
...@@ -66,7 +66,7 @@ Updates the lock table when we have reorganized a page. NOTE: we copy ...@@ -66,7 +66,7 @@ Updates the lock table when we have reorganized a page. NOTE: we copy
also the locks set on the infimum of the page; the infimum may carry also the locks set on the infimum of the page; the infimum may carry
locks if an update of a record is occurring on the page, and its locks locks if an update of a record is occurring on the page, and its locks
were temporarily stored on the infimum. */ were temporarily stored on the infimum. */
UNIV_INTERN
void void
lock_move_reorganize_page( lock_move_reorganize_page(
/*======================*/ /*======================*/
...@@ -77,7 +77,7 @@ lock_move_reorganize_page( ...@@ -77,7 +77,7 @@ lock_move_reorganize_page(
/***************************************************************** /*****************************************************************
Moves the explicit locks on user records to another page if a record Moves the explicit locks on user records to another page if a record
list end is moved to another page. */ list end is moved to another page. */
UNIV_INTERN
void void
lock_move_rec_list_end( lock_move_rec_list_end(
/*===================*/ /*===================*/
...@@ -88,7 +88,7 @@ lock_move_rec_list_end( ...@@ -88,7 +88,7 @@ lock_move_rec_list_end(
/***************************************************************** /*****************************************************************
Moves the explicit locks on user records to another page if a record Moves the explicit locks on user records to another page if a record
list start is moved to another page. */ list start is moved to another page. */
UNIV_INTERN
void void
lock_move_rec_list_start( lock_move_rec_list_start(
/*=====================*/ /*=====================*/
...@@ -104,7 +104,7 @@ lock_move_rec_list_start( ...@@ -104,7 +104,7 @@ lock_move_rec_list_start(
were copied */ were copied */
/***************************************************************** /*****************************************************************
Updates the lock table when a page is split to the right. */ Updates the lock table when a page is split to the right. */
UNIV_INTERN
void void
lock_update_split_right( lock_update_split_right(
/*====================*/ /*====================*/
...@@ -112,7 +112,7 @@ lock_update_split_right( ...@@ -112,7 +112,7 @@ lock_update_split_right(
const buf_block_t* left_block); /* in: left page */ const buf_block_t* left_block); /* in: left page */
/***************************************************************** /*****************************************************************
Updates the lock table when a page is merged to the right. */ Updates the lock table when a page is merged to the right. */
UNIV_INTERN
void void
lock_update_merge_right( lock_update_merge_right(
/*====================*/ /*====================*/
...@@ -132,7 +132,7 @@ root page, even though they do not make sense on other than leaf ...@@ -132,7 +132,7 @@ root page, even though they do not make sense on other than leaf
pages: the reason is that in a pessimistic update the infimum record pages: the reason is that in a pessimistic update the infimum record
of the root page will act as a dummy carrier of the locks of the record of the root page will act as a dummy carrier of the locks of the record
to be updated. */ to be updated. */
UNIV_INTERN
void void
lock_update_root_raise( lock_update_root_raise(
/*===================*/ /*===================*/
...@@ -141,7 +141,7 @@ lock_update_root_raise( ...@@ -141,7 +141,7 @@ lock_update_root_raise(
/***************************************************************** /*****************************************************************
Updates the lock table when a page is copied to another and the original page Updates the lock table when a page is copied to another and the original page
is removed from the chain of leaf pages, except if page is the root! */ is removed from the chain of leaf pages, except if page is the root! */
UNIV_INTERN
void void
lock_update_copy_and_discard( lock_update_copy_and_discard(
/*=========================*/ /*=========================*/
...@@ -151,7 +151,7 @@ lock_update_copy_and_discard( ...@@ -151,7 +151,7 @@ lock_update_copy_and_discard(
NOT the root! */ NOT the root! */
/***************************************************************** /*****************************************************************
Updates the lock table when a page is split to the left. */ Updates the lock table when a page is split to the left. */
UNIV_INTERN
void void
lock_update_split_left( lock_update_split_left(
/*===================*/ /*===================*/
...@@ -159,7 +159,7 @@ lock_update_split_left( ...@@ -159,7 +159,7 @@ lock_update_split_left(
const buf_block_t* left_block); /* in: left page */ const buf_block_t* left_block); /* in: left page */
/***************************************************************** /*****************************************************************
Updates the lock table when a page is merged to the left. */ Updates the lock table when a page is merged to the left. */
UNIV_INTERN
void void
lock_update_merge_left( lock_update_merge_left(
/*===================*/ /*===================*/
...@@ -173,7 +173,7 @@ lock_update_merge_left( ...@@ -173,7 +173,7 @@ lock_update_merge_left(
/***************************************************************** /*****************************************************************
Resets the original locks on heir and replaces them with gap type locks Resets the original locks on heir and replaces them with gap type locks
inherited from rec. */ inherited from rec. */
UNIV_INTERN
void void
lock_rec_reset_and_inherit_gap_locks( lock_rec_reset_and_inherit_gap_locks(
/*=================================*/ /*=================================*/
...@@ -189,7 +189,7 @@ lock_rec_reset_and_inherit_gap_locks( ...@@ -189,7 +189,7 @@ lock_rec_reset_and_inherit_gap_locks(
donating record */ donating record */
/***************************************************************** /*****************************************************************
Updates the lock table when a page is discarded. */ Updates the lock table when a page is discarded. */
UNIV_INTERN
void void
lock_update_discard( lock_update_discard(
/*================*/ /*================*/
...@@ -201,7 +201,7 @@ lock_update_discard( ...@@ -201,7 +201,7 @@ lock_update_discard(
which will be discarded */ which will be discarded */
/***************************************************************** /*****************************************************************
Updates the lock table when a new user record is inserted. */ Updates the lock table when a new user record is inserted. */
UNIV_INTERN
void void
lock_update_insert( lock_update_insert(
/*===============*/ /*===============*/
...@@ -209,7 +209,7 @@ lock_update_insert( ...@@ -209,7 +209,7 @@ lock_update_insert(
const rec_t* rec); /* in: the inserted record */ const rec_t* rec); /* in: the inserted record */
/***************************************************************** /*****************************************************************
Updates the lock table when a record is removed. */ Updates the lock table when a record is removed. */
UNIV_INTERN
void void
lock_update_delete( lock_update_delete(
/*===============*/ /*===============*/
...@@ -222,7 +222,7 @@ updated and the size of the record changes in the update. The record ...@@ -222,7 +222,7 @@ updated and the size of the record changes in the update. The record
is in such an update moved, perhaps to another page. The infimum record is in such an update moved, perhaps to another page. The infimum record
acts as a dummy carrier record, taking care of lock releases while the acts as a dummy carrier record, taking care of lock releases while the
actual record is being moved. */ actual record is being moved. */
UNIV_INTERN
void void
lock_rec_store_on_page_infimum( lock_rec_store_on_page_infimum(
/*===========================*/ /*===========================*/
...@@ -235,7 +235,7 @@ lock_rec_store_on_page_infimum( ...@@ -235,7 +235,7 @@ lock_rec_store_on_page_infimum(
/************************************************************************* /*************************************************************************
Restores the state of explicit lock requests on a single record, where the Restores the state of explicit lock requests on a single record, where the
state was stored on the infimum of the page. */ state was stored on the infimum of the page. */
UNIV_INTERN
void void
lock_rec_restore_from_page_infimum( lock_rec_restore_from_page_infimum(
/*===============================*/ /*===============================*/
...@@ -249,7 +249,7 @@ lock_rec_restore_from_page_infimum( ...@@ -249,7 +249,7 @@ lock_rec_restore_from_page_infimum(
the infimum */ the infimum */
/************************************************************************* /*************************************************************************
Returns TRUE if there are explicit record locks on a page. */ Returns TRUE if there are explicit record locks on a page. */
UNIV_INTERN
ibool ibool
lock_rec_expl_exist_on_page( lock_rec_expl_exist_on_page(
/*========================*/ /*========================*/
...@@ -263,7 +263,7 @@ a record. If they do, first tests if the query thread should anyway ...@@ -263,7 +263,7 @@ a record. If they do, first tests if the query thread should anyway
be suspended for some reason; if not, then puts the transaction and be suspended for some reason; if not, then puts the transaction and
the query thread to the lock wait state and inserts a waiting request the query thread to the lock wait state and inserts a waiting request
for a gap x-lock to the lock queue. */ for a gap x-lock to the lock queue. */
UNIV_INTERN
ulint ulint
lock_rec_insert_check_and_lock( lock_rec_insert_check_and_lock(
/*===========================*/ /*===========================*/
...@@ -286,7 +286,7 @@ first tests if the query thread should anyway be suspended for some ...@@ -286,7 +286,7 @@ first tests if the query thread should anyway be suspended for some
reason; if not, then puts the transaction and the query thread to the reason; if not, then puts the transaction and the query thread to the
lock wait state and inserts a waiting request for a record x-lock to the lock wait state and inserts a waiting request for a record x-lock to the
lock queue. */ lock queue. */
UNIV_INTERN
ulint ulint
lock_clust_rec_modify_check_and_lock( lock_clust_rec_modify_check_and_lock(
/*=================================*/ /*=================================*/
...@@ -304,7 +304,7 @@ lock_clust_rec_modify_check_and_lock( ...@@ -304,7 +304,7 @@ lock_clust_rec_modify_check_and_lock(
/************************************************************************* /*************************************************************************
Checks if locks of other transactions prevent an immediate modify Checks if locks of other transactions prevent an immediate modify
(delete mark or delete unmark) of a secondary index record. */ (delete mark or delete unmark) of a secondary index record. */
UNIV_INTERN
ulint ulint
lock_sec_rec_modify_check_and_lock( lock_sec_rec_modify_check_and_lock(
/*===============================*/ /*===============================*/
...@@ -323,7 +323,7 @@ lock_sec_rec_modify_check_and_lock( ...@@ -323,7 +323,7 @@ lock_sec_rec_modify_check_and_lock(
/************************************************************************* /*************************************************************************
Like the counterpart for a clustered index below, but now we read a Like the counterpart for a clustered index below, but now we read a
secondary index record. */ secondary index record. */
UNIV_INTERN
ulint ulint
lock_sec_rec_read_check_and_lock( lock_sec_rec_read_check_and_lock(
/*=============================*/ /*=============================*/
...@@ -354,7 +354,7 @@ if the query thread should anyway be suspended for some reason; if not, then ...@@ -354,7 +354,7 @@ if the query thread should anyway be suspended for some reason; if not, then
puts the transaction and the query thread to the lock wait state and inserts a puts the transaction and the query thread to the lock wait state and inserts a
waiting request for a record lock to the lock queue. Sets the requested mode waiting request for a record lock to the lock queue. Sets the requested mode
lock on the record. */ lock on the record. */
UNIV_INTERN
ulint ulint
lock_clust_rec_read_check_and_lock( lock_clust_rec_read_check_and_lock(
/*===============================*/ /*===============================*/
...@@ -387,7 +387,7 @@ waiting request for a record lock to the lock queue. Sets the requested mode ...@@ -387,7 +387,7 @@ waiting request for a record lock to the lock queue. Sets the requested mode
lock on the record. This is an alternative version of lock on the record. This is an alternative version of
lock_clust_rec_read_check_and_lock() that does not require the parameter lock_clust_rec_read_check_and_lock() that does not require the parameter
"offsets". */ "offsets". */
UNIV_INTERN
ulint ulint
lock_clust_rec_read_check_and_lock_alt( lock_clust_rec_read_check_and_lock_alt(
/*===================================*/ /*===================================*/
...@@ -412,7 +412,7 @@ lock_clust_rec_read_check_and_lock_alt( ...@@ -412,7 +412,7 @@ lock_clust_rec_read_check_and_lock_alt(
que_thr_t* thr); /* in: query thread */ que_thr_t* thr); /* in: query thread */
/************************************************************************* /*************************************************************************
Checks that a record is seen in a consistent read. */ Checks that a record is seen in a consistent read. */
UNIV_INTERN
ibool ibool
lock_clust_rec_cons_read_sees( lock_clust_rec_cons_read_sees(
/*==========================*/ /*==========================*/
...@@ -425,7 +425,7 @@ lock_clust_rec_cons_read_sees( ...@@ -425,7 +425,7 @@ lock_clust_rec_cons_read_sees(
read_view_t* view); /* in: consistent read view */ read_view_t* view); /* in: consistent read view */
/************************************************************************* /*************************************************************************
Checks that a non-clustered index record is seen in a consistent read. */ Checks that a non-clustered index record is seen in a consistent read. */
UNIV_INTERN
ulint ulint
lock_sec_rec_cons_read_sees( lock_sec_rec_cons_read_sees(
/*========================*/ /*========================*/
...@@ -449,7 +449,7 @@ lock_sec_rec_cons_read_sees( ...@@ -449,7 +449,7 @@ lock_sec_rec_cons_read_sees(
/************************************************************************* /*************************************************************************
Locks the specified database table in the mode given. If the lock cannot Locks the specified database table in the mode given. If the lock cannot
be granted immediately, the query thread is put to wait. */ be granted immediately, the query thread is put to wait. */
UNIV_INTERN
ulint ulint
lock_table( lock_table(
/*=======*/ /*=======*/
...@@ -462,7 +462,7 @@ lock_table( ...@@ -462,7 +462,7 @@ lock_table(
que_thr_t* thr); /* in: query thread */ que_thr_t* thr); /* in: query thread */
/************************************************************************* /*************************************************************************
Checks if there are any locks set on the table. */ Checks if there are any locks set on the table. */
UNIV_INTERN
ibool ibool
lock_is_on_table( lock_is_on_table(
/*=============*/ /*=============*/
...@@ -472,7 +472,7 @@ lock_is_on_table( ...@@ -472,7 +472,7 @@ lock_is_on_table(
Removes a granted record lock of a transaction from the queue and grants Removes a granted record lock of a transaction from the queue and grants
locks to other transactions waiting in the queue if they now are entitled locks to other transactions waiting in the queue if they now are entitled
to a lock. */ to a lock. */
UNIV_INTERN
void void
lock_rec_unlock( lock_rec_unlock(
/*============*/ /*============*/
...@@ -484,7 +484,7 @@ lock_rec_unlock( ...@@ -484,7 +484,7 @@ lock_rec_unlock(
/************************************************************************* /*************************************************************************
Releases a table lock. Releases a table lock.
Releases possible other transactions waiting for this lock. */ Releases possible other transactions waiting for this lock. */
UNIV_INTERN
void void
lock_table_unlock( lock_table_unlock(
/*==============*/ /*==============*/
...@@ -492,7 +492,7 @@ lock_table_unlock( ...@@ -492,7 +492,7 @@ lock_table_unlock(
/************************************************************************* /*************************************************************************
Releases an auto-inc lock a transaction possibly has on a table. Releases an auto-inc lock a transaction possibly has on a table.
Releases possible other transactions waiting for this lock. */ Releases possible other transactions waiting for this lock. */
UNIV_INTERN
void void
lock_table_unlock_auto_inc( lock_table_unlock_auto_inc(
/*=======================*/ /*=======================*/
...@@ -500,7 +500,7 @@ lock_table_unlock_auto_inc( ...@@ -500,7 +500,7 @@ lock_table_unlock_auto_inc(
/************************************************************************* /*************************************************************************
Releases transaction locks, and releases possible other transactions waiting Releases transaction locks, and releases possible other transactions waiting
because of these locks. */ because of these locks. */
UNIV_INTERN
void void
lock_release_off_kernel( lock_release_off_kernel(
/*====================*/ /*====================*/
...@@ -508,7 +508,7 @@ lock_release_off_kernel( ...@@ -508,7 +508,7 @@ lock_release_off_kernel(
/************************************************************************* /*************************************************************************
Cancels a waiting lock request and releases possible other transactions Cancels a waiting lock request and releases possible other transactions
waiting behind it. */ waiting behind it. */
UNIV_INTERN
void void
lock_cancel_waiting_and_release( lock_cancel_waiting_and_release(
/*============================*/ /*============================*/
...@@ -516,7 +516,7 @@ lock_cancel_waiting_and_release( ...@@ -516,7 +516,7 @@ lock_cancel_waiting_and_release(
/************************************************************************* /*************************************************************************
Resets all locks, both table and record locks, on a table to be dropped. Resets all locks, both table and record locks, on a table to be dropped.
No lock is allowed to be a wait lock. */ No lock is allowed to be a wait lock. */
UNIV_INTERN
void void
lock_reset_all_on_table( lock_reset_all_on_table(
/*====================*/ /*====================*/
...@@ -546,7 +546,7 @@ lock_rec_hash( ...@@ -546,7 +546,7 @@ lock_rec_hash(
/************************************************************************** /**************************************************************************
Looks for a set bit in a record lock bitmap. Returns ULINT_UNDEFINED, Looks for a set bit in a record lock bitmap. Returns ULINT_UNDEFINED,
if none found. */ if none found. */
UNIV_INTERN
ulint ulint
lock_rec_find_set_bit( lock_rec_find_set_bit(
/*==================*/ /*==================*/
...@@ -557,7 +557,7 @@ lock_rec_find_set_bit( ...@@ -557,7 +557,7 @@ lock_rec_find_set_bit(
/************************************************************************* /*************************************************************************
Gets the source table of an ALTER TABLE transaction. The table must be Gets the source table of an ALTER TABLE transaction. The table must be
covered by an IX or IS table lock. */ covered by an IX or IS table lock. */
UNIV_INTERN
dict_table_t* dict_table_t*
lock_get_src_table( lock_get_src_table(
/*===============*/ /*===============*/
...@@ -573,7 +573,7 @@ lock_get_src_table( ...@@ -573,7 +573,7 @@ lock_get_src_table(
Determine if the given table is exclusively "owned" by the given Determine if the given table is exclusively "owned" by the given
transaction, i.e., transaction holds LOCK_IX and possibly LOCK_AUTO_INC transaction, i.e., transaction holds LOCK_IX and possibly LOCK_AUTO_INC
on the table. */ on the table. */
UNIV_INTERN
ibool ibool
lock_is_table_exclusive( lock_is_table_exclusive(
/*====================*/ /*====================*/
...@@ -583,7 +583,7 @@ lock_is_table_exclusive( ...@@ -583,7 +583,7 @@ lock_is_table_exclusive(
trx_t* trx); /* in: transaction */ trx_t* trx); /* in: transaction */
/************************************************************************* /*************************************************************************
Checks if a lock request lock1 has to wait for request lock2. */ Checks if a lock request lock1 has to wait for request lock2. */
UNIV_INTERN
ibool ibool
lock_has_to_wait( lock_has_to_wait(
/*=============*/ /*=============*/
...@@ -596,7 +596,7 @@ lock_has_to_wait( ...@@ -596,7 +596,7 @@ lock_has_to_wait(
locks are record locks */ locks are record locks */
/************************************************************************* /*************************************************************************
Checks that a transaction id is sensible, i.e., not in the future. */ Checks that a transaction id is sensible, i.e., not in the future. */
UNIV_INTERN
ibool ibool
lock_check_trx_id_sanity( lock_check_trx_id_sanity(
/*=====================*/ /*=====================*/
...@@ -609,7 +609,7 @@ lock_check_trx_id_sanity( ...@@ -609,7 +609,7 @@ lock_check_trx_id_sanity(
kernel mutex */ kernel mutex */
/************************************************************************* /*************************************************************************
Prints info of a table lock. */ Prints info of a table lock. */
UNIV_INTERN
void void
lock_table_print( lock_table_print(
/*=============*/ /*=============*/
...@@ -617,7 +617,7 @@ lock_table_print( ...@@ -617,7 +617,7 @@ lock_table_print(
const lock_t* lock); /* in: table type lock */ const lock_t* lock); /* in: table type lock */
/************************************************************************* /*************************************************************************
Prints info of a record lock. */ Prints info of a record lock. */
UNIV_INTERN
void void
lock_rec_print( lock_rec_print(
/*===========*/ /*===========*/
...@@ -625,14 +625,14 @@ lock_rec_print( ...@@ -625,14 +625,14 @@ lock_rec_print(
const lock_t* lock); /* in: record type lock */ const lock_t* lock); /* in: record type lock */
/************************************************************************* /*************************************************************************
Prints info of locks for all transactions. */ Prints info of locks for all transactions. */
UNIV_INTERN
void void
lock_print_info_summary( lock_print_info_summary(
/*====================*/ /*====================*/
FILE* file); /* in: file where to print */ FILE* file); /* in: file where to print */
/************************************************************************* /*************************************************************************
Prints info of locks for each transaction. */ Prints info of locks for each transaction. */
UNIV_INTERN
void void
lock_print_info_all_transactions( lock_print_info_all_transactions(
/*=============================*/ /*=============================*/
...@@ -641,7 +641,7 @@ lock_print_info_all_transactions( ...@@ -641,7 +641,7 @@ lock_print_info_all_transactions(
Return approximate number or record locks (bits set in the bitmap) for Return approximate number or record locks (bits set in the bitmap) for
this transaction. Since delete-marked records may be removed, the this transaction. Since delete-marked records may be removed, the
record count will not be precise. */ record count will not be precise. */
UNIV_INTERN
ulint ulint
lock_number_of_rows_locked( lock_number_of_rows_locked(
/*=======================*/ /*=======================*/
...@@ -650,7 +650,7 @@ lock_number_of_rows_locked( ...@@ -650,7 +650,7 @@ lock_number_of_rows_locked(
/*********************************************************************** /***********************************************************************
Gets the type of a lock. Non-inline version for using outside of the Gets the type of a lock. Non-inline version for using outside of the
lock module. */ lock module. */
UNIV_INTERN
ulint ulint
lock_get_type( lock_get_type(
/*==========*/ /*==========*/
...@@ -659,7 +659,7 @@ lock_get_type( ...@@ -659,7 +659,7 @@ lock_get_type(
/*********************************************************************** /***********************************************************************
Gets the id of the transaction owning a lock. */ Gets the id of the transaction owning a lock. */
UNIV_INTERN
ullint ullint
lock_get_trx_id( lock_get_trx_id(
/*============*/ /*============*/
...@@ -688,7 +688,7 @@ lock_get_type_str( ...@@ -688,7 +688,7 @@ lock_get_type_str(
/*********************************************************************** /***********************************************************************
Gets the id of the table on which the lock is. */ Gets the id of the table on which the lock is. */
UNIV_INTERN
ullint ullint
lock_get_table_id( lock_get_table_id(
/*==============*/ /*==============*/
...@@ -726,7 +726,7 @@ lock_rec_get_index_name( ...@@ -726,7 +726,7 @@ lock_rec_get_index_name(
/*********************************************************************** /***********************************************************************
For a record lock, gets the tablespace number on which the lock is. */ For a record lock, gets the tablespace number on which the lock is. */
UNIV_INTERN
ulint ulint
lock_rec_get_space_id( lock_rec_get_space_id(
/*==================*/ /*==================*/
...@@ -735,7 +735,7 @@ lock_rec_get_space_id( ...@@ -735,7 +735,7 @@ lock_rec_get_space_id(
/*********************************************************************** /***********************************************************************
For a record lock, gets the page number on which the lock is. */ For a record lock, gets the page number on which the lock is. */
UNIV_INTERN
ulint ulint
lock_rec_get_page_no( lock_rec_get_page_no(
/*=================*/ /*=================*/
......
...@@ -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(
/*======*/ /*======*/
......
...@@ -174,14 +174,14 @@ typedef DIR* os_file_dir_t; /* directory stream */ ...@@ -174,14 +174,14 @@ typedef DIR* os_file_dir_t; /* directory stream */
/*************************************************************************** /***************************************************************************
Gets the operating system version. Currently works only on Windows. */ Gets the operating system version. Currently works only on Windows. */
UNIV_INTERN
ulint ulint
os_get_os_version(void); os_get_os_version(void);
/*===================*/ /*===================*/
/* out: OS_WIN95, OS_WIN31, OS_WINNT, or OS_WIN2000 */ /* out: OS_WIN95, OS_WIN31, OS_WINNT, or OS_WIN2000 */
/******************************************************************** /********************************************************************
Creates the seek mutexes used in positioned reads and writes. */ Creates the seek mutexes used in positioned reads and writes. */
UNIV_INTERN
void void
os_io_init_simple(void); os_io_init_simple(void);
/*===================*/ /*===================*/
...@@ -200,7 +200,7 @@ The os_file_opendir() function opens a directory stream corresponding to the ...@@ -200,7 +200,7 @@ The os_file_opendir() function opens a directory stream corresponding to the
directory named by the dirname argument. The directory stream is positioned directory named by the dirname argument. The directory stream is positioned
at the first entry. In both Unix and Windows we automatically skip the '.' at the first entry. In both Unix and Windows we automatically skip the '.'
and '..' items at the start of the directory listing. */ and '..' items at the start of the directory listing. */
UNIV_INTERN
os_file_dir_t os_file_dir_t
os_file_opendir( os_file_opendir(
/*============*/ /*============*/
...@@ -215,7 +215,7 @@ os_file_opendir( ...@@ -215,7 +215,7 @@ os_file_opendir(
a directory */ a directory */
/*************************************************************************** /***************************************************************************
Closes a directory stream. */ Closes a directory stream. */
UNIV_INTERN
int int
os_file_closedir( os_file_closedir(
/*=============*/ /*=============*/
...@@ -224,7 +224,7 @@ os_file_closedir( ...@@ -224,7 +224,7 @@ os_file_closedir(
/*************************************************************************** /***************************************************************************
This function returns information of the next file in the directory. We jump This function returns information of the next file in the directory. We jump
over the '.' and '..' entries in the directory. */ over the '.' and '..' entries in the directory. */
UNIV_INTERN
int int
os_file_readdir_next_file( os_file_readdir_next_file(
/*======================*/ /*======================*/
...@@ -238,7 +238,7 @@ This function attempts to create a directory named pathname. The new directory ...@@ -238,7 +238,7 @@ This function attempts to create a directory named pathname. The new directory
gets default permissions. On Unix, the permissions are (0770 & ~umask). If the gets default permissions. On Unix, the permissions are (0770 & ~umask). If the
directory exists already, nothing is done and the call succeeds, unless the directory exists already, nothing is done and the call succeeds, unless the
fail_if_exists arguments is true. */ fail_if_exists arguments is true. */
UNIV_INTERN
ibool ibool
os_file_create_directory( os_file_create_directory(
/*=====================*/ /*=====================*/
...@@ -250,7 +250,7 @@ os_file_create_directory( ...@@ -250,7 +250,7 @@ os_file_create_directory(
is treated as an error. */ is treated as an error. */
/******************************************************************** /********************************************************************
A simple function to open or create a file. */ A simple function to open or create a file. */
UNIV_INTERN
os_file_t os_file_t
os_file_create_simple( os_file_create_simple(
/*==================*/ /*==================*/
...@@ -271,7 +271,7 @@ os_file_create_simple( ...@@ -271,7 +271,7 @@ os_file_create_simple(
ibool* success);/* out: TRUE if succeed, FALSE if error */ ibool* success);/* out: TRUE if succeed, FALSE if error */
/******************************************************************** /********************************************************************
A simple function to open or create a file. */ A simple function to open or create a file. */
UNIV_INTERN
os_file_t os_file_t
os_file_create_simple_no_error_handling( os_file_create_simple_no_error_handling(
/*====================================*/ /*====================================*/
...@@ -291,7 +291,7 @@ os_file_create_simple_no_error_handling( ...@@ -291,7 +291,7 @@ os_file_create_simple_no_error_handling(
ibool* success);/* out: TRUE if succeed, FALSE if error */ ibool* success);/* out: TRUE if succeed, FALSE if error */
/******************************************************************** /********************************************************************
Opens an existing file or creates a new. */ Opens an existing file or creates a new. */
UNIV_INTERN
os_file_t os_file_t
os_file_create( os_file_create(
/*===========*/ /*===========*/
...@@ -319,7 +319,7 @@ os_file_create( ...@@ -319,7 +319,7 @@ os_file_create(
ibool* success);/* out: TRUE if succeed, FALSE if error */ ibool* success);/* out: TRUE if succeed, FALSE if error */
/*************************************************************************** /***************************************************************************
Deletes a file. The file has to be closed before calling this. */ Deletes a file. The file has to be closed before calling this. */
UNIV_INTERN
ibool ibool
os_file_delete( os_file_delete(
/*===========*/ /*===========*/
...@@ -328,7 +328,7 @@ os_file_delete( ...@@ -328,7 +328,7 @@ os_file_delete(
/*************************************************************************** /***************************************************************************
Deletes a file if it exists. The file has to be closed before calling this. */ Deletes a file if it exists. The file has to be closed before calling this. */
UNIV_INTERN
ibool ibool
os_file_delete_if_exists( os_file_delete_if_exists(
/*=====================*/ /*=====================*/
...@@ -337,7 +337,7 @@ os_file_delete_if_exists( ...@@ -337,7 +337,7 @@ os_file_delete_if_exists(
/*************************************************************************** /***************************************************************************
Renames a file (can also move it to another directory). It is safest that the Renames a file (can also move it to another directory). It is safest that the
file is closed before calling this function. */ file is closed before calling this function. */
UNIV_INTERN
ibool ibool
os_file_rename( os_file_rename(
/*===========*/ /*===========*/
...@@ -348,7 +348,7 @@ os_file_rename( ...@@ -348,7 +348,7 @@ os_file_rename(
/*************************************************************************** /***************************************************************************
Closes a file handle. In case of error, error number can be retrieved with Closes a file handle. In case of error, error number can be retrieved with
os_file_get_last_error. */ os_file_get_last_error. */
UNIV_INTERN
ibool ibool
os_file_close( os_file_close(
/*==========*/ /*==========*/
...@@ -356,7 +356,7 @@ os_file_close( ...@@ -356,7 +356,7 @@ os_file_close(
os_file_t file); /* in, own: handle to a file */ os_file_t file); /* in, own: handle to a file */
/*************************************************************************** /***************************************************************************
Closes a file handle. */ Closes a file handle. */
UNIV_INTERN
ibool ibool
os_file_close_no_error_handling( os_file_close_no_error_handling(
/*============================*/ /*============================*/
...@@ -364,7 +364,7 @@ os_file_close_no_error_handling( ...@@ -364,7 +364,7 @@ os_file_close_no_error_handling(
os_file_t file); /* in, own: handle to a file */ os_file_t file); /* in, own: handle to a file */
/*************************************************************************** /***************************************************************************
Gets a file size. */ Gets a file size. */
UNIV_INTERN
ibool ibool
os_file_get_size( os_file_get_size(
/*=============*/ /*=============*/
...@@ -375,7 +375,7 @@ os_file_get_size( ...@@ -375,7 +375,7 @@ os_file_get_size(
ulint* size_high);/* out: most significant 32 bits of size */ ulint* size_high);/* out: most significant 32 bits of size */
/*************************************************************************** /***************************************************************************
Gets file size as a 64-bit integer ib_longlong. */ Gets file size as a 64-bit integer ib_longlong. */
UNIV_INTERN
ib_longlong ib_longlong
os_file_get_size_as_iblonglong( os_file_get_size_as_iblonglong(
/*===========================*/ /*===========================*/
...@@ -383,7 +383,7 @@ os_file_get_size_as_iblonglong( ...@@ -383,7 +383,7 @@ os_file_get_size_as_iblonglong(
os_file_t file); /* in: handle to a file */ os_file_t file); /* in: handle to a file */
/*************************************************************************** /***************************************************************************
Write the specified number of zeros to a newly created file. */ Write the specified number of zeros to a newly created file. */
UNIV_INTERN
ibool ibool
os_file_set_size( os_file_set_size(
/*=============*/ /*=============*/
...@@ -396,7 +396,7 @@ os_file_set_size( ...@@ -396,7 +396,7 @@ os_file_set_size(
ulint size_high);/* in: most significant 32 bits of size */ ulint size_high);/* in: most significant 32 bits of size */
/*************************************************************************** /***************************************************************************
Truncates a file at its current position. */ Truncates a file at its current position. */
UNIV_INTERN
ibool ibool
os_file_set_eof( os_file_set_eof(
/*============*/ /*============*/
...@@ -404,7 +404,7 @@ os_file_set_eof( ...@@ -404,7 +404,7 @@ os_file_set_eof(
FILE* file); /* in: file to be truncated */ FILE* file); /* in: file to be truncated */
/*************************************************************************** /***************************************************************************
Flushes the write buffers of a given file to the disk. */ Flushes the write buffers of a given file to the disk. */
UNIV_INTERN
ibool ibool
os_file_flush( os_file_flush(
/*==========*/ /*==========*/
...@@ -415,7 +415,7 @@ Retrieves the last error number if an error occurs in a file io function. ...@@ -415,7 +415,7 @@ Retrieves the last error number if an error occurs in a file io function.
The number should be retrieved before any other OS calls (because they may The number should be retrieved before any other OS calls (because they may
overwrite the error number). If the number is not known to this program, overwrite the error number). If the number is not known to this program,
the OS error number + 100 is returned. */ the OS error number + 100 is returned. */
UNIV_INTERN
ulint ulint
os_file_get_last_error( os_file_get_last_error(
/*===================*/ /*===================*/
...@@ -425,7 +425,7 @@ os_file_get_last_error( ...@@ -425,7 +425,7 @@ os_file_get_last_error(
printed of all errors */ printed of all errors */
/*********************************************************************** /***********************************************************************
Requests a synchronous read operation. */ Requests a synchronous read operation. */
UNIV_INTERN
ibool ibool
os_file_read( os_file_read(
/*=========*/ /*=========*/
...@@ -442,7 +442,7 @@ os_file_read( ...@@ -442,7 +442,7 @@ os_file_read(
Rewind file to its start, read at most size - 1 bytes from it to str, and Rewind file to its start, read at most size - 1 bytes from it to str, and
NUL-terminate str. All errors are silently ignored. This function is NUL-terminate str. All errors are silently ignored. This function is
mostly meant to be used with temporary files. */ mostly meant to be used with temporary files. */
UNIV_INTERN
void void
os_file_read_string( os_file_read_string(
/*================*/ /*================*/
...@@ -452,7 +452,7 @@ os_file_read_string( ...@@ -452,7 +452,7 @@ os_file_read_string(
/*********************************************************************** /***********************************************************************
Requests a synchronous positioned read operation. This function does not do Requests a synchronous positioned read operation. This function does not do
any error handling. In case of error it returns FALSE. */ any error handling. In case of error it returns FALSE. */
UNIV_INTERN
ibool ibool
os_file_read_no_error_handling( os_file_read_no_error_handling(
/*===========================*/ /*===========================*/
...@@ -468,7 +468,7 @@ os_file_read_no_error_handling( ...@@ -468,7 +468,7 @@ os_file_read_no_error_handling(
/*********************************************************************** /***********************************************************************
Requests a synchronous write operation. */ Requests a synchronous write operation. */
UNIV_INTERN
ibool ibool
os_file_write( os_file_write(
/*==========*/ /*==========*/
...@@ -485,7 +485,7 @@ os_file_write( ...@@ -485,7 +485,7 @@ os_file_write(
ulint n); /* in: number of bytes to write */ ulint n); /* in: number of bytes to write */
/*********************************************************************** /***********************************************************************
Check the existence and type of the given file. */ Check the existence and type of the given file. */
UNIV_INTERN
ibool ibool
os_file_status( os_file_status(
/*===========*/ /*===========*/
...@@ -520,7 +520,7 @@ returned by dirname and basename for different paths: ...@@ -520,7 +520,7 @@ returned by dirname and basename for different paths:
"." "." "." "." "." "."
".." "." ".." ".." "." ".."
*/ */
UNIV_INTERN
char* char*
os_file_dirname( os_file_dirname(
/*============*/ /*============*/
...@@ -529,7 +529,7 @@ os_file_dirname( ...@@ -529,7 +529,7 @@ os_file_dirname(
const char* path); /* in: pathname */ const char* path); /* in: pathname */
/******************************************************************** /********************************************************************
Creates all missing subdirectories along the given path. */ Creates all missing subdirectories along the given path. */
UNIV_INTERN
ibool ibool
os_file_create_subdirs_if_needed( os_file_create_subdirs_if_needed(
/*=============================*/ /*=============================*/
...@@ -544,7 +544,7 @@ synchronous aio array of the specified size. The combined number of segments ...@@ -544,7 +544,7 @@ synchronous aio array of the specified size. The combined number of segments
in the three first aio arrays is the parameter n_segments given to the in the three first aio arrays is the parameter n_segments given to the
function. The caller must create an i/o handler thread for each segment in function. The caller must create an i/o handler thread for each segment in
the four first arrays, but not for the sync aio array. */ the four first arrays, but not for the sync aio array. */
UNIV_INTERN
void void
os_aio_init( os_aio_init(
/*========*/ /*========*/
...@@ -555,7 +555,7 @@ os_aio_init( ...@@ -555,7 +555,7 @@ os_aio_init(
ulint n_slots_sync); /* in: number of slots in the sync aio array */ ulint n_slots_sync); /* in: number of slots in the sync aio array */
/*********************************************************************** /***********************************************************************
Requests an asynchronous i/o operation. */ Requests an asynchronous i/o operation. */
UNIV_INTERN
ibool ibool
os_aio( os_aio(
/*===*/ /*===*/
...@@ -593,20 +593,20 @@ os_aio( ...@@ -593,20 +593,20 @@ os_aio(
/**************************************************************************** /****************************************************************************
Wakes up all async i/o threads so that they know to exit themselves in Wakes up all async i/o threads so that they know to exit themselves in
shutdown. */ shutdown. */
UNIV_INTERN
void void
os_aio_wake_all_threads_at_shutdown(void); os_aio_wake_all_threads_at_shutdown(void);
/*=====================================*/ /*=====================================*/
/**************************************************************************** /****************************************************************************
Waits until there are no pending writes in os_aio_write_array. There can Waits until there are no pending writes in os_aio_write_array. There can
be other, synchronous, pending writes. */ be other, synchronous, pending writes. */
UNIV_INTERN
void void
os_aio_wait_until_no_pending_writes(void); os_aio_wait_until_no_pending_writes(void);
/*=====================================*/ /*=====================================*/
/************************************************************************** /**************************************************************************
Wakes up simulated aio i/o-handler threads if they have something to do. */ Wakes up simulated aio i/o-handler threads if they have something to do. */
UNIV_INTERN
void void
os_aio_simulated_wake_handler_threads(void); os_aio_simulated_wake_handler_threads(void);
/*=======================================*/ /*=======================================*/
...@@ -615,7 +615,7 @@ This function can be called if one wants to post a batch of reads and ...@@ -615,7 +615,7 @@ This function can be called if one wants to post a batch of reads and
prefers an i/o-handler thread to handle them all at once later. You must prefers an i/o-handler thread to handle them all at once later. You must
call os_aio_simulated_wake_handler_threads later to ensure the threads call os_aio_simulated_wake_handler_threads later to ensure the threads
are not left sleeping! */ are not left sleeping! */
UNIV_INTERN
void void
os_aio_simulated_put_read_threads_to_sleep(void); os_aio_simulated_put_read_threads_to_sleep(void);
/*============================================*/ /*============================================*/
...@@ -628,7 +628,7 @@ for completed requests. The aio array of pending requests is divided ...@@ -628,7 +628,7 @@ for completed requests. The aio array of pending requests is divided
into segments. The thread specifies which segment or slot it wants to wait into segments. The thread specifies which segment or slot it wants to wait
for. NOTE: this function will also take care of freeing the aio slot, for. NOTE: this function will also take care of freeing the aio slot,
therefore no other thread is allowed to do the freeing! */ therefore no other thread is allowed to do the freeing! */
UNIV_INTERN
ibool ibool
os_aio_windows_handle( os_aio_windows_handle(
/*==================*/ /*==================*/
...@@ -657,7 +657,7 @@ os_aio_windows_handle( ...@@ -657,7 +657,7 @@ os_aio_windows_handle(
/************************************************************************** /**************************************************************************
This function is only used in Posix asynchronous i/o. Waits for an aio This function is only used in Posix asynchronous i/o. Waits for an aio
operation to complete. */ operation to complete. */
UNIV_INTERN
ibool ibool
os_aio_posix_handle( os_aio_posix_handle(
/*================*/ /*================*/
...@@ -673,7 +673,7 @@ os_aio_posix_handle( ...@@ -673,7 +673,7 @@ os_aio_posix_handle(
/************************************************************************** /**************************************************************************
Does simulated aio. This function should be called by an i/o-handler Does simulated aio. This function should be called by an i/o-handler
thread. */ thread. */
UNIV_INTERN
ibool ibool
os_aio_simulated_handle( os_aio_simulated_handle(
/*====================*/ /*====================*/
...@@ -692,21 +692,21 @@ os_aio_simulated_handle( ...@@ -692,21 +692,21 @@ os_aio_simulated_handle(
ulint* type); /* out: OS_FILE_WRITE or ..._READ */ ulint* type); /* out: OS_FILE_WRITE or ..._READ */
/************************************************************************** /**************************************************************************
Validates the consistency of the aio system. */ Validates the consistency of the aio system. */
UNIV_INTERN
ibool ibool
os_aio_validate(void); os_aio_validate(void);
/*=================*/ /*=================*/
/* out: TRUE if ok */ /* out: TRUE if ok */
/************************************************************************** /**************************************************************************
Prints info of the aio arrays. */ Prints info of the aio arrays. */
UNIV_INTERN
void void
os_aio_print( os_aio_print(
/*=========*/ /*=========*/
FILE* file); /* in: file where to print */ FILE* file); /* in: file where to print */
/************************************************************************** /**************************************************************************
Refreshes the statistics used to print per-second averages. */ Refreshes the statistics used to print per-second averages. */
UNIV_INTERN
void void
os_aio_refresh_stats(void); os_aio_refresh_stats(void);
/*======================*/ /*======================*/
...@@ -715,7 +715,7 @@ os_aio_refresh_stats(void); ...@@ -715,7 +715,7 @@ os_aio_refresh_stats(void);
/************************************************************************** /**************************************************************************
Checks that all slots in the system have been freed, that is, there are Checks that all slots in the system have been freed, that is, there are
no pending io operations. */ no pending io operations. */
UNIV_INTERN
ibool ibool
os_aio_all_slots_free(void); os_aio_all_slots_free(void);
/*=======================*/ /*=======================*/
...@@ -723,6 +723,7 @@ os_aio_all_slots_free(void); ...@@ -723,6 +723,7 @@ os_aio_all_slots_free(void);
/*********************************************************************** /***********************************************************************
This function returns information about the specified file */ This function returns information about the specified file */
UNIV_INTERN
ibool ibool
os_file_get_status( os_file_get_status(
/*===============*/ /*===============*/
...@@ -736,7 +737,7 @@ os_file_get_status( ...@@ -736,7 +737,7 @@ os_file_get_status(
/************************************************************************* /*************************************************************************
Creates a temporary file that will be deleted on close. Creates a temporary file that will be deleted on close.
This function is defined in ha_innodb.cc. */ This function is defined in ha_innodb.cc. */
UNIV_INTERN
int int
innobase_mysql_tmpfile(void); innobase_mysql_tmpfile(void);
/*========================*/ /*========================*/
......
...@@ -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(
/*==========*/ /*==========*/
......
...@@ -58,7 +58,7 @@ extern ulint page_zip_decompress_count[8]; ...@@ -58,7 +58,7 @@ extern ulint page_zip_decompress_count[8];
/************************************************************************** /**************************************************************************
Write data to the compressed page. The data must already be written to Write data to the compressed page. The data must already be written to
the uncompressed page. */ the uncompressed page. */
UNIV_INTERN
void void
page_zip_write( page_zip_write(
/*===========*/ /*===========*/
...@@ -73,7 +73,7 @@ page_zip_write( ...@@ -73,7 +73,7 @@ page_zip_write(
/************************************************************************** /**************************************************************************
Write the "deleted" flag of a record on a compressed page. The flag must Write the "deleted" flag of a record on a compressed page. The flag must
already have been written on the uncompressed page. */ already have been written on the uncompressed page. */
UNIV_INTERN
void void
page_zip_rec_set_deleted( page_zip_rec_set_deleted(
/*=====================*/ /*=====================*/
...@@ -85,7 +85,7 @@ page_zip_rec_set_deleted( ...@@ -85,7 +85,7 @@ page_zip_rec_set_deleted(
/************************************************************************** /**************************************************************************
Write the "owned" flag of a record on a compressed page. The n_owned field Write the "owned" flag of a record on a compressed page. The n_owned field
must already have been written on the uncompressed page. */ must already have been written on the uncompressed page. */
UNIV_INTERN
void void
page_zip_rec_set_owned( page_zip_rec_set_owned(
/*===================*/ /*===================*/
...@@ -96,7 +96,7 @@ page_zip_rec_set_owned( ...@@ -96,7 +96,7 @@ page_zip_rec_set_owned(
/************************************************************************** /**************************************************************************
Shift the dense page directory when a record is deleted. */ Shift the dense page directory when a record is deleted. */
UNIV_INTERN
void void
page_zip_dir_delete( page_zip_dir_delete(
/*================*/ /*================*/
...@@ -109,7 +109,7 @@ page_zip_dir_delete( ...@@ -109,7 +109,7 @@ page_zip_dir_delete(
/************************************************************************** /**************************************************************************
Add a slot to the dense page directory. */ Add a slot to the dense page directory. */
UNIV_INTERN
void void
page_zip_dir_add_slot( page_zip_dir_add_slot(
/*==================*/ /*==================*/
......
...@@ -53,7 +53,7 @@ page_zip_rec_needs_ext( ...@@ -53,7 +53,7 @@ page_zip_rec_needs_ext(
/************************************************************************** /**************************************************************************
Determine the guaranteed free space on an empty page. */ Determine the guaranteed free space on an empty page. */
UNIV_INTERN
ulint ulint
page_zip_empty_size( page_zip_empty_size(
/*================*/ /*================*/
...@@ -73,7 +73,7 @@ page_zip_des_init( ...@@ -73,7 +73,7 @@ page_zip_des_init(
/************************************************************************** /**************************************************************************
Configure the zlib allocator to use the given memory heap. */ Configure the zlib allocator to use the given memory heap. */
UNIV_INTERN
void void
page_zip_set_alloc( page_zip_set_alloc(
/*===============*/ /*===============*/
...@@ -82,7 +82,7 @@ page_zip_set_alloc( ...@@ -82,7 +82,7 @@ page_zip_set_alloc(
/************************************************************************** /**************************************************************************
Compress a page. */ Compress a page. */
UNIV_INTERN
ibool ibool
page_zip_compress( page_zip_compress(
/*==============*/ /*==============*/
...@@ -99,7 +99,7 @@ page_zip_compress( ...@@ -99,7 +99,7 @@ page_zip_compress(
Decompress a page. This function should tolerate errors on the compressed Decompress a page. This function should tolerate errors on the compressed
page. Instead of letting assertions fail, it will return FALSE if an page. Instead of letting assertions fail, it will return FALSE if an
inconsistency is detected. */ inconsistency is detected. */
UNIV_INTERN
ibool ibool
page_zip_decompress( page_zip_decompress(
/*================*/ /*================*/
...@@ -124,7 +124,7 @@ page_zip_simple_validate( ...@@ -124,7 +124,7 @@ page_zip_simple_validate(
#ifdef UNIV_ZIP_DEBUG #ifdef UNIV_ZIP_DEBUG
/************************************************************************** /**************************************************************************
Check that the compressed and decompressed pages match. */ Check that the compressed and decompressed pages match. */
UNIV_INTERN
ibool ibool
page_zip_validate( page_zip_validate(
/*==============*/ /*==============*/
...@@ -179,7 +179,7 @@ page_zip_write_header( ...@@ -179,7 +179,7 @@ page_zip_write_header(
/************************************************************************** /**************************************************************************
Write an entire record on the compressed page. The data must already Write an entire record on the compressed page. The data must already
have been written to the uncompressed page. */ have been written to the uncompressed page. */
UNIV_INTERN
void void
page_zip_write_rec( page_zip_write_rec(
/*===============*/ /*===============*/
...@@ -192,7 +192,7 @@ page_zip_write_rec( ...@@ -192,7 +192,7 @@ page_zip_write_rec(
/*************************************************************** /***************************************************************
Parses a log record of writing a BLOB pointer of a record. */ Parses a log record of writing a BLOB pointer of a record. */
UNIV_INTERN
byte* byte*
page_zip_parse_write_blob_ptr( page_zip_parse_write_blob_ptr(
/*==========================*/ /*==========================*/
...@@ -205,7 +205,7 @@ page_zip_parse_write_blob_ptr( ...@@ -205,7 +205,7 @@ page_zip_parse_write_blob_ptr(
/************************************************************************** /**************************************************************************
Write a BLOB pointer of a record on the leaf page of a clustered index. Write a BLOB pointer of a record on the leaf page of a clustered index.
The information must already have been updated on the uncompressed page. */ The information must already have been updated on the uncompressed page. */
UNIV_INTERN
void void
page_zip_write_blob_ptr( page_zip_write_blob_ptr(
/*====================*/ /*====================*/
...@@ -221,7 +221,7 @@ page_zip_write_blob_ptr( ...@@ -221,7 +221,7 @@ page_zip_write_blob_ptr(
/*************************************************************** /***************************************************************
Parses a log record of writing the node pointer of a record. */ Parses a log record of writing the node pointer of a record. */
UNIV_INTERN
byte* byte*
page_zip_parse_write_node_ptr( page_zip_parse_write_node_ptr(
/*==========================*/ /*==========================*/
...@@ -233,7 +233,7 @@ page_zip_parse_write_node_ptr( ...@@ -233,7 +233,7 @@ page_zip_parse_write_node_ptr(
/************************************************************************** /**************************************************************************
Write the node pointer of a record on a non-leaf compressed page. */ Write the node pointer of a record on a non-leaf compressed page. */
UNIV_INTERN
void void
page_zip_write_node_ptr( page_zip_write_node_ptr(
/*====================*/ /*====================*/
...@@ -246,7 +246,7 @@ page_zip_write_node_ptr( ...@@ -246,7 +246,7 @@ page_zip_write_node_ptr(
/************************************************************************** /**************************************************************************
Write the trx_id and roll_ptr of a record on a B-tree leaf node page. */ Write the trx_id and roll_ptr of a record on a B-tree leaf node page. */
UNIV_INTERN
void void
page_zip_write_trx_id_and_roll_ptr( page_zip_write_trx_id_and_roll_ptr(
/*===============================*/ /*===============================*/
...@@ -261,7 +261,7 @@ page_zip_write_trx_id_and_roll_ptr( ...@@ -261,7 +261,7 @@ page_zip_write_trx_id_and_roll_ptr(
/************************************************************************** /**************************************************************************
Write the "deleted" flag of a record on a compressed page. The flag must Write the "deleted" flag of a record on a compressed page. The flag must
already have been written on the uncompressed page. */ already have been written on the uncompressed page. */
UNIV_INTERN
void void
page_zip_rec_set_deleted( page_zip_rec_set_deleted(
/*=====================*/ /*=====================*/
...@@ -273,7 +273,7 @@ page_zip_rec_set_deleted( ...@@ -273,7 +273,7 @@ page_zip_rec_set_deleted(
/************************************************************************** /**************************************************************************
Write the "owned" flag of a record on a compressed page. The n_owned field Write the "owned" flag of a record on a compressed page. The n_owned field
must already have been written on the uncompressed page. */ must already have been written on the uncompressed page. */
UNIV_INTERN
void void
page_zip_rec_set_owned( page_zip_rec_set_owned(
/*===================*/ /*===================*/
...@@ -284,7 +284,7 @@ page_zip_rec_set_owned( ...@@ -284,7 +284,7 @@ page_zip_rec_set_owned(
/************************************************************************** /**************************************************************************
Insert a record to the dense page directory. */ Insert a record to the dense page directory. */
UNIV_INTERN
void void
page_zip_dir_insert( page_zip_dir_insert(
/*================*/ /*================*/
...@@ -297,7 +297,7 @@ page_zip_dir_insert( ...@@ -297,7 +297,7 @@ page_zip_dir_insert(
/************************************************************************** /**************************************************************************
Shift the dense page directory and the array of BLOB pointers Shift the dense page directory and the array of BLOB pointers
when a record is deleted. */ when a record is deleted. */
UNIV_INTERN
void void
page_zip_dir_delete( page_zip_dir_delete(
/*================*/ /*================*/
...@@ -310,7 +310,7 @@ page_zip_dir_delete( ...@@ -310,7 +310,7 @@ page_zip_dir_delete(
/************************************************************************** /**************************************************************************
Add a slot to the dense page directory. */ Add a slot to the dense page directory. */
UNIV_INTERN
void void
page_zip_dir_add_slot( page_zip_dir_add_slot(
/*==================*/ /*==================*/
...@@ -321,7 +321,7 @@ page_zip_dir_add_slot( ...@@ -321,7 +321,7 @@ page_zip_dir_add_slot(
/*************************************************************** /***************************************************************
Parses a log record of writing to the header of a page. */ Parses a log record of writing to the header of a page. */
UNIV_INTERN
byte* byte*
page_zip_parse_write_header( page_zip_parse_write_header(
/*========================*/ /*========================*/
...@@ -356,7 +356,7 @@ IMPORTANT: if page_zip_reorganize() is invoked on a leaf page of a ...@@ -356,7 +356,7 @@ IMPORTANT: if page_zip_reorganize() is invoked on a leaf page of a
non-clustered index, the caller must update the insert buffer free non-clustered index, the caller must update the insert buffer free
bits in the same mini-transaction in such a way that the modification bits in the same mini-transaction in such a way that the modification
will be redo-logged. */ will be redo-logged. */
UNIV_INTERN
ibool ibool
page_zip_reorganize( page_zip_reorganize(
/*================*/ /*================*/
...@@ -372,7 +372,7 @@ page_zip_reorganize( ...@@ -372,7 +372,7 @@ page_zip_reorganize(
__attribute__((nonnull)); __attribute__((nonnull));
/************************************************************************** /**************************************************************************
Copy a page byte for byte, except for the file page header and trailer. */ Copy a page byte for byte, except for the file page header and trailer. */
UNIV_INTERN
void void
page_zip_copy( page_zip_copy(
/*==========*/ /*==========*/
...@@ -388,7 +388,7 @@ page_zip_copy( ...@@ -388,7 +388,7 @@ page_zip_copy(
/************************************************************************** /**************************************************************************
Parses a log record of compressing an index page. */ Parses a log record of compressing an index page. */
UNIV_INTERN
byte* byte*
page_zip_parse_compress( page_zip_parse_compress(
/*====================*/ /*====================*/
...@@ -401,7 +401,7 @@ page_zip_parse_compress( ...@@ -401,7 +401,7 @@ page_zip_parse_compress(
/************************************************************************** /**************************************************************************
Calculate the compressed page checksum. */ Calculate the compressed page checksum. */
UNIV_INTERN
ulint ulint
page_zip_calc_checksum( page_zip_calc_checksum(
/*===================*/ /*===================*/
......
...@@ -20,7 +20,7 @@ Created 12/21/1997 Heikki Tuuri ...@@ -20,7 +20,7 @@ Created 12/21/1997 Heikki Tuuri
Optimizes a select. Decides which indexes to tables to use. The tables Optimizes a select. Decides which indexes to tables to use. The tables
are accessed in the order that they were written to the FROM part in the are accessed in the order that they were written to the FROM part in the
select statement. */ select statement. */
UNIV_INTERN
void void
opt_search_plan( opt_search_plan(
/*============*/ /*============*/
...@@ -32,7 +32,7 @@ already exist in the list. If the column is already in the list, puts a value ...@@ -32,7 +32,7 @@ already exist in the list. If the column is already in the list, puts a value
indirection to point to the occurrence in the column list, except if the indirection to point to the occurrence in the column list, except if the
column occurrence we are looking at is in the column list, in which case column occurrence we are looking at is in the column list, in which case
nothing is done. */ nothing is done. */
UNIV_INTERN
void void
opt_find_all_cols( opt_find_all_cols(
/*==============*/ /*==============*/
...@@ -45,7 +45,7 @@ opt_find_all_cols( ...@@ -45,7 +45,7 @@ opt_find_all_cols(
que_node_t* exp); /* in: expression or condition */ que_node_t* exp); /* in: expression or condition */
/************************************************************************ /************************************************************************
Prints info of a query plan. */ Prints info of a query plan. */
UNIV_INTERN
void void
opt_print_query_plan( opt_print_query_plan(
/*=================*/ /*=================*/
......
...@@ -79,7 +79,7 @@ yyparse(void); ...@@ -79,7 +79,7 @@ yyparse(void);
/***************************************************************** /*****************************************************************
Parses an SQL string returning the query graph. */ Parses an SQL string returning the query graph. */
UNIV_INTERN
que_t* que_t*
pars_sql( pars_sql(
/*=====*/ /*=====*/
...@@ -88,7 +88,7 @@ pars_sql( ...@@ -88,7 +88,7 @@ pars_sql(
const char* str); /* in: SQL string */ const char* str); /* in: SQL string */
/***************************************************************** /*****************************************************************
Retrieves characters to the lexical analyzer. */ Retrieves characters to the lexical analyzer. */
UNIV_INTERN
void void
pars_get_lex_chars( pars_get_lex_chars(
/*===============*/ /*===============*/
...@@ -98,14 +98,14 @@ pars_get_lex_chars( ...@@ -98,14 +98,14 @@ pars_get_lex_chars(
in the buffer */ in the buffer */
/***************************************************************** /*****************************************************************
Called by yyparse on error. */ Called by yyparse on error. */
UNIV_INTERN
void void
yyerror( yyerror(
/*====*/ /*====*/
const char* s); /* in: error message string */ const char* s); /* in: error message string */
/************************************************************************* /*************************************************************************
Parses a variable declaration. */ Parses a variable declaration. */
UNIV_INTERN
sym_node_t* sym_node_t*
pars_variable_declaration( pars_variable_declaration(
/*======================*/ /*======================*/
...@@ -116,7 +116,7 @@ pars_variable_declaration( ...@@ -116,7 +116,7 @@ pars_variable_declaration(
pars_res_word_t* type); /* in: pointer to a type token */ pars_res_word_t* type); /* in: pointer to a type token */
/************************************************************************* /*************************************************************************
Parses a function expression. */ Parses a function expression. */
UNIV_INTERN
func_node_t* func_node_t*
pars_func( pars_func(
/*======*/ /*======*/
...@@ -125,7 +125,7 @@ pars_func( ...@@ -125,7 +125,7 @@ pars_func(
que_node_t* arg); /* in: first argument in the argument list */ que_node_t* arg); /* in: first argument in the argument list */
/************************************************************************* /*************************************************************************
Parses an operator expression. */ Parses an operator expression. */
UNIV_INTERN
func_node_t* func_node_t*
pars_op( pars_op(
/*====*/ /*====*/
...@@ -136,7 +136,7 @@ pars_op( ...@@ -136,7 +136,7 @@ pars_op(
operator */ operator */
/************************************************************************* /*************************************************************************
Parses an ORDER BY clause. Order by a single column only is supported. */ Parses an ORDER BY clause. Order by a single column only is supported. */
UNIV_INTERN
order_node_t* order_node_t*
pars_order_by( pars_order_by(
/*==========*/ /*==========*/
...@@ -146,7 +146,7 @@ pars_order_by( ...@@ -146,7 +146,7 @@ pars_order_by(
/************************************************************************* /*************************************************************************
Parses a select list; creates a query graph node for the whole SELECT Parses a select list; creates a query graph node for the whole SELECT
statement. */ statement. */
UNIV_INTERN
sel_node_t* sel_node_t*
pars_select_list( pars_select_list(
/*=============*/ /*=============*/
...@@ -156,7 +156,7 @@ pars_select_list( ...@@ -156,7 +156,7 @@ pars_select_list(
sym_node_t* into_list); /* in: variables list or NULL */ sym_node_t* into_list); /* in: variables list or NULL */
/************************************************************************* /*************************************************************************
Parses a cursor declaration. */ Parses a cursor declaration. */
UNIV_INTERN
que_node_t* que_node_t*
pars_cursor_declaration( pars_cursor_declaration(
/*====================*/ /*====================*/
...@@ -166,7 +166,7 @@ pars_cursor_declaration( ...@@ -166,7 +166,7 @@ pars_cursor_declaration(
sel_node_t* select_node); /* in: select node */ sel_node_t* select_node); /* in: select node */
/************************************************************************* /*************************************************************************
Parses a function declaration. */ Parses a function declaration. */
UNIV_INTERN
que_node_t* que_node_t*
pars_function_declaration( pars_function_declaration(
/*======================*/ /*======================*/
...@@ -175,7 +175,7 @@ pars_function_declaration( ...@@ -175,7 +175,7 @@ pars_function_declaration(
table */ table */
/************************************************************************* /*************************************************************************
Parses a select statement. */ Parses a select statement. */
UNIV_INTERN
sel_node_t* sel_node_t*
pars_select_statement( pars_select_statement(
/*==================*/ /*==================*/
...@@ -191,7 +191,7 @@ pars_select_statement( ...@@ -191,7 +191,7 @@ pars_select_statement(
order_node_t* order_by); /* in: NULL or an order-by node */ order_node_t* order_by); /* in: NULL or an order-by node */
/************************************************************************* /*************************************************************************
Parses a column assignment in an update. */ Parses a column assignment in an update. */
UNIV_INTERN
col_assign_node_t* col_assign_node_t*
pars_column_assignment( pars_column_assignment(
/*===================*/ /*===================*/
...@@ -200,7 +200,7 @@ pars_column_assignment( ...@@ -200,7 +200,7 @@ pars_column_assignment(
que_node_t* exp); /* in: value to assign */ que_node_t* exp); /* in: value to assign */
/************************************************************************* /*************************************************************************
Parses a delete or update statement start. */ Parses a delete or update statement start. */
UNIV_INTERN
upd_node_t* upd_node_t*
pars_update_statement_start( pars_update_statement_start(
/*========================*/ /*========================*/
...@@ -212,7 +212,7 @@ pars_update_statement_start( ...@@ -212,7 +212,7 @@ pars_update_statement_start(
if delete */ if delete */
/************************************************************************* /*************************************************************************
Parses an update or delete statement. */ Parses an update or delete statement. */
UNIV_INTERN
upd_node_t* upd_node_t*
pars_update_statement( pars_update_statement(
/*==================*/ /*==================*/
...@@ -224,7 +224,7 @@ pars_update_statement( ...@@ -224,7 +224,7 @@ pars_update_statement(
que_node_t* search_cond); /* in: search condition or NULL */ que_node_t* search_cond); /* in: search condition or NULL */
/************************************************************************* /*************************************************************************
Parses an insert statement. */ Parses an insert statement. */
UNIV_INTERN
ins_node_t* ins_node_t*
pars_insert_statement( pars_insert_statement(
/*==================*/ /*==================*/
...@@ -235,7 +235,7 @@ pars_insert_statement( ...@@ -235,7 +235,7 @@ pars_insert_statement(
sel_node_t* select); /* in: select condition or NULL */ sel_node_t* select); /* in: select condition or NULL */
/************************************************************************* /*************************************************************************
Parses a procedure parameter declaration. */ Parses a procedure parameter declaration. */
UNIV_INTERN
sym_node_t* sym_node_t*
pars_parameter_declaration( pars_parameter_declaration(
/*=======================*/ /*=======================*/
...@@ -248,7 +248,7 @@ pars_parameter_declaration( ...@@ -248,7 +248,7 @@ pars_parameter_declaration(
pars_res_word_t* type); /* in: pointer to a type token */ pars_res_word_t* type); /* in: pointer to a type token */
/************************************************************************* /*************************************************************************
Parses an elsif element. */ Parses an elsif element. */
UNIV_INTERN
elsif_node_t* elsif_node_t*
pars_elsif_element( pars_elsif_element(
/*===============*/ /*===============*/
...@@ -257,7 +257,7 @@ pars_elsif_element( ...@@ -257,7 +257,7 @@ pars_elsif_element(
que_node_t* stat_list); /* in: statement list */ que_node_t* stat_list); /* in: statement list */
/************************************************************************* /*************************************************************************
Parses an if-statement. */ Parses an if-statement. */
UNIV_INTERN
if_node_t* if_node_t*
pars_if_statement( pars_if_statement(
/*==============*/ /*==============*/
...@@ -267,7 +267,7 @@ pars_if_statement( ...@@ -267,7 +267,7 @@ pars_if_statement(
que_node_t* else_part); /* in: else-part statement list */ que_node_t* else_part); /* in: else-part statement list */
/************************************************************************* /*************************************************************************
Parses a for-loop-statement. */ Parses a for-loop-statement. */
UNIV_INTERN
for_node_t* for_node_t*
pars_for_statement( pars_for_statement(
/*===============*/ /*===============*/
...@@ -278,7 +278,7 @@ pars_for_statement( ...@@ -278,7 +278,7 @@ pars_for_statement(
que_node_t* stat_list); /* in: statement list */ que_node_t* stat_list); /* in: statement list */
/************************************************************************* /*************************************************************************
Parses a while-statement. */ Parses a while-statement. */
UNIV_INTERN
while_node_t* while_node_t*
pars_while_statement( pars_while_statement(
/*=================*/ /*=================*/
...@@ -287,21 +287,21 @@ pars_while_statement( ...@@ -287,21 +287,21 @@ pars_while_statement(
que_node_t* stat_list); /* in: statement list */ que_node_t* stat_list); /* in: statement list */
/************************************************************************* /*************************************************************************
Parses an exit statement. */ Parses an exit statement. */
UNIV_INTERN
exit_node_t* exit_node_t*
pars_exit_statement(void); pars_exit_statement(void);
/*=====================*/ /*=====================*/
/* out: exit statement node */ /* out: exit statement node */
/************************************************************************* /*************************************************************************
Parses a return-statement. */ Parses a return-statement. */
UNIV_INTERN
return_node_t* return_node_t*
pars_return_statement(void); pars_return_statement(void);
/*=======================*/ /*=======================*/
/* out: return-statement node */ /* out: return-statement node */
/************************************************************************* /*************************************************************************
Parses a procedure call. */ Parses a procedure call. */
UNIV_INTERN
func_node_t* func_node_t*
pars_procedure_call( pars_procedure_call(
/*================*/ /*================*/
...@@ -310,7 +310,7 @@ pars_procedure_call( ...@@ -310,7 +310,7 @@ pars_procedure_call(
que_node_t* args); /* in: argument list */ que_node_t* args); /* in: argument list */
/************************************************************************* /*************************************************************************
Parses an assignment statement. */ Parses an assignment statement. */
UNIV_INTERN
assign_node_t* assign_node_t*
pars_assignment_statement( pars_assignment_statement(
/*======================*/ /*======================*/
...@@ -320,7 +320,7 @@ pars_assignment_statement( ...@@ -320,7 +320,7 @@ pars_assignment_statement(
/************************************************************************* /*************************************************************************
Parses a fetch statement. into_list or user_func (but not both) must be Parses a fetch statement. into_list or user_func (but not both) must be
non-NULL. */ non-NULL. */
UNIV_INTERN
fetch_node_t* fetch_node_t*
pars_fetch_statement( pars_fetch_statement(
/*=================*/ /*=================*/
...@@ -330,7 +330,7 @@ pars_fetch_statement( ...@@ -330,7 +330,7 @@ pars_fetch_statement(
sym_node_t* user_func); /* in: user function name, or NULL */ sym_node_t* user_func); /* in: user function name, or NULL */
/************************************************************************* /*************************************************************************
Parses an open or close cursor statement. */ Parses an open or close cursor statement. */
UNIV_INTERN
open_node_t* open_node_t*
pars_open_statement( pars_open_statement(
/*================*/ /*================*/
...@@ -340,7 +340,7 @@ pars_open_statement( ...@@ -340,7 +340,7 @@ pars_open_statement(
sym_node_t* cursor); /* in: cursor node */ sym_node_t* cursor); /* in: cursor node */
/************************************************************************* /*************************************************************************
Parses a row_printf-statement. */ Parses a row_printf-statement. */
UNIV_INTERN
row_printf_node_t* row_printf_node_t*
pars_row_printf_statement( pars_row_printf_statement(
/*======================*/ /*======================*/
...@@ -348,19 +348,19 @@ pars_row_printf_statement( ...@@ -348,19 +348,19 @@ pars_row_printf_statement(
sel_node_t* sel_node); /* in: select node */ sel_node_t* sel_node); /* in: select node */
/************************************************************************* /*************************************************************************
Parses a commit statement. */ Parses a commit statement. */
UNIV_INTERN
commit_node_t* commit_node_t*
pars_commit_statement(void); pars_commit_statement(void);
/*=======================*/ /*=======================*/
/************************************************************************* /*************************************************************************
Parses a rollback statement. */ Parses a rollback statement. */
UNIV_INTERN
roll_node_t* roll_node_t*
pars_rollback_statement(void); pars_rollback_statement(void);
/*=========================*/ /*=========================*/
/************************************************************************* /*************************************************************************
Parses a column definition at a table creation. */ Parses a column definition at a table creation. */
UNIV_INTERN
sym_node_t* sym_node_t*
pars_column_def( pars_column_def(
/*============*/ /*============*/
...@@ -377,7 +377,7 @@ pars_column_def( ...@@ -377,7 +377,7 @@ pars_column_def(
is of type NOT NULL. */ is of type NOT NULL. */
/************************************************************************* /*************************************************************************
Parses a table creation operation. */ Parses a table creation operation. */
UNIV_INTERN
tab_node_t* tab_node_t*
pars_create_table( pars_create_table(
/*==============*/ /*==============*/
...@@ -397,7 +397,7 @@ pars_create_table( ...@@ -397,7 +397,7 @@ pars_create_table(
from disk */ from disk */
/************************************************************************* /*************************************************************************
Parses an index creation operation. */ Parses an index creation operation. */
UNIV_INTERN
ind_node_t* ind_node_t*
pars_create_index( pars_create_index(
/*==============*/ /*==============*/
...@@ -411,7 +411,7 @@ pars_create_index( ...@@ -411,7 +411,7 @@ pars_create_index(
sym_node_t* column_list); /* in: list of column names */ sym_node_t* column_list); /* in: list of column names */
/************************************************************************* /*************************************************************************
Parses a procedure definition. */ Parses a procedure definition. */
UNIV_INTERN
que_fork_t* que_fork_t*
pars_procedure_definition( pars_procedure_definition(
/*======================*/ /*======================*/
...@@ -426,7 +426,7 @@ Parses a stored procedure call, when this is not within another stored ...@@ -426,7 +426,7 @@ Parses a stored procedure call, when this is not within another stored
procedure, that is, the client issues a procedure call directly. procedure, that is, the client issues a procedure call directly.
In MySQL/InnoDB, stored InnoDB procedures are invoked via the In MySQL/InnoDB, stored InnoDB procedures are invoked via the
parsed procedure tree, not via InnoDB SQL, so this function is not used. */ parsed procedure tree, not via InnoDB SQL, so this function is not used. */
UNIV_INTERN
que_fork_t* que_fork_t*
pars_stored_procedure_call( pars_stored_procedure_call(
/*=======================*/ /*=======================*/
...@@ -436,7 +436,7 @@ pars_stored_procedure_call( ...@@ -436,7 +436,7 @@ pars_stored_procedure_call(
Completes a query graph by adding query thread and fork nodes Completes a query graph by adding query thread and fork nodes
above it and prepares the graph for running. The fork created is of above it and prepares the graph for running. The fork created is of
type QUE_FORK_MYSQL_INTERFACE. */ type QUE_FORK_MYSQL_INTERFACE. */
UNIV_INTERN
que_thr_t* que_thr_t*
pars_complete_graph_for_exec( pars_complete_graph_for_exec(
/*=========================*/ /*=========================*/
...@@ -448,7 +448,7 @@ pars_complete_graph_for_exec( ...@@ -448,7 +448,7 @@ pars_complete_graph_for_exec(
/******************************************************************** /********************************************************************
Create parser info struct.*/ Create parser info struct.*/
UNIV_INTERN
pars_info_t* pars_info_t*
pars_info_create(void); pars_info_create(void);
/*==================*/ /*==================*/
...@@ -456,7 +456,7 @@ pars_info_create(void); ...@@ -456,7 +456,7 @@ pars_info_create(void);
/******************************************************************** /********************************************************************
Free info struct and everything it contains.*/ Free info struct and everything it contains.*/
UNIV_INTERN
void void
pars_info_free( pars_info_free(
/*===========*/ /*===========*/
...@@ -464,7 +464,7 @@ pars_info_free( ...@@ -464,7 +464,7 @@ pars_info_free(
/******************************************************************** /********************************************************************
Add bound literal. */ Add bound literal. */
UNIV_INTERN
void void
pars_info_add_literal( pars_info_add_literal(
/*==================*/ /*==================*/
...@@ -479,7 +479,7 @@ pars_info_add_literal( ...@@ -479,7 +479,7 @@ pars_info_add_literal(
/******************************************************************** /********************************************************************
Equivalent to pars_info_add_literal(info, name, str, strlen(str), Equivalent to pars_info_add_literal(info, name, str, strlen(str),
DATA_VARCHAR, DATA_ENGLISH). */ DATA_VARCHAR, DATA_ENGLISH). */
UNIV_INTERN
void void
pars_info_add_str_literal( pars_info_add_str_literal(
/*======================*/ /*======================*/
...@@ -496,7 +496,7 @@ pars_info_add_literal(info, name, buf, 4, DATA_INT, 0); ...@@ -496,7 +496,7 @@ pars_info_add_literal(info, name, buf, 4, DATA_INT, 0);
except that the buffer is dynamically allocated from the info struct's except that the buffer is dynamically allocated from the info struct's
heap. */ heap. */
UNIV_INTERN
void void
pars_info_add_int4_literal( pars_info_add_int4_literal(
/*=======================*/ /*=======================*/
...@@ -513,7 +513,7 @@ pars_info_add_literal(info, name, buf, 8, DATA_BINARY, 0); ...@@ -513,7 +513,7 @@ pars_info_add_literal(info, name, buf, 8, DATA_BINARY, 0);
except that the buffer is dynamically allocated from the info struct's except that the buffer is dynamically allocated from the info struct's
heap. */ heap. */
UNIV_INTERN
void void
pars_info_add_dulint_literal( pars_info_add_dulint_literal(
/*=========================*/ /*=========================*/
...@@ -522,7 +522,7 @@ pars_info_add_dulint_literal( ...@@ -522,7 +522,7 @@ pars_info_add_dulint_literal(
dulint val); /* in: value */ dulint val); /* in: value */
/******************************************************************** /********************************************************************
Add user function. */ Add user function. */
UNIV_INTERN
void void
pars_info_add_function( pars_info_add_function(
/*===================*/ /*===================*/
...@@ -533,7 +533,7 @@ pars_info_add_function( ...@@ -533,7 +533,7 @@ pars_info_add_function(
/******************************************************************** /********************************************************************
Add bound id. */ Add bound id. */
UNIV_INTERN
void void
pars_info_add_id( pars_info_add_id(
/*=============*/ /*=============*/
...@@ -543,7 +543,7 @@ pars_info_add_id( ...@@ -543,7 +543,7 @@ pars_info_add_id(
/******************************************************************** /********************************************************************
Get user function with the given name.*/ Get user function with the given name.*/
UNIV_INTERN
pars_user_func_t* pars_user_func_t*
pars_info_get_user_func( pars_info_get_user_func(
/*====================*/ /*====================*/
...@@ -554,7 +554,7 @@ pars_info_get_user_func( ...@@ -554,7 +554,7 @@ pars_info_get_user_func(
/******************************************************************** /********************************************************************
Get bound literal with the given name.*/ Get bound literal with the given name.*/
UNIV_INTERN
pars_bound_lit_t* pars_bound_lit_t*
pars_info_get_bound_lit( pars_info_get_bound_lit(
/*====================*/ /*====================*/
...@@ -565,7 +565,7 @@ pars_info_get_bound_lit( ...@@ -565,7 +565,7 @@ pars_info_get_bound_lit(
/******************************************************************** /********************************************************************
Get bound id with the given name.*/ Get bound id with the given name.*/
UNIV_INTERN
pars_bound_id_t* pars_bound_id_t*
pars_info_get_bound_id( pars_info_get_bound_id(
/*===================*/ /*===================*/
......
...@@ -18,7 +18,7 @@ Created 12/15/1997 Heikki Tuuri ...@@ -18,7 +18,7 @@ Created 12/15/1997 Heikki Tuuri
/********************************************************************** /**********************************************************************
Creates a symbol table for a single stored procedure or query. */ Creates a symbol table for a single stored procedure or query. */
UNIV_INTERN
sym_tab_t* sym_tab_t*
sym_tab_create( sym_tab_create(
/*===========*/ /*===========*/
...@@ -28,14 +28,14 @@ sym_tab_create( ...@@ -28,14 +28,14 @@ sym_tab_create(
Frees the memory allocated dynamically AFTER parsing phase for variables Frees the memory allocated dynamically AFTER parsing phase for variables
etc. in the symbol table. Does not free the mem heap where the table was etc. in the symbol table. Does not free the mem heap where the table was
originally created. Frees also SQL explicit cursor definitions. */ originally created. Frees also SQL explicit cursor definitions. */
UNIV_INTERN
void void
sym_tab_free_private( sym_tab_free_private(
/*=================*/ /*=================*/
sym_tab_t* sym_tab); /* in, own: symbol table */ sym_tab_t* sym_tab); /* in, own: symbol table */
/********************************************************************** /**********************************************************************
Adds an integer literal to a symbol table. */ Adds an integer literal to a symbol table. */
UNIV_INTERN
sym_node_t* sym_node_t*
sym_tab_add_int_lit( sym_tab_add_int_lit(
/*================*/ /*================*/
...@@ -44,7 +44,7 @@ sym_tab_add_int_lit( ...@@ -44,7 +44,7 @@ sym_tab_add_int_lit(
ulint val); /* in: integer value */ ulint val); /* in: integer value */
/********************************************************************** /**********************************************************************
Adds an string literal to a symbol table. */ Adds an string literal to a symbol table. */
UNIV_INTERN
sym_node_t* sym_node_t*
sym_tab_add_str_lit( sym_tab_add_str_lit(
/*================*/ /*================*/
...@@ -55,7 +55,7 @@ sym_tab_add_str_lit( ...@@ -55,7 +55,7 @@ sym_tab_add_str_lit(
ulint len); /* in: string length */ ulint len); /* in: string length */
/********************************************************************** /**********************************************************************
Add a bound literal to a symbol table. */ Add a bound literal to a symbol table. */
UNIV_INTERN
sym_node_t* sym_node_t*
sym_tab_add_bound_lit( sym_tab_add_bound_lit(
/*==================*/ /*==================*/
...@@ -65,7 +65,7 @@ sym_tab_add_bound_lit( ...@@ -65,7 +65,7 @@ sym_tab_add_bound_lit(
ulint* lit_type); /* out: type of literal (PARS_*_LIT) */ ulint* lit_type); /* out: type of literal (PARS_*_LIT) */
/********************************************************************** /**********************************************************************
Adds an SQL null literal to a symbol table. */ Adds an SQL null literal to a symbol table. */
UNIV_INTERN
sym_node_t* sym_node_t*
sym_tab_add_null_lit( sym_tab_add_null_lit(
/*=================*/ /*=================*/
...@@ -73,7 +73,7 @@ sym_tab_add_null_lit( ...@@ -73,7 +73,7 @@ sym_tab_add_null_lit(
sym_tab_t* sym_tab); /* in: symbol table */ sym_tab_t* sym_tab); /* in: symbol table */
/********************************************************************** /**********************************************************************
Adds an identifier to a symbol table. */ Adds an identifier to a symbol table. */
UNIV_INTERN
sym_node_t* sym_node_t*
sym_tab_add_id( sym_tab_add_id(
/*===========*/ /*===========*/
...@@ -84,7 +84,7 @@ sym_tab_add_id( ...@@ -84,7 +84,7 @@ sym_tab_add_id(
/********************************************************************** /**********************************************************************
Add a bound identifier to a symbol table. */ Add a bound identifier to a symbol table. */
UNIV_INTERN
sym_node_t* sym_node_t*
sym_tab_add_bound_id( sym_tab_add_bound_id(
/*===========*/ /*===========*/
......
...@@ -25,7 +25,7 @@ extern ibool que_trace_on; ...@@ -25,7 +25,7 @@ extern ibool que_trace_on;
/*************************************************************************** /***************************************************************************
Adds a query graph to the session's list of graphs. */ Adds a query graph to the session's list of graphs. */
UNIV_INTERN
void void
que_graph_publish( que_graph_publish(
/*==============*/ /*==============*/
...@@ -33,7 +33,7 @@ que_graph_publish( ...@@ -33,7 +33,7 @@ que_graph_publish(
sess_t* sess); /* in: session */ sess_t* sess); /* in: session */
/*************************************************************************** /***************************************************************************
Creates a query graph fork node. */ Creates a query graph fork node. */
UNIV_INTERN
que_fork_t* que_fork_t*
que_fork_create( que_fork_create(
/*============*/ /*============*/
...@@ -68,7 +68,7 @@ que_node_set_parent( ...@@ -68,7 +68,7 @@ que_node_set_parent(
que_node_t* parent);/* in: parent */ que_node_t* parent);/* in: parent */
/*************************************************************************** /***************************************************************************
Creates a query graph thread node. */ Creates a query graph thread node. */
UNIV_INTERN
que_thr_t* que_thr_t*
que_thr_create( que_thr_create(
/*===========*/ /*===========*/
...@@ -79,7 +79,7 @@ que_thr_create( ...@@ -79,7 +79,7 @@ que_thr_create(
Checks if the query graph is in a state where it should be freed, and Checks if the query graph is in a state where it should be freed, and
frees it in that case. If the session is in a state where it should be frees it in that case. If the session is in a state where it should be
closed, also this is done. */ closed, also this is done. */
UNIV_INTERN
ibool ibool
que_graph_try_free( que_graph_try_free(
/*===============*/ /*===============*/
...@@ -88,14 +88,14 @@ que_graph_try_free( ...@@ -88,14 +88,14 @@ que_graph_try_free(
/************************************************************************** /**************************************************************************
Frees a query graph, but not the heap where it was created. Does not free Frees a query graph, but not the heap where it was created. Does not free
explicit cursor declarations, they are freed in que_graph_free. */ explicit cursor declarations, they are freed in que_graph_free. */
UNIV_INTERN
void void
que_graph_free_recursive( que_graph_free_recursive(
/*=====================*/ /*=====================*/
que_node_t* node); /* in: query graph node */ que_node_t* node); /* in: query graph node */
/************************************************************************** /**************************************************************************
Frees a query graph. */ Frees a query graph. */
UNIV_INTERN
void void
que_graph_free( que_graph_free(
/*===========*/ /*===========*/
...@@ -108,7 +108,7 @@ que_graph_free( ...@@ -108,7 +108,7 @@ que_graph_free(
Stops a query thread if graph or trx is in a state requiring it. The Stops a query thread if graph or trx is in a state requiring it. The
conditions are tested in the order (1) graph, (2) trx. The kernel mutex has conditions are tested in the order (1) graph, (2) trx. The kernel mutex has
to be reserved. */ to be reserved. */
UNIV_INTERN
ibool ibool
que_thr_stop( que_thr_stop(
/*=========*/ /*=========*/
...@@ -117,7 +117,7 @@ que_thr_stop( ...@@ -117,7 +117,7 @@ que_thr_stop(
/************************************************************************** /**************************************************************************
Moves a thread from another state to the QUE_THR_RUNNING state. Increments Moves a thread from another state to the QUE_THR_RUNNING state. Increments
the n_active_thrs counters of the query graph and transaction. */ the n_active_thrs counters of the query graph and transaction. */
UNIV_INTERN
void void
que_thr_move_to_run_state_for_mysql( que_thr_move_to_run_state_for_mysql(
/*================================*/ /*================================*/
...@@ -126,7 +126,7 @@ que_thr_move_to_run_state_for_mysql( ...@@ -126,7 +126,7 @@ que_thr_move_to_run_state_for_mysql(
/************************************************************************** /**************************************************************************
A patch for MySQL used to 'stop' a dummy query thread used in MySQL A patch for MySQL used to 'stop' a dummy query thread used in MySQL
select, when there is no error or lock wait. */ select, when there is no error or lock wait. */
UNIV_INTERN
void void
que_thr_stop_for_mysql_no_error( que_thr_stop_for_mysql_no_error(
/*============================*/ /*============================*/
...@@ -137,14 +137,14 @@ A patch for MySQL used to 'stop' a dummy query thread used in MySQL. The ...@@ -137,14 +137,14 @@ A patch for MySQL used to 'stop' a dummy query thread used in MySQL. The
query thread is stopped and made inactive, except in the case where query thread is stopped and made inactive, except in the case where
it was put to the lock wait state in lock0lock.c, but the lock has already it was put to the lock wait state in lock0lock.c, but the lock has already
been granted or the transaction chosen as a victim in deadlock resolution. */ been granted or the transaction chosen as a victim in deadlock resolution. */
UNIV_INTERN
void void
que_thr_stop_for_mysql( que_thr_stop_for_mysql(
/*===================*/ /*===================*/
que_thr_t* thr); /* in: query thread */ que_thr_t* thr); /* in: query thread */
/************************************************************************** /**************************************************************************
Run a query thread. Handles lock waits. */ Run a query thread. Handles lock waits. */
UNIV_INTERN
void void
que_run_threads( que_run_threads(
/*============*/ /*============*/
...@@ -153,7 +153,7 @@ que_run_threads( ...@@ -153,7 +153,7 @@ que_run_threads(
After signal handling is finished, returns control to a query graph error After signal handling is finished, returns control to a query graph error
handling routine. (Currently, just returns the control to the root of the handling routine. (Currently, just returns the control to the root of the
graph so that the graph can communicate an error message to the client.) */ graph so that the graph can communicate an error message to the client.) */
UNIV_INTERN
void void
que_fork_error_handle( que_fork_error_handle(
/*==================*/ /*==================*/
...@@ -165,7 +165,7 @@ Moves a suspended query thread to the QUE_THR_RUNNING state and releases ...@@ -165,7 +165,7 @@ Moves a suspended query thread to the QUE_THR_RUNNING state and releases
a single worker thread to execute it. This function should be used to end a single worker thread to execute it. This function should be used to end
the wait state of a query thread waiting for a lock or a stored procedure the wait state of a query thread waiting for a lock or a stored procedure
completion. */ completion. */
UNIV_INTERN
void void
que_thr_end_wait( que_thr_end_wait(
/*=============*/ /*=============*/
...@@ -180,7 +180,7 @@ que_thr_end_wait( ...@@ -180,7 +180,7 @@ que_thr_end_wait(
a new query thread */ a new query thread */
/************************************************************************** /**************************************************************************
Same as que_thr_end_wait, but no parameter next_thr available. */ Same as que_thr_end_wait, but no parameter next_thr available. */
UNIV_INTERN
void void
que_thr_end_wait_no_next_thr( que_thr_end_wait_no_next_thr(
/*=========================*/ /*=========================*/
...@@ -193,7 +193,7 @@ Starts execution of a command in a query fork. Picks a query thread which ...@@ -193,7 +193,7 @@ Starts execution of a command in a query fork. Picks a query thread which
is not in the QUE_THR_RUNNING state and moves it to that state. If none is not in the QUE_THR_RUNNING state and moves it to that state. If none
can be chosen, a situation which may arise in parallelized fetches, NULL can be chosen, a situation which may arise in parallelized fetches, NULL
is returned. */ is returned. */
UNIV_INTERN
que_thr_t* que_thr_t*
que_fork_start_command( que_fork_start_command(
/*===================*/ /*===================*/
...@@ -265,7 +265,7 @@ que_node_get_parent( ...@@ -265,7 +265,7 @@ que_node_get_parent(
/******************************************************************** /********************************************************************
Get the first containing loop node (e.g. while_node_t or for_node_t) for the Get the first containing loop node (e.g. while_node_t or for_node_t) for the
given node, or NULL if the node is not within a loop. */ given node, or NULL if the node is not within a loop. */
UNIV_INTERN
que_node_t* que_node_t*
que_node_get_containing_loop_node( que_node_get_containing_loop_node(
/*==============================*/ /*==============================*/
...@@ -311,14 +311,14 @@ que_graph_is_select( ...@@ -311,14 +311,14 @@ que_graph_is_select(
que_t* graph); /* in: graph */ que_t* graph); /* in: graph */
/************************************************************************** /**************************************************************************
Prints info of an SQL query graph node. */ Prints info of an SQL query graph node. */
UNIV_INTERN
void void
que_node_print_info( que_node_print_info(
/*================*/ /*================*/
que_node_t* node); /* in: query graph node */ que_node_t* node); /* in: query graph node */
/************************************************************************* /*************************************************************************
Evaluate the given SQL */ Evaluate the given SQL */
UNIV_INTERN
ulint ulint
que_eval_sql( que_eval_sql(
/*=========*/ /*=========*/
......
...@@ -20,7 +20,7 @@ Created 2/16/1997 Heikki Tuuri ...@@ -20,7 +20,7 @@ Created 2/16/1997 Heikki Tuuri
/************************************************************************* /*************************************************************************
Opens a read view where exactly the transactions serialized before this Opens a read view where exactly the transactions serialized before this
point in time are seen in the view. */ point in time are seen in the view. */
UNIV_INTERN
read_view_t* read_view_t*
read_view_open_now( read_view_open_now(
/*===============*/ /*===============*/
...@@ -33,7 +33,7 @@ read_view_open_now( ...@@ -33,7 +33,7 @@ read_view_open_now(
/************************************************************************* /*************************************************************************
Makes a copy of the oldest existing read view, or opens a new. The view Makes a copy of the oldest existing read view, or opens a new. The view
must be closed with ..._close. */ must be closed with ..._close. */
UNIV_INTERN
read_view_t* read_view_t*
read_view_oldest_copy_or_open_new( read_view_oldest_copy_or_open_new(
/*==============================*/ /*==============================*/
...@@ -45,7 +45,7 @@ read_view_oldest_copy_or_open_new( ...@@ -45,7 +45,7 @@ read_view_oldest_copy_or_open_new(
allocated */ allocated */
/************************************************************************* /*************************************************************************
Closes a read view. */ Closes a read view. */
UNIV_INTERN
void void
read_view_close( read_view_close(
/*============*/ /*============*/
...@@ -53,7 +53,7 @@ read_view_close( ...@@ -53,7 +53,7 @@ read_view_close(
/************************************************************************* /*************************************************************************
Closes a consistent read view for MySQL. This function is called at an SQL Closes a consistent read view for MySQL. This function is called at an SQL
statement end if the trx isolation level is <= TRX_ISO_READ_COMMITTED. */ statement end if the trx isolation level is <= TRX_ISO_READ_COMMITTED. */
UNIV_INTERN
void void
read_view_close_for_mysql( read_view_close_for_mysql(
/*======================*/ /*======================*/
...@@ -69,7 +69,7 @@ read_view_sees_trx_id( ...@@ -69,7 +69,7 @@ read_view_sees_trx_id(
dulint trx_id);/* in: trx id */ dulint trx_id);/* in: trx id */
/************************************************************************* /*************************************************************************
Prints a read view to stderr. */ Prints a read view to stderr. */
UNIV_INTERN
void void
read_view_print( read_view_print(
/*============*/ /*============*/
...@@ -78,7 +78,7 @@ read_view_print( ...@@ -78,7 +78,7 @@ read_view_print(
Create a consistent cursor view for mysql to be used in cursors. In this Create a consistent cursor view for mysql to be used in cursors. In this
consistent read view modifications done by the creating transaction or future consistent read view modifications done by the creating transaction or future
transactions are not visible. */ transactions are not visible. */
UNIV_INTERN
cursor_view_t* cursor_view_t*
read_cursor_view_create_for_mysql( read_cursor_view_create_for_mysql(
/*==============================*/ /*==============================*/
...@@ -86,7 +86,7 @@ read_cursor_view_create_for_mysql( ...@@ -86,7 +86,7 @@ read_cursor_view_create_for_mysql(
/************************************************************************* /*************************************************************************
Close a given consistent cursor view for mysql and restore global read view Close a given consistent cursor view for mysql and restore global read view
back to a transaction read view. */ back to a transaction read view. */
UNIV_INTERN
void void
read_cursor_view_close_for_mysql( read_cursor_view_close_for_mysql(
/*=============================*/ /*=============================*/
...@@ -96,7 +96,7 @@ read_cursor_view_close_for_mysql( ...@@ -96,7 +96,7 @@ read_cursor_view_close_for_mysql(
This function sets a given consistent cursor view to a transaction This function sets a given consistent cursor view to a transaction
read view if given consistent cursor view is not NULL. Otherwise, function read view if given consistent cursor view is not NULL. Otherwise, function
restores a global read view to a transaction read view. */ restores a global read view to a transaction read view. */
UNIV_INTERN
void void
read_cursor_set_for_mysql( read_cursor_set_for_mysql(
/*======================*/ /*======================*/
......
...@@ -17,7 +17,7 @@ Created 7/1/1994 Heikki Tuuri ...@@ -17,7 +17,7 @@ Created 7/1/1994 Heikki Tuuri
/***************************************************************** /*****************************************************************
Returns TRUE if two columns are equal for comparison purposes. */ Returns TRUE if two columns are equal for comparison purposes. */
UNIV_INTERN
ibool ibool
cmp_cols_are_equal( cmp_cols_are_equal(
/*===============*/ /*===============*/
...@@ -47,7 +47,7 @@ cmp_data_data( ...@@ -47,7 +47,7 @@ cmp_data_data(
/***************************************************************** /*****************************************************************
This function is used to compare two data fields for which we know the This function is used to compare two data fields for which we know the
data type. */ data type. */
UNIV_INTERN
int int
cmp_data_data_slow( cmp_data_data_slow(
/*===============*/ /*===============*/
...@@ -80,7 +80,7 @@ have either m >= n fields, or it must differ from dtuple in some of ...@@ -80,7 +80,7 @@ have either m >= n fields, or it must differ from dtuple in some of
the m fields rec has. If rec has an externally stored field we do not the m fields rec has. If rec has an externally stored field we do not
compare it but return with value 0 if such a comparison should be compare it but return with value 0 if such a comparison should be
made. */ made. */
UNIV_INTERN
int int
cmp_dtuple_rec_with_match( cmp_dtuple_rec_with_match(
/*======================*/ /*======================*/
...@@ -104,7 +104,7 @@ cmp_dtuple_rec_with_match( ...@@ -104,7 +104,7 @@ cmp_dtuple_rec_with_match(
value for current comparison */ value for current comparison */
/****************************************************************** /******************************************************************
Compares a data tuple to a physical record. */ Compares a data tuple to a physical record. */
UNIV_INTERN
int int
cmp_dtuple_rec( cmp_dtuple_rec(
/*===========*/ /*===========*/
...@@ -117,7 +117,7 @@ cmp_dtuple_rec( ...@@ -117,7 +117,7 @@ cmp_dtuple_rec(
/****************************************************************** /******************************************************************
Checks if a dtuple is a prefix of a record. The last field in dtuple Checks if a dtuple is a prefix of a record. The last field in dtuple
is allowed to be a prefix of the corresponding field in the record. */ is allowed to be a prefix of the corresponding field in the record. */
UNIV_INTERN
ibool ibool
cmp_dtuple_is_prefix_of_rec( cmp_dtuple_is_prefix_of_rec(
/*========================*/ /*========================*/
...@@ -129,7 +129,7 @@ cmp_dtuple_is_prefix_of_rec( ...@@ -129,7 +129,7 @@ cmp_dtuple_is_prefix_of_rec(
/***************************************************************** /*****************************************************************
Compare two physical records that contain the same number of columns, Compare two physical records that contain the same number of columns,
none of which are stored externally. */ none of which are stored externally. */
UNIV_INTERN
int int
cmp_rec_rec_simple( cmp_rec_rec_simple(
/*===============*/ /*===============*/
...@@ -145,7 +145,7 @@ cmp_rec_rec_simple( ...@@ -145,7 +145,7 @@ cmp_rec_rec_simple(
This function is used to compare two physical records. Only the common This function is used to compare two physical records. Only the common
first fields are compared, and if an externally stored field is first fields are compared, and if an externally stored field is
encountered, then 0 is returned. */ encountered, then 0 is returned. */
UNIV_INTERN
int int
cmp_rec_rec_with_match( cmp_rec_rec_with_match(
/*===================*/ /*===================*/
......
...@@ -315,7 +315,7 @@ rec_get_1byte_offs_flag( ...@@ -315,7 +315,7 @@ rec_get_1byte_offs_flag(
/********************************************************** /**********************************************************
Determine how many of the first n columns in a compact Determine how many of the first n columns in a compact
physical record are stored externally. */ physical record are stored externally. */
UNIV_INTERN
ulint ulint
rec_get_n_extern_new( rec_get_n_extern_new(
/*=================*/ /*=================*/
...@@ -327,7 +327,7 @@ rec_get_n_extern_new( ...@@ -327,7 +327,7 @@ rec_get_n_extern_new(
/********************************************************** /**********************************************************
The following function determines the offsets to each field The following function determines the offsets to each field
in the record. It can reuse a previously allocated array. */ in the record. It can reuse a previously allocated array. */
UNIV_INTERN
ulint* ulint*
rec_get_offsets_func( rec_get_offsets_func(
/*=================*/ /*=================*/
...@@ -352,7 +352,7 @@ rec_get_offsets_func( ...@@ -352,7 +352,7 @@ rec_get_offsets_func(
Determine the offset to each field in a leaf-page record Determine the offset to each field in a leaf-page record
in ROW_FORMAT=COMPACT. This is a special case of in ROW_FORMAT=COMPACT. This is a special case of
rec_init_offsets() and rec_get_offsets_func(). */ rec_init_offsets() and rec_get_offsets_func(). */
UNIV_INTERN
void void
rec_init_offsets_comp_ordinary( rec_init_offsets_comp_ordinary(
/*===========================*/ /*===========================*/
...@@ -369,7 +369,7 @@ rec_init_offsets_comp_ordinary( ...@@ -369,7 +369,7 @@ rec_init_offsets_comp_ordinary(
/********************************************************** /**********************************************************
The following function determines the offsets to each field The following function determines the offsets to each field
in the record. It can reuse a previously allocated array. */ in the record. It can reuse a previously allocated array. */
UNIV_INTERN
void void
rec_get_offsets_reverse( rec_get_offsets_reverse(
/*====================*/ /*====================*/
...@@ -413,7 +413,7 @@ rec_offs_make_valid( ...@@ -413,7 +413,7 @@ rec_offs_make_valid(
/**************************************************************** /****************************************************************
The following function is used to get the offset to the nth The following function is used to get the offset to the nth
data field in an old-style record. */ data field in an old-style record. */
UNIV_INTERN
ulint ulint
rec_get_nth_field_offs_old( rec_get_nth_field_offs_old(
/*=======================*/ /*=======================*/
...@@ -621,7 +621,7 @@ rec_copy( ...@@ -621,7 +621,7 @@ rec_copy(
/****************************************************************** /******************************************************************
Copies the first n fields of a physical record to a new physical record in Copies the first n fields of a physical record to a new physical record in
a buffer. */ a buffer. */
UNIV_INTERN
rec_t* rec_t*
rec_copy_prefix_to_buf( rec_copy_prefix_to_buf(
/*===================*/ /*===================*/
...@@ -652,7 +652,7 @@ rec_fold( ...@@ -652,7 +652,7 @@ rec_fold(
__attribute__((pure)); __attribute__((pure));
/************************************************************* /*************************************************************
Builds a ROW_FORMAT=COMPACT record out of a data tuple. */ Builds a ROW_FORMAT=COMPACT record out of a data tuple. */
UNIV_INTERN
void void
rec_convert_dtuple_to_rec_comp( rec_convert_dtuple_to_rec_comp(
/*===========================*/ /*===========================*/
...@@ -668,7 +668,7 @@ rec_convert_dtuple_to_rec_comp( ...@@ -668,7 +668,7 @@ rec_convert_dtuple_to_rec_comp(
/************************************************************* /*************************************************************
Builds a physical record out of a data tuple and Builds a physical record out of a data tuple and
stores it into the given buffer. */ stores it into the given buffer. */
UNIV_INTERN
rec_t* rec_t*
rec_convert_dtuple_to_rec( rec_convert_dtuple_to_rec(
/*======================*/ /*======================*/
...@@ -694,7 +694,7 @@ rec_get_converted_extra_size( ...@@ -694,7 +694,7 @@ rec_get_converted_extra_size(
__attribute__((const)); __attribute__((const));
/************************************************************** /**************************************************************
Determines the size of a data tuple in ROW_FORMAT=COMPACT. */ Determines the size of a data tuple in ROW_FORMAT=COMPACT. */
UNIV_INTERN
ulint ulint
rec_get_converted_size_comp( rec_get_converted_size_comp(
/*========================*/ /*========================*/
...@@ -721,7 +721,7 @@ rec_get_converted_size( ...@@ -721,7 +721,7 @@ rec_get_converted_size(
/****************************************************************** /******************************************************************
Copies the first n fields of a physical record to a data tuple. Copies the first n fields of a physical record to a data tuple.
The fields are copied to the memory heap. */ The fields are copied to the memory heap. */
UNIV_INTERN
void void
rec_copy_prefix_to_dtuple( rec_copy_prefix_to_dtuple(
/*======================*/ /*======================*/
...@@ -733,7 +733,7 @@ rec_copy_prefix_to_dtuple( ...@@ -733,7 +733,7 @@ rec_copy_prefix_to_dtuple(
mem_heap_t* heap); /* in: memory heap */ mem_heap_t* heap); /* in: memory heap */
/******************************************************************* /*******************************************************************
Validates the consistency of a physical record. */ Validates the consistency of a physical record. */
UNIV_INTERN
ibool ibool
rec_validate( rec_validate(
/*=========*/ /*=========*/
...@@ -742,7 +742,7 @@ rec_validate( ...@@ -742,7 +742,7 @@ rec_validate(
const ulint* offsets);/* in: array returned by rec_get_offsets() */ const ulint* offsets);/* in: array returned by rec_get_offsets() */
/******************************************************************* /*******************************************************************
Prints an old-style physical record. */ Prints an old-style physical record. */
UNIV_INTERN
void void
rec_print_old( rec_print_old(
/*==========*/ /*==========*/
...@@ -751,7 +751,7 @@ rec_print_old( ...@@ -751,7 +751,7 @@ rec_print_old(
/******************************************************************* /*******************************************************************
Prints a physical record in ROW_FORMAT=COMPACT. Ignores the Prints a physical record in ROW_FORMAT=COMPACT. Ignores the
record header. */ record header. */
UNIV_INTERN
void void
rec_print_comp( rec_print_comp(
/*===========*/ /*===========*/
...@@ -760,7 +760,7 @@ rec_print_comp( ...@@ -760,7 +760,7 @@ rec_print_comp(
const ulint* offsets);/* in: array returned by rec_get_offsets() */ const ulint* offsets);/* in: array returned by rec_get_offsets() */
/******************************************************************* /*******************************************************************
Prints a physical record. */ Prints a physical record. */
UNIV_INTERN
void void
rec_print_new( rec_print_new(
/*==========*/ /*==========*/
...@@ -769,7 +769,7 @@ rec_print_new( ...@@ -769,7 +769,7 @@ rec_print_new(
const ulint* offsets);/* in: array returned by rec_get_offsets() */ const ulint* offsets);/* in: array returned by rec_get_offsets() */
/******************************************************************* /*******************************************************************
Prints a physical record. */ Prints a physical record. */
UNIV_INTERN
void void
rec_print( rec_print(
/*======*/ /*======*/
......
...@@ -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(
/*===========*/ /*===========*/
......
...@@ -20,7 +20,7 @@ Created 4/20/1996 Heikki Tuuri ...@@ -20,7 +20,7 @@ Created 4/20/1996 Heikki Tuuri
Checks if foreign key constraint fails for an index entry. Sets shared locks Checks if foreign key constraint fails for an index entry. Sets shared locks
which lock either the success or the failure of the constraint. NOTE that which lock either the success or the failure of the constraint. NOTE that
the caller must have a shared latch on dict_foreign_key_check_lock. */ the caller must have a shared latch on dict_foreign_key_check_lock. */
UNIV_INTERN
ulint ulint
row_ins_check_foreign_constraint( row_ins_check_foreign_constraint(
/*=============================*/ /*=============================*/
...@@ -39,7 +39,7 @@ row_ins_check_foreign_constraint( ...@@ -39,7 +39,7 @@ row_ins_check_foreign_constraint(
que_thr_t* thr); /* in: query thread */ que_thr_t* thr); /* in: query thread */
/************************************************************************* /*************************************************************************
Creates an insert node struct. */ Creates an insert node struct. */
UNIV_INTERN
ins_node_t* ins_node_t*
ins_node_create( ins_node_create(
/*============*/ /*============*/
...@@ -51,7 +51,7 @@ ins_node_create( ...@@ -51,7 +51,7 @@ ins_node_create(
Sets a new row to insert for an INS_DIRECT node. This function is only used Sets a new row to insert for an INS_DIRECT node. This function is only used
if we have constructed the row separately, which is a rare case; this if we have constructed the row separately, which is a rare case; this
function is quite slow. */ function is quite slow. */
UNIV_INTERN
void void
ins_node_set_new_row( ins_node_set_new_row(
/*=================*/ /*=================*/
...@@ -62,7 +62,7 @@ Inserts an index entry to index. Tries first optimistic, then pessimistic ...@@ -62,7 +62,7 @@ Inserts an index entry to index. Tries first optimistic, then pessimistic
descent down the tree. If the entry matches enough to a delete marked record, descent down the tree. If the entry matches enough to a delete marked record,
performs the insert by updating or delete unmarking the delete marked performs the insert by updating or delete unmarking the delete marked
record. */ record. */
UNIV_INTERN
ulint ulint
row_ins_index_entry( row_ins_index_entry(
/*================*/ /*================*/
...@@ -76,7 +76,7 @@ row_ins_index_entry( ...@@ -76,7 +76,7 @@ row_ins_index_entry(
/*************************************************************** /***************************************************************
Inserts a row to a table. This is a high-level function used in Inserts a row to a table. This is a high-level function used in
SQL execution graphs. */ SQL execution graphs. */
UNIV_INTERN
que_thr_t* que_thr_t*
row_ins_step( row_ins_step(
/*=========*/ /*=========*/
...@@ -84,7 +84,7 @@ row_ins_step( ...@@ -84,7 +84,7 @@ row_ins_step(
que_thr_t* thr); /* in: query thread */ que_thr_t* thr); /* in: query thread */
/*************************************************************** /***************************************************************
Creates an entry template for each index of a table. */ Creates an entry template for each index of a table. */
UNIV_INTERN
void void
ins_node_create_entry_list( ins_node_create_entry_list(
/*=======================*/ /*=======================*/
......
...@@ -45,7 +45,7 @@ typedef struct merge_index_def_struct merge_index_def_t; ...@@ -45,7 +45,7 @@ typedef struct merge_index_def_struct merge_index_def_t;
/************************************************************************* /*************************************************************************
Sets an exclusive lock on a table, for the duration of creating indexes. */ Sets an exclusive lock on a table, for the duration of creating indexes. */
UNIV_INTERN
ulint ulint
row_merge_lock_table( row_merge_lock_table(
/*=================*/ /*=================*/
...@@ -55,7 +55,7 @@ row_merge_lock_table( ...@@ -55,7 +55,7 @@ row_merge_lock_table(
enum lock_mode mode); /* in: LOCK_X or LOCK_S */ enum lock_mode mode); /* in: LOCK_X or LOCK_S */
/************************************************************************* /*************************************************************************
Drop an index from the InnoDB system tables. */ Drop an index from the InnoDB system tables. */
UNIV_INTERN
void void
row_merge_drop_index( row_merge_drop_index(
/*=================*/ /*=================*/
...@@ -65,7 +65,7 @@ row_merge_drop_index( ...@@ -65,7 +65,7 @@ row_merge_drop_index(
/************************************************************************* /*************************************************************************
Drop those indexes which were created before an error occurred Drop those indexes which were created before an error occurred
when building an index. */ when building an index. */
UNIV_INTERN
void void
row_merge_drop_indexes( row_merge_drop_indexes(
/*===================*/ /*===================*/
...@@ -75,13 +75,13 @@ row_merge_drop_indexes( ...@@ -75,13 +75,13 @@ row_merge_drop_indexes(
ulint num_created); /* in: number of elements in index[] */ ulint num_created); /* in: number of elements in index[] */
/************************************************************************* /*************************************************************************
Drop all partially created indexes during crash recovery. */ Drop all partially created indexes during crash recovery. */
UNIV_INTERN
void void
row_merge_drop_temp_indexes(void); row_merge_drop_temp_indexes(void);
/*=============================*/ /*=============================*/
/************************************************************************* /*************************************************************************
Rename the tables in the data dictionary. */ Rename the tables in the data dictionary. */
UNIV_INTERN
ulint ulint
row_merge_rename_tables( row_merge_rename_tables(
/*====================*/ /*====================*/
...@@ -96,7 +96,7 @@ row_merge_rename_tables( ...@@ -96,7 +96,7 @@ row_merge_rename_tables(
/************************************************************************* /*************************************************************************
Create a temporary table for creating a primary key, using the definition Create a temporary table for creating a primary key, using the definition
of an existing table. */ of an existing table. */
UNIV_INTERN
dict_table_t* dict_table_t*
row_merge_create_temporary_table( row_merge_create_temporary_table(
/*=============================*/ /*=============================*/
...@@ -110,7 +110,7 @@ row_merge_create_temporary_table( ...@@ -110,7 +110,7 @@ row_merge_create_temporary_table(
(sets error_state) */ (sets error_state) */
/************************************************************************* /*************************************************************************
Rename the temporary indexes in the dictionary to permanent ones. */ Rename the temporary indexes in the dictionary to permanent ones. */
UNIV_INTERN
ulint ulint
row_merge_rename_indexes( row_merge_rename_indexes(
/*=====================*/ /*=====================*/
...@@ -119,7 +119,7 @@ row_merge_rename_indexes( ...@@ -119,7 +119,7 @@ row_merge_rename_indexes(
dict_table_t* table); /* in/out: table with new indexes */ dict_table_t* table); /* in/out: table with new indexes */
/************************************************************************* /*************************************************************************
Create the index and load in to the dictionary. */ Create the index and load in to the dictionary. */
UNIV_INTERN
dict_index_t* dict_index_t*
row_merge_create_index( row_merge_create_index(
/*===================*/ /*===================*/
...@@ -131,7 +131,7 @@ row_merge_create_index( ...@@ -131,7 +131,7 @@ row_merge_create_index(
#ifdef ROW_MERGE_IS_INDEX_USABLE #ifdef ROW_MERGE_IS_INDEX_USABLE
/************************************************************************* /*************************************************************************
Check if a transaction can use an index. */ Check if a transaction can use an index. */
UNIV_INTERN
ibool ibool
row_merge_is_index_usable( row_merge_is_index_usable(
/*======================*/ /*======================*/
...@@ -143,7 +143,7 @@ row_merge_is_index_usable( ...@@ -143,7 +143,7 @@ row_merge_is_index_usable(
/************************************************************************* /*************************************************************************
If there are views that refer to the old table name then we "attach" to If there are views that refer to the old table name then we "attach" to
the new instance of the table else we drop it immediately. */ the new instance of the table else we drop it immediately. */
UNIV_INTERN
ulint ulint
row_merge_drop_table( row_merge_drop_table(
/*=================*/ /*=================*/
...@@ -155,7 +155,7 @@ row_merge_drop_table( ...@@ -155,7 +155,7 @@ row_merge_drop_table(
Build indexes on a table by reading a clustered index, Build indexes on a table by reading a clustered index,
creating a temporary file containing index entries, merge sorting creating a temporary file containing index entries, merge sorting
these index entries and inserting sorted index entries to indexes. */ these index entries and inserting sorted index entries to indexes. */
UNIV_INTERN
ulint ulint
row_merge_build_indexes( row_merge_build_indexes(
/*====================*/ /*====================*/
......
...@@ -25,7 +25,7 @@ typedef struct row_prebuilt_struct row_prebuilt_t; ...@@ -25,7 +25,7 @@ typedef struct row_prebuilt_struct row_prebuilt_t;
/*********************************************************************** /***********************************************************************
Frees the blob heap in prebuilt when no longer needed. */ Frees the blob heap in prebuilt when no longer needed. */
UNIV_INTERN
void void
row_mysql_prebuilt_free_blob_heap( row_mysql_prebuilt_free_blob_heap(
/*==============================*/ /*==============================*/
...@@ -34,7 +34,7 @@ row_mysql_prebuilt_free_blob_heap( ...@@ -34,7 +34,7 @@ row_mysql_prebuilt_free_blob_heap(
/*********************************************************************** /***********************************************************************
Stores a >= 5.0.3 format true VARCHAR length to dest, in the MySQL row Stores a >= 5.0.3 format true VARCHAR length to dest, in the MySQL row
format. */ format. */
UNIV_INTERN
byte* byte*
row_mysql_store_true_var_len( row_mysql_store_true_var_len(
/*=========================*/ /*=========================*/
...@@ -59,7 +59,7 @@ row_mysql_read_true_varchar( ...@@ -59,7 +59,7 @@ row_mysql_read_true_varchar(
or 2 bytes */ or 2 bytes */
/*********************************************************************** /***********************************************************************
Stores a reference to a BLOB in the MySQL format. */ Stores a reference to a BLOB in the MySQL format. */
UNIV_INTERN
void void
row_mysql_store_blob_ref( row_mysql_store_blob_ref(
/*=====================*/ /*=====================*/
...@@ -90,7 +90,7 @@ row_mysql_read_blob_ref( ...@@ -90,7 +90,7 @@ row_mysql_read_blob_ref(
Stores a non-SQL-NULL field given in the MySQL format in the InnoDB format. Stores a non-SQL-NULL field given in the MySQL format in the InnoDB format.
The counterpart of this function is row_sel_field_store_in_mysql_format() in The counterpart of this function is row_sel_field_store_in_mysql_format() in
row0sel.c. */ row0sel.c. */
UNIV_INTERN
byte* byte*
row_mysql_store_col_in_innobase_format( row_mysql_store_col_in_innobase_format(
/*===================================*/ /*===================================*/
...@@ -123,7 +123,7 @@ row_mysql_store_col_in_innobase_format( ...@@ -123,7 +123,7 @@ row_mysql_store_col_in_innobase_format(
ulint comp); /* in: nonzero=compact format */ ulint comp); /* in: nonzero=compact format */
/******************************************************************** /********************************************************************
Handles user errors and lock waits detected by the database engine. */ Handles user errors and lock waits detected by the database engine. */
UNIV_INTERN
ibool ibool
row_mysql_handle_errors( row_mysql_handle_errors(
/*====================*/ /*====================*/
...@@ -137,7 +137,7 @@ row_mysql_handle_errors( ...@@ -137,7 +137,7 @@ row_mysql_handle_errors(
trx_savept_t* savept);/* in: savepoint */ trx_savept_t* savept);/* in: savepoint */
/************************************************************************ /************************************************************************
Create a prebuilt struct for a MySQL table handle. */ Create a prebuilt struct for a MySQL table handle. */
UNIV_INTERN
row_prebuilt_t* row_prebuilt_t*
row_create_prebuilt( row_create_prebuilt(
/*================*/ /*================*/
...@@ -145,7 +145,7 @@ row_create_prebuilt( ...@@ -145,7 +145,7 @@ row_create_prebuilt(
dict_table_t* table); /* in: Innobase table handle */ dict_table_t* table); /* in: Innobase table handle */
/************************************************************************ /************************************************************************
Free a prebuilt struct for a MySQL table handle. */ Free a prebuilt struct for a MySQL table handle. */
UNIV_INTERN
void void
row_prebuilt_free( row_prebuilt_free(
/*==============*/ /*==============*/
...@@ -154,7 +154,7 @@ row_prebuilt_free( ...@@ -154,7 +154,7 @@ row_prebuilt_free(
/************************************************************************* /*************************************************************************
Updates the transaction pointers in query graphs stored in the prebuilt Updates the transaction pointers in query graphs stored in the prebuilt
struct. */ struct. */
UNIV_INTERN
void void
row_update_prebuilt_trx( row_update_prebuilt_trx(
/*====================*/ /*====================*/
...@@ -164,7 +164,7 @@ row_update_prebuilt_trx( ...@@ -164,7 +164,7 @@ row_update_prebuilt_trx(
trx_t* trx); /* in: transaction handle */ trx_t* trx); /* in: transaction handle */
/************************************************************************* /*************************************************************************
Unlocks an AUTO_INC type lock possibly reserved by trx. */ Unlocks an AUTO_INC type lock possibly reserved by trx. */
UNIV_INTERN
void void
row_unlock_table_autoinc_for_mysql( row_unlock_table_autoinc_for_mysql(
/*===============================*/ /*===============================*/
...@@ -175,7 +175,7 @@ AUTO_INC lock gives exclusive access to the auto-inc counter of the ...@@ -175,7 +175,7 @@ AUTO_INC lock gives exclusive access to the auto-inc counter of the
table. The lock is reserved only for the duration of an SQL statement. table. The lock is reserved only for the duration of an SQL statement.
It is not compatible with another AUTO_INC or exclusive lock on the It is not compatible with another AUTO_INC or exclusive lock on the
table. */ table. */
UNIV_INTERN
int int
row_lock_table_autoinc_for_mysql( row_lock_table_autoinc_for_mysql(
/*=============================*/ /*=============================*/
...@@ -184,7 +184,7 @@ row_lock_table_autoinc_for_mysql( ...@@ -184,7 +184,7 @@ row_lock_table_autoinc_for_mysql(
table handle */ table handle */
/************************************************************************* /*************************************************************************
Sets a table lock on the table mentioned in prebuilt. */ Sets a table lock on the table mentioned in prebuilt. */
UNIV_INTERN
int int
row_lock_table_for_mysql( row_lock_table_for_mysql(
/*=====================*/ /*=====================*/
...@@ -200,7 +200,7 @@ row_lock_table_for_mysql( ...@@ -200,7 +200,7 @@ row_lock_table_for_mysql(
/************************************************************************* /*************************************************************************
Does an insert for MySQL. */ Does an insert for MySQL. */
UNIV_INTERN
int int
row_insert_for_mysql( row_insert_for_mysql(
/*=================*/ /*=================*/
...@@ -210,7 +210,7 @@ row_insert_for_mysql( ...@@ -210,7 +210,7 @@ row_insert_for_mysql(
handle */ handle */
/************************************************************************* /*************************************************************************
Builds a dummy query graph used in selects. */ Builds a dummy query graph used in selects. */
UNIV_INTERN
void void
row_prebuild_sel_graph( row_prebuild_sel_graph(
/*===================*/ /*===================*/
...@@ -220,7 +220,7 @@ row_prebuild_sel_graph( ...@@ -220,7 +220,7 @@ row_prebuild_sel_graph(
Gets pointer to a prebuilt update vector used in updates. If the update Gets pointer to a prebuilt update vector used in updates. If the update
graph has not yet been built in the prebuilt struct, then this function graph has not yet been built in the prebuilt struct, then this function
first builds it. */ first builds it. */
UNIV_INTERN
upd_t* upd_t*
row_get_prebuilt_update_vector( row_get_prebuilt_update_vector(
/*===========================*/ /*===========================*/
...@@ -230,7 +230,7 @@ row_get_prebuilt_update_vector( ...@@ -230,7 +230,7 @@ row_get_prebuilt_update_vector(
/************************************************************************* /*************************************************************************
Checks if a table is such that we automatically created a clustered Checks if a table is such that we automatically created a clustered
index on it (on row id). */ index on it (on row id). */
UNIV_INTERN
ibool ibool
row_table_got_default_clust_index( row_table_got_default_clust_index(
/*==============================*/ /*==============================*/
...@@ -238,14 +238,14 @@ row_table_got_default_clust_index( ...@@ -238,14 +238,14 @@ row_table_got_default_clust_index(
/************************************************************************* /*************************************************************************
Calculates the key number used inside MySQL for an Innobase index. We have Calculates the key number used inside MySQL for an Innobase index. We have
to take into account if we generated a default clustered index for the table */ to take into account if we generated a default clustered index for the table */
UNIV_INTERN
ulint ulint
row_get_mysql_key_number_for_index( row_get_mysql_key_number_for_index(
/*===============================*/ /*===============================*/
const dict_index_t* index); const dict_index_t* index);
/************************************************************************* /*************************************************************************
Does an update or delete of a row for MySQL. */ Does an update or delete of a row for MySQL. */
UNIV_INTERN
int int
row_update_for_mysql( row_update_for_mysql(
/*=================*/ /*=================*/
...@@ -265,7 +265,7 @@ in the case of an UPDATE or a DELETE statement, where the row lock is of the ...@@ -265,7 +265,7 @@ in the case of an UPDATE or a DELETE statement, where the row lock is of the
LOCK_X type. LOCK_X type.
Thus, this implements a 'mini-rollback' that releases the latest record Thus, this implements a 'mini-rollback' that releases the latest record
locks we set. */ locks we set. */
UNIV_INTERN
int int
row_unlock_for_mysql( row_unlock_for_mysql(
/*=================*/ /*=================*/
...@@ -279,7 +279,7 @@ row_unlock_for_mysql( ...@@ -279,7 +279,7 @@ row_unlock_for_mysql(
/************************************************************************* /*************************************************************************
Creates an query graph node of 'update' type to be used in the MySQL Creates an query graph node of 'update' type to be used in the MySQL
interface. */ interface. */
UNIV_INTERN
upd_node_t* upd_node_t*
row_create_update_node_for_mysql( row_create_update_node_for_mysql(
/*=============================*/ /*=============================*/
...@@ -288,7 +288,7 @@ row_create_update_node_for_mysql( ...@@ -288,7 +288,7 @@ row_create_update_node_for_mysql(
mem_heap_t* heap); /* in: mem heap from which allocated */ mem_heap_t* heap); /* in: mem heap from which allocated */
/************************************************************************** /**************************************************************************
Does a cascaded delete or set null in a foreign key operation. */ Does a cascaded delete or set null in a foreign key operation. */
UNIV_INTERN
ulint ulint
row_update_cascade_for_mysql( row_update_cascade_for_mysql(
/*=========================*/ /*=========================*/
...@@ -300,14 +300,14 @@ row_update_cascade_for_mysql( ...@@ -300,14 +300,14 @@ row_update_cascade_for_mysql(
/************************************************************************* /*************************************************************************
Locks the data dictionary exclusively for performing a table create or other Locks the data dictionary exclusively for performing a table create or other
data dictionary modification operation. */ data dictionary modification operation. */
UNIV_INTERN
void void
row_mysql_lock_data_dictionary( row_mysql_lock_data_dictionary(
/*===========================*/ /*===========================*/
trx_t* trx); /* in: transaction */ trx_t* trx); /* in: transaction */
/************************************************************************* /*************************************************************************
Unlocks the data dictionary exclusive lock. */ Unlocks the data dictionary exclusive lock. */
UNIV_INTERN
void void
row_mysql_unlock_data_dictionary( row_mysql_unlock_data_dictionary(
/*=============================*/ /*=============================*/
...@@ -315,14 +315,14 @@ row_mysql_unlock_data_dictionary( ...@@ -315,14 +315,14 @@ row_mysql_unlock_data_dictionary(
/************************************************************************* /*************************************************************************
Locks the data dictionary in shared mode from modifications, for performing Locks the data dictionary in shared mode from modifications, for performing
foreign key check, rollback, or other operation invisible to MySQL. */ foreign key check, rollback, or other operation invisible to MySQL. */
UNIV_INTERN
void void
row_mysql_freeze_data_dictionary( row_mysql_freeze_data_dictionary(
/*=============================*/ /*=============================*/
trx_t* trx); /* in: transaction */ trx_t* trx); /* in: transaction */
/************************************************************************* /*************************************************************************
Unlocks the data dictionary shared lock. */ Unlocks the data dictionary shared lock. */
UNIV_INTERN
void void
row_mysql_unfreeze_data_dictionary( row_mysql_unfreeze_data_dictionary(
/*===============================*/ /*===============================*/
...@@ -334,7 +334,7 @@ one of "innodb_monitor", "innodb_lock_monitor", "innodb_tablespace_monitor", ...@@ -334,7 +334,7 @@ one of "innodb_monitor", "innodb_lock_monitor", "innodb_tablespace_monitor",
"innodb_table_monitor", then this will also start the printing of monitor "innodb_table_monitor", then this will also start the printing of monitor
output by the master thread. If the table name ends in "innodb_mem_validate", output by the master thread. If the table name ends in "innodb_mem_validate",
InnoDB will try to invoke mem_validate(). */ InnoDB will try to invoke mem_validate(). */
UNIV_INTERN
int int
row_create_table_for_mysql( row_create_table_for_mysql(
/*=======================*/ /*=======================*/
...@@ -345,7 +345,7 @@ row_create_table_for_mysql( ...@@ -345,7 +345,7 @@ row_create_table_for_mysql(
Does an index creation operation for MySQL. TODO: currently failure Does an index creation operation for MySQL. TODO: currently failure
to create an index results in dropping the whole table! This is no problem to create an index results in dropping the whole table! This is no problem
currently as all indexes must be created at the same time as the table. */ currently as all indexes must be created at the same time as the table. */
UNIV_INTERN
int int
row_create_index_for_mysql( row_create_index_for_mysql(
/*=======================*/ /*=======================*/
...@@ -365,7 +365,7 @@ should be called after the indexes for a table have been created. ...@@ -365,7 +365,7 @@ should be called after the indexes for a table have been created.
Each foreign key constraint must be accompanied with indexes in Each foreign key constraint must be accompanied with indexes in
bot participating tables. The indexes are allowed to contain more bot participating tables. The indexes are allowed to contain more
fields than mentioned in the constraint. */ fields than mentioned in the constraint. */
UNIV_INTERN
int int
row_table_add_foreign_constraints( row_table_add_foreign_constraints(
/*==============================*/ /*==============================*/
...@@ -387,7 +387,7 @@ row_table_add_foreign_constraints( ...@@ -387,7 +387,7 @@ row_table_add_foreign_constraints(
The master thread in srv0srv.c calls this regularly to drop tables which The master thread in srv0srv.c calls this regularly to drop tables which
we must drop in background after queries to them have ended. Such lazy we must drop in background after queries to them have ended. Such lazy
dropping of tables is needed in ALTER TABLE on Unix. */ dropping of tables is needed in ALTER TABLE on Unix. */
UNIV_INTERN
ulint ulint
row_drop_tables_for_mysql_in_background(void); row_drop_tables_for_mysql_in_background(void);
/*=========================================*/ /*=========================================*/
...@@ -396,14 +396,14 @@ row_drop_tables_for_mysql_in_background(void); ...@@ -396,14 +396,14 @@ row_drop_tables_for_mysql_in_background(void);
/************************************************************************* /*************************************************************************
Get the background drop list length. NOTE: the caller must own the kernel Get the background drop list length. NOTE: the caller must own the kernel
mutex! */ mutex! */
UNIV_INTERN
ulint ulint
row_get_background_drop_list_len_low(void); row_get_background_drop_list_len_low(void);
/*======================================*/ /*======================================*/
/* out: how many tables in list */ /* out: how many tables in list */
/************************************************************************* /*************************************************************************
Truncates a table for MySQL. */ Truncates a table for MySQL. */
UNIV_INTERN
int int
row_truncate_table_for_mysql( row_truncate_table_for_mysql(
/*=========================*/ /*=========================*/
...@@ -415,7 +415,7 @@ Drops a table for MySQL. If the name of the dropped table ends in ...@@ -415,7 +415,7 @@ Drops a table for MySQL. If the name of the dropped table ends in
one of "innodb_monitor", "innodb_lock_monitor", "innodb_tablespace_monitor", one of "innodb_monitor", "innodb_lock_monitor", "innodb_tablespace_monitor",
"innodb_table_monitor", then this will also stop the printing of monitor "innodb_table_monitor", then this will also stop the printing of monitor
output by the master thread. */ output by the master thread. */
UNIV_INTERN
int int
row_drop_table_for_mysql( row_drop_table_for_mysql(
/*=====================*/ /*=====================*/
...@@ -430,7 +430,7 @@ name of the dropped table ends in one of "innodb_monitor", ...@@ -430,7 +430,7 @@ name of the dropped table ends in one of "innodb_monitor",
"innodb_lock_monitor", "innodb_tablespace_monitor", "innodb_lock_monitor", "innodb_tablespace_monitor",
"innodb_table_monitor", then this will also stop the printing of "innodb_table_monitor", then this will also stop the printing of
monitor output by the master thread. */ monitor output by the master thread. */
UNIV_INTERN
int int
row_drop_table_for_mysql_no_commit( row_drop_table_for_mysql_no_commit(
/*===============================*/ /*===============================*/
...@@ -442,7 +442,7 @@ row_drop_table_for_mysql_no_commit( ...@@ -442,7 +442,7 @@ row_drop_table_for_mysql_no_commit(
Discards the tablespace of a table which stored in an .ibd file. Discarding Discards the tablespace of a table which stored in an .ibd file. Discarding
means that this function deletes the .ibd file and assigns a new table id for means that this function deletes the .ibd file and assigns a new table id for
the table. Also the flag table->ibd_file_missing is set TRUE. */ the table. Also the flag table->ibd_file_missing is set TRUE. */
UNIV_INTERN
int int
row_discard_tablespace_for_mysql( row_discard_tablespace_for_mysql(
/*=============================*/ /*=============================*/
...@@ -452,7 +452,7 @@ row_discard_tablespace_for_mysql( ...@@ -452,7 +452,7 @@ row_discard_tablespace_for_mysql(
/********************************************************************* /*********************************************************************
Imports a tablespace. The space id in the .ibd file must match the space id Imports a tablespace. The space id in the .ibd file must match the space id
of the table in the data dictionary. */ of the table in the data dictionary. */
UNIV_INTERN
int int
row_import_tablespace_for_mysql( row_import_tablespace_for_mysql(
/*============================*/ /*============================*/
...@@ -461,7 +461,7 @@ row_import_tablespace_for_mysql( ...@@ -461,7 +461,7 @@ row_import_tablespace_for_mysql(
trx_t* trx); /* in: transaction handle */ trx_t* trx); /* in: transaction handle */
/************************************************************************* /*************************************************************************
Drops a database for MySQL. */ Drops a database for MySQL. */
UNIV_INTERN
int int
row_drop_database_for_mysql( row_drop_database_for_mysql(
/*========================*/ /*========================*/
...@@ -470,7 +470,7 @@ row_drop_database_for_mysql( ...@@ -470,7 +470,7 @@ row_drop_database_for_mysql(
trx_t* trx); /* in: transaction handle */ trx_t* trx); /* in: transaction handle */
/************************************************************************* /*************************************************************************
Renames a table for MySQL. */ Renames a table for MySQL. */
UNIV_INTERN
ulint ulint
row_rename_table_for_mysql( row_rename_table_for_mysql(
/*=======================*/ /*=======================*/
...@@ -481,7 +481,7 @@ row_rename_table_for_mysql( ...@@ -481,7 +481,7 @@ row_rename_table_for_mysql(
ibool commit); /* in: if TRUE then commit trx */ ibool commit); /* in: if TRUE then commit trx */
/************************************************************************* /*************************************************************************
Checks a table for corruption. */ Checks a table for corruption. */
UNIV_INTERN
ulint ulint
row_check_table_for_mysql( row_check_table_for_mysql(
/*======================*/ /*======================*/
......
...@@ -20,7 +20,7 @@ Created 3/14/1997 Heikki Tuuri ...@@ -20,7 +20,7 @@ Created 3/14/1997 Heikki Tuuri
/************************************************************************ /************************************************************************
Creates a purge node to a query graph. */ Creates a purge node to a query graph. */
UNIV_INTERN
purge_node_t* purge_node_t*
row_purge_node_create( row_purge_node_create(
/*==================*/ /*==================*/
...@@ -30,7 +30,7 @@ row_purge_node_create( ...@@ -30,7 +30,7 @@ row_purge_node_create(
/*************************************************************** /***************************************************************
Does the purge operation for a single undo log record. This is a high-level Does the purge operation for a single undo log record. This is a high-level
function used in an SQL execution graph. */ function used in an SQL execution graph. */
UNIV_INTERN
que_thr_t* que_thr_t*
row_purge_step( row_purge_step(
/*===========*/ /*===========*/
......
...@@ -23,7 +23,7 @@ Created 4/20/1996 Heikki Tuuri ...@@ -23,7 +23,7 @@ Created 4/20/1996 Heikki Tuuri
/************************************************************************* /*************************************************************************
Gets the offset of the trx id field, in bytes relative to the origin of Gets the offset of the trx id field, in bytes relative to the origin of
a clustered index record. */ a clustered index record. */
UNIV_INTERN
ulint ulint
row_get_trx_id_offset( row_get_trx_id_offset(
/*==================*/ /*==================*/
...@@ -54,7 +54,7 @@ row_get_rec_roll_ptr( ...@@ -54,7 +54,7 @@ row_get_rec_roll_ptr(
/********************************************************************* /*********************************************************************
When an insert or purge to a table is performed, this function builds When an insert or purge to a table is performed, this function builds
the entry to be inserted into or purged from an index on the table. */ the entry to be inserted into or purged from an index on the table. */
UNIV_INTERN
dtuple_t* dtuple_t*
row_build_index_entry( row_build_index_entry(
/*==================*/ /*==================*/
...@@ -73,7 +73,7 @@ row_build_index_entry( ...@@ -73,7 +73,7 @@ row_build_index_entry(
/*********************************************************************** /***********************************************************************
An inverse function to row_build_index_entry. Builds a row from a An inverse function to row_build_index_entry. Builds a row from a
record in a clustered index. */ record in a clustered index. */
UNIV_INTERN
dtuple_t* dtuple_t*
row_build( row_build(
/*======*/ /*======*/
...@@ -115,7 +115,7 @@ row_build( ...@@ -115,7 +115,7 @@ row_build(
the memory needed is allocated */ the memory needed is allocated */
/*********************************************************************** /***********************************************************************
Converts an index record to a typed data tuple. */ Converts an index record to a typed data tuple. */
UNIV_INTERN
dtuple_t* dtuple_t*
row_rec_to_index_entry_low( row_rec_to_index_entry_low(
/*=======================*/ /*=======================*/
...@@ -132,7 +132,7 @@ row_rec_to_index_entry_low( ...@@ -132,7 +132,7 @@ row_rec_to_index_entry_low(
/*********************************************************************** /***********************************************************************
Converts an index record to a typed data tuple. NOTE that externally Converts an index record to a typed data tuple. NOTE that externally
stored (often big) fields are NOT copied to heap. */ stored (often big) fields are NOT copied to heap. */
UNIV_INTERN
dtuple_t* dtuple_t*
row_rec_to_index_entry( row_rec_to_index_entry(
/*===================*/ /*===================*/
...@@ -162,7 +162,7 @@ row_rec_to_index_entry( ...@@ -162,7 +162,7 @@ row_rec_to_index_entry(
/*********************************************************************** /***********************************************************************
Builds from a secondary index record a row reference with which we can Builds from a secondary index record a row reference with which we can
search the clustered index record. */ search the clustered index record. */
UNIV_INTERN
dtuple_t* dtuple_t*
row_build_row_ref( row_build_row_ref(
/*==============*/ /*==============*/
...@@ -185,7 +185,7 @@ row_build_row_ref( ...@@ -185,7 +185,7 @@ row_build_row_ref(
/*********************************************************************** /***********************************************************************
Builds from a secondary index record a row reference with which we can Builds from a secondary index record a row reference with which we can
search the clustered index record. */ search the clustered index record. */
UNIV_INTERN
void void
row_build_row_ref_in_tuple( row_build_row_ref_in_tuple(
/*=======================*/ /*=======================*/
...@@ -206,7 +206,7 @@ row_build_row_ref_in_tuple( ...@@ -206,7 +206,7 @@ row_build_row_ref_in_tuple(
/*********************************************************************** /***********************************************************************
From a row build a row reference with which we can search the clustered From a row build a row reference with which we can search the clustered
index record. */ index record. */
UNIV_INTERN
void void
row_build_row_ref_from_row( row_build_row_ref_from_row(
/*=======================*/ /*=======================*/
...@@ -237,7 +237,7 @@ row_build_row_ref_fast( ...@@ -237,7 +237,7 @@ row_build_row_ref_fast(
/******************************************************************* /*******************************************************************
Searches the clustered index record for a row, if we have the row Searches the clustered index record for a row, if we have the row
reference. */ reference. */
UNIV_INTERN
ibool ibool
row_search_on_row_ref( row_search_on_row_ref(
/*==================*/ /*==================*/
...@@ -251,7 +251,7 @@ row_search_on_row_ref( ...@@ -251,7 +251,7 @@ row_search_on_row_ref(
/************************************************************************* /*************************************************************************
Fetches the clustered index record for a secondary index record. The latches Fetches the clustered index record for a secondary index record. The latches
on the secondary index record are preserved. */ on the secondary index record are preserved. */
UNIV_INTERN
rec_t* rec_t*
row_get_clust_rec( row_get_clust_rec(
/*==============*/ /*==============*/
...@@ -263,7 +263,7 @@ row_get_clust_rec( ...@@ -263,7 +263,7 @@ row_get_clust_rec(
mtr_t* mtr); /* in: mtr */ mtr_t* mtr); /* in: mtr */
/******************************************************************* /*******************************************************************
Searches an index record. */ Searches an index record. */
UNIV_INTERN
ibool ibool
row_search_index_entry( row_search_index_entry(
/*===================*/ /*===================*/
...@@ -294,7 +294,7 @@ Not more than "buf_size" bytes are written to "buf". ...@@ -294,7 +294,7 @@ Not more than "buf_size" bytes are written to "buf".
The result is always '\0'-terminated (provided buf_size > 0) and the The result is always '\0'-terminated (provided buf_size > 0) and the
number of bytes that were written to "buf" is returned (including the number of bytes that were written to "buf" is returned (including the
terminating '\0'). */ terminating '\0'). */
UNIV_INTERN
ulint ulint
row_raw_format( row_raw_format(
/*===========*/ /*===========*/
......
...@@ -23,7 +23,7 @@ Created 12/19/1997 Heikki Tuuri ...@@ -23,7 +23,7 @@ Created 12/19/1997 Heikki Tuuri
/************************************************************************* /*************************************************************************
Creates a select node struct. */ Creates a select node struct. */
UNIV_INTERN
sel_node_t* sel_node_t*
sel_node_create( sel_node_create(
/*============*/ /*============*/
...@@ -32,7 +32,7 @@ sel_node_create( ...@@ -32,7 +32,7 @@ sel_node_create(
/************************************************************************* /*************************************************************************
Frees the memory private to a select node when a query graph is freed, Frees the memory private to a select node when a query graph is freed,
does not free the heap where the node was originally created. */ does not free the heap where the node was originally created. */
UNIV_INTERN
void void
sel_node_free_private( sel_node_free_private(
/*==================*/ /*==================*/
...@@ -40,7 +40,7 @@ sel_node_free_private( ...@@ -40,7 +40,7 @@ sel_node_free_private(
/************************************************************************* /*************************************************************************
Frees a prefetch buffer for a column, including the dynamically allocated Frees a prefetch buffer for a column, including the dynamically allocated
memory for data stored there. */ memory for data stored there. */
UNIV_INTERN
void void
sel_col_prefetch_buf_free( sel_col_prefetch_buf_free(
/*======================*/ /*======================*/
...@@ -56,7 +56,7 @@ sel_node_get_nth_plan( ...@@ -56,7 +56,7 @@ sel_node_get_nth_plan(
/************************************************************************** /**************************************************************************
Performs a select step. This is a high-level function used in SQL execution Performs a select step. This is a high-level function used in SQL execution
graphs. */ graphs. */
UNIV_INTERN
que_thr_t* que_thr_t*
row_sel_step( row_sel_step(
/*=========*/ /*=========*/
...@@ -72,7 +72,7 @@ open_step( ...@@ -72,7 +72,7 @@ open_step(
que_thr_t* thr); /* in: query thread */ que_thr_t* thr); /* in: query thread */
/************************************************************************** /**************************************************************************
Performs a fetch for a cursor. */ Performs a fetch for a cursor. */
UNIV_INTERN
que_thr_t* que_thr_t*
fetch_step( fetch_step(
/*=======*/ /*=======*/
...@@ -80,7 +80,7 @@ fetch_step( ...@@ -80,7 +80,7 @@ fetch_step(
que_thr_t* thr); /* in: query thread */ que_thr_t* thr); /* in: query thread */
/******************************************************************** /********************************************************************
Sample callback function for fetch that prints each row.*/ Sample callback function for fetch that prints each row.*/
UNIV_INTERN
void* void*
row_fetch_print( row_fetch_print(
/*============*/ /*============*/
...@@ -91,7 +91,7 @@ row_fetch_print( ...@@ -91,7 +91,7 @@ row_fetch_print(
Callback function for fetch that stores an unsigned 4 byte integer to the Callback function for fetch that stores an unsigned 4 byte integer to the
location pointed. The column's type must be DATA_INT, DATA_UNSIGNED, length location pointed. The column's type must be DATA_INT, DATA_UNSIGNED, length
= 4. */ = 4. */
UNIV_INTERN
void* void*
row_fetch_store_uint4( row_fetch_store_uint4(
/*==================*/ /*==================*/
...@@ -100,7 +100,7 @@ row_fetch_store_uint4( ...@@ -100,7 +100,7 @@ row_fetch_store_uint4(
void* user_arg); /* in: data pointer */ void* user_arg); /* in: data pointer */
/*************************************************************** /***************************************************************
Prints a row in a select result. */ Prints a row in a select result. */
UNIV_INTERN
que_thr_t* que_thr_t*
row_printf_step( row_printf_step(
/*============*/ /*============*/
...@@ -112,7 +112,7 @@ field of the key value may be just a prefix of a fixed length field: hence ...@@ -112,7 +112,7 @@ field of the key value may be just a prefix of a fixed length field: hence
the parameter key_len. But currently we do not allow search keys where the the parameter key_len. But currently we do not allow search keys where the
last field is only a prefix of the full key field len and print a warning if last field is only a prefix of the full key field len and print a warning if
such appears. */ such appears. */
UNIV_INTERN
void void
row_sel_convert_mysql_key_to_innobase( row_sel_convert_mysql_key_to_innobase(
/*==================================*/ /*==================================*/
...@@ -133,7 +133,7 @@ MySQL. This function opens a cursor, and also implements fetch next ...@@ -133,7 +133,7 @@ MySQL. This function opens a cursor, and also implements fetch next
and fetch prev. NOTE that if we do a search with a full key value and fetch prev. NOTE that if we do a search with a full key value
from a unique index (ROW_SEL_EXACT), then we will not store the cursor from a unique index (ROW_SEL_EXACT), then we will not store the cursor
position and fetch next or fetch prev must not be tried to the cursor! */ position and fetch next or fetch prev must not be tried to the cursor! */
UNIV_INTERN
ulint ulint
row_search_for_mysql( row_search_for_mysql(
/*=================*/ /*=================*/
...@@ -162,7 +162,7 @@ row_search_for_mysql( ...@@ -162,7 +162,7 @@ row_search_for_mysql(
/*********************************************************************** /***********************************************************************
Checks if MySQL at the moment is allowed for this table to retrieve a Checks if MySQL at the moment is allowed for this table to retrieve a
consistent read result, or store it to the query cache. */ consistent read result, or store it to the query cache. */
UNIV_INTERN
ibool ibool
row_search_check_if_query_cache_permitted( row_search_check_if_query_cache_permitted(
/*======================================*/ /*======================================*/
...@@ -173,7 +173,7 @@ row_search_check_if_query_cache_permitted( ...@@ -173,7 +173,7 @@ row_search_check_if_query_cache_permitted(
'/' char, table name */ '/' char, table name */
/*********************************************************************** /***********************************************************************
Read the max AUTOINC value from an index. */ Read the max AUTOINC value from an index. */
UNIV_INTERN
ulint ulint
row_search_max_autoinc( row_search_max_autoinc(
/*===================*/ /*===================*/
......
...@@ -21,7 +21,7 @@ Created 2/25/1997 Heikki Tuuri ...@@ -21,7 +21,7 @@ Created 2/25/1997 Heikki Tuuri
Undoes a fresh insert of a row to a table. A fresh insert means that Undoes a fresh insert of a row to a table. A fresh insert means that
the same clustered index unique key did not have any record, even delete the same clustered index unique key did not have any record, even delete
marked, at the time of the insert. */ marked, at the time of the insert. */
UNIV_INTERN
ulint ulint
row_undo_ins( row_undo_ins(
/*=========*/ /*=========*/
......
...@@ -19,7 +19,7 @@ Created 2/27/1997 Heikki Tuuri ...@@ -19,7 +19,7 @@ Created 2/27/1997 Heikki Tuuri
/*************************************************************** /***************************************************************
Undoes a modify operation on a row of a table. */ Undoes a modify operation on a row of a table. */
UNIV_INTERN
ulint ulint
row_undo_mod( row_undo_mod(
/*=========*/ /*=========*/
......
...@@ -21,7 +21,7 @@ Created 1/8/1997 Heikki Tuuri ...@@ -21,7 +21,7 @@ Created 1/8/1997 Heikki Tuuri
/************************************************************************ /************************************************************************
Creates a row undo node to a query graph. */ Creates a row undo node to a query graph. */
UNIV_INTERN
undo_node_t* undo_node_t*
row_undo_node_create( row_undo_node_create(
/*=================*/ /*=================*/
...@@ -34,7 +34,7 @@ Looks for the clustered index record when node has the row reference. ...@@ -34,7 +34,7 @@ Looks for the clustered index record when node has the row reference.
The pcur in node is used in the search. If found, stores the row to node, The pcur in node is used in the search. If found, stores the row to node,
and stores the position of pcur, and detaches it. The pcur must be closed and stores the position of pcur, and detaches it. The pcur must be closed
by the caller in any case. */ by the caller in any case. */
UNIV_INTERN
ibool ibool
row_undo_search_clust_to_pcur( row_undo_search_clust_to_pcur(
/*==========================*/ /*==========================*/
...@@ -45,7 +45,7 @@ row_undo_search_clust_to_pcur( ...@@ -45,7 +45,7 @@ row_undo_search_clust_to_pcur(
/*************************************************************** /***************************************************************
Undoes a row operation in a table. This is a high-level function used Undoes a row operation in a table. This is a high-level function used
in SQL execution graphs. */ in SQL execution graphs. */
UNIV_INTERN
que_thr_t* que_thr_t*
row_undo_step( row_undo_step(
/*==========*/ /*==========*/
......
...@@ -64,7 +64,7 @@ upd_field_set_field_no( ...@@ -64,7 +64,7 @@ upd_field_set_field_no(
/************************************************************************* /*************************************************************************
Writes into the redo log the values of trx id and roll ptr and enough info Writes into the redo log the values of trx id and roll ptr and enough info
to determine their positions within a clustered index record. */ to determine their positions within a clustered index record. */
UNIV_INTERN
byte* byte*
row_upd_write_sys_vals_to_log( row_upd_write_sys_vals_to_log(
/*==========================*/ /*==========================*/
...@@ -91,7 +91,7 @@ row_upd_rec_sys_fields( ...@@ -91,7 +91,7 @@ row_upd_rec_sys_fields(
dulint roll_ptr);/* in: roll ptr of the undo log record */ dulint roll_ptr);/* in: roll ptr of the undo log record */
/************************************************************************* /*************************************************************************
Sets the trx id or roll ptr field of a clustered index entry. */ Sets the trx id or roll ptr field of a clustered index entry. */
UNIV_INTERN
void void
row_upd_index_entry_sys_field( row_upd_index_entry_sys_field(
/*==========================*/ /*==========================*/
...@@ -104,7 +104,7 @@ row_upd_index_entry_sys_field( ...@@ -104,7 +104,7 @@ row_upd_index_entry_sys_field(
dulint val); /* in: value to write */ dulint val); /* in: value to write */
/************************************************************************* /*************************************************************************
Creates an update node for a query graph. */ Creates an update node for a query graph. */
UNIV_INTERN
upd_node_t* upd_node_t*
upd_node_create( upd_node_create(
/*============*/ /*============*/
...@@ -112,7 +112,7 @@ upd_node_create( ...@@ -112,7 +112,7 @@ upd_node_create(
mem_heap_t* heap); /* in: mem heap where created */ mem_heap_t* heap); /* in: mem heap where created */
/*************************************************************** /***************************************************************
Writes to the redo log the new values of the fields occurring in the index. */ Writes to the redo log the new values of the fields occurring in the index. */
UNIV_INTERN
void void
row_upd_index_write_log( row_upd_index_write_log(
/*====================*/ /*====================*/
...@@ -125,7 +125,7 @@ row_upd_index_write_log( ...@@ -125,7 +125,7 @@ row_upd_index_write_log(
/*************************************************************** /***************************************************************
Returns TRUE if row update changes size of some field in index or if some Returns TRUE if row update changes size of some field in index or if some
field to be updated is stored externally in rec or update. */ field to be updated is stored externally in rec or update. */
UNIV_INTERN
ibool ibool
row_upd_changes_field_size_or_external( row_upd_changes_field_size_or_external(
/*===================================*/ /*===================================*/
...@@ -138,7 +138,7 @@ row_upd_changes_field_size_or_external( ...@@ -138,7 +138,7 @@ row_upd_changes_field_size_or_external(
/*************************************************************** /***************************************************************
Replaces the new column values stored in the update vector to the record Replaces the new column values stored in the update vector to the record
given. No field size changes are allowed. */ given. No field size changes are allowed. */
UNIV_INTERN
void void
row_upd_rec_in_place( row_upd_rec_in_place(
/*=================*/ /*=================*/
...@@ -152,7 +152,7 @@ row_upd_rec_in_place( ...@@ -152,7 +152,7 @@ row_upd_rec_in_place(
Builds an update vector from those fields which in a secondary index entry Builds an update vector from those fields which in a secondary index entry
differ from a record that has the equal ordering fields. NOTE: we compare differ from a record that has the equal ordering fields. NOTE: we compare
the fields as binary strings! */ the fields as binary strings! */
UNIV_INTERN
upd_t* upd_t*
row_upd_build_sec_rec_difference_binary( row_upd_build_sec_rec_difference_binary(
/*====================================*/ /*====================================*/
...@@ -167,7 +167,7 @@ row_upd_build_sec_rec_difference_binary( ...@@ -167,7 +167,7 @@ row_upd_build_sec_rec_difference_binary(
Builds an update vector from those fields, excluding the roll ptr and Builds an update vector from those fields, excluding the roll ptr and
trx id fields, which in an index entry differ from a record that has trx id fields, which in an index entry differ from a record that has
the equal ordering fields. NOTE: we compare the fields as binary strings! */ the equal ordering fields. NOTE: we compare the fields as binary strings! */
UNIV_INTERN
upd_t* upd_t*
row_upd_build_difference_binary( row_upd_build_difference_binary(
/*============================*/ /*============================*/
...@@ -181,7 +181,7 @@ row_upd_build_difference_binary( ...@@ -181,7 +181,7 @@ row_upd_build_difference_binary(
/*************************************************************** /***************************************************************
Replaces the new column values stored in the update vector to the index entry Replaces the new column values stored in the update vector to the index entry
given. */ given. */
UNIV_INTERN
void void
row_upd_index_replace_new_col_vals_index_pos( row_upd_index_replace_new_col_vals_index_pos(
/*=========================================*/ /*=========================================*/
...@@ -209,7 +209,7 @@ row_upd_index_replace_new_col_vals_index_pos( ...@@ -209,7 +209,7 @@ row_upd_index_replace_new_col_vals_index_pos(
/*************************************************************** /***************************************************************
Replaces the new column values stored in the update vector to the index entry Replaces the new column values stored in the update vector to the index entry
given. */ given. */
UNIV_INTERN
void void
row_upd_index_replace_new_col_vals( row_upd_index_replace_new_col_vals(
/*===============================*/ /*===============================*/
...@@ -232,7 +232,7 @@ row_upd_index_replace_new_col_vals( ...@@ -232,7 +232,7 @@ row_upd_index_replace_new_col_vals(
stored columns or column prefixes */ stored columns or column prefixes */
/*************************************************************** /***************************************************************
Replaces the new column values stored in the update vector. */ Replaces the new column values stored in the update vector. */
UNIV_INTERN
void void
row_upd_replace( row_upd_replace(
/*============*/ /*============*/
...@@ -252,7 +252,7 @@ Checks if an update vector changes an ordering field of an index record. ...@@ -252,7 +252,7 @@ Checks if an update vector changes an ordering field of an index record.
This function is fast if the update vector is short or the number of ordering This function is fast if the update vector is short or the number of ordering
fields in the index is small. Otherwise, this can be quadratic. fields in the index is small. Otherwise, this can be quadratic.
NOTE: we compare the fields as binary strings! */ NOTE: we compare the fields as binary strings! */
UNIV_INTERN
ibool ibool
row_upd_changes_ord_field_binary( row_upd_changes_ord_field_binary(
/*=============================*/ /*=============================*/
...@@ -273,7 +273,7 @@ Checks if an update vector changes an ordering field of an index record. ...@@ -273,7 +273,7 @@ Checks if an update vector changes an ordering field of an index record.
This function is fast if the update vector is short or the number of ordering This function is fast if the update vector is short or the number of ordering
fields in the index is small. Otherwise, this can be quadratic. fields in the index is small. Otherwise, this can be quadratic.
NOTE: we compare the fields as binary strings! */ NOTE: we compare the fields as binary strings! */
UNIV_INTERN
ibool ibool
row_upd_changes_some_index_ord_field_binary( row_upd_changes_some_index_ord_field_binary(
/*========================================*/ /*========================================*/
...@@ -285,7 +285,7 @@ row_upd_changes_some_index_ord_field_binary( ...@@ -285,7 +285,7 @@ row_upd_changes_some_index_ord_field_binary(
/*************************************************************** /***************************************************************
Updates a row in a table. This is a high-level function used Updates a row in a table. This is a high-level function used
in SQL execution graphs. */ in SQL execution graphs. */
UNIV_INTERN
que_thr_t* que_thr_t*
row_upd_step( row_upd_step(
/*=========*/ /*=========*/
...@@ -294,7 +294,7 @@ row_upd_step( ...@@ -294,7 +294,7 @@ row_upd_step(
/************************************************************************* /*************************************************************************
Performs an in-place update for the current clustered index record in Performs an in-place update for the current clustered index record in
select. */ select. */
UNIV_INTERN
void void
row_upd_in_place_in_select( row_upd_in_place_in_select(
/*=======================*/ /*=======================*/
...@@ -303,7 +303,7 @@ row_upd_in_place_in_select( ...@@ -303,7 +303,7 @@ row_upd_in_place_in_select(
mtr_t* mtr); /* in: mtr */ mtr_t* mtr); /* in: mtr */
/************************************************************************* /*************************************************************************
Parses the log data of system field values. */ Parses the log data of system field values. */
UNIV_INTERN
byte* byte*
row_upd_parse_sys_vals( row_upd_parse_sys_vals(
/*===================*/ /*===================*/
...@@ -316,7 +316,7 @@ row_upd_parse_sys_vals( ...@@ -316,7 +316,7 @@ row_upd_parse_sys_vals(
/************************************************************************* /*************************************************************************
Updates the trx id and roll ptr field in a clustered index record in database Updates the trx id and roll ptr field in a clustered index record in database
recovery. */ recovery. */
UNIV_INTERN
void void
row_upd_rec_sys_fields_in_recovery( row_upd_rec_sys_fields_in_recovery(
/*===============================*/ /*===============================*/
...@@ -328,7 +328,7 @@ row_upd_rec_sys_fields_in_recovery( ...@@ -328,7 +328,7 @@ row_upd_rec_sys_fields_in_recovery(
dulint roll_ptr);/* in: roll ptr of the undo log record */ dulint roll_ptr);/* in: roll ptr of the undo log record */
/************************************************************************* /*************************************************************************
Parses the log data written by row_upd_index_write_log. */ Parses the log data written by row_upd_index_write_log. */
UNIV_INTERN
byte* byte*
row_upd_index_parse( row_upd_index_parse(
/*================*/ /*================*/
......
...@@ -22,7 +22,7 @@ Created 2/6/1997 Heikki Tuuri ...@@ -22,7 +22,7 @@ Created 2/6/1997 Heikki Tuuri
Finds out if an active transaction has inserted or modified a secondary Finds out if an active transaction has inserted or modified a secondary
index record. NOTE: the kernel mutex is temporarily released in this index record. NOTE: the kernel mutex is temporarily released in this
function! */ function! */
UNIV_INTERN
trx_t* trx_t*
row_vers_impl_x_locked_off_kernel( row_vers_impl_x_locked_off_kernel(
/*==============================*/ /*==============================*/
...@@ -35,7 +35,7 @@ row_vers_impl_x_locked_off_kernel( ...@@ -35,7 +35,7 @@ row_vers_impl_x_locked_off_kernel(
/********************************************************************* /*********************************************************************
Finds out if we must preserve a delete marked earlier version of a clustered Finds out if we must preserve a delete marked earlier version of a clustered
index record, because it is >= the purge view. */ index record, because it is >= the purge view. */
UNIV_INTERN
ibool ibool
row_vers_must_preserve_del_marked( row_vers_must_preserve_del_marked(
/*==============================*/ /*==============================*/
...@@ -49,7 +49,7 @@ purge view, should have ientry as its secondary index entry. We check ...@@ -49,7 +49,7 @@ purge view, should have ientry as its secondary index entry. We check
if there is any not delete marked version of the record where the trx if there is any not delete marked version of the record where the trx
id >= purge view, and the secondary index entry == ientry; exactly in id >= purge view, and the secondary index entry == ientry; exactly in
this case we return TRUE. */ this case we return TRUE. */
UNIV_INTERN
ibool ibool
row_vers_old_has_index_entry( row_vers_old_has_index_entry(
/*=========================*/ /*=========================*/
...@@ -67,7 +67,7 @@ row_vers_old_has_index_entry( ...@@ -67,7 +67,7 @@ row_vers_old_has_index_entry(
Constructs the version of a clustered index record which a consistent Constructs the version of a clustered index record which a consistent
read should see. We assume that the trx id stored in rec is such that read should see. We assume that the trx id stored in rec is such that
the consistent read should not see rec in its present version. */ the consistent read should not see rec in its present version. */
UNIV_INTERN
ulint ulint
row_vers_build_for_consistent_read( row_vers_build_for_consistent_read(
/*===============================*/ /*===============================*/
...@@ -95,7 +95,7 @@ row_vers_build_for_consistent_read( ...@@ -95,7 +95,7 @@ row_vers_build_for_consistent_read(
/********************************************************************* /*********************************************************************
Constructs the last committed version of a clustered index record, Constructs the last committed version of a clustered index record,
which should be seen by a semi-consistent read. */ which should be seen by a semi-consistent read. */
UNIV_INTERN
ulint ulint
row_vers_build_for_semi_consistent_read( row_vers_build_for_semi_consistent_read(
/*====================================*/ /*====================================*/
......
...@@ -18,14 +18,14 @@ Checks if there is work to do in the server task queue. If there is, the ...@@ -18,14 +18,14 @@ Checks if there is work to do in the server task queue. If there is, the
thread starts processing a task. Before leaving, it again checks the task thread starts processing a task. Before leaving, it again checks the task
queue and picks a new task if any exists. This is called by a SRV_WORKER queue and picks a new task if any exists. This is called by a SRV_WORKER
thread. */ thread. */
UNIV_INTERN
void void
srv_que_task_queue_check(void); srv_que_task_queue_check(void);
/*==========================*/ /*==========================*/
/************************************************************************** /**************************************************************************
Performs round-robin on the server tasks. This is called by a SRV_WORKER Performs round-robin on the server tasks. This is called by a SRV_WORKER
thread every second or so. */ thread every second or so. */
UNIV_INTERN
que_thr_t* que_thr_t*
srv_que_round_robin( srv_que_round_robin(
/*================*/ /*================*/
...@@ -35,7 +35,7 @@ srv_que_round_robin( ...@@ -35,7 +35,7 @@ srv_que_round_robin(
/************************************************************************** /**************************************************************************
Enqueues a task to server task queue and releases a worker thread, if Enqueues a task to server task queue and releases a worker thread, if
there exists one suspended. */ there exists one suspended. */
UNIV_INTERN
void void
srv_que_task_enqueue( srv_que_task_enqueue(
/*=================*/ /*=================*/
...@@ -43,7 +43,7 @@ srv_que_task_enqueue( ...@@ -43,7 +43,7 @@ srv_que_task_enqueue(
/************************************************************************** /**************************************************************************
Enqueues a task to server task queue and releases a worker thread, if Enqueues a task to server task queue and releases a worker thread, if
there exists one suspended. */ there exists one suspended. */
UNIV_INTERN
void void
srv_que_task_enqueue_low( srv_que_task_enqueue_low(
/*=====================*/ /*=====================*/
......
...@@ -313,33 +313,33 @@ enum srv_thread_type { ...@@ -313,33 +313,33 @@ enum srv_thread_type {
/************************************************************************* /*************************************************************************
Boots Innobase server. */ Boots Innobase server. */
UNIV_INTERN
ulint ulint
srv_boot(void); srv_boot(void);
/*==========*/ /*==========*/
/* out: DB_SUCCESS or error code */ /* out: DB_SUCCESS or error code */
/************************************************************************* /*************************************************************************
Initializes the server. */ Initializes the server. */
UNIV_INTERN
void void
srv_init(void); srv_init(void);
/*==========*/ /*==========*/
/************************************************************************* /*************************************************************************
Frees the OS fast mutex created in srv_boot(). */ Frees the OS fast mutex created in srv_boot(). */
UNIV_INTERN
void void
srv_free(void); srv_free(void);
/*==========*/ /*==========*/
/************************************************************************* /*************************************************************************
Initializes the synchronization primitives, memory system, and the thread Initializes the synchronization primitives, memory system, and the thread
local storage. */ local storage. */
UNIV_INTERN
void void
srv_general_init(void); srv_general_init(void);
/*==================*/ /*==================*/
/************************************************************************* /*************************************************************************
Gets the number of threads in the system. */ Gets the number of threads in the system. */
UNIV_INTERN
ulint ulint
srv_get_n_threads(void); srv_get_n_threads(void);
/*===================*/ /*===================*/
...@@ -352,7 +352,7 @@ srv_get_thread_type(void); ...@@ -352,7 +352,7 @@ srv_get_thread_type(void);
/* out: SRV_COM, ... */ /* out: SRV_COM, ... */
/************************************************************************* /*************************************************************************
Sets the info describing an i/o thread current state. */ Sets the info describing an i/o thread current state. */
UNIV_INTERN
void void
srv_set_io_thread_op_info( srv_set_io_thread_op_info(
/*======================*/ /*======================*/
...@@ -362,7 +362,7 @@ srv_set_io_thread_op_info( ...@@ -362,7 +362,7 @@ srv_set_io_thread_op_info(
/************************************************************************* /*************************************************************************
Releases threads of the type given from suspension in the thread table. Releases threads of the type given from suspension in the thread table.
NOTE! The server mutex has to be reserved by the caller! */ NOTE! The server mutex has to be reserved by the caller! */
UNIV_INTERN
ulint ulint
srv_release_threads( srv_release_threads(
/*================*/ /*================*/
...@@ -374,7 +374,7 @@ srv_release_threads( ...@@ -374,7 +374,7 @@ srv_release_threads(
ulint n); /* in: number of threads to release */ ulint n); /* in: number of threads to release */
/************************************************************************* /*************************************************************************
The master thread controlling the server. */ The master thread controlling the server. */
UNIV_INTERN
os_thread_ret_t os_thread_ret_t
srv_master_thread( srv_master_thread(
/*==============*/ /*==============*/
...@@ -387,20 +387,20 @@ and wakes up the master thread if it is suspended (not sleeping). Used ...@@ -387,20 +387,20 @@ and wakes up the master thread if it is suspended (not sleeping). Used
in the MySQL interface. Note that there is a small chance that the master in the MySQL interface. Note that there is a small chance that the master
thread stays suspended (we do not protect our operation with the kernel thread stays suspended (we do not protect our operation with the kernel
mutex, for performace reasons). */ mutex, for performace reasons). */
UNIV_INTERN
void void
srv_active_wake_master_thread(void); srv_active_wake_master_thread(void);
/*===============================*/ /*===============================*/
/*********************************************************************** /***********************************************************************
Wakes up the master thread if it is suspended or being suspended. */ Wakes up the master thread if it is suspended or being suspended. */
UNIV_INTERN
void void
srv_wake_master_thread(void); srv_wake_master_thread(void);
/*========================*/ /*========================*/
/************************************************************************* /*************************************************************************
Puts an OS thread to wait if there are too many concurrent threads Puts an OS thread to wait if there are too many concurrent threads
(>= srv_thread_concurrency) inside InnoDB. The threads wait in a FIFO queue. */ (>= srv_thread_concurrency) inside InnoDB. The threads wait in a FIFO queue. */
UNIV_INTERN
void void
srv_conc_enter_innodb( srv_conc_enter_innodb(
/*==================*/ /*==================*/
...@@ -409,7 +409,7 @@ srv_conc_enter_innodb( ...@@ -409,7 +409,7 @@ srv_conc_enter_innodb(
/************************************************************************* /*************************************************************************
This lets a thread enter InnoDB regardless of the number of threads inside This lets a thread enter InnoDB regardless of the number of threads inside
InnoDB. This must be called when a thread ends a lock wait. */ InnoDB. This must be called when a thread ends a lock wait. */
UNIV_INTERN
void void
srv_conc_force_enter_innodb( srv_conc_force_enter_innodb(
/*========================*/ /*========================*/
...@@ -418,7 +418,7 @@ srv_conc_force_enter_innodb( ...@@ -418,7 +418,7 @@ srv_conc_force_enter_innodb(
/************************************************************************* /*************************************************************************
This must be called when a thread exits InnoDB in a lock wait or at the This must be called when a thread exits InnoDB in a lock wait or at the
end of an SQL statement. */ end of an SQL statement. */
UNIV_INTERN
void void
srv_conc_force_exit_innodb( srv_conc_force_exit_innodb(
/*=======================*/ /*=======================*/
...@@ -426,7 +426,7 @@ srv_conc_force_exit_innodb( ...@@ -426,7 +426,7 @@ srv_conc_force_exit_innodb(
thread */ thread */
/************************************************************************* /*************************************************************************
This must be called when a thread exits InnoDB. */ This must be called when a thread exits InnoDB. */
UNIV_INTERN
void void
srv_conc_exit_innodb( srv_conc_exit_innodb(
/*=================*/ /*=================*/
...@@ -438,7 +438,7 @@ occurs during the wait trx->error_state associated with thr is ...@@ -438,7 +438,7 @@ occurs during the wait trx->error_state associated with thr is
!= DB_SUCCESS when we return. DB_LOCK_WAIT_TIMEOUT and DB_DEADLOCK != DB_SUCCESS when we return. DB_LOCK_WAIT_TIMEOUT and DB_DEADLOCK
are possible errors. DB_DEADLOCK is returned if selective deadlock are possible errors. DB_DEADLOCK is returned if selective deadlock
resolution chose this transaction as a victim. */ resolution chose this transaction as a victim. */
UNIV_INTERN
void void
srv_suspend_mysql_thread( srv_suspend_mysql_thread(
/*=====================*/ /*=====================*/
...@@ -447,7 +447,7 @@ srv_suspend_mysql_thread( ...@@ -447,7 +447,7 @@ srv_suspend_mysql_thread(
/************************************************************************ /************************************************************************
Releases a MySQL OS thread waiting for a lock to be released, if the Releases a MySQL OS thread waiting for a lock to be released, if the
thread is already suspended. */ thread is already suspended. */
UNIV_INTERN
void void
srv_release_mysql_thread_if_suspended( srv_release_mysql_thread_if_suspended(
/*==================================*/ /*==================================*/
...@@ -456,7 +456,7 @@ srv_release_mysql_thread_if_suspended( ...@@ -456,7 +456,7 @@ srv_release_mysql_thread_if_suspended(
/************************************************************************* /*************************************************************************
A thread which wakes up threads whose lock wait may have lasted too long. A thread which wakes up threads whose lock wait may have lasted too long.
This also prints the info output by various InnoDB monitors. */ This also prints the info output by various InnoDB monitors. */
UNIV_INTERN
os_thread_ret_t os_thread_ret_t
srv_lock_timeout_and_monitor_thread( srv_lock_timeout_and_monitor_thread(
/*================================*/ /*================================*/
...@@ -466,7 +466,7 @@ srv_lock_timeout_and_monitor_thread( ...@@ -466,7 +466,7 @@ srv_lock_timeout_and_monitor_thread(
/************************************************************************* /*************************************************************************
A thread which prints warnings about semaphore waits which have lasted A thread which prints warnings about semaphore waits which have lasted
too long. These can be used to track bugs which cause hangs. */ too long. These can be used to track bugs which cause hangs. */
UNIV_INTERN
os_thread_ret_t os_thread_ret_t
srv_error_monitor_thread( srv_error_monitor_thread(
/*=====================*/ /*=====================*/
...@@ -475,7 +475,7 @@ srv_error_monitor_thread( ...@@ -475,7 +475,7 @@ srv_error_monitor_thread(
os_thread_create */ os_thread_create */
/********************************************************************** /**********************************************************************
Outputs to a file the output of the InnoDB Monitor. */ Outputs to a file the output of the InnoDB Monitor. */
UNIV_INTERN
void void
srv_printf_innodb_monitor( srv_printf_innodb_monitor(
/*======================*/ /*======================*/
...@@ -487,7 +487,7 @@ srv_printf_innodb_monitor( ...@@ -487,7 +487,7 @@ srv_printf_innodb_monitor(
/********************************************************************** /**********************************************************************
Function to pass InnoDB status variables to MySQL */ Function to pass InnoDB status variables to MySQL */
UNIV_INTERN
void void
srv_export_innodb_status(void); srv_export_innodb_status(void);
/*=====================*/ /*=====================*/
......
...@@ -15,7 +15,7 @@ Created 10/10/1995 Heikki Tuuri ...@@ -15,7 +15,7 @@ Created 10/10/1995 Heikki Tuuri
/************************************************************************* /*************************************************************************
Normalizes a directory path for Windows: converts slashes to backslashes. */ Normalizes a directory path for Windows: converts slashes to backslashes. */
UNIV_INTERN
void void
srv_normalize_path_for_win( srv_normalize_path_for_win(
/*=======================*/ /*=======================*/
...@@ -23,7 +23,7 @@ srv_normalize_path_for_win( ...@@ -23,7 +23,7 @@ srv_normalize_path_for_win(
/************************************************************************* /*************************************************************************
Reads the data files and their sizes from a character string given in Reads the data files and their sizes from a character string given in
the .cnf file. */ the .cnf file. */
UNIV_INTERN
ibool ibool
srv_parse_data_file_paths_and_sizes( srv_parse_data_file_paths_and_sizes(
/*================================*/ /*================================*/
...@@ -45,7 +45,7 @@ srv_parse_data_file_paths_and_sizes( ...@@ -45,7 +45,7 @@ srv_parse_data_file_paths_and_sizes(
/************************************************************************* /*************************************************************************
Reads log group home directories from a character string given in Reads log group home directories from a character string given in
the .cnf file. */ the .cnf file. */
UNIV_INTERN
ibool ibool
srv_parse_log_group_home_dirs( srv_parse_log_group_home_dirs(
/*==========================*/ /*==========================*/
...@@ -56,7 +56,7 @@ srv_parse_log_group_home_dirs( ...@@ -56,7 +56,7 @@ srv_parse_log_group_home_dirs(
/************************************************************************* /*************************************************************************
Adds a slash or a backslash to the end of a string if it is missing Adds a slash or a backslash to the end of a string if it is missing
and the string is not empty. */ and the string is not empty. */
UNIV_INTERN
char* char*
srv_add_path_separator_if_needed( srv_add_path_separator_if_needed(
/*=============================*/ /*=============================*/
...@@ -67,13 +67,14 @@ srv_add_path_separator_if_needed( ...@@ -67,13 +67,14 @@ srv_add_path_separator_if_needed(
Starts Innobase and creates a new database if database files Starts Innobase and creates a new database if database files
are not found and the user wants. Server parameters are are not found and the user wants. Server parameters are
read from a file of name "srv_init" in the ib_home directory. */ read from a file of name "srv_init" in the ib_home directory. */
UNIV_INTERN
int int
innobase_start_or_create_for_mysql(void); innobase_start_or_create_for_mysql(void);
/*====================================*/ /*====================================*/
/* out: DB_SUCCESS or error code */ /* out: DB_SUCCESS or error code */
/******************************************************************** /********************************************************************
Shuts down the Innobase database. */ Shuts down the Innobase database. */
UNIV_INTERN
int int
innobase_shutdown_for_mysql(void); innobase_shutdown_for_mysql(void);
/*=============================*/ /*=============================*/
......
...@@ -24,7 +24,7 @@ typedef struct sync_array_struct sync_array_t; ...@@ -24,7 +24,7 @@ typedef struct sync_array_struct sync_array_t;
Creates a synchronization wait array. It is protected by a mutex Creates a synchronization wait array. It is protected by a mutex
which is automatically reserved when the functions operating on it which is automatically reserved when the functions operating on it
are called. */ are called. */
UNIV_INTERN
sync_array_t* sync_array_t*
sync_array_create( sync_array_create(
/*==============*/ /*==============*/
...@@ -36,7 +36,7 @@ sync_array_create( ...@@ -36,7 +36,7 @@ sync_array_create(
of mutex protecting the data structure */ of mutex protecting the data structure */
/********************************************************************** /**********************************************************************
Frees the resources in a wait array. */ Frees the resources in a wait array. */
UNIV_INTERN
void void
sync_array_free( sync_array_free(
/*============*/ /*============*/
...@@ -44,7 +44,7 @@ sync_array_free( ...@@ -44,7 +44,7 @@ sync_array_free(
/********************************************************************** /**********************************************************************
Reserves a wait array cell for waiting for an object. Reserves a wait array cell for waiting for an object.
The event of the cell is reset to nonsignalled state. */ The event of the cell is reset to nonsignalled state. */
UNIV_INTERN
void void
sync_array_reserve_cell( sync_array_reserve_cell(
/*====================*/ /*====================*/
...@@ -59,7 +59,7 @@ This function should be called when a thread starts to wait on ...@@ -59,7 +59,7 @@ This function should be called when a thread starts to wait on
a wait array cell. In the debug version this function checks a wait array cell. In the debug version this function checks
if the wait for a semaphore will result in a deadlock, in which if the wait for a semaphore will result in a deadlock, in which
case prints info and asserts. */ case prints info and asserts. */
UNIV_INTERN
void void
sync_array_wait_event( sync_array_wait_event(
/*==================*/ /*==================*/
...@@ -68,7 +68,7 @@ sync_array_wait_event( ...@@ -68,7 +68,7 @@ sync_array_wait_event(
/********************************************************************** /**********************************************************************
Frees the cell safely by reserving the sync array mutex and decrementing Frees the cell safely by reserving the sync array mutex and decrementing
n_reserved if necessary. Should only be called from mutex_spin_wait. */ n_reserved if necessary. Should only be called from mutex_spin_wait. */
UNIV_INTERN
void void
sync_array_free_cell_protected( sync_array_free_cell_protected(
/*===========================*/ /*===========================*/
...@@ -80,7 +80,7 @@ to the wait object specified, ...@@ -80,7 +80,7 @@ to the wait object specified,
and sets their corresponding events to the signaled state. In this and sets their corresponding events to the signaled state. In this
way releases the threads waiting for the object to contend for the object. way releases the threads waiting for the object to contend for the object.
It is possible that no such cell is found, in which case does nothing. */ It is possible that no such cell is found, in which case does nothing. */
UNIV_INTERN
void void
sync_array_signal_object( sync_array_signal_object(
/*=====================*/ /*=====================*/
...@@ -90,13 +90,13 @@ sync_array_signal_object( ...@@ -90,13 +90,13 @@ sync_array_signal_object(
If the wakeup algorithm does not work perfectly at semaphore relases, If the wakeup algorithm does not work perfectly at semaphore relases,
this function will do the waking (see the comment in mutex_exit). This this function will do the waking (see the comment in mutex_exit). This
function should be called about every 1 second in the server. */ function should be called about every 1 second in the server. */
UNIV_INTERN
void void
sync_arr_wake_threads_if_sema_free(void); sync_arr_wake_threads_if_sema_free(void);
/*====================================*/ /*====================================*/
/************************************************************************** /**************************************************************************
Prints warnings of long semaphore waits to stderr. */ Prints warnings of long semaphore waits to stderr. */
UNIV_INTERN
ibool ibool
sync_array_print_long_waits(void); sync_array_print_long_waits(void);
/*=============================*/ /*=============================*/
...@@ -105,14 +105,14 @@ sync_array_print_long_waits(void); ...@@ -105,14 +105,14 @@ sync_array_print_long_waits(void);
/************************************************************************ /************************************************************************
Validates the integrity of the wait array. Checks Validates the integrity of the wait array. Checks
that the number of reserved cells equals the count variable. */ that the number of reserved cells equals the count variable. */
UNIV_INTERN
void void
sync_array_validate( sync_array_validate(
/*================*/ /*================*/
sync_array_t* arr); /* in: sync wait array */ sync_array_t* arr); /* in: sync wait array */
/************************************************************************** /**************************************************************************
Prints info of the wait array. */ Prints info of the wait array. */
UNIV_INTERN
void void
sync_array_print_info( sync_array_print_info(
/*==================*/ /*==================*/
......
...@@ -79,7 +79,7 @@ Creates, or rather, initializes an rw-lock object in a specified memory ...@@ -79,7 +79,7 @@ Creates, or rather, initializes an rw-lock object in a specified memory
location (which must be appropriately aligned). The rw-lock is initialized location (which must be appropriately aligned). The rw-lock is initialized
to the non-locked state. Explicit freeing of the rw-lock with rw_lock_free to the non-locked state. Explicit freeing of the rw-lock with rw_lock_free
is necessary only if the memory block containing it is freed. */ is necessary only if the memory block containing it is freed. */
UNIV_INTERN
void void
rw_lock_create_func( rw_lock_create_func(
/*================*/ /*================*/
...@@ -96,7 +96,7 @@ rw_lock_create_func( ...@@ -96,7 +96,7 @@ rw_lock_create_func(
Calling this function is obligatory only if the memory buffer containing Calling this function is obligatory only if the memory buffer containing
the rw-lock is freed. Removes an rw-lock object from the global list. The the rw-lock is freed. Removes an rw-lock object from the global list. The
rw-lock is checked to be in the non-locked state. */ rw-lock is checked to be in the non-locked state. */
UNIV_INTERN
void void
rw_lock_free( rw_lock_free(
/*=========*/ /*=========*/
...@@ -105,7 +105,7 @@ rw_lock_free( ...@@ -105,7 +105,7 @@ rw_lock_free(
/********************************************************************** /**********************************************************************
Checks that the rw-lock has been initialized and that there are no Checks that the rw-lock has been initialized and that there are no
simultaneous shared and exclusive locks. */ simultaneous shared and exclusive locks. */
UNIV_INTERN
ibool ibool
rw_lock_validate( rw_lock_validate(
/*=============*/ /*=============*/
...@@ -224,7 +224,7 @@ for the lock, before suspending the thread. If the same thread has an x-lock ...@@ -224,7 +224,7 @@ for the lock, before suspending the thread. If the same thread has an x-lock
on the rw-lock, locking succeed, with the following exception: if pass != 0, on the rw-lock, locking succeed, with the following exception: if pass != 0,
only a single x-lock may be taken on the lock. NOTE: If the same thread has only a single x-lock may be taken on the lock. NOTE: If the same thread has
an s-lock, locking does not succeed! */ an s-lock, locking does not succeed! */
UNIV_INTERN
void void
rw_lock_x_lock_func( rw_lock_x_lock_func(
/*================*/ /*================*/
...@@ -293,7 +293,7 @@ read was done. The ownership is moved because we want that the current ...@@ -293,7 +293,7 @@ read was done. The ownership is moved because we want that the current
thread is able to acquire a second x-latch which is stored in an mtr. thread is able to acquire a second x-latch which is stored in an mtr.
This, in turn, is needed to pass the debug checks of index page This, in turn, is needed to pass the debug checks of index page
operations. */ operations. */
UNIV_INTERN
void void
rw_lock_x_lock_move_ownership( rw_lock_x_lock_move_ownership(
/*==========================*/ /*==========================*/
...@@ -345,7 +345,7 @@ rw_lock_get_reader_count( ...@@ -345,7 +345,7 @@ rw_lock_get_reader_count(
/********************************************************************** /**********************************************************************
Checks if the thread has locked the rw-lock in the specified mode, with Checks if the thread has locked the rw-lock in the specified mode, with
the pass value == 0. */ the pass value == 0. */
UNIV_INTERN
ibool ibool
rw_lock_own( rw_lock_own(
/*========*/ /*========*/
...@@ -355,7 +355,7 @@ rw_lock_own( ...@@ -355,7 +355,7 @@ rw_lock_own(
#endif /* UNIV_SYNC_DEBUG */ #endif /* UNIV_SYNC_DEBUG */
/********************************************************************** /**********************************************************************
Checks if somebody has locked the rw-lock in the specified mode. */ Checks if somebody has locked the rw-lock in the specified mode. */
UNIV_INTERN
ibool ibool
rw_lock_is_locked( rw_lock_is_locked(
/*==============*/ /*==============*/
...@@ -365,14 +365,14 @@ rw_lock_is_locked( ...@@ -365,14 +365,14 @@ rw_lock_is_locked(
#ifdef UNIV_SYNC_DEBUG #ifdef UNIV_SYNC_DEBUG
/******************************************************************* /*******************************************************************
Prints debug info of an rw-lock. */ Prints debug info of an rw-lock. */
UNIV_INTERN
void void
rw_lock_print( rw_lock_print(
/*==========*/ /*==========*/
rw_lock_t* lock); /* in: rw-lock */ rw_lock_t* lock); /* in: rw-lock */
/******************************************************************* /*******************************************************************
Prints debug info of currently locked rw-locks. */ Prints debug info of currently locked rw-locks. */
UNIV_INTERN
void void
rw_lock_list_print_info( rw_lock_list_print_info(
/*====================*/ /*====================*/
...@@ -380,7 +380,7 @@ rw_lock_list_print_info( ...@@ -380,7 +380,7 @@ rw_lock_list_print_info(
/******************************************************************* /*******************************************************************
Returns the number of currently locked rw-locks. Returns the number of currently locked rw-locks.
Works only in the debug version. */ Works only in the debug version. */
UNIV_INTERN
ulint ulint
rw_lock_n_locked(void); rw_lock_n_locked(void);
/*==================*/ /*==================*/
...@@ -393,19 +393,19 @@ because the debug mutex is also acquired in sync0arr while holding the OS ...@@ -393,19 +393,19 @@ because the debug mutex is also acquired in sync0arr while holding the OS
mutex protecting the sync array, and the ordinary mutex_enter might mutex protecting the sync array, and the ordinary mutex_enter might
recursively call routines in sync0arr, leading to a deadlock on the OS recursively call routines in sync0arr, leading to a deadlock on the OS
mutex. */ mutex. */
UNIV_INTERN
void void
rw_lock_debug_mutex_enter(void); rw_lock_debug_mutex_enter(void);
/*==========================*/ /*==========================*/
/********************************************************************** /**********************************************************************
Releases the debug mutex. */ Releases the debug mutex. */
UNIV_INTERN
void void
rw_lock_debug_mutex_exit(void); rw_lock_debug_mutex_exit(void);
/*==========================*/ /*==========================*/
/************************************************************************* /*************************************************************************
Prints info of a debug struct. */ Prints info of a debug struct. */
UNIV_INTERN
void void
rw_lock_debug_print( rw_lock_debug_print(
/*================*/ /*================*/
......
...@@ -23,13 +23,13 @@ extern my_bool timed_mutexes; ...@@ -23,13 +23,13 @@ extern my_bool timed_mutexes;
/********************************************************************** /**********************************************************************
Initializes the synchronization data structures. */ Initializes the synchronization data structures. */
UNIV_INTERN
void void
sync_init(void); sync_init(void);
/*===========*/ /*===========*/
/********************************************************************** /**********************************************************************
Frees the resources in synchronization data structures. */ Frees the resources in synchronization data structures. */
UNIV_INTERN
void void
sync_close(void); sync_close(void);
/*===========*/ /*===========*/
...@@ -57,7 +57,7 @@ Creates, or rather, initializes a mutex object in a specified memory ...@@ -57,7 +57,7 @@ Creates, or rather, initializes a mutex object in a specified memory
location (which must be appropriately aligned). The mutex is initialized location (which must be appropriately aligned). The mutex is initialized
in the reset state. Explicit freeing of the mutex with mutex_free is in the reset state. Explicit freeing of the mutex with mutex_free is
necessary only if the memory block containing it is freed. */ necessary only if the memory block containing it is freed. */
UNIV_INTERN
void void
mutex_create_func( mutex_create_func(
/*==============*/ /*==============*/
...@@ -70,12 +70,14 @@ mutex_create_func( ...@@ -70,12 +70,14 @@ mutex_create_func(
#endif /* UNIV_DEBUG */ #endif /* UNIV_DEBUG */
const char* cfile_name, /* in: file name where created */ const char* cfile_name, /* in: file name where created */
ulint cline); /* in: file line where created */ ulint cline); /* in: file line where created */
#undef mutex_free /* Fix for MacOS X */
/********************************************************************** /**********************************************************************
Calling this function is obligatory only if the memory buffer containing Calling this function is obligatory only if the memory buffer containing
the mutex is freed. Removes a mutex object from the mutex list. The mutex the mutex is freed. Removes a mutex object from the mutex list. The mutex
is checked to be in the reset state. */ is checked to be in the reset state. */
UNIV_INTERN
#undef mutex_free /* Fix for MacOS X */
void void
mutex_free( mutex_free(
/*=======*/ /*=======*/
...@@ -114,7 +116,7 @@ corresponding function. */ ...@@ -114,7 +116,7 @@ corresponding function. */
NOTE! Use the corresponding macro in the header file, not this function NOTE! Use the corresponding macro in the header file, not this function
directly. Tries to lock the mutex for the current thread. If the lock is not directly. Tries to lock the mutex for the current thread. If the lock is not
acquired immediately, returns with return value 1. */ acquired immediately, returns with return value 1. */
UNIV_INTERN
ulint ulint
mutex_enter_nowait_func( mutex_enter_nowait_func(
/*====================*/ /*====================*/
...@@ -133,7 +135,7 @@ mutex_exit( ...@@ -133,7 +135,7 @@ mutex_exit(
/********************************************************************** /**********************************************************************
Returns TRUE if no mutex or rw-lock is currently locked. Returns TRUE if no mutex or rw-lock is currently locked.
Works only in the debug version. */ Works only in the debug version. */
UNIV_INTERN
ibool ibool
sync_all_freed(void); sync_all_freed(void);
/*================*/ /*================*/
...@@ -141,14 +143,14 @@ sync_all_freed(void); ...@@ -141,14 +143,14 @@ sync_all_freed(void);
FUNCTION PROTOTYPES FOR DEBUGGING */ FUNCTION PROTOTYPES FOR DEBUGGING */
/*********************************************************************** /***********************************************************************
Prints wait info of the sync system. */ Prints wait info of the sync system. */
UNIV_INTERN
void void
sync_print_wait_info( sync_print_wait_info(
/*=================*/ /*=================*/
FILE* file); /* in: file where to print */ FILE* file); /* in: file where to print */
/*********************************************************************** /***********************************************************************
Prints info of the sync system. */ Prints info of the sync system. */
UNIV_INTERN
void void
sync_print( sync_print(
/*=======*/ /*=======*/
...@@ -156,7 +158,7 @@ sync_print( ...@@ -156,7 +158,7 @@ sync_print(
#ifdef UNIV_DEBUG #ifdef UNIV_DEBUG
/********************************************************************** /**********************************************************************
Checks that the mutex has been initialized. */ Checks that the mutex has been initialized. */
UNIV_INTERN
ibool ibool
mutex_validate( mutex_validate(
/*===========*/ /*===========*/
...@@ -164,7 +166,7 @@ mutex_validate( ...@@ -164,7 +166,7 @@ mutex_validate(
/********************************************************************** /**********************************************************************
Checks that the current thread owns the mutex. Works only Checks that the current thread owns the mutex. Works only
in the debug version. */ in the debug version. */
UNIV_INTERN
ibool ibool
mutex_own( mutex_own(
/*======*/ /*======*/
...@@ -176,7 +178,7 @@ mutex_own( ...@@ -176,7 +178,7 @@ mutex_own(
Adds a latch and its level in the thread level array. Allocates the memory Adds a latch and its level in the thread level array. Allocates the memory
for the array if called first time for this OS thread. Makes the checks for the array if called first time for this OS thread. Makes the checks
against other latch levels stored in the array for this thread. */ against other latch levels stored in the array for this thread. */
UNIV_INTERN
void void
sync_thread_add_level( sync_thread_add_level(
/*==================*/ /*==================*/
...@@ -185,7 +187,7 @@ sync_thread_add_level( ...@@ -185,7 +187,7 @@ sync_thread_add_level(
SYNC_LEVEL_VARYING, nothing is done */ SYNC_LEVEL_VARYING, nothing is done */
/********************************************************************** /**********************************************************************
Removes a latch from the thread level array if it is found there. */ Removes a latch from the thread level array if it is found there. */
UNIV_INTERN
ibool ibool
sync_thread_reset_level( sync_thread_reset_level(
/*====================*/ /*====================*/
...@@ -196,14 +198,14 @@ sync_thread_reset_level( ...@@ -196,14 +198,14 @@ sync_thread_reset_level(
void* latch); /* in: pointer to a mutex or an rw-lock */ void* latch); /* in: pointer to a mutex or an rw-lock */
/********************************************************************** /**********************************************************************
Checks that the level array for the current thread is empty. */ Checks that the level array for the current thread is empty. */
UNIV_INTERN
ibool ibool
sync_thread_levels_empty(void); sync_thread_levels_empty(void);
/*==========================*/ /*==========================*/
/* out: TRUE if empty */ /* out: TRUE if empty */
/********************************************************************** /**********************************************************************
Checks that the level array for the current thread is empty. */ Checks that the level array for the current thread is empty. */
UNIV_INTERN
ibool ibool
sync_thread_levels_empty_gen( sync_thread_levels_empty_gen(
/*=========================*/ /*=========================*/
...@@ -215,7 +217,7 @@ sync_thread_levels_empty_gen( ...@@ -215,7 +217,7 @@ sync_thread_levels_empty_gen(
allowed */ allowed */
/********************************************************************** /**********************************************************************
Gets the debug information for a reserved mutex. */ Gets the debug information for a reserved mutex. */
UNIV_INTERN
void void
mutex_get_debug_info( mutex_get_debug_info(
/*=================*/ /*=================*/
...@@ -226,7 +228,7 @@ mutex_get_debug_info( ...@@ -226,7 +228,7 @@ mutex_get_debug_info(
the mutex */ the mutex */
/********************************************************************** /**********************************************************************
Counts currently reserved mutexes. Works only in the debug version. */ Counts currently reserved mutexes. Works only in the debug version. */
UNIV_INTERN
ulint ulint
mutex_n_reserved(void); mutex_n_reserved(void);
/*==================*/ /*==================*/
......
...@@ -18,26 +18,26 @@ OS handle to the current thread, or its priority. */ ...@@ -18,26 +18,26 @@ OS handle to the current thread, or its priority. */
/******************************************************************** /********************************************************************
Initializes the thread local storage module. */ Initializes the thread local storage module. */
UNIV_INTERN
void void
thr_local_init(void); thr_local_init(void);
/*================*/ /*================*/
/*********************************************************************** /***********************************************************************
Creates a local storage struct for the calling new thread. */ Creates a local storage struct for the calling new thread. */
UNIV_INTERN
void void
thr_local_create(void); thr_local_create(void);
/*==================*/ /*==================*/
/*********************************************************************** /***********************************************************************
Frees the local storage struct for the specified thread. */ Frees the local storage struct for the specified thread. */
UNIV_INTERN
void void
thr_local_free( thr_local_free(
/*===========*/ /*===========*/
os_thread_id_t id); /* in: thread id */ os_thread_id_t id); /* in: thread id */
/*********************************************************************** /***********************************************************************
Gets the slot number in the thread table of a thread. */ Gets the slot number in the thread table of a thread. */
UNIV_INTERN
ulint ulint
thr_local_get_slot_no( thr_local_get_slot_no(
/*==================*/ /*==================*/
...@@ -45,7 +45,7 @@ thr_local_get_slot_no( ...@@ -45,7 +45,7 @@ thr_local_get_slot_no(
os_thread_id_t id); /* in: thread id of the thread */ os_thread_id_t id); /* in: thread id of the thread */
/*********************************************************************** /***********************************************************************
Sets in the local storage the slot number in the thread table of a thread. */ Sets in the local storage the slot number in the thread table of a thread. */
UNIV_INTERN
void void
thr_local_set_slot_no( thr_local_set_slot_no(
/*==================*/ /*==================*/
...@@ -54,7 +54,7 @@ thr_local_set_slot_no( ...@@ -54,7 +54,7 @@ thr_local_set_slot_no(
/*********************************************************************** /***********************************************************************
Returns pointer to the 'in_ibuf' field within the current thread local Returns pointer to the 'in_ibuf' field within the current thread local
storage. */ storage. */
UNIV_INTERN
ibool* ibool*
thr_local_get_in_ibuf_field(void); thr_local_get_in_ibuf_field(void);
/*=============================*/ /*=============================*/
......
...@@ -92,7 +92,7 @@ extern trx_i_s_cache_t* trx_i_s_cache; ...@@ -92,7 +92,7 @@ extern trx_i_s_cache_t* trx_i_s_cache;
/*********************************************************************** /***********************************************************************
Initialize INFORMATION SCHEMA trx related cache. */ Initialize INFORMATION SCHEMA trx related cache. */
UNIV_INTERN
void void
trx_i_s_cache_init( trx_i_s_cache_init(
/*===============*/ /*===============*/
...@@ -100,7 +100,7 @@ trx_i_s_cache_init( ...@@ -100,7 +100,7 @@ trx_i_s_cache_init(
/*********************************************************************** /***********************************************************************
Issue a shared/read lock on the tables cache. */ Issue a shared/read lock on the tables cache. */
UNIV_INTERN
void void
trx_i_s_cache_start_read( trx_i_s_cache_start_read(
/*=====================*/ /*=====================*/
...@@ -108,7 +108,7 @@ trx_i_s_cache_start_read( ...@@ -108,7 +108,7 @@ trx_i_s_cache_start_read(
/*********************************************************************** /***********************************************************************
Release a shared/read lock on the tables cache. */ Release a shared/read lock on the tables cache. */
UNIV_INTERN
void void
trx_i_s_cache_end_read( trx_i_s_cache_end_read(
/*===================*/ /*===================*/
...@@ -116,7 +116,7 @@ trx_i_s_cache_end_read( ...@@ -116,7 +116,7 @@ trx_i_s_cache_end_read(
/*********************************************************************** /***********************************************************************
Issue an exclusive/write lock on the tables cache. */ Issue an exclusive/write lock on the tables cache. */
UNIV_INTERN
void void
trx_i_s_cache_start_write( trx_i_s_cache_start_write(
/*======================*/ /*======================*/
...@@ -124,7 +124,7 @@ trx_i_s_cache_start_write( ...@@ -124,7 +124,7 @@ trx_i_s_cache_start_write(
/*********************************************************************** /***********************************************************************
Release an exclusive/write lock on the tables cache. */ Release an exclusive/write lock on the tables cache. */
UNIV_INTERN
void void
trx_i_s_cache_end_write( trx_i_s_cache_end_write(
/*====================*/ /*====================*/
...@@ -134,7 +134,7 @@ trx_i_s_cache_end_write( ...@@ -134,7 +134,7 @@ trx_i_s_cache_end_write(
/*********************************************************************** /***********************************************************************
Retrieves the number of used rows in the cache for a given Retrieves the number of used rows in the cache for a given
INFORMATION SCHEMA table. */ INFORMATION SCHEMA table. */
UNIV_INTERN
ullint ullint
trx_i_s_cache_get_rows_used( trx_i_s_cache_get_rows_used(
/*========================*/ /*========================*/
...@@ -145,7 +145,7 @@ trx_i_s_cache_get_rows_used( ...@@ -145,7 +145,7 @@ trx_i_s_cache_get_rows_used(
/*********************************************************************** /***********************************************************************
Retrieves the nth row in the cache for a given INFORMATION SCHEMA Retrieves the nth row in the cache for a given INFORMATION SCHEMA
table. */ table. */
UNIV_INTERN
void* void*
trx_i_s_cache_get_nth_row( trx_i_s_cache_get_nth_row(
/*======================*/ /*======================*/
...@@ -156,7 +156,7 @@ trx_i_s_cache_get_nth_row( ...@@ -156,7 +156,7 @@ trx_i_s_cache_get_nth_row(
/*********************************************************************** /***********************************************************************
Update the transactions cache if it has not been read for some time. */ Update the transactions cache if it has not been read for some time. */
UNIV_INTERN
int int
trx_i_s_possibly_fetch_data_into_cache( trx_i_s_possibly_fetch_data_into_cache(
/*===================================*/ /*===================================*/
...@@ -166,7 +166,7 @@ trx_i_s_possibly_fetch_data_into_cache( ...@@ -166,7 +166,7 @@ trx_i_s_possibly_fetch_data_into_cache(
/*********************************************************************** /***********************************************************************
Returns TRUE if the data in the cache is truncated due to the memory Returns TRUE if the data in the cache is truncated due to the memory
limit posed by TRX_I_S_MEM_LIMIT. */ limit posed by TRX_I_S_MEM_LIMIT. */
UNIV_INTERN
ibool ibool
trx_i_s_cache_is_truncated( trx_i_s_cache_is_truncated(
/*=======================*/ /*=======================*/
...@@ -183,7 +183,7 @@ Crafts a lock id string from a i_s_locks_row_t object. Returns its ...@@ -183,7 +183,7 @@ Crafts a lock id string from a i_s_locks_row_t object. Returns its
second argument. This function aborts if there is not enough space in second argument. This function aborts if there is not enough space in
lock_id. Be sure to provide at least TRX_I_S_LOCK_ID_MAX_LEN + 1 if you lock_id. Be sure to provide at least TRX_I_S_LOCK_ID_MAX_LEN + 1 if you
want to be 100% sure that it will not abort. */ want to be 100% sure that it will not abort. */
UNIV_INTERN
char* char*
trx_i_s_create_lock_id( trx_i_s_create_lock_id(
/*===================*/ /*===================*/
......
...@@ -38,7 +38,7 @@ trx_purge_get_log_from_hist( ...@@ -38,7 +38,7 @@ trx_purge_get_log_from_hist(
/********************************************************************* /*********************************************************************
Checks if trx_id is >= purge_view: then it is guaranteed that its update Checks if trx_id is >= purge_view: then it is guaranteed that its update
undo log still exists in the system. */ undo log still exists in the system. */
UNIV_INTERN
ibool ibool
trx_purge_update_undo_must_exist( trx_purge_update_undo_must_exist(
/*=============================*/ /*=============================*/
...@@ -49,14 +49,14 @@ trx_purge_update_undo_must_exist( ...@@ -49,14 +49,14 @@ trx_purge_update_undo_must_exist(
/************************************************************************ /************************************************************************
Creates the global purge system control structure and inits the history Creates the global purge system control structure and inits the history
mutex. */ mutex. */
UNIV_INTERN
void void
trx_purge_sys_create(void); trx_purge_sys_create(void);
/*======================*/ /*======================*/
/************************************************************************ /************************************************************************
Adds the update undo log as the first log in the history list. Removes the Adds the update undo log as the first log in the history list. Removes the
update undo log segment from the rseg slot if it is too big for reuse. */ update undo log segment from the rseg slot if it is too big for reuse. */
UNIV_INTERN
void void
trx_purge_add_update_undo_to_history( trx_purge_add_update_undo_to_history(
/*=================================*/ /*=================================*/
...@@ -67,7 +67,7 @@ trx_purge_add_update_undo_to_history( ...@@ -67,7 +67,7 @@ trx_purge_add_update_undo_to_history(
/************************************************************************ /************************************************************************
Fetches the next undo log record from the history list to purge. It must be Fetches the next undo log record from the history list to purge. It must be
released with the corresponding release function. */ released with the corresponding release function. */
UNIV_INTERN
trx_undo_rec_t* trx_undo_rec_t*
trx_purge_fetch_next_rec( trx_purge_fetch_next_rec(
/*=====================*/ /*=====================*/
...@@ -81,14 +81,14 @@ trx_purge_fetch_next_rec( ...@@ -81,14 +81,14 @@ trx_purge_fetch_next_rec(
mem_heap_t* heap); /* in: memory heap where copied */ mem_heap_t* heap); /* in: memory heap where copied */
/*********************************************************************** /***********************************************************************
Releases a reserved purge undo record. */ Releases a reserved purge undo record. */
UNIV_INTERN
void void
trx_purge_rec_release( trx_purge_rec_release(
/*==================*/ /*==================*/
trx_undo_inf_t* cell); /* in: storage cell */ trx_undo_inf_t* cell); /* in: storage cell */
/*********************************************************************** /***********************************************************************
This function runs a purge batch. */ This function runs a purge batch. */
UNIV_INTERN
ulint ulint
trx_purge(void); trx_purge(void);
/*===========*/ /*===========*/
...@@ -96,7 +96,7 @@ trx_purge(void); ...@@ -96,7 +96,7 @@ trx_purge(void);
the batch */ the batch */
/********************************************************************** /**********************************************************************
Prints information of the purge system to stderr. */ Prints information of the purge system to stderr. */
UNIV_INTERN
void void
trx_purge_sys_print(void); trx_purge_sys_print(void);
/*======================*/ /*======================*/
......
...@@ -73,7 +73,7 @@ trx_undo_rec_get_ptr( ...@@ -73,7 +73,7 @@ trx_undo_rec_get_ptr(
/************************************************************************** /**************************************************************************
Reads from an undo log record the general parameters. */ Reads from an undo log record the general parameters. */
UNIV_INTERN
byte* byte*
trx_undo_rec_get_pars( trx_undo_rec_get_pars(
/*==================*/ /*==================*/
...@@ -90,7 +90,7 @@ trx_undo_rec_get_pars( ...@@ -90,7 +90,7 @@ trx_undo_rec_get_pars(
dulint* table_id); /* out: table id */ dulint* table_id); /* out: table id */
/*********************************************************************** /***********************************************************************
Builds a row reference from an undo log record. */ Builds a row reference from an undo log record. */
UNIV_INTERN
byte* byte*
trx_undo_rec_get_row_ref( trx_undo_rec_get_row_ref(
/*=====================*/ /*=====================*/
...@@ -108,7 +108,7 @@ trx_undo_rec_get_row_ref( ...@@ -108,7 +108,7 @@ trx_undo_rec_get_row_ref(
needed is allocated */ needed is allocated */
/*********************************************************************** /***********************************************************************
Skips a row reference from an undo log record. */ Skips a row reference from an undo log record. */
UNIV_INTERN
byte* byte*
trx_undo_rec_skip_row_ref( trx_undo_rec_skip_row_ref(
/*======================*/ /*======================*/
...@@ -120,7 +120,7 @@ trx_undo_rec_skip_row_ref( ...@@ -120,7 +120,7 @@ trx_undo_rec_skip_row_ref(
/************************************************************************** /**************************************************************************
Reads from an undo log update record the system field values of the old Reads from an undo log update record the system field values of the old
version. */ version. */
UNIV_INTERN
byte* byte*
trx_undo_update_rec_get_sys_cols( trx_undo_update_rec_get_sys_cols(
/*=============================*/ /*=============================*/
...@@ -134,7 +134,7 @@ trx_undo_update_rec_get_sys_cols( ...@@ -134,7 +134,7 @@ trx_undo_update_rec_get_sys_cols(
ulint* info_bits); /* out: info bits state */ ulint* info_bits); /* out: info bits state */
/*********************************************************************** /***********************************************************************
Builds an update vector based on a remaining part of an undo log record. */ Builds an update vector based on a remaining part of an undo log record. */
UNIV_INTERN
byte* byte*
trx_undo_update_rec_get_update( trx_undo_update_rec_get_update(
/*===========================*/ /*===========================*/
...@@ -163,7 +163,7 @@ trx_undo_update_rec_get_update( ...@@ -163,7 +163,7 @@ trx_undo_update_rec_get_update(
/*********************************************************************** /***********************************************************************
Builds a partial row from an update undo log record. It contains the Builds a partial row from an update undo log record. It contains the
columns which occur as ordering in any index of the table. */ columns which occur as ordering in any index of the table. */
UNIV_INTERN
byte* byte*
trx_undo_rec_get_partial_row( trx_undo_rec_get_partial_row(
/*=========================*/ /*=========================*/
...@@ -185,7 +185,7 @@ Writes information to an undo log about an insert, update, or a delete marking ...@@ -185,7 +185,7 @@ Writes information to an undo log about an insert, update, or a delete marking
of a clustered index record. This information is used in a rollback of the of a clustered index record. This information is used in a rollback of the
transaction and in consistent reads that must look to the history of this transaction and in consistent reads that must look to the history of this
transaction. */ transaction. */
UNIV_INTERN
ulint ulint
trx_undo_report_row_operation( trx_undo_report_row_operation(
/*==========================*/ /*==========================*/
...@@ -213,7 +213,7 @@ trx_undo_report_row_operation( ...@@ -213,7 +213,7 @@ trx_undo_report_row_operation(
/********************************************************************** /**********************************************************************
Copies an undo record to heap. This function can be called if we know that Copies an undo record to heap. This function can be called if we know that
the undo log record exists. */ the undo log record exists. */
UNIV_INTERN
trx_undo_rec_t* trx_undo_rec_t*
trx_undo_get_undo_rec_low( trx_undo_get_undo_rec_low(
/*======================*/ /*======================*/
...@@ -222,7 +222,7 @@ trx_undo_get_undo_rec_low( ...@@ -222,7 +222,7 @@ trx_undo_get_undo_rec_low(
mem_heap_t* heap); /* in: memory heap where copied */ mem_heap_t* heap); /* in: memory heap where copied */
/********************************************************************** /**********************************************************************
Copies an undo record to heap. */ Copies an undo record to heap. */
UNIV_INTERN
ulint ulint
trx_undo_get_undo_rec( trx_undo_get_undo_rec(
/*==================*/ /*==================*/
...@@ -243,7 +243,7 @@ Build a previous version of a clustered index record. This function checks ...@@ -243,7 +243,7 @@ Build a previous version of a clustered index record. This function checks
that the caller has a latch on the index page of the clustered index record that the caller has a latch on the index page of the clustered index record
and an s-latch on the purge_view. This guarantees that the stack of versions and an s-latch on the purge_view. This guarantees that the stack of versions
is locked. */ is locked. */
UNIV_INTERN
ulint ulint
trx_undo_prev_version_build( trx_undo_prev_version_build(
/*========================*/ /*========================*/
...@@ -265,7 +265,7 @@ trx_undo_prev_version_build( ...@@ -265,7 +265,7 @@ trx_undo_prev_version_build(
history data has been deleted */ history data has been deleted */
/*************************************************************** /***************************************************************
Parses a redo log record of adding an undo log record. */ Parses a redo log record of adding an undo log record. */
UNIV_INTERN
byte* byte*
trx_undo_parse_add_undo_rec( trx_undo_parse_add_undo_rec(
/*========================*/ /*========================*/
...@@ -275,7 +275,7 @@ trx_undo_parse_add_undo_rec( ...@@ -275,7 +275,7 @@ trx_undo_parse_add_undo_rec(
page_t* page); /* in: page or NULL */ page_t* page); /* in: page or NULL */
/*************************************************************** /***************************************************************
Parses a redo log record of erasing of an undo page end. */ Parses a redo log record of erasing of an undo page end. */
UNIV_INTERN
byte* byte*
trx_undo_parse_erase_page_end( trx_undo_parse_erase_page_end(
/*==========================*/ /*==========================*/
......
...@@ -17,7 +17,7 @@ Created 3/26/1996 Heikki Tuuri ...@@ -17,7 +17,7 @@ Created 3/26/1996 Heikki Tuuri
/*********************************************************************** /***********************************************************************
Returns a transaction savepoint taken at this point in time. */ Returns a transaction savepoint taken at this point in time. */
UNIV_INTERN
trx_savept_t trx_savept_t
trx_savept_take( trx_savept_take(
/*============*/ /*============*/
...@@ -25,13 +25,13 @@ trx_savept_take( ...@@ -25,13 +25,13 @@ trx_savept_take(
trx_t* trx); /* in: transaction */ trx_t* trx); /* in: transaction */
/*********************************************************************** /***********************************************************************
Creates an undo number array. */ Creates an undo number array. */
UNIV_INTERN
trx_undo_arr_t* trx_undo_arr_t*
trx_undo_arr_create(void); trx_undo_arr_create(void);
/*=====================*/ /*=====================*/
/*********************************************************************** /***********************************************************************
Frees an undo number array. */ Frees an undo number array. */
UNIV_INTERN
void void
trx_undo_arr_free( trx_undo_arr_free(
/*==============*/ /*==============*/
...@@ -47,7 +47,7 @@ trx_undo_arr_get_nth_info( ...@@ -47,7 +47,7 @@ trx_undo_arr_get_nth_info(
ulint n); /* in: position */ ulint n); /* in: position */
/*************************************************************************** /***************************************************************************
Tries truncate the undo logs. */ Tries truncate the undo logs. */
UNIV_INTERN
void void
trx_roll_try_truncate( trx_roll_try_truncate(
/*==================*/ /*==================*/
...@@ -58,7 +58,7 @@ as a single stack of records ordered by their undo numbers. Inserts the ...@@ -58,7 +58,7 @@ as a single stack of records ordered by their undo numbers. Inserts the
undo number of the popped undo record to the array of currently processed undo number of the popped undo record to the array of currently processed
undo numbers in the transaction. When the query thread finishes processing undo numbers in the transaction. When the query thread finishes processing
of this undo record, it must be released with trx_undo_rec_release. */ of this undo record, it must be released with trx_undo_rec_release. */
UNIV_INTERN
trx_undo_rec_t* trx_undo_rec_t*
trx_roll_pop_top_rec_of_trx( trx_roll_pop_top_rec_of_trx(
/*========================*/ /*========================*/
...@@ -73,7 +73,7 @@ trx_roll_pop_top_rec_of_trx( ...@@ -73,7 +73,7 @@ trx_roll_pop_top_rec_of_trx(
Reserves an undo log record for a query thread to undo. This should be Reserves an undo log record for a query thread to undo. This should be
called if the query thread gets the undo log record not using the pop called if the query thread gets the undo log record not using the pop
function above. */ function above. */
UNIV_INTERN
ibool ibool
trx_undo_rec_reserve( trx_undo_rec_reserve(
/*=================*/ /*=================*/
...@@ -82,7 +82,7 @@ trx_undo_rec_reserve( ...@@ -82,7 +82,7 @@ trx_undo_rec_reserve(
dulint undo_no);/* in: undo number of the record */ dulint undo_no);/* in: undo number of the record */
/*********************************************************************** /***********************************************************************
Releases a reserved undo record. */ Releases a reserved undo record. */
UNIV_INTERN
void void
trx_undo_rec_release( trx_undo_rec_release(
/*=================*/ /*=================*/
...@@ -90,7 +90,7 @@ trx_undo_rec_release( ...@@ -90,7 +90,7 @@ trx_undo_rec_release(
dulint undo_no);/* in: undo number */ dulint undo_no);/* in: undo number */
/************************************************************************* /*************************************************************************
Starts a rollback operation. */ Starts a rollback operation. */
UNIV_INTERN
void void
trx_rollback( trx_rollback(
/*=========*/ /*=========*/
...@@ -107,7 +107,7 @@ encountered in crash recovery. If the transaction already was ...@@ -107,7 +107,7 @@ encountered in crash recovery. If the transaction already was
committed, then we clean up a possible insert undo log. If the committed, then we clean up a possible insert undo log. If the
transaction was not yet committed, then we roll it back. transaction was not yet committed, then we roll it back.
Note: this is done in a background thread. */ Note: this is done in a background thread. */
UNIV_INTERN
os_thread_ret_t os_thread_ret_t
trx_rollback_or_clean_all_recovered( trx_rollback_or_clean_all_recovered(
/*================================*/ /*================================*/
...@@ -117,7 +117,7 @@ trx_rollback_or_clean_all_recovered( ...@@ -117,7 +117,7 @@ trx_rollback_or_clean_all_recovered(
os_thread_create */ os_thread_create */
/******************************************************************** /********************************************************************
Finishes a transaction rollback. */ Finishes a transaction rollback. */
UNIV_INTERN
void void
trx_finish_rollback_off_kernel( trx_finish_rollback_off_kernel(
/*===========================*/ /*===========================*/
...@@ -134,7 +134,7 @@ Builds an undo 'query' graph for a transaction. The actual rollback is ...@@ -134,7 +134,7 @@ Builds an undo 'query' graph for a transaction. The actual rollback is
performed by executing this query graph like a query subprocedure call. performed by executing this query graph like a query subprocedure call.
The reply about the completion of the rollback will be sent by this The reply about the completion of the rollback will be sent by this
graph. */ graph. */
UNIV_INTERN
que_t* que_t*
trx_roll_graph_build( trx_roll_graph_build(
/*=================*/ /*=================*/
...@@ -142,7 +142,7 @@ trx_roll_graph_build( ...@@ -142,7 +142,7 @@ trx_roll_graph_build(
trx_t* trx); /* in: trx handle */ trx_t* trx); /* in: trx handle */
/************************************************************************* /*************************************************************************
Creates a rollback command node struct. */ Creates a rollback command node struct. */
UNIV_INTERN
roll_node_t* roll_node_t*
roll_node_create( roll_node_create(
/*=============*/ /*=============*/
...@@ -150,7 +150,7 @@ roll_node_create( ...@@ -150,7 +150,7 @@ roll_node_create(
mem_heap_t* heap); /* in: mem heap where created */ mem_heap_t* heap); /* in: mem heap where created */
/*************************************************************** /***************************************************************
Performs an execution step for a rollback command node in a query graph. */ Performs an execution step for a rollback command node in a query graph. */
UNIV_INTERN
que_thr_t* que_thr_t*
trx_rollback_step( trx_rollback_step(
/*==============*/ /*==============*/
...@@ -158,7 +158,7 @@ trx_rollback_step( ...@@ -158,7 +158,7 @@ trx_rollback_step(
que_thr_t* thr); /* in: query thread */ que_thr_t* thr); /* in: query thread */
/*********************************************************************** /***********************************************************************
Rollback a transaction used in MySQL. */ Rollback a transaction used in MySQL. */
UNIV_INTERN
int int
trx_rollback_for_mysql( trx_rollback_for_mysql(
/*===================*/ /*===================*/
...@@ -166,7 +166,7 @@ trx_rollback_for_mysql( ...@@ -166,7 +166,7 @@ trx_rollback_for_mysql(
trx_t* trx); /* in: transaction handle */ trx_t* trx); /* in: transaction handle */
/*********************************************************************** /***********************************************************************
Rollback the latest SQL statement for MySQL. */ Rollback the latest SQL statement for MySQL. */
UNIV_INTERN
int int
trx_rollback_last_sql_stat_for_mysql( trx_rollback_last_sql_stat_for_mysql(
/*=================================*/ /*=================================*/
...@@ -174,7 +174,7 @@ trx_rollback_last_sql_stat_for_mysql( ...@@ -174,7 +174,7 @@ trx_rollback_last_sql_stat_for_mysql(
trx_t* trx); /* in: transaction handle */ trx_t* trx); /* in: transaction handle */
/*********************************************************************** /***********************************************************************
Rollback a transaction used in MySQL. */ Rollback a transaction used in MySQL. */
UNIV_INTERN
int int
trx_general_rollback_for_mysql( trx_general_rollback_for_mysql(
/*===========================*/ /*===========================*/
...@@ -190,7 +190,7 @@ which are stored in memory. If a lock is 'implicit', that is, a new inserted ...@@ -190,7 +190,7 @@ which are stored in memory. If a lock is 'implicit', that is, a new inserted
row holds a lock where the lock information is carried by the trx id stored in row holds a lock where the lock information is carried by the trx id stored in
the row, these locks are naturally released in the rollback. Savepoints which the row, these locks are naturally released in the rollback. Savepoints which
were set after this savepoint are deleted. */ were set after this savepoint are deleted. */
UNIV_INTERN
ulint ulint
trx_rollback_to_savepoint_for_mysql( trx_rollback_to_savepoint_for_mysql(
/*================================*/ /*================================*/
...@@ -211,7 +211,7 @@ Creates a named savepoint. If the transaction is not yet started, starts it. ...@@ -211,7 +211,7 @@ Creates a named savepoint. If the transaction is not yet started, starts it.
If there is already a savepoint of the same name, this call erases that old If there is already a savepoint of the same name, this call erases that old
savepoint and replaces it with a new. Savepoints are deleted in a transaction savepoint and replaces it with a new. Savepoints are deleted in a transaction
commit or rollback. */ commit or rollback. */
UNIV_INTERN
ulint ulint
trx_savepoint_for_mysql( trx_savepoint_for_mysql(
/*====================*/ /*====================*/
...@@ -226,7 +226,7 @@ trx_savepoint_for_mysql( ...@@ -226,7 +226,7 @@ trx_savepoint_for_mysql(
/*********************************************************************** /***********************************************************************
Releases a named savepoint. Savepoints which Releases a named savepoint. Savepoints which
were set after this savepoint are deleted. */ were set after this savepoint are deleted. */
UNIV_INTERN
ulint ulint
trx_release_savepoint_for_mysql( trx_release_savepoint_for_mysql(
/*============================*/ /*============================*/
...@@ -239,7 +239,7 @@ trx_release_savepoint_for_mysql( ...@@ -239,7 +239,7 @@ trx_release_savepoint_for_mysql(
/*********************************************************************** /***********************************************************************
Frees savepoint structs. */ Frees savepoint structs. */
UNIV_INTERN
void void
trx_roll_savepoints_free( trx_roll_savepoints_free(
/*=====================*/ /*=====================*/
......
...@@ -71,7 +71,7 @@ trx_rsegf_undo_find_free( ...@@ -71,7 +71,7 @@ trx_rsegf_undo_find_free(
mtr_t* mtr); /* in: mtr */ mtr_t* mtr); /* in: mtr */
/********************************************************************** /**********************************************************************
Looks for a rollback segment, based on the rollback segment id. */ Looks for a rollback segment, based on the rollback segment id. */
UNIV_INTERN
trx_rseg_t* trx_rseg_t*
trx_rseg_get_on_id( trx_rseg_get_on_id(
/*===============*/ /*===============*/
...@@ -80,7 +80,7 @@ trx_rseg_get_on_id( ...@@ -80,7 +80,7 @@ trx_rseg_get_on_id(
/******************************************************************** /********************************************************************
Creates a rollback segment header. This function is called only when Creates a rollback segment header. This function is called only when
a new rollback segment is created in the database. */ a new rollback segment is created in the database. */
UNIV_INTERN
ulint ulint
trx_rseg_header_create( trx_rseg_header_create(
/*===================*/ /*===================*/
...@@ -95,7 +95,7 @@ trx_rseg_header_create( ...@@ -95,7 +95,7 @@ trx_rseg_header_create(
/************************************************************************* /*************************************************************************
Creates the memory copies for rollback segments and initializes the Creates the memory copies for rollback segments and initializes the
rseg list and array in trx_sys at a database startup. */ rseg list and array in trx_sys at a database startup. */
UNIV_INTERN
void void
trx_rseg_list_and_array_init( trx_rseg_list_and_array_init(
/*=========================*/ /*=========================*/
...@@ -103,7 +103,7 @@ trx_rseg_list_and_array_init( ...@@ -103,7 +103,7 @@ trx_rseg_list_and_array_init(
mtr_t* mtr); /* in: mtr */ mtr_t* mtr); /* in: mtr */
/******************************************************************** /********************************************************************
Creates a new rollback segment to the database. */ Creates a new rollback segment to the database. */
UNIV_INTERN
trx_rseg_t* trx_rseg_t*
trx_rseg_create( trx_rseg_create(
/*============*/ /*============*/
......
...@@ -52,7 +52,7 @@ extern ibool trx_sys_multiple_tablespace_format; ...@@ -52,7 +52,7 @@ extern ibool trx_sys_multiple_tablespace_format;
/******************************************************************** /********************************************************************
Creates the doublewrite buffer to a new InnoDB installation. The header of the Creates the doublewrite buffer to a new InnoDB installation. The header of the
doublewrite buffer is placed on the trx system header page. */ doublewrite buffer is placed on the trx system header page. */
UNIV_INTERN
void void
trx_sys_create_doublewrite_buf(void); trx_sys_create_doublewrite_buf(void);
/*================================*/ /*================================*/
...@@ -63,7 +63,7 @@ upgrading to an InnoDB version which supports multiple tablespaces, then this ...@@ -63,7 +63,7 @@ upgrading to an InnoDB version which supports multiple tablespaces, then this
function performs the necessary update operations. If we are in a crash function performs the necessary update operations. If we are in a crash
recovery, this function uses a possible doublewrite buffer to restore recovery, this function uses a possible doublewrite buffer to restore
half-written pages in the data files. */ half-written pages in the data files. */
UNIV_INTERN
void void
trx_sys_doublewrite_init_or_restore_pages( trx_sys_doublewrite_init_or_restore_pages(
/*======================================*/ /*======================================*/
...@@ -71,13 +71,13 @@ trx_sys_doublewrite_init_or_restore_pages( ...@@ -71,13 +71,13 @@ trx_sys_doublewrite_init_or_restore_pages(
/******************************************************************** /********************************************************************
Marks the trx sys header when we have successfully upgraded to the >= 4.1.x Marks the trx sys header when we have successfully upgraded to the >= 4.1.x
multiple tablespace format. */ multiple tablespace format. */
UNIV_INTERN
void void
trx_sys_mark_upgraded_to_multiple_tablespaces(void); trx_sys_mark_upgraded_to_multiple_tablespaces(void);
/*===============================================*/ /*===============================================*/
/******************************************************************** /********************************************************************
Determines if a page number is located inside the doublewrite buffer. */ Determines if a page number is located inside the doublewrite buffer. */
UNIV_INTERN
ibool ibool
trx_doublewrite_page_inside( trx_doublewrite_page_inside(
/*========================*/ /*========================*/
...@@ -96,19 +96,19 @@ trx_sys_hdr_page( ...@@ -96,19 +96,19 @@ trx_sys_hdr_page(
/********************************************************************* /*********************************************************************
Creates and initializes the central memory structures for the transaction Creates and initializes the central memory structures for the transaction
system. This is called when the database is started. */ system. This is called when the database is started. */
UNIV_INTERN
void void
trx_sys_init_at_db_start(void); trx_sys_init_at_db_start(void);
/*==========================*/ /*==========================*/
/********************************************************************* /*********************************************************************
Creates and initializes the transaction system at the database creation. */ Creates and initializes the transaction system at the database creation. */
UNIV_INTERN
void void
trx_sys_create(void); trx_sys_create(void);
/*================*/ /*================*/
/******************************************************************** /********************************************************************
Looks for a free slot for a rollback segment in the trx system file copy. */ Looks for a free slot for a rollback segment in the trx system file copy. */
UNIV_INTERN
ulint ulint
trx_sysf_rseg_find_free( trx_sysf_rseg_find_free(
/*====================*/ /*====================*/
...@@ -252,7 +252,7 @@ trx_is_active( ...@@ -252,7 +252,7 @@ trx_is_active(
dulint trx_id);/* in: trx id of the transaction */ dulint trx_id);/* in: trx id of the transaction */
/******************************************************************** /********************************************************************
Checks that trx is in the trx list. */ Checks that trx is in the trx list. */
UNIV_INTERN
ibool ibool
trx_in_trx_list( trx_in_trx_list(
/*============*/ /*============*/
...@@ -263,7 +263,7 @@ Updates the offset information about the end of the MySQL binlog entry ...@@ -263,7 +263,7 @@ Updates the offset information about the end of the MySQL binlog entry
which corresponds to the transaction just being committed. In a MySQL which corresponds to the transaction just being committed. In a MySQL
replication slave updates the latest master binlog position up to which replication slave updates the latest master binlog position up to which
replication has proceeded. */ replication has proceeded. */
UNIV_INTERN
void void
trx_sys_update_mysql_binlog_offset( trx_sys_update_mysql_binlog_offset(
/*===============================*/ /*===============================*/
...@@ -275,7 +275,7 @@ trx_sys_update_mysql_binlog_offset( ...@@ -275,7 +275,7 @@ trx_sys_update_mysql_binlog_offset(
/********************************************************************* /*********************************************************************
Prints to stderr the MySQL binlog offset info in the trx system header if Prints to stderr the MySQL binlog offset info in the trx system header if
the magic number shows it valid. */ the magic number shows it valid. */
UNIV_INTERN
void void
trx_sys_print_mysql_binlog_offset(void); trx_sys_print_mysql_binlog_offset(void);
/*===================================*/ /*===================================*/
...@@ -283,7 +283,7 @@ trx_sys_print_mysql_binlog_offset(void); ...@@ -283,7 +283,7 @@ trx_sys_print_mysql_binlog_offset(void);
/********************************************************************* /*********************************************************************
Prints to stderr the MySQL binlog info in the system header if the Prints to stderr the MySQL binlog info in the system header if the
magic number shows it valid. */ magic number shows it valid. */
UNIV_INTERN
void void
trx_sys_print_mysql_binlog_offset_from_page( trx_sys_print_mysql_binlog_offset_from_page(
/*========================================*/ /*========================================*/
...@@ -294,7 +294,7 @@ trx_sys_print_mysql_binlog_offset_from_page( ...@@ -294,7 +294,7 @@ trx_sys_print_mysql_binlog_offset_from_page(
/********************************************************************* /*********************************************************************
Prints to stderr the MySQL master log offset info in the trx system header if Prints to stderr the MySQL master log offset info in the trx system header if
the magic number shows it valid. */ the magic number shows it valid. */
UNIV_INTERN
void void
trx_sys_print_mysql_master_log_pos(void); trx_sys_print_mysql_master_log_pos(void);
/*====================================*/ /*====================================*/
......
...@@ -56,13 +56,14 @@ trx_new_rec_locks_contain( ...@@ -56,13 +56,14 @@ trx_new_rec_locks_contain(
dict_index_t* index); /* in: index */ dict_index_t* index); /* in: index */
/************************************************************************ /************************************************************************
Releases the search latch if trx has reserved it. */ Releases the search latch if trx has reserved it. */
UNIV_INTERN
void void
trx_search_latch_release_if_reserved( trx_search_latch_release_if_reserved(
/*=================================*/ /*=================================*/
trx_t* trx); /* in: transaction */ trx_t* trx); /* in: transaction */
/********************************************************************** /**********************************************************************
Set detailed error message for the transaction. */ Set detailed error message for the transaction. */
UNIV_INTERN
void void
trx_set_detailed_error( trx_set_detailed_error(
/*===================*/ /*===================*/
...@@ -71,7 +72,7 @@ trx_set_detailed_error( ...@@ -71,7 +72,7 @@ trx_set_detailed_error(
/***************************************************************** /*****************************************************************
Set detailed error message for the transaction from a file. Note that the Set detailed error message for the transaction from a file. Note that the
file is rewinded before reading from it. */ file is rewinded before reading from it. */
UNIV_INTERN
void void
trx_set_detailed_error_from_file( trx_set_detailed_error_from_file(
/*=============================*/ /*=============================*/
...@@ -87,7 +88,7 @@ trx_get_error_info( ...@@ -87,7 +88,7 @@ trx_get_error_info(
const trx_t* trx); /* in: trx object */ const trx_t* trx); /* in: trx object */
/******************************************************************** /********************************************************************
Creates and initializes a transaction object. */ Creates and initializes a transaction object. */
UNIV_INTERN
trx_t* trx_t*
trx_create( trx_create(
/*=======*/ /*=======*/
...@@ -96,35 +97,35 @@ trx_create( ...@@ -96,35 +97,35 @@ trx_create(
__attribute__((nonnull)); __attribute__((nonnull));
/************************************************************************ /************************************************************************
Creates a transaction object for MySQL. */ Creates a transaction object for MySQL. */
UNIV_INTERN
trx_t* trx_t*
trx_allocate_for_mysql(void); trx_allocate_for_mysql(void);
/*========================*/ /*========================*/
/* out, own: transaction object */ /* out, own: transaction object */
/************************************************************************ /************************************************************************
Creates a transaction object for background operations by the master thread. */ Creates a transaction object for background operations by the master thread. */
UNIV_INTERN
trx_t* trx_t*
trx_allocate_for_background(void); trx_allocate_for_background(void);
/*=============================*/ /*=============================*/
/* out, own: transaction object */ /* out, own: transaction object */
/************************************************************************ /************************************************************************
Frees a transaction object. */ Frees a transaction object. */
UNIV_INTERN
void void
trx_free( trx_free(
/*=====*/ /*=====*/
trx_t* trx); /* in, own: trx object */ trx_t* trx); /* in, own: trx object */
/************************************************************************ /************************************************************************
Frees a transaction object for MySQL. */ Frees a transaction object for MySQL. */
UNIV_INTERN
void void
trx_free_for_mysql( trx_free_for_mysql(
/*===============*/ /*===============*/
trx_t* trx); /* in, own: trx object */ trx_t* trx); /* in, own: trx object */
/************************************************************************ /************************************************************************
Frees a transaction object of a background operation of the master thread. */ Frees a transaction object of a background operation of the master thread. */
UNIV_INTERN
void void
trx_free_for_background( trx_free_for_background(
/*====================*/ /*====================*/
...@@ -135,13 +136,13 @@ trx_sys at database start. Rollback segment and undo log lists must ...@@ -135,13 +136,13 @@ trx_sys at database start. Rollback segment and undo log lists must
already exist when this function is called, because the lists of already exist when this function is called, because the lists of
transactions to be rolled back or cleaned up are built based on the transactions to be rolled back or cleaned up are built based on the
undo log lists. */ undo log lists. */
UNIV_INTERN
void void
trx_lists_init_at_db_start(void); trx_lists_init_at_db_start(void);
/*============================*/ /*============================*/
/******************************************************************** /********************************************************************
Starts a new transaction. */ Starts a new transaction. */
UNIV_INTERN
ibool ibool
trx_start( trx_start(
/*======*/ /*======*/
...@@ -153,7 +154,7 @@ trx_start( ...@@ -153,7 +154,7 @@ trx_start(
automatically in a round-robin fashion */ automatically in a round-robin fashion */
/******************************************************************** /********************************************************************
Starts a new transaction. */ Starts a new transaction. */
UNIV_INTERN
ibool ibool
trx_start_low( trx_start_low(
/*==========*/ /*==========*/
...@@ -179,7 +180,7 @@ trx_start_if_not_started_low( ...@@ -179,7 +180,7 @@ trx_start_if_not_started_low(
trx_t* trx); /* in: transaction */ trx_t* trx); /* in: transaction */
/******************************************************************** /********************************************************************
Commits a transaction. */ Commits a transaction. */
UNIV_INTERN
void void
trx_commit_off_kernel( trx_commit_off_kernel(
/*==================*/ /*==================*/
...@@ -188,14 +189,14 @@ trx_commit_off_kernel( ...@@ -188,14 +189,14 @@ trx_commit_off_kernel(
Cleans up a transaction at database startup. The cleanup is needed if Cleans up a transaction at database startup. The cleanup is needed if
the transaction already got to the middle of a commit when the database the transaction already got to the middle of a commit when the database
crashed, andf we cannot roll it back. */ crashed, andf we cannot roll it back. */
UNIV_INTERN
void void
trx_cleanup_at_db_startup( trx_cleanup_at_db_startup(
/*======================*/ /*======================*/
trx_t* trx); /* in: transaction */ trx_t* trx); /* in: transaction */
/************************************************************************** /**************************************************************************
Does the transaction commit for MySQL. */ Does the transaction commit for MySQL. */
UNIV_INTERN
ulint ulint
trx_commit_for_mysql( trx_commit_for_mysql(
/*=================*/ /*=================*/
...@@ -203,7 +204,7 @@ trx_commit_for_mysql( ...@@ -203,7 +204,7 @@ trx_commit_for_mysql(
trx_t* trx); /* in: trx handle */ trx_t* trx); /* in: trx handle */
/************************************************************************** /**************************************************************************
Does the transaction prepare for MySQL. */ Does the transaction prepare for MySQL. */
UNIV_INTERN
ulint ulint
trx_prepare_for_mysql( trx_prepare_for_mysql(
/*==================*/ /*==================*/
...@@ -212,7 +213,7 @@ trx_prepare_for_mysql( ...@@ -212,7 +213,7 @@ trx_prepare_for_mysql(
/************************************************************************** /**************************************************************************
This function is used to find number of prepared transactions and This function is used to find number of prepared transactions and
their transaction objects for a recovery. */ their transaction objects for a recovery. */
UNIV_INTERN
int int
trx_recover_for_mysql( trx_recover_for_mysql(
/*==================*/ /*==================*/
...@@ -222,6 +223,7 @@ trx_recover_for_mysql( ...@@ -222,6 +223,7 @@ trx_recover_for_mysql(
/*********************************************************************** /***********************************************************************
This function is used to find one X/Open XA distributed transaction This function is used to find one X/Open XA distributed transaction
which is in the prepared state */ which is in the prepared state */
UNIV_INTERN
trx_t * trx_t *
trx_get_trx_by_xid( trx_get_trx_by_xid(
/*===============*/ /*===============*/
...@@ -230,7 +232,7 @@ trx_get_trx_by_xid( ...@@ -230,7 +232,7 @@ trx_get_trx_by_xid(
/************************************************************************** /**************************************************************************
If required, flushes the log to disk if we called trx_commit_for_mysql() If required, flushes the log to disk if we called trx_commit_for_mysql()
with trx->flush_log_later == TRUE. */ with trx->flush_log_later == TRUE. */
UNIV_INTERN
ulint ulint
trx_commit_complete_for_mysql( trx_commit_complete_for_mysql(
/*==========================*/ /*==========================*/
...@@ -238,7 +240,7 @@ trx_commit_complete_for_mysql( ...@@ -238,7 +240,7 @@ trx_commit_complete_for_mysql(
trx_t* trx); /* in: trx handle */ trx_t* trx); /* in: trx handle */
/************************************************************************** /**************************************************************************
Marks the latest SQL statement ended. */ Marks the latest SQL statement ended. */
UNIV_INTERN
void void
trx_mark_sql_stat_end( trx_mark_sql_stat_end(
/*==================*/ /*==================*/
...@@ -247,7 +249,7 @@ trx_mark_sql_stat_end( ...@@ -247,7 +249,7 @@ trx_mark_sql_stat_end(
Assigns a read view for a consistent read query. All the consistent reads Assigns a read view for a consistent read query. All the consistent reads
within the same transaction will get the same read view, which is created within the same transaction will get the same read view, which is created
when this function is first called for a new started transaction. */ when this function is first called for a new started transaction. */
UNIV_INTERN
read_view_t* read_view_t*
trx_assign_read_view( trx_assign_read_view(
/*=================*/ /*=================*/
...@@ -257,14 +259,14 @@ trx_assign_read_view( ...@@ -257,14 +259,14 @@ trx_assign_read_view(
The transaction must be in the TRX_QUE_LOCK_WAIT state. Puts it to The transaction must be in the TRX_QUE_LOCK_WAIT state. Puts it to
the TRX_QUE_RUNNING state and releases query threads which were the TRX_QUE_RUNNING state and releases query threads which were
waiting for a lock in the wait_thrs list. */ waiting for a lock in the wait_thrs list. */
UNIV_INTERN
void void
trx_end_lock_wait( trx_end_lock_wait(
/*==============*/ /*==============*/
trx_t* trx); /* in: transaction */ trx_t* trx); /* in: transaction */
/******************************************************************** /********************************************************************
Sends a signal to a trx object. */ Sends a signal to a trx object. */
UNIV_INTERN
void void
trx_sig_send( trx_sig_send(
/*=========*/ /*=========*/
...@@ -286,7 +288,7 @@ trx_sig_send( ...@@ -286,7 +288,7 @@ trx_sig_send(
/******************************************************************** /********************************************************************
Send the reply message when a signal in the queue of the trx has Send the reply message when a signal in the queue of the trx has
been handled. */ been handled. */
UNIV_INTERN
void void
trx_sig_reply( trx_sig_reply(
/*==========*/ /*==========*/
...@@ -298,7 +300,7 @@ trx_sig_reply( ...@@ -298,7 +300,7 @@ trx_sig_reply(
a new query thread */ a new query thread */
/******************************************************************** /********************************************************************
Removes the signal object from a trx signal queue. */ Removes the signal object from a trx signal queue. */
UNIV_INTERN
void void
trx_sig_remove( trx_sig_remove(
/*===========*/ /*===========*/
...@@ -306,7 +308,7 @@ trx_sig_remove( ...@@ -306,7 +308,7 @@ trx_sig_remove(
trx_sig_t* sig); /* in, own: signal */ trx_sig_t* sig); /* in, own: signal */
/******************************************************************** /********************************************************************
Starts handling of a trx signal. */ Starts handling of a trx signal. */
UNIV_INTERN
void void
trx_sig_start_handle( trx_sig_start_handle(
/*=================*/ /*=================*/
...@@ -321,14 +323,14 @@ Ends signal handling. If the session is in the error state, and ...@@ -321,14 +323,14 @@ Ends signal handling. If the session is in the error state, and
trx->graph_before_signal_handling != NULL, returns control to the error trx->graph_before_signal_handling != NULL, returns control to the error
handling routine of the graph (currently only returns the control to the handling routine of the graph (currently only returns the control to the
graph root which then sends an error message to the client). */ graph root which then sends an error message to the client). */
UNIV_INTERN
void void
trx_end_signal_handling( trx_end_signal_handling(
/*====================*/ /*====================*/
trx_t* trx); /* in: trx */ trx_t* trx); /* in: trx */
/************************************************************************* /*************************************************************************
Creates a commit command node struct. */ Creates a commit command node struct. */
UNIV_INTERN
commit_node_t* commit_node_t*
commit_node_create( commit_node_create(
/*===============*/ /*===============*/
...@@ -336,7 +338,7 @@ commit_node_create( ...@@ -336,7 +338,7 @@ commit_node_create(
mem_heap_t* heap); /* in: mem heap where created */ mem_heap_t* heap); /* in: mem heap where created */
/*************************************************************** /***************************************************************
Performs an execution step for a commit type node in a query graph. */ Performs an execution step for a commit type node in a query graph. */
UNIV_INTERN
que_thr_t* que_thr_t*
trx_commit_step( trx_commit_step(
/*============*/ /*============*/
...@@ -348,7 +350,7 @@ Prints info about a transaction to the given file. The caller must own the ...@@ -348,7 +350,7 @@ Prints info about a transaction to the given file. The caller must own the
kernel mutex and must have called kernel mutex and must have called
innobase_mysql_prepare_print_arbitrary_thd(), unless he knows that MySQL innobase_mysql_prepare_print_arbitrary_thd(), unless he knows that MySQL
or InnoDB cannot meanwhile change the info printed here. */ or InnoDB cannot meanwhile change the info printed here. */
UNIV_INTERN
void void
trx_print( trx_print(
/*======*/ /*======*/
...@@ -394,7 +396,7 @@ trx_set_dict_operation( ...@@ -394,7 +396,7 @@ trx_set_dict_operation(
#ifndef UNIV_HOTBACKUP #ifndef UNIV_HOTBACKUP
/************************************************************************** /**************************************************************************
Determines if the currently running transaction has been interrupted. */ Determines if the currently running transaction has been interrupted. */
UNIV_INTERN
ibool ibool
trx_is_interrupted( trx_is_interrupted(
/*===============*/ /*===============*/
...@@ -416,7 +418,7 @@ is estimated as the number of altered rows + the number of locked rows. ...@@ -416,7 +418,7 @@ is estimated as the number of altered rows + the number of locked rows.
Compares the "weight" (or size) of two transactions. Transactions that Compares the "weight" (or size) of two transactions. Transactions that
have edited non-transactional tables are considered heavier than ones have edited non-transactional tables are considered heavier than ones
that have not. */ that have not. */
UNIV_INTERN
int int
trx_weight_cmp( trx_weight_cmp(
/*===========*/ /*===========*/
......
...@@ -136,7 +136,7 @@ trx_undo_page_get_first_rec( ...@@ -136,7 +136,7 @@ trx_undo_page_get_first_rec(
ulint offset);/* in: undo log header offset on page */ ulint offset);/* in: undo log header offset on page */
/*************************************************************************** /***************************************************************************
Gets the previous record in an undo log. */ Gets the previous record in an undo log. */
UNIV_INTERN
trx_undo_rec_t* trx_undo_rec_t*
trx_undo_get_prev_rec( trx_undo_get_prev_rec(
/*==================*/ /*==================*/
...@@ -148,7 +148,7 @@ trx_undo_get_prev_rec( ...@@ -148,7 +148,7 @@ trx_undo_get_prev_rec(
mtr_t* mtr); /* in: mtr */ mtr_t* mtr); /* in: mtr */
/*************************************************************************** /***************************************************************************
Gets the next record in an undo log. */ Gets the next record in an undo log. */
UNIV_INTERN
trx_undo_rec_t* trx_undo_rec_t*
trx_undo_get_next_rec( trx_undo_get_next_rec(
/*==================*/ /*==================*/
...@@ -160,7 +160,7 @@ trx_undo_get_next_rec( ...@@ -160,7 +160,7 @@ trx_undo_get_next_rec(
mtr_t* mtr); /* in: mtr */ mtr_t* mtr); /* in: mtr */
/*************************************************************************** /***************************************************************************
Gets the first record in an undo log. */ Gets the first record in an undo log. */
UNIV_INTERN
trx_undo_rec_t* trx_undo_rec_t*
trx_undo_get_first_rec( trx_undo_get_first_rec(
/*===================*/ /*===================*/
...@@ -175,7 +175,7 @@ trx_undo_get_first_rec( ...@@ -175,7 +175,7 @@ trx_undo_get_first_rec(
mtr_t* mtr); /* in: mtr */ mtr_t* mtr); /* in: mtr */
/************************************************************************ /************************************************************************
Tries to add a page to the undo log segment where the undo log is placed. */ Tries to add a page to the undo log segment where the undo log is placed. */
UNIV_INTERN
ulint ulint
trx_undo_add_page( trx_undo_add_page(
/*==============*/ /*==============*/
...@@ -189,7 +189,7 @@ trx_undo_add_page( ...@@ -189,7 +189,7 @@ trx_undo_add_page(
/*************************************************************************** /***************************************************************************
Truncates an undo log from the end. This function is used during a rollback Truncates an undo log from the end. This function is used during a rollback
to free space from an undo log. */ to free space from an undo log. */
UNIV_INTERN
void void
trx_undo_truncate_end( trx_undo_truncate_end(
/*==================*/ /*==================*/
...@@ -200,7 +200,7 @@ trx_undo_truncate_end( ...@@ -200,7 +200,7 @@ trx_undo_truncate_end(
/*************************************************************************** /***************************************************************************
Truncates an undo log from the start. This function is used during a purge Truncates an undo log from the start. This function is used during a purge
operation. */ operation. */
UNIV_INTERN
void void
trx_undo_truncate_start( trx_undo_truncate_start(
/*====================*/ /*====================*/
...@@ -217,7 +217,7 @@ trx_undo_truncate_start( ...@@ -217,7 +217,7 @@ trx_undo_truncate_start(
Initializes the undo log lists for a rollback segment memory copy. Initializes the undo log lists for a rollback segment memory copy.
This function is only called when the database is started or a new This function is only called when the database is started or a new
rollback segment created. */ rollback segment created. */
UNIV_INTERN
ulint ulint
trx_undo_lists_init( trx_undo_lists_init(
/*================*/ /*================*/
...@@ -227,7 +227,7 @@ trx_undo_lists_init( ...@@ -227,7 +227,7 @@ trx_undo_lists_init(
/************************************************************************** /**************************************************************************
Assigns an undo log for a transaction. A new undo log is created or a cached Assigns an undo log for a transaction. A new undo log is created or a cached
undo log reused. */ undo log reused. */
UNIV_INTERN
ulint ulint
trx_undo_assign_undo( trx_undo_assign_undo(
/*=================*/ /*=================*/
...@@ -240,7 +240,7 @@ trx_undo_assign_undo( ...@@ -240,7 +240,7 @@ trx_undo_assign_undo(
ulint type); /* in: TRX_UNDO_INSERT or TRX_UNDO_UPDATE */ ulint type); /* in: TRX_UNDO_INSERT or TRX_UNDO_UPDATE */
/********************************************************************** /**********************************************************************
Sets the state of the undo log segment at a transaction finish. */ Sets the state of the undo log segment at a transaction finish. */
UNIV_INTERN
page_t* page_t*
trx_undo_set_state_at_finish( trx_undo_set_state_at_finish(
/*=========================*/ /*=========================*/
...@@ -251,7 +251,7 @@ trx_undo_set_state_at_finish( ...@@ -251,7 +251,7 @@ trx_undo_set_state_at_finish(
mtr_t* mtr); /* in: mtr */ mtr_t* mtr); /* in: mtr */
/********************************************************************** /**********************************************************************
Sets the state of the undo log segment at a transaction prepare. */ Sets the state of the undo log segment at a transaction prepare. */
UNIV_INTERN
page_t* page_t*
trx_undo_set_state_at_prepare( trx_undo_set_state_at_prepare(
/*==========================*/ /*==========================*/
...@@ -265,7 +265,7 @@ trx_undo_set_state_at_prepare( ...@@ -265,7 +265,7 @@ trx_undo_set_state_at_prepare(
Adds the update undo log header as the first in the history list, and Adds the update undo log header as the first in the history list, and
frees the memory object, or puts it to the list of cached update undo log frees the memory object, or puts it to the list of cached update undo log
segments. */ segments. */
UNIV_INTERN
void void
trx_undo_update_cleanup( trx_undo_update_cleanup(
/*====================*/ /*====================*/
...@@ -277,14 +277,14 @@ trx_undo_update_cleanup( ...@@ -277,14 +277,14 @@ trx_undo_update_cleanup(
Frees or caches an insert undo log after a transaction commit or rollback. Frees or caches an insert undo log after a transaction commit or rollback.
Knowledge of inserts is not needed after a commit or rollback, therefore Knowledge of inserts is not needed after a commit or rollback, therefore
the data can be discarded. */ the data can be discarded. */
UNIV_INTERN
void void
trx_undo_insert_cleanup( trx_undo_insert_cleanup(
/*====================*/ /*====================*/
trx_t* trx); /* in: transaction handle */ trx_t* trx); /* in: transaction handle */
/*************************************************************** /***************************************************************
Parses the redo log entry of an undo log page initialization. */ Parses the redo log entry of an undo log page initialization. */
UNIV_INTERN
byte* byte*
trx_undo_parse_page_init( trx_undo_parse_page_init(
/*=====================*/ /*=====================*/
...@@ -295,7 +295,7 @@ trx_undo_parse_page_init( ...@@ -295,7 +295,7 @@ trx_undo_parse_page_init(
mtr_t* mtr); /* in: mtr or NULL */ mtr_t* mtr); /* in: mtr or NULL */
/*************************************************************** /***************************************************************
Parses the redo log entry of an undo log page header create or reuse. */ Parses the redo log entry of an undo log page header create or reuse. */
UNIV_INTERN
byte* byte*
trx_undo_parse_page_header( trx_undo_parse_page_header(
/*=======================*/ /*=======================*/
...@@ -307,7 +307,7 @@ trx_undo_parse_page_header( ...@@ -307,7 +307,7 @@ trx_undo_parse_page_header(
mtr_t* mtr); /* in: mtr or NULL */ mtr_t* mtr); /* in: mtr or NULL */
/*************************************************************** /***************************************************************
Parses the redo log entry of an undo log page header discard. */ Parses the redo log entry of an undo log page header discard. */
UNIV_INTERN
byte* byte*
trx_undo_parse_discard_latest( trx_undo_parse_discard_latest(
/*==========================*/ /*==========================*/
......
...@@ -21,7 +21,7 @@ Created 6/25/1996 Heikki Tuuri ...@@ -21,7 +21,7 @@ Created 6/25/1996 Heikki Tuuri
/************************************************************************* /*************************************************************************
Opens a session. */ Opens a session. */
UNIV_INTERN
sess_t* sess_t*
sess_open(void); sess_open(void);
/*============*/ /*============*/
...@@ -29,7 +29,7 @@ sess_open(void); ...@@ -29,7 +29,7 @@ sess_open(void);
/************************************************************************* /*************************************************************************
Closes a session, freeing the memory occupied by it, if it is in a state Closes a session, freeing the memory occupied by it, if it is in a state
where it should be closed. */ where it should be closed. */
UNIV_INTERN
ibool ibool
sess_try_close( sess_try_close(
/*===========*/ /*===========*/
......
...@@ -183,11 +183,15 @@ Increments a dulint variable by 1. */ ...@@ -183,11 +183,15 @@ Increments a dulint variable by 1. */
Tests if two dulints are equal. */ Tests if two dulints are equal. */
#define UT_DULINT_EQ(D1, D2) (((D1).low == (D2).low)\ #define UT_DULINT_EQ(D1, D2) (((D1).low == (D2).low)\
&& ((D1).high == (D2).high)) && ((D1).high == (D2).high))
#ifdef notdefined
/**************************************************************** /****************************************************************
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);
/*===============================================================*/ /*===============================================================*/
#endif /* notdefined */
/************************************************************ /************************************************************
The following function calculates the value of an integer n rounded The following function calculates the value of an integer n rounded
to the least product of align_no which is >= n. align_no has to be a to the least product of align_no which is >= n. align_no has to be a
......
...@@ -23,7 +23,7 @@ extern ulint ut_dbg_zero; /* This is used to eliminate ...@@ -23,7 +23,7 @@ extern ulint ut_dbg_zero; /* This is used to eliminate
/***************************************************************** /*****************************************************************
Report a failed assertion. */ Report a failed assertion. */
UNIV_INTERN
void void
ut_dbg_assertion_failed( ut_dbg_assertion_failed(
/*====================*/ /*====================*/
...@@ -59,7 +59,7 @@ extern ibool ut_dbg_stop_threads; ...@@ -59,7 +59,7 @@ extern ibool ut_dbg_stop_threads;
/***************************************************************** /*****************************************************************
Stop a thread after assertion failure. */ Stop a thread after assertion failure. */
UNIV_INTERN
void void
ut_dbg_stop_thread( ut_dbg_stop_thread(
/*===============*/ /*===============*/
...@@ -124,7 +124,7 @@ typedef struct speedo_struct { ...@@ -124,7 +124,7 @@ typedef struct speedo_struct {
/*********************************************************************** /***********************************************************************
Resets a speedo (records the current time in it). */ Resets a speedo (records the current time in it). */
UNIV_INTERN
void void
speedo_reset( speedo_reset(
/*=========*/ /*=========*/
...@@ -133,7 +133,7 @@ speedo_reset( ...@@ -133,7 +133,7 @@ speedo_reset(
/*********************************************************************** /***********************************************************************
Shows the time elapsed and usage statistics since the last reset of a Shows the time elapsed and usage statistics since the last reset of a
speedo. */ speedo. */
UNIV_INTERN
void void
speedo_show( speedo_show(
/*========*/ /*========*/
......
...@@ -31,7 +31,7 @@ typedef struct ib_list_helper_struct ib_list_helper_t; ...@@ -31,7 +31,7 @@ typedef struct ib_list_helper_struct ib_list_helper_t;
/******************************************************************** /********************************************************************
Create a new list using mem_alloc. Lists created with this function must be Create a new list using mem_alloc. Lists created with this function must be
freed with ib_list_free. */ freed with ib_list_free. */
UNIV_INTERN
ib_list_t* ib_list_t*
ib_list_create(void); ib_list_create(void);
/*=================*/ /*=================*/
...@@ -41,7 +41,7 @@ ib_list_create(void); ...@@ -41,7 +41,7 @@ ib_list_create(void);
/******************************************************************** /********************************************************************
Create a new list using the given heap. ib_list_free MUST NOT BE CALLED for Create a new list using the given heap. ib_list_free MUST NOT BE CALLED for
lists created with this function. */ lists created with this function. */
UNIV_INTERN
ib_list_t* ib_list_t*
ib_list_create_heap( ib_list_create_heap(
/*================*/ /*================*/
...@@ -50,7 +50,7 @@ ib_list_create_heap( ...@@ -50,7 +50,7 @@ ib_list_create_heap(
/******************************************************************** /********************************************************************
Free a list. */ Free a list. */
UNIV_INTERN
void void
ib_list_free( ib_list_free(
/*=========*/ /*=========*/
...@@ -58,7 +58,7 @@ ib_list_free( ...@@ -58,7 +58,7 @@ ib_list_free(
/******************************************************************** /********************************************************************
Add the data to the start of the list. */ Add the data to the start of the list. */
UNIV_INTERN
ib_list_node_t* ib_list_node_t*
ib_list_add_first( ib_list_add_first(
/*==============*/ /*==============*/
...@@ -69,7 +69,7 @@ ib_list_add_first( ...@@ -69,7 +69,7 @@ ib_list_add_first(
/******************************************************************** /********************************************************************
Add the data to the end of the list. */ Add the data to the end of the list. */
UNIV_INTERN
ib_list_node_t* ib_list_node_t*
ib_list_add_last( ib_list_add_last(
/*=============*/ /*=============*/
...@@ -80,7 +80,7 @@ ib_list_add_last( ...@@ -80,7 +80,7 @@ ib_list_add_last(
/******************************************************************** /********************************************************************
Add the data after the indicated node. */ Add the data after the indicated node. */
UNIV_INTERN
ib_list_node_t* ib_list_node_t*
ib_list_add_after( ib_list_add_after(
/*==============*/ /*==============*/
...@@ -93,7 +93,7 @@ ib_list_add_after( ...@@ -93,7 +93,7 @@ ib_list_add_after(
/******************************************************************** /********************************************************************
Remove the node from the list. */ Remove the node from the list. */
UNIV_INTERN
void void
ib_list_remove( ib_list_remove(
/*===========*/ /*===========*/
......
...@@ -32,7 +32,7 @@ ut_memcmp(const void* str1, const void* str2, ulint n); ...@@ -32,7 +32,7 @@ ut_memcmp(const void* str1, const void* str2, ulint n);
/************************************************************************** /**************************************************************************
Allocates memory. Sets it also to zero if UNIV_SET_MEM_TO_ZERO is Allocates memory. Sets it also to zero if UNIV_SET_MEM_TO_ZERO is
defined and set_to_zero is TRUE. */ defined and set_to_zero is TRUE. */
UNIV_INTERN
void* void*
ut_malloc_low( ut_malloc_low(
/*==========*/ /*==========*/
...@@ -46,7 +46,7 @@ ut_malloc_low( ...@@ -46,7 +46,7 @@ ut_malloc_low(
/************************************************************************** /**************************************************************************
Allocates memory. Sets it also to zero if UNIV_SET_MEM_TO_ZERO is Allocates memory. Sets it also to zero if UNIV_SET_MEM_TO_ZERO is
defined. */ defined. */
UNIV_INTERN
void* void*
ut_malloc( ut_malloc(
/*======*/ /*======*/
...@@ -56,7 +56,7 @@ ut_malloc( ...@@ -56,7 +56,7 @@ ut_malloc(
Tests if malloc of n bytes would succeed. ut_malloc() asserts if memory runs Tests if malloc of n bytes would succeed. ut_malloc() asserts if memory runs
out. It cannot be used if we want to return an error message. Prints to out. It cannot be used if we want to return an error message. Prints to
stderr a message if fails. */ stderr a message if fails. */
UNIV_INTERN
ibool ibool
ut_test_malloc( ut_test_malloc(
/*===========*/ /*===========*/
...@@ -64,7 +64,7 @@ ut_test_malloc( ...@@ -64,7 +64,7 @@ ut_test_malloc(
ulint n); /* in: try to allocate this many bytes */ ulint n); /* in: try to allocate this many bytes */
/************************************************************************** /**************************************************************************
Frees a memory block allocated with ut_malloc. */ Frees a memory block allocated with ut_malloc. */
UNIV_INTERN
void void
ut_free( ut_free(
/*====*/ /*====*/
...@@ -93,7 +93,7 @@ RETURN VALUE ...@@ -93,7 +93,7 @@ RETURN VALUE
be passed to free() is returned. If realloc() fails the be passed to free() is returned. If realloc() fails the
original block is left untouched - it is not freed or original block is left untouched - it is not freed or
moved. */ moved. */
UNIV_INTERN
void* void*
ut_realloc( ut_realloc(
/*=======*/ /*=======*/
...@@ -102,7 +102,7 @@ ut_realloc( ...@@ -102,7 +102,7 @@ ut_realloc(
ulint size); /* in: desired size */ ulint size); /* in: desired size */
/************************************************************************** /**************************************************************************
Frees in shutdown all allocated memory not freed yet. */ Frees in shutdown all allocated memory not freed yet. */
UNIV_INTERN
void void
ut_free_all_mem(void); ut_free_all_mem(void);
/*=================*/ /*=================*/
...@@ -123,7 +123,7 @@ ut_strcmp(const char* str1, const char* str2); ...@@ -123,7 +123,7 @@ ut_strcmp(const char* str1, const char* str2);
Copies up to size - 1 characters from the NUL-terminated string src to Copies up to size - 1 characters from the NUL-terminated string src to
dst, NUL-terminating the result. Returns strlen(src), so truncation dst, NUL-terminating the result. Returns strlen(src), so truncation
occurred if the return value >= size. */ occurred if the return value >= size. */
UNIV_INTERN
ulint ulint
ut_strlcpy( ut_strlcpy(
/*=======*/ /*=======*/
...@@ -135,7 +135,7 @@ ut_strlcpy( ...@@ -135,7 +135,7 @@ ut_strlcpy(
/************************************************************************** /**************************************************************************
Like ut_strlcpy, but if src doesn't fit in dst completely, copies the last Like ut_strlcpy, but if src doesn't fit in dst completely, copies the last
(size - 1) bytes of src, not the first. */ (size - 1) bytes of src, not the first. */
UNIV_INTERN
ulint ulint
ut_strlcpy_rev( ut_strlcpy_rev(
/*===========*/ /*===========*/
...@@ -158,7 +158,7 @@ ut_strlenq( ...@@ -158,7 +158,7 @@ ut_strlenq(
Make a quoted copy of a NUL-terminated string. Leading and trailing Make a quoted copy of a NUL-terminated string. Leading and trailing
quotes will not be included; only embedded quotes will be escaped. quotes will not be included; only embedded quotes will be escaped.
See also ut_strlenq() and ut_memcpyq(). */ See also ut_strlenq() and ut_memcpyq(). */
UNIV_INTERN
char* char*
ut_strcpyq( ut_strcpyq(
/*=======*/ /*=======*/
...@@ -171,7 +171,7 @@ ut_strcpyq( ...@@ -171,7 +171,7 @@ ut_strcpyq(
Make a quoted copy of a fixed-length string. Leading and trailing Make a quoted copy of a fixed-length string. Leading and trailing
quotes will not be included; only embedded quotes will be escaped. quotes will not be included; only embedded quotes will be escaped.
See also ut_strlenq() and ut_strcpyq(). */ See also ut_strlenq() and ut_strcpyq(). */
UNIV_INTERN
char* char*
ut_memcpyq( ut_memcpyq(
/*=======*/ /*=======*/
...@@ -184,7 +184,7 @@ ut_memcpyq( ...@@ -184,7 +184,7 @@ ut_memcpyq(
/************************************************************************** /**************************************************************************
Return the number of times s2 occurs in s1. Overlapping instances of s2 Return the number of times s2 occurs in s1. Overlapping instances of s2
are only counted once. */ are only counted once. */
UNIV_INTERN
ulint ulint
ut_strcount( ut_strcount(
/*========*/ /*========*/
...@@ -195,7 +195,7 @@ ut_strcount( ...@@ -195,7 +195,7 @@ ut_strcount(
/************************************************************************** /**************************************************************************
Replace every occurrence of s1 in str with s2. Overlapping instances of s1 Replace every occurrence of s1 in str with s2. Overlapping instances of s1
are only replaced once. */ are only replaced once. */
UNIV_INTERN
char* char*
ut_strreplace( ut_strreplace(
/*==========*/ /*==========*/
......
...@@ -110,7 +110,7 @@ ut_fold_binary( ...@@ -110,7 +110,7 @@ ut_fold_binary(
/*************************************************************** /***************************************************************
Looks for a prime number slightly greater than the given argument. Looks for a prime number slightly greater than the given argument.
The prime is chosen so that it is not near any power of 2. */ The prime is chosen so that it is not near any power of 2. */
UNIV_INTERN
ulint ulint
ut_find_prime( ut_find_prime(
/*==========*/ /*==========*/
......
...@@ -39,7 +39,7 @@ do { \ ...@@ -39,7 +39,7 @@ do { \
Gets the high 32 bits in a ulint. That is makes a shift >> 32, Gets the high 32 bits in a ulint. That is makes a shift >> 32,
but since there seem to be compiler bugs in both gcc and Visual C++, but since there seem to be compiler bugs in both gcc and Visual C++,
we do this by a special conversion. */ we do this by a special conversion. */
UNIV_INTERN
ulint ulint
ut_get_high32( ut_get_high32(
/*==========*/ /*==========*/
...@@ -140,7 +140,7 @@ ut_2_exp( ...@@ -140,7 +140,7 @@ ut_2_exp(
ulint n); /* in: number */ ulint n); /* in: number */
/***************************************************************** /*****************************************************************
Calculates fast the number rounded up to the nearest power of 2. */ Calculates fast the number rounded up to the nearest power of 2. */
UNIV_INTERN
ulint ulint
ut_2_power_up( ut_2_power_up(
/*==========*/ /*==========*/
...@@ -155,13 +155,13 @@ store the given number of bits. */ ...@@ -155,13 +155,13 @@ store the given number of bits. */
/************************************************************** /**************************************************************
Returns system time. We do not specify the format of the time returned: Returns system time. We do not specify the format of the time returned:
the only way to manipulate it is to use the function ut_difftime. */ the only way to manipulate it is to use the function ut_difftime. */
UNIV_INTERN
ib_time_t ib_time_t
ut_time(void); ut_time(void);
/*=========*/ /*=========*/
/************************************************************** /**************************************************************
Returns system time. */ Returns system time. */
UNIV_INTERN
void void
ut_usectime( ut_usectime(
/*========*/ /*========*/
...@@ -172,7 +172,7 @@ ut_usectime( ...@@ -172,7 +172,7 @@ ut_usectime(
Returns the number of microseconds since epoch. Similar to Returns the number of microseconds since epoch. Similar to
time(3), the return value is also stored in *tloc, provided time(3), the return value is also stored in *tloc, provided
that tloc is non-NULL. */ that tloc is non-NULL. */
UNIV_INTERN
ullint ullint
ut_time_us( ut_time_us(
/*=======*/ /*=======*/
...@@ -181,7 +181,7 @@ ut_time_us( ...@@ -181,7 +181,7 @@ ut_time_us(
/************************************************************** /**************************************************************
Returns the difference of two times in seconds. */ Returns the difference of two times in seconds. */
UNIV_INTERN
double double
ut_difftime( ut_difftime(
/*========*/ /*========*/
...@@ -190,14 +190,14 @@ ut_difftime( ...@@ -190,14 +190,14 @@ ut_difftime(
ib_time_t time1); /* in: time */ ib_time_t time1); /* in: time */
/************************************************************** /**************************************************************
Prints a timestamp to a file. */ Prints a timestamp to a file. */
UNIV_INTERN
void void
ut_print_timestamp( ut_print_timestamp(
/*===============*/ /*===============*/
FILE* file); /* in: file where to print */ FILE* file); /* in: file where to print */
/************************************************************** /**************************************************************
Sprintfs a timestamp to a buffer, 13..14 chars plus terminating NUL. */ Sprintfs a timestamp to a buffer, 13..14 chars plus terminating NUL. */
UNIV_INTERN
void void
ut_sprintf_timestamp( ut_sprintf_timestamp(
/*=================*/ /*=================*/
...@@ -205,14 +205,14 @@ ut_sprintf_timestamp( ...@@ -205,14 +205,14 @@ ut_sprintf_timestamp(
/************************************************************** /**************************************************************
Sprintfs a timestamp to a buffer with no spaces and with ':' characters Sprintfs a timestamp to a buffer with no spaces and with ':' characters
replaced by '_'. */ replaced by '_'. */
UNIV_INTERN
void void
ut_sprintf_timestamp_without_extra_chars( ut_sprintf_timestamp_without_extra_chars(
/*=====================================*/ /*=====================================*/
char* buf); /* in: buffer where to sprintf */ char* buf); /* in: buffer where to sprintf */
/************************************************************** /**************************************************************
Returns current year, month, day. */ Returns current year, month, day. */
UNIV_INTERN
void void
ut_get_year_month_day( ut_get_year_month_day(
/*==================*/ /*==================*/
...@@ -222,7 +222,7 @@ ut_get_year_month_day( ...@@ -222,7 +222,7 @@ ut_get_year_month_day(
/***************************************************************** /*****************************************************************
Runs an idle loop on CPU. The argument gives the desired delay Runs an idle loop on CPU. The argument gives the desired delay
in microseconds on 100 MHz Pentium + Visual C++. */ in microseconds on 100 MHz Pentium + Visual C++. */
UNIV_INTERN
ulint ulint
ut_delay( ut_delay(
/*=====*/ /*=====*/
...@@ -230,7 +230,7 @@ ut_delay( ...@@ -230,7 +230,7 @@ ut_delay(
ulint delay); /* in: delay in microseconds on 100 MHz Pentium */ ulint delay); /* in: delay in microseconds on 100 MHz Pentium */
/***************************************************************** /*****************************************************************
Prints the contents of a memory buffer in hex and ascii. */ Prints the contents of a memory buffer in hex and ascii. */
UNIV_INTERN
void void
ut_print_buf( ut_print_buf(
/*=========*/ /*=========*/
...@@ -240,7 +240,7 @@ ut_print_buf( ...@@ -240,7 +240,7 @@ ut_print_buf(
/************************************************************************** /**************************************************************************
Outputs a NUL-terminated file name, quoted with apostrophes. */ Outputs a NUL-terminated file name, quoted with apostrophes. */
UNIV_INTERN
void void
ut_print_filename( ut_print_filename(
/*==============*/ /*==============*/
...@@ -255,7 +255,7 @@ Outputs a fixed-length string, quoted as an SQL identifier. ...@@ -255,7 +255,7 @@ Outputs a fixed-length string, quoted as an SQL identifier.
If the string contains a slash '/', the string will be If the string contains a slash '/', the string will be
output as two identifiers separated by a period (.), output as two identifiers separated by a period (.),
as in SQL database_name.identifier. */ as in SQL database_name.identifier. */
UNIV_INTERN
void void
ut_print_name( ut_print_name(
/*==========*/ /*==========*/
...@@ -270,7 +270,7 @@ Outputs a fixed-length string, quoted as an SQL identifier. ...@@ -270,7 +270,7 @@ Outputs a fixed-length string, quoted as an SQL identifier.
If the string contains a slash '/', the string will be If the string contains a slash '/', the string will be
output as two identifiers separated by a period (.), output as two identifiers separated by a period (.),
as in SQL database_name.identifier. */ as in SQL database_name.identifier. */
UNIV_INTERN
void void
ut_print_namel( ut_print_namel(
/*===========*/ /*===========*/
...@@ -283,7 +283,7 @@ ut_print_namel( ...@@ -283,7 +283,7 @@ ut_print_namel(
/************************************************************************** /**************************************************************************
Catenate files. */ Catenate files. */
UNIV_INTERN
void void
ut_copy_file( ut_copy_file(
/*=========*/ /*=========*/
......
...@@ -22,7 +22,7 @@ typedef struct ib_vector_struct ib_vector_t; ...@@ -22,7 +22,7 @@ typedef struct ib_vector_struct ib_vector_t;
/******************************************************************** /********************************************************************
Create a new vector with the given initial size. */ Create a new vector with the given initial size. */
UNIV_INTERN
ib_vector_t* ib_vector_t*
ib_vector_create( ib_vector_create(
/*=============*/ /*=============*/
...@@ -32,7 +32,7 @@ ib_vector_create( ...@@ -32,7 +32,7 @@ ib_vector_create(
/******************************************************************** /********************************************************************
Push a new element to the vector, increasing its size if necessary. */ Push a new element to the vector, increasing its size if necessary. */
UNIV_INTERN
void void
ib_vector_push( ib_vector_push(
/*===========*/ /*===========*/
......
...@@ -17,7 +17,7 @@ typedef struct ib_wqueue_struct ib_wqueue_t; ...@@ -17,7 +17,7 @@ typedef struct ib_wqueue_struct ib_wqueue_t;
/******************************************************************** /********************************************************************
Create a new work queue. */ Create a new work queue. */
UNIV_INTERN
ib_wqueue_t* ib_wqueue_t*
ib_wqueue_create(void); ib_wqueue_create(void);
/*===================*/ /*===================*/
...@@ -25,7 +25,7 @@ ib_wqueue_create(void); ...@@ -25,7 +25,7 @@ ib_wqueue_create(void);
/******************************************************************** /********************************************************************
Free a work queue. */ Free a work queue. */
UNIV_INTERN
void void
ib_wqueue_free( ib_wqueue_free(
/*===========*/ /*===========*/
...@@ -33,7 +33,7 @@ ib_wqueue_free( ...@@ -33,7 +33,7 @@ ib_wqueue_free(
/******************************************************************** /********************************************************************
Add a work item to the queue. */ Add a work item to the queue. */
UNIV_INTERN
void void
ib_wqueue_add( ib_wqueue_add(
/*==========*/ /*==========*/
...@@ -44,7 +44,7 @@ ib_wqueue_add( ...@@ -44,7 +44,7 @@ ib_wqueue_add(
/******************************************************************** /********************************************************************
Wait for a work item to appear in the queue. */ Wait for a work item to appear in the queue. */
UNIV_INTERN
void* void*
ib_wqueue_wait( ib_wqueue_wait(
/* out: work item */ /* out: work item */
......
...@@ -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