Commit 2c2b06ad authored by marko's avatar marko

branches/zip: Introduce UNIV_INTERN, a linkage specifier for InnoDB-global

symbols.  Use it for all definitions of non-static variables and functions.

lexyy.c, make_flex.sh: Declare yylex as UNIV_INTERN, not static.  It is
referenced from pars0grm.c.

Actually, according to
	nm .libs/ha_innodb.so|grep -w '[ABCE-TVXYZ]'
the following symbols are still global:

* The vtable for class ha_innodb
* pars0grm.c: The function yyparse() and the variables yychar, yylval, yynerrs

The required changes to the Bison-generated file pars0grm.c will be addressed
in a separate commit, which will add a script similar to make_flex.sh.

The class ha_innodb is renamed from class ha_innobase by a #define.  Thus,
there will be no clash with the builtin InnoDB.  However, there will be some
overhead for invoking virtual methods of class ha_innodb.  Ideas for making
the vtable hidden are welcome.  -fvisibility=hidden is not available in GCC 3.
parent c6d69feb
......@@ -106,7 +106,7 @@ btr_root_block_get(
/******************************************************************
Gets the root node of a tree and x-latches it. */
UNIV_INTERN
page_t*
btr_root_get(
/*=========*/
......@@ -120,7 +120,7 @@ btr_root_get(
/*****************************************************************
Gets pointer to the previous user record in the tree. It is assumed that
the caller has appropriate latches on the page and its neighbor. */
UNIV_INTERN
rec_t*
btr_get_prev_user_rec(
/*==================*/
......@@ -178,7 +178,7 @@ btr_get_prev_user_rec(
/*****************************************************************
Gets pointer to the next user record in the tree. It is assumed that the
caller has appropriate latches on the page and its neighbor. */
UNIV_INTERN
rec_t*
btr_get_next_user_rec(
/*==================*/
......@@ -303,7 +303,7 @@ btr_page_alloc_for_ibuf(
/******************************************************************
Allocates a new file page to be used in an index tree. NOTE: we assume
that the caller has made the reservation for free extents! */
UNIV_INTERN
buf_block_t*
btr_page_alloc(
/*===========*/
......@@ -358,7 +358,7 @@ btr_page_alloc(
/******************************************************************
Gets the number of pages in a B-tree. */
UNIV_INTERN
ulint
btr_get_size(
/*=========*/
......@@ -428,7 +428,7 @@ btr_page_free_for_ibuf(
Frees a file page used in an index tree. Can be used also to (BLOB)
external storage pages, because the page level 0 can be given as an
argument. */
UNIV_INTERN
void
btr_page_free_low(
/*==============*/
......@@ -469,7 +469,7 @@ btr_page_free_low(
/******************************************************************
Frees a file page used in an index tree. NOTE: cannot free field external
storage pages because the page must contain info on its level. */
UNIV_INTERN
void
btr_page_free(
/*==========*/
......@@ -678,7 +678,7 @@ btr_page_get_father(
/****************************************************************
Creates the root node for a new index tree. */
UNIV_INTERN
ulint
btr_create(
/*=======*/
......@@ -803,7 +803,7 @@ btr_create(
/****************************************************************
Frees a B-tree except the root page, which MUST be freed after this
by calling btr_free_root. */
UNIV_INTERN
void
btr_free_but_not_root(
/*==================*/
......@@ -849,7 +849,7 @@ top_loop:
/****************************************************************
Frees the B-tree root page. Other tree MUST already have been freed. */
UNIV_INTERN
void
btr_free_root(
/*==========*/
......@@ -993,7 +993,7 @@ IMPORTANT: if btr_page_reorganize() is invoked on a compressed leaf
page of a non-clustered index, the caller must update the insert
buffer free bits in the same mini-transaction in such a way that the
modification will be redo-logged. */
UNIV_INTERN
ibool
btr_page_reorganize(
/*================*/
......@@ -1007,7 +1007,7 @@ btr_page_reorganize(
/***************************************************************
Parses a redo log record of reorganizing a page. */
UNIV_INTERN
byte*
btr_parse_page_reorganize(
/*======================*/
......@@ -1069,7 +1069,7 @@ the tuple. It is assumed that mtr contains an x-latch on the tree.
NOTE that the operation of this function must always succeed,
we cannot reverse it: therefore enough free disk space must be
guaranteed to be available before this function is called. */
UNIV_INTERN
rec_t*
btr_root_raise_and_insert(
/*======================*/
......@@ -1224,7 +1224,7 @@ btr_root_raise_and_insert(
/*****************************************************************
Decides if the page should be split at the convergence point of inserts
converging to the left. */
UNIV_INTERN
ibool
btr_page_get_split_rec_to_left(
/*===========================*/
......@@ -1269,7 +1269,7 @@ btr_page_get_split_rec_to_left(
/*****************************************************************
Decides if the page should be split at the convergence point of inserts
converging to the right. */
UNIV_INTERN
ibool
btr_page_get_split_rec_to_right(
/*============================*/
......@@ -1544,7 +1544,7 @@ btr_page_insert_fits(
/***********************************************************
Inserts a data tuple to a tree on a non-leaf level. It is assumed
that mtr holds an x-latch on the tree. */
UNIV_INTERN
void
btr_insert_on_non_leaf_level(
/*=========================*/
......@@ -1714,7 +1714,7 @@ is released within this function! NOTE that the operation of this
function must always succeed, we cannot reverse it: therefore
enough free disk space must be guaranteed to be available before
this function is called. */
UNIV_INTERN
rec_t*
btr_page_split_and_insert(
/*======================*/
......@@ -2100,7 +2100,7 @@ btr_set_min_rec_mark_log(
/********************************************************************
Parses the redo log record for setting an index record as the predefined
minimum record. */
UNIV_INTERN
byte*
btr_parse_set_min_rec_mark(
/*=======================*/
......@@ -2131,7 +2131,7 @@ btr_parse_set_min_rec_mark(
/********************************************************************
Sets a record as the predefined minimum record. */
UNIV_INTERN
void
btr_set_min_rec_mark(
/*=================*/
......@@ -2157,7 +2157,7 @@ btr_set_min_rec_mark(
/*****************************************************************
Deletes on the upper level the node pointer to a page. */
UNIV_INTERN
void
btr_node_ptr_delete(
/*================*/
......@@ -2303,7 +2303,7 @@ level lifts the records of the page to the father page, thus reducing the
tree height. It is assumed that mtr holds an x-latch on the tree and on the
page. If cursor is on the leaf level, mtr must also hold x-latches to the
brothers, if they exist. */
UNIV_INTERN
ibool
btr_compress(
/*=========*/
......@@ -2640,7 +2640,7 @@ btr_discard_only_page_on_level(
Discards a page from a B-tree. This is used to remove the last record from
a B-tree page: the whole page must be removed at the same time. This cannot
be used for the root page, which is allowed to be empty. */
UNIV_INTERN
void
btr_discard_page(
/*=============*/
......@@ -2747,7 +2747,7 @@ btr_discard_page(
#ifdef UNIV_BTR_PRINT
/*****************************************************************
Prints size info of a B-tree. */
UNIV_INTERN
void
btr_print_size(
/*===========*/
......@@ -2848,7 +2848,7 @@ btr_print_recursive(
/******************************************************************
Prints directories and other info of all nodes in the tree. */
UNIV_INTERN
void
btr_print_index(
/*============*/
......@@ -2884,7 +2884,7 @@ btr_print_index(
#ifdef UNIV_DEBUG
/****************************************************************
Checks that the node pointer to a page is appropriate. */
UNIV_INTERN
ibool
btr_check_node_ptr(
/*===============*/
......@@ -2945,7 +2945,7 @@ btr_index_rec_validate_report(
/****************************************************************
Checks the size and number of fields in a record based on the definition of
the index. */
UNIV_INTERN
ibool
btr_index_rec_validate(
/*===================*/
......@@ -3475,7 +3475,7 @@ node_ptr_fails:
/******************************************************************
Checks the consistency of an index tree. */
UNIV_INTERN
ibool
btr_validate_index(
/*===============*/
......
......@@ -42,13 +42,13 @@ Created 10/16/1994 Heikki Tuuri
#ifdef UNIV_DEBUG
/* If the following is set to TRUE, this module prints a lot of
trace information of individual record operations */
ibool btr_cur_print_record_ops = FALSE;
UNIV_INTERN ibool btr_cur_print_record_ops = FALSE;
#endif /* UNIV_DEBUG */
ulint btr_cur_n_non_sea = 0;
ulint btr_cur_n_sea = 0;
ulint btr_cur_n_non_sea_old = 0;
ulint btr_cur_n_sea_old = 0;
UNIV_INTERN ulint btr_cur_n_non_sea = 0;
UNIV_INTERN ulint btr_cur_n_sea = 0;
UNIV_INTERN ulint btr_cur_n_non_sea_old = 0;
UNIV_INTERN ulint btr_cur_n_sea_old = 0;
/* In the optimistic insert, if the insert does not fit, but this much space
can be released by page reorganize, then it is reorganized */
......@@ -71,7 +71,7 @@ this many index pages */
/* A BLOB field reference full of zero, for use in assertions and tests.
Initially, BLOB field references are set to zero, in
dtuple_convert_big_rec(). */
const byte field_ref_zero[BTR_EXTERN_FIELD_REF_SIZE];
UNIV_INTERN const byte field_ref_zero[BTR_EXTERN_FIELD_REF_SIZE];
/***********************************************************************
Marks all extern fields in a record as owned by the record. This function
......@@ -281,7 +281,7 @@ If mode is PAGE_CUR_LE , cursor is left at the place where an insert of the
search tuple should be performed in the B-tree. InnoDB does an insert
immediately after the cursor. Thus, the cursor may end up on a user record,
or on a page infimum record. */
UNIV_INTERN
void
btr_cur_search_to_nth_level(
/*========================*/
......@@ -637,7 +637,7 @@ func_exit:
/*********************************************************************
Opens a cursor at either end of an index. */
UNIV_INTERN
void
btr_cur_open_at_index_side(
/*=======================*/
......@@ -769,7 +769,7 @@ btr_cur_open_at_index_side(
/**************************************************************************
Positions a cursor at a randomly chosen position within a B-tree. */
UNIV_INTERN
void
btr_cur_open_at_rnd_pos(
/*====================*/
......@@ -987,7 +987,7 @@ It is assumed that mtr holds an x-latch on the page. The operation does
not succeed if there is too little space on the page. If there is just
one record on the page, the insert will always succeed; this is to
prevent trying to split a page with just one record. */
UNIV_INTERN
ulint
btr_cur_optimistic_insert(
/*======================*/
......@@ -1222,7 +1222,7 @@ Performs an insert on a page of an index tree. It is assumed that mtr
holds an x-latch on the tree and on the cursor page. If the insert is
made on the leaf level, to avoid deadlocks, mtr must also own x-latches
to brothers of page, if those brothers exist. */
UNIV_INTERN
ulint
btr_cur_pessimistic_insert(
/*=======================*/
......@@ -1513,7 +1513,7 @@ btr_cur_update_in_place_log(
/***************************************************************
Parses a redo log record of updating a record in-place. */
UNIV_INTERN
byte*
btr_cur_parse_update_in_place(
/*==========================*/
......@@ -1649,7 +1649,7 @@ btr_cur_update_alloc_zip(
/*****************************************************************
Updates a record when the update causes no size changes in its fields.
We assume here that the ordering fields of the record do not change. */
UNIV_INTERN
ulint
btr_cur_update_in_place(
/*====================*/
......@@ -1771,7 +1771,7 @@ holds an x-latch on the page. The operation does not succeed if there is too
little space on the page or if the update would result in too empty a page,
so that tree compression is recommended. We assume here that the ordering
fields of the record do not change. */
UNIV_INTERN
ulint
btr_cur_optimistic_update(
/*======================*/
......@@ -2027,7 +2027,7 @@ that mtr holds an x-latch on the tree and on the cursor page. If the
update is made on the leaf level, to avoid deadlocks, mtr must also
own x-latches to brothers of page, if those brothers exist. We assume
here that the ordering fields of the record do not change. */
UNIV_INTERN
ulint
btr_cur_pessimistic_update(
/*=======================*/
......@@ -2354,7 +2354,7 @@ btr_cur_del_mark_set_clust_rec_log(
/********************************************************************
Parses the redo log record for delete marking or unmarking of a clustered
index record. */
UNIV_INTERN
byte*
btr_cur_parse_del_mark_set_clust_rec(
/*=================================*/
......@@ -2436,7 +2436,7 @@ Marks a clustered index record deleted. Writes an undo log record to
undo log on this delete marking. Writes in the trx id field the id
of the deleting transaction, and in the roll ptr field pointer to the
undo log record created. */
UNIV_INTERN
ulint
btr_cur_del_mark_set_clust_rec(
/*===========================*/
......@@ -2559,7 +2559,7 @@ btr_cur_del_mark_set_sec_rec_log(
/********************************************************************
Parses the redo log record for delete marking or unmarking of a secondary
index record. */
UNIV_INTERN
byte*
btr_cur_parse_del_mark_set_sec_rec(
/*===============================*/
......@@ -2601,7 +2601,7 @@ btr_cur_parse_del_mark_set_sec_rec(
/***************************************************************
Sets a secondary index record delete mark to TRUE or FALSE. */
UNIV_INTERN
ulint
btr_cur_del_mark_set_sec_rec(
/*=========================*/
......@@ -2657,7 +2657,7 @@ btr_cur_del_mark_set_sec_rec(
/***************************************************************
Sets a secondary index record delete mark to FALSE. This function is only
used by the insert buffer insert merge mechanism. */
UNIV_INTERN
void
btr_cur_del_unmark_for_ibuf(
/*========================*/
......@@ -2684,7 +2684,7 @@ that mtr holds an x-latch on the tree and on the cursor page. To avoid
deadlocks, mtr must also own x-latches to brothers of page, if those
brothers exist. NOTE: it is assumed that the caller has reserved enough
free extents so that the compression will always succeed if done! */
UNIV_INTERN
ibool
btr_cur_compress_if_useful(
/*=======================*/
......@@ -2708,7 +2708,7 @@ btr_cur_compress_if_useful(
Removes the record on which the tree cursor is positioned on a leaf page.
It is assumed that the mtr has an x-latch on the page where the cursor is
positioned, but no latch on the whole tree. */
UNIV_INTERN
ibool
btr_cur_optimistic_delete(
/*======================*/
......@@ -2793,7 +2793,7 @@ or if it is the only page on the level. It is assumed that mtr holds
an x-latch on the tree and on the cursor page. To avoid deadlocks,
mtr must also own x-latches to brothers of page, if those brothers
exist. */
UNIV_INTERN
ibool
btr_cur_pessimistic_delete(
/*=======================*/
......@@ -2991,7 +2991,7 @@ btr_cur_add_path_info(
/***********************************************************************
Estimates the number of rows in a given index range. */
UNIV_INTERN
ib_longlong
btr_estimate_n_rows_in_range(
/*=========================*/
......@@ -3141,7 +3141,7 @@ btr_estimate_n_rows_in_range(
Estimates the number of different key values in a given index, for
each n-column prefix of the index where n <= dict_index_get_n_unique(index).
The estimates are stored in the array index->stat_n_diff_key_vals. */
UNIV_INTERN
void
btr_estimate_number_of_different_key_vals(
/*======================================*/
......@@ -3396,7 +3396,7 @@ Marks not updated extern fields as not-owned by this record. The ownership
is transferred to the updated record which is inserted elsewhere in the
index tree. In purge only the owner of externally stored field is allowed
to free the field. */
UNIV_INTERN
void
btr_cur_mark_extern_inherited_fields(
/*=================================*/
......@@ -3450,7 +3450,7 @@ updated:
The complement of the previous function: in an update entry may inherit
some externally stored fields from a record. We must mark them as inherited
in entry, so that they are not freed in a rollback. */
UNIV_INTERN
void
btr_cur_mark_dtuple_inherited_extern(
/*=================================*/
......@@ -3527,7 +3527,7 @@ btr_cur_unmark_extern_fields(
/***********************************************************************
Marks all extern fields in a dtuple as owned by the record. */
UNIV_INTERN
void
btr_cur_unmark_dtuple_extern_fields(
/*================================*/
......@@ -3552,7 +3552,7 @@ btr_cur_unmark_dtuple_extern_fields(
Flags the data tuple fields that are marked as extern storage in the
update vector. We use this function to remember which fields we must
mark as extern storage in a record inserted for an update. */
UNIV_INTERN
ulint
btr_push_update_extern_fields(
/*==========================*/
......@@ -3700,7 +3700,7 @@ Stores the fields in big_rec_vec to the tablespace and puts pointers to
them in rec. The extern flags in rec will have to be set beforehand.
The fields are stored on pages allocated from leaf node
file segment of the index tree. */
UNIV_INTERN
ulint
btr_store_big_rec_extern_fields(
/*============================*/
......@@ -4062,7 +4062,7 @@ Frees the space in an externally stored field to the file space
management if the field in data is owned by the externally stored field,
in a rollback we may have the additional condition that the field must
not be inherited. */
UNIV_INTERN
void
btr_free_externally_stored_field(
/*=============================*/
......@@ -4579,7 +4579,7 @@ btr_copy_externally_stored_field_prefix_low(
/***********************************************************************
Copies the prefix of an externally stored field of a record. The
clustered index record must be protected by a lock or a page latch. */
UNIV_INTERN
ulint
btr_copy_externally_stored_field_prefix(
/*====================================*/
......@@ -4680,7 +4680,7 @@ btr_copy_externally_stored_field(
/***********************************************************************
Copies an externally stored field of a record to mem heap. */
UNIV_INTERN
byte*
btr_rec_copy_externally_stored_field(
/*=================================*/
......
......@@ -18,7 +18,7 @@ Created 2/23/1996 Heikki Tuuri
/******************************************************************
Allocates memory for a persistent cursor object and initializes the cursor. */
UNIV_INTERN
btr_pcur_t*
btr_pcur_create_for_mysql(void)
/*============================*/
......@@ -36,7 +36,7 @@ btr_pcur_create_for_mysql(void)
/******************************************************************
Frees the memory for a persistent cursor object. */
UNIV_INTERN
void
btr_pcur_free_for_mysql(
/*====================*/
......@@ -67,7 +67,7 @@ cursor data structure, or just setting a flag if the cursor id before the
first in an EMPTY tree, or after the last in an EMPTY tree. NOTE that the
page where the cursor is positioned must not be empty if the index tree is
not totally empty! */
UNIV_INTERN
void
btr_pcur_store_position(
/*====================*/
......@@ -143,7 +143,7 @@ btr_pcur_store_position(
/******************************************************************
Copies the stored position of a pcur to another pcur. */
UNIV_INTERN
void
btr_pcur_copy_stored_position(
/*==========================*/
......@@ -183,7 +183,7 @@ infimum;
GREATER than the user record which was the predecessor of the supremum.
(4) cursor was positioned before the first or after the last in an empty tree:
restores to before first or after the last in the tree. */
UNIV_INTERN
ibool
btr_pcur_restore_position(
/*======================*/
......@@ -340,7 +340,7 @@ releases the page latch and bufferfix reserved by the cursor.
NOTE! In the case of BTR_LEAF_MODIFY, there should not exist changes
made by the current mini-transaction to the data protected by the
cursor latch, as then the latch must not be released until mtr_commit. */
UNIV_INTERN
void
btr_pcur_release_leaf(
/*==================*/
......@@ -366,7 +366,7 @@ Moves the persistent cursor to the first record on the next page. Releases the
latch on the current page, and bufferunfixes it. Note that there must not be
modifications on the current page, as then the x-latch can be released only in
mtr_commit. */
UNIV_INTERN
void
btr_pcur_move_to_next_page(
/*=======================*/
......@@ -421,7 +421,7 @@ alphabetical position of the cursor is guaranteed to be sensible on
return, but it may happen that the cursor is not positioned on the last
record of any page, because the structure of the tree may have changed
during the time when the cursor had no latches. */
UNIV_INTERN
void
btr_pcur_move_backward_from_page(
/*=============================*/
......@@ -497,7 +497,7 @@ btr_pcur_move_backward_from_page(
/*************************************************************
Moves the persistent cursor to the previous record in the tree. If no records
are left, the cursor stays 'before first in tree'. */
UNIV_INTERN
ibool
btr_pcur_move_to_prev(
/*==================*/
......@@ -536,7 +536,7 @@ PAGE_CUR_LE, on the last user record. If no such user record exists, then
in the first case sets the cursor after last in tree, and in the latter case
before first in tree. The latching mode must be BTR_SEARCH_LEAF or
BTR_MODIFY_LEAF. */
UNIV_INTERN
void
btr_pcur_open_on_user_rec(
/*======================*/
......
......@@ -20,19 +20,20 @@ Created 2/17/1996 Heikki Tuuri
#include "ha0ha.h"
/* Flag: has the search system been disabled? */
ibool btr_search_disabled = FALSE;
UNIV_INTERN ibool btr_search_disabled = FALSE;
ulint btr_search_this_is_zero = 0; /* A dummy variable to fool the
compiler */
/* A dummy variable to fool the compiler */
UNIV_INTERN ulint btr_search_this_is_zero = 0;
#ifdef UNIV_SEARCH_PERF_STAT
ulint btr_search_n_succ = 0;
ulint btr_search_n_hash_fail = 0;
UNIV_INTERN ulint btr_search_n_succ = 0;
UNIV_INTERN ulint btr_search_n_hash_fail = 0;
#endif /* UNIV_SEARCH_PERF_STAT */
byte btr_sea_pad1[64]; /* padding to prevent other memory update
hotspots from residing on the same memory
cache line as btr_search_latch */
/* padding to prevent other memory update
hotspots from residing on the same memory
cache line as btr_search_latch */
UNIV_INTERN byte btr_sea_pad1[64];
/* The latch protecting the adaptive search system: this latch protects the
(1) positions of records on those pages where a hash index has been built.
......@@ -40,16 +41,15 @@ NOTE: It does not protect values of non-ordering fields within a record from
being updated in-place! We can use fact (1) to perform unique searches to
indexes. */
rw_lock_t* btr_search_latch_temp; /* We will allocate the latch from
dynamic memory to get it to the
same DRAM page as other hotspot
semaphores */
/* We will allocate the latch from dynamic memory to get it to the
same DRAM page as other hotspot semaphores */
UNIV_INTERN rw_lock_t* btr_search_latch_temp;
byte btr_sea_pad2[64]; /* padding to prevent other memory update
hotspots from residing on the same memory
cache line */
/* padding to prevent other memory update hotspots from residing on
the same memory cache line */
UNIV_INTERN byte btr_sea_pad2[64];
btr_search_sys_t* btr_search_sys;
UNIV_INTERN btr_search_sys_t* btr_search_sys;
/* If the number of records on the page divided by this parameter
would have been successfully accessed using a hash index, the index
......@@ -127,7 +127,7 @@ btr_search_check_free_space_in_heap(void)
/*********************************************************************
Creates and initializes the adaptive search system at a database start. */
UNIV_INTERN
void
btr_search_sys_create(
/*==================*/
......@@ -148,7 +148,7 @@ btr_search_sys_create(
/************************************************************************
Disable the adaptive hash search system and empty the index. */
UNIV_INTERN
void
btr_search_disable(void)
/*====================*/
......@@ -163,7 +163,7 @@ btr_search_disable(void)
/************************************************************************
Enable the adaptive hash search system. */
UNIV_INTERN
void
btr_search_enable(void)
/*====================*/
......@@ -173,7 +173,7 @@ btr_search_enable(void)
/*********************************************************************
Creates and initializes a search info struct. */
UNIV_INTERN
btr_search_t*
btr_search_info_create(
/*===================*/
......@@ -482,7 +482,7 @@ btr_search_update_hash_ref(
/*************************************************************************
Updates the search info. */
UNIV_INTERN
void
btr_search_info_update_slow(
/*========================*/
......@@ -708,7 +708,7 @@ Tries to guess the right search position based on the hash search info
of the index. Note that if mode is PAGE_CUR_LE, which is used in inserts,
and the function returns TRUE, then cursor->up_match and cursor->low_match
both have sensible values. */
UNIV_INTERN
ibool
btr_search_guess_on_hash(
/*=====================*/
......@@ -935,7 +935,7 @@ failure:
/************************************************************************
Drops a page hash index. */
UNIV_INTERN
void
btr_search_drop_page_hash_index(
/*============================*/
......@@ -1099,7 +1099,7 @@ cleanup:
/************************************************************************
Drops a page hash index when a page is freed from a fseg to the file system.
Drops possible hash index if the page happens to be in the buffer pool. */
UNIV_INTERN
void
btr_search_drop_page_hash_when_freed(
/*=================================*/
......@@ -1323,7 +1323,7 @@ Moves or deletes hash entries for moved records. If new_page is already hashed,
then the hash index for page, if any, is dropped. If new_page is not hashed,
and page is hashed, then a new hash index is built to new_page with the same
parameters as page (this often happens when a page is split). */
UNIV_INTERN
void
btr_search_move_or_delete_hash_entries(
/*===================================*/
......@@ -1386,7 +1386,7 @@ btr_search_move_or_delete_hash_entries(
/************************************************************************
Updates the page hash index when a single record is deleted from a page. */
UNIV_INTERN
void
btr_search_update_hash_on_delete(
/*=============================*/
......@@ -1439,7 +1439,7 @@ btr_search_update_hash_on_delete(
/************************************************************************
Updates the page hash index when a single record is inserted on a page. */
UNIV_INTERN
void
btr_search_update_hash_node_on_insert(
/*==================================*/
......@@ -1490,7 +1490,7 @@ btr_search_update_hash_node_on_insert(
/************************************************************************
Updates the page hash index when a single record is inserted on a page. */
UNIV_INTERN
void
btr_search_update_hash_on_insert(
/*=============================*/
......@@ -1640,7 +1640,7 @@ function_exit:
/************************************************************************
Validates the search system. */
UNIV_INTERN
ibool
btr_search_validate(void)
/*=====================*/
......
......@@ -21,24 +21,24 @@ Created December 2006 by Marko Makela
/** Number of frames allocated from the buffer pool to the buddy system.
Protected by buf_pool_mutex. */
ulint buf_buddy_n_frames;
UNIV_INTERN ulint buf_buddy_n_frames;
/** Counts of blocks allocated from the buddy system.
Protected by buf_pool_mutex. */
ulint buf_buddy_used[BUF_BUDDY_SIZES + 1];
UNIV_INTERN ulint buf_buddy_used[BUF_BUDDY_SIZES + 1];
/** Counts of blocks relocated by the buddy system.
Protected by buf_pool_mutex. */
ib_uint64_t buf_buddy_relocated[BUF_BUDDY_SIZES + 1];
UNIV_INTERN ib_uint64_t buf_buddy_relocated[BUF_BUDDY_SIZES + 1];
/** Preferred minimum number of frames allocated from the buffer pool
to the buddy system. Unless this number is exceeded or the buffer
pool is scarce, the LRU algorithm will not free compressed-only pages
in order to satisfy an allocation request. Protected by buf_pool_mutex. */
ulint buf_buddy_min_n_frames = 0;
UNIV_INTERN ulint buf_buddy_min_n_frames = 0;
/** Preferred maximum number of frames allocated from the buffer pool
to the buddy system. Unless this number is exceeded, the buddy allocator
will not try to free clean compressed-only pages before falling back
to the LRU algorithm. Protected by buf_pool_mutex. */
ulint buf_buddy_max_n_frames = ULINT_UNDEFINED;
UNIV_INTERN ulint buf_buddy_max_n_frames = ULINT_UNDEFINED;
/**************************************************************************
Get the offset of the buddy of a compressed page frame. */
......@@ -398,7 +398,7 @@ free_LRU:
Allocate a block. The thread calling this function must hold
buf_pool_mutex and must not hold buf_pool_zip_mutex or any block->mutex.
The buf_pool_mutex may only be released and reacquired if lru != NULL. */
UNIV_INTERN
void*
buf_buddy_alloc_low(
/*================*/
......@@ -621,7 +621,7 @@ success:
/**************************************************************************
Deallocate a block. */
UNIV_INTERN
void
buf_buddy_free_low(
/*===============*/
......
This diff is collapsed.
......@@ -45,7 +45,7 @@ buf_flush_validate_low(void);
/************************************************************************
Inserts a modified block into the flush list. */
UNIV_INTERN
void
buf_flush_insert_into_flush_list(
/*=============================*/
......@@ -90,7 +90,7 @@ buf_flush_insert_into_flush_list(
Inserts a modified block into the flush list in the right sorted position.
This function is used by recovery, because there the modifications do not
necessarily come in the order of lsn's. */
UNIV_INTERN
void
buf_flush_insert_sorted_into_flush_list(
/*====================================*/
......@@ -149,7 +149,7 @@ buf_flush_insert_sorted_into_flush_list(
/************************************************************************
Returns TRUE if the file page block is immediately suitable for replacement,
i.e., the transition FILE_PAGE => NOT_USED allowed. */
UNIV_INTERN
ibool
buf_flush_ready_for_replace(
/*========================*/
......@@ -216,7 +216,7 @@ buf_flush_ready_for_flush(
/************************************************************************
Remove a block from the flush list of modified blocks. */
UNIV_INTERN
void
buf_flush_remove(
/*=============*/
......@@ -254,7 +254,7 @@ buf_flush_remove(
/************************************************************************
Updates the flush system data structures when a write is completed. */
UNIV_INTERN
void
buf_flush_write_complete(
/*=====================*/
......@@ -589,7 +589,7 @@ try_again:
/************************************************************************
Initializes a page for writing to the tablespace. */
UNIV_INTERN
void
buf_flush_init_for_writing(
/*=======================*/
......@@ -988,7 +988,7 @@ NOTE 1: in the case of an LRU flush the calling thread may own latches to
pages: to avoid deadlocks, this function must be written so that it cannot
end up waiting for these latches! NOTE 2: in the case of a flush list flush,
the calling thread is not allowed to own any latches on pages! */
UNIV_INTERN
ulint
buf_flush_batch(
/*============*/
......@@ -1147,7 +1147,7 @@ flush_next:
/**********************************************************************
Waits until a flush batch of the given type ends */
UNIV_INTERN
void
buf_flush_wait_batch_end(
/*=====================*/
......@@ -1216,7 +1216,7 @@ of replaceable pages there or in the free list. VERY IMPORTANT: this function
is called also by threads which have locks on pages. To avoid deadlocks, we
flush only pages such that the s-lock required for flushing can be acquired
immediately, without waiting. */
UNIV_INTERN
void
buf_flush_free_margin(void)
/*=======================*/
......@@ -1268,7 +1268,7 @@ buf_flush_validate_low(void)
/**********************************************************************
Validates the flush list. */
UNIV_INTERN
ibool
buf_flush_validate(void)
/*====================*/
......
......@@ -46,7 +46,7 @@ initial segment in buf_LRU_get_recent_limit */
/* If we switch on the InnoDB monitor because there are too few available
frames in the buffer pool, we set this to TRUE */
ibool buf_lru_switched_on_innodb_mon = FALSE;
UNIV_INTERN ibool buf_lru_switched_on_innodb_mon = FALSE;
/**********************************************************************
Takes a block out of the LRU list and page hash table.
......@@ -81,7 +81,7 @@ buf_LRU_block_free_hashed_page(
/**********************************************************************
Invalidates all pages belonging to a given tablespace when we are deleting
the data file(s) of that tablespace. */
UNIV_INTERN
void
buf_LRU_invalidate_tablespace(
/*==========================*/
......@@ -185,7 +185,7 @@ next_page:
Gets the minimum LRU_position field for the blocks in an initial segment
(determined by BUF_LRU_INITIAL_RATIO) of the LRU list. The limit is not
guaranteed to be precise, because the ulint_clock may wrap around. */
UNIV_INTERN
ulint
buf_LRU_get_recent_limit(void)
/*==========================*/
......@@ -218,7 +218,7 @@ buf_LRU_get_recent_limit(void)
/************************************************************************
Insert a compressed block into buf_pool->zip_clean in the LRU order. */
UNIV_INTERN
void
buf_LRU_insert_zip_clean(
/*=====================*/
......@@ -251,7 +251,7 @@ buf_LRU_insert_zip_clean(
/**********************************************************************
Look for a replaceable block from the end of the LRU list and put it to
the free list if found. */
UNIV_INTERN
ibool
buf_LRU_search_and_free_block(
/*==========================*/
......@@ -368,7 +368,7 @@ taken out of the buffer pool, and their inserts redirected to the insert
buffer. Otherwise, the flushed blocks could get modified again before read
operations need new buffer blocks, and the i/o work done in flushing would be
wasted. */
UNIV_INTERN
void
buf_LRU_try_free_flushed_blocks(void)
/*=================================*/
......@@ -391,7 +391,7 @@ buf_LRU_try_free_flushed_blocks(void)
Returns TRUE if less than 25 % of the buffer pool is available. This can be
used in heuristics to prevent huge transactions eating up the whole buffer
pool for their locks. */
UNIV_INTERN
ibool
buf_LRU_buf_pool_running_out(void)
/*==============================*/
......@@ -416,7 +416,7 @@ buf_LRU_buf_pool_running_out(void)
/**********************************************************************
Returns a free block from the buf_pool. The block is taken off the
free list. If it is empty, returns NULL. */
UNIV_INTERN
buf_block_t*
buf_LRU_get_free_only(void)
/*=======================*/
......@@ -452,7 +452,7 @@ buf_LRU_get_free_only(void)
Returns a free block from the buf_pool. The block is taken off the
free list. If it is empty, blocks are moved from the end of the
LRU list to the free list. */
UNIV_INTERN
buf_block_t*
buf_LRU_get_free_block(
/*===================*/
......@@ -887,7 +887,7 @@ buf_LRU_add_block_low(
/**********************************************************************
Adds a block to the LRU list. */
UNIV_INTERN
void
buf_LRU_add_block(
/*==============*/
......@@ -903,7 +903,7 @@ buf_LRU_add_block(
/**********************************************************************
Moves a block to the start of the LRU list. */
UNIV_INTERN
void
buf_LRU_make_block_young(
/*=====================*/
......@@ -915,7 +915,7 @@ buf_LRU_make_block_young(
/**********************************************************************
Moves a block to the end of the LRU list. */
UNIV_INTERN
void
buf_LRU_make_block_old(
/*===================*/
......@@ -927,7 +927,7 @@ buf_LRU_make_block_old(
/**********************************************************************
Try to free a block. */
UNIV_INTERN
ibool
buf_LRU_free_block(
/*===============*/
......@@ -1116,7 +1116,7 @@ alloc:
/**********************************************************************
Puts a block back to the free list. */
UNIV_INTERN
void
buf_LRU_block_free_non_file_page(
/*=============================*/
......@@ -1373,7 +1373,7 @@ buf_LRU_block_free_hashed_page(
#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
/**************************************************************************
Validates the LRU list. */
UNIV_INTERN
ibool
buf_LRU_validate(void)
/*==================*/
......@@ -1446,7 +1446,7 @@ buf_LRU_validate(void)
#if defined UNIV_DEBUG_PRINT || defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
/**************************************************************************
Prints the LRU list. */
UNIV_INTERN
void
buf_LRU_print(void)
/*===============*/
......
......@@ -314,7 +314,7 @@ buffer buf_pool if it is not already there. Sets the io_fix flag and sets
an exclusive lock on the buffer frame. The flag is cleared and the x-lock
released by the i/o-handler thread. Does a random read-ahead if it seems
sensible. */
UNIV_INTERN
ulint
buf_read_page(
/*==========*/
......@@ -379,7 +379,7 @@ latches!
NOTE 3: the calling thread must want access to the page given: this rule is
set to prevent unintended read-aheads performed by ibuf routines, a situation
which could result in a deadlock if the OS does not support asynchronous io. */
UNIV_INTERN
ulint
buf_read_ahead_linear(
/*==================*/
......@@ -621,7 +621,7 @@ buf_read_ahead_linear(
Issues read requests for pages which the ibuf module wants to read in, in
order to contract the insert buffer tree. Technically, this function is like
a read-ahead function. */
UNIV_INTERN
void
buf_read_ibuf_merge_pages(
/*======================*/
......@@ -697,7 +697,7 @@ tablespace_deleted:
/************************************************************************
Issues read requests for pages which recovery wants to read in. */
UNIV_INTERN
void
buf_read_recv_pages(
/*================*/
......
......@@ -22,16 +22,17 @@ Created 5/30/1994 Heikki Tuuri
#include <ctype.h>
#ifdef UNIV_DEBUG
byte data_error; /* data pointers of tuple fields are initialized
to point here for error checking */
/* data pointers of tuple fields are initialized to point here
for error checking */
UNIV_INTERN byte data_error;
ulint data_dummy; /* this is used to fool the compiler in
dtuple_validate */
/* this is used to fool the compiler in dtuple_validate */
UNIV_INTERN ulint data_dummy;
#endif /* UNIV_DEBUG */
/*************************************************************************
Tests if dfield data length and content is equal to the given. */
UNIV_INTERN
ibool
dfield_data_is_binary_equal(
/*========================*/
......@@ -60,7 +61,7 @@ dfield_data_is_binary_equal(
/****************************************************************
Compare two data tuples, respecting the collation of character fields. */
UNIV_INTERN
int
dtuple_coll_cmp(
/*============*/
......@@ -103,7 +104,7 @@ dtuple_coll_cmp(
/*************************************************************************
Sets number of fields used in a tuple. Normally this is set in
dtuple_create, but if you want later to set it smaller, you can use this. */
UNIV_INTERN
void
dtuple_set_n_fields(
/*================*/
......@@ -140,7 +141,7 @@ dfield_check_typed_no_assert(
/**************************************************************
Checks that a data tuple is typed. */
UNIV_INTERN
ibool
dtuple_check_typed_no_assert(
/*=========================*/
......@@ -176,7 +177,7 @@ dump:
/**************************************************************
Checks that a data field is typed. Asserts an error if not. */
UNIV_INTERN
ibool
dfield_check_typed(
/*===============*/
......@@ -199,7 +200,7 @@ dfield_check_typed(
/**************************************************************
Checks that a data tuple is typed. Asserts an error if not. */
UNIV_INTERN
ibool
dtuple_check_typed(
/*===============*/
......@@ -223,7 +224,7 @@ dtuple_check_typed(
/**************************************************************
Validates the consistency of a tuple which must be complete, i.e,
all fields must have been set. */
UNIV_INTERN
ibool
dtuple_validate(
/*============*/
......@@ -272,7 +273,7 @@ dtuple_validate(
/*****************************************************************
Pretty prints a dfield value according to its data type. */
UNIV_INTERN
void
dfield_print(
/*=========*/
......@@ -315,7 +316,7 @@ dfield_print(
/*****************************************************************
Pretty prints a dfield value according to its data type. Also the hex string
is printed if a string contains non-printable characters. */
UNIV_INTERN
void
dfield_print_also_hex(
/*==================*/
......@@ -509,7 +510,7 @@ dfield_print_raw(
/**************************************************************
The following function prints the contents of a tuple. */
UNIV_INTERN
void
dtuple_print(
/*=========*/
......@@ -540,7 +541,7 @@ Moves parts of long fields in entry to the big record vector so that
the size of tuple drops below the maximum record size allowed in the
database. Moves data only from those fields which are not necessary
to determine uniquely the insertion place of the tuple in the index. */
UNIV_INTERN
big_rec_t*
dtuple_convert_big_rec(
/*===================*/
......@@ -682,7 +683,7 @@ skip_field:
Puts back to entry the data stored in vector. Note that to ensure the
fields in entry can accommodate the data, vector must have been created
from entry with dtuple_convert_big_rec. */
UNIV_INTERN
void
dtuple_convert_back_big_rec(
/*========================*/
......
......@@ -20,7 +20,7 @@ index field in bytes.
NOTE: the prototype of this function is copied from ha_innodb.cc! If you change
this function, you MUST change also the prototype here! */
UNIV_INTERN
ulint
innobase_get_at_most_n_mbchars(
/*===========================*/
......@@ -44,7 +44,7 @@ ulint data_mysql_default_charset_coll = 99999999;
Determine how many bytes the first n characters of the given string occupy.
If the string is shorter than n characters, returns the number of bytes
the characters in the string occupy. */
UNIV_INTERN
ulint
dtype_get_at_most_n_mbchars(
/*========================*/
......@@ -91,7 +91,7 @@ dtype_get_at_most_n_mbchars(
/*************************************************************************
Checks if a data main type is a string type. Also a BLOB is considered a
string type. */
UNIV_INTERN
ibool
dtype_is_string_type(
/*=================*/
......@@ -112,7 +112,7 @@ dtype_is_string_type(
Checks if a type is a binary string type. Note that for tables created with
< 4.0.14, we do not know if a DATA_BLOB column is a BLOB or a TEXT column. For
those DATA_BLOB columns this function currently returns FALSE. */
UNIV_INTERN
ibool
dtype_is_binary_string_type(
/*========================*/
......@@ -135,7 +135,7 @@ Checks if a type is a non-binary string type. That is, dtype_is_string_type is
TRUE and dtype_is_binary_string_type is FALSE. Note that for tables created
with < 4.0.14, we do not know if a DATA_BLOB column is a BLOB or a TEXT column.
For those DATA_BLOB columns this function currently returns TRUE. */
UNIV_INTERN
ibool
dtype_is_non_binary_string_type(
/*============================*/
......@@ -155,7 +155,7 @@ dtype_is_non_binary_string_type(
/*************************************************************************
Forms a precise type from the < 4.1.2 format precise type plus the
charset-collation code. */
UNIV_INTERN
ulint
dtype_form_prtype(
/*==============*/
......@@ -171,7 +171,7 @@ dtype_form_prtype(
/*************************************************************************
Validates a data type structure. */
UNIV_INTERN
ibool
dtype_validate(
/*===========*/
......@@ -193,7 +193,7 @@ dtype_validate(
/*************************************************************************
Prints a data type structure. */
UNIV_INTERN
void
dtype_print(
/*========*/
......
......@@ -25,7 +25,7 @@ Created 4/18/1996 Heikki Tuuri
/**************************************************************************
Gets a pointer to the dictionary header and x-latches its page. */
UNIV_INTERN
dict_hdr_t*
dict_hdr_get(
/*=========*/
......@@ -47,7 +47,7 @@ dict_hdr_get(
/**************************************************************************
Returns a new table, index, or tree id. */
UNIV_INTERN
dulint
dict_hdr_get_new_id(
/*================*/
......@@ -77,7 +77,7 @@ dict_hdr_get_new_id(
/**************************************************************************
Writes the current value of the row id counter to the dictionary header file
page. */
UNIV_INTERN
void
dict_hdr_flush_row_id(void)
/*=======================*/
......@@ -205,7 +205,7 @@ dict_hdr_create(
/*********************************************************************
Initializes the data dictionary memory structures when the database is
started. This function is also called when the data dictionary is created. */
UNIV_INTERN
void
dict_boot(void)
/*===========*/
......@@ -419,7 +419,7 @@ dict_insert_initial_data(void)
/*********************************************************************
Creates and initializes the data dictionary at the database creation. */
UNIV_INTERN
void
dict_create(void)
/*=============*/
......
......@@ -643,7 +643,7 @@ dict_create_index_tree_step(
/***********************************************************************
Drops the index tree associated with a row in SYS_INDEXES table. */
UNIV_INTERN
void
dict_drop_index_tree(
/*=================*/
......@@ -706,7 +706,7 @@ dict_drop_index_tree(
/***********************************************************************
Truncates the index tree associated with a row in SYS_INDEXES table. */
UNIV_INTERN
ulint
dict_truncate_index_tree(
/*=====================*/
......@@ -842,7 +842,7 @@ create:
/*************************************************************************
Creates a table create graph. */
UNIV_INTERN
tab_node_t*
tab_create_graph_create(
/*====================*/
......@@ -878,7 +878,7 @@ tab_create_graph_create(
/*************************************************************************
Creates an index create graph. */
UNIV_INTERN
ind_node_t*
ind_create_graph_create(
/*====================*/
......@@ -915,7 +915,7 @@ ind_create_graph_create(
/***************************************************************
Creates a table. This is a high-level function used in SQL execution graphs. */
UNIV_INTERN
que_thr_t*
dict_create_table_step(
/*===================*/
......@@ -1022,7 +1022,7 @@ function_exit:
/***************************************************************
Creates an index. This is a high-level function used in SQL execution
graphs. */
UNIV_INTERN
que_thr_t*
dict_create_index_step(
/*===================*/
......@@ -1155,7 +1155,7 @@ function_exit:
Creates the foreign key constraints system tables inside InnoDB
at database creation or database start if they are not found or are
not of the right form. */
UNIV_INTERN
ulint
dict_create_or_check_foreign_constraint_tables(void)
/*================================================*/
......@@ -1450,7 +1450,7 @@ dict_create_add_foreign_to_dictionary(
/************************************************************************
Adds foreign key definitions to data dictionary tables in the database. */
UNIV_INTERN
ulint
dict_create_add_foreigns_to_dictionary(
/*===================================*/
......
This diff is collapsed.
......@@ -47,7 +47,7 @@ name_of_col_is(
/************************************************************************
Finds the first table name in the given database. */
UNIV_INTERN
char*
dict_get_first_table_name_in_db(
/*============================*/
......@@ -132,7 +132,7 @@ loop:
/************************************************************************
Prints to the standard output information on all tables found in the data
dictionary system table. */
UNIV_INTERN
void
dict_print(void)
/*============*/
......@@ -269,7 +269,7 @@ to what we already read with fil_load_single_table_tablespaces().
In a normal startup, we create the tablespace objects for every table in
InnoDB's data dictionary, if the corresponding .ibd file exists.
We also scan the biggest space id, and store it to fil_system. */
UNIV_INTERN
void
dict_check_tablespaces_and_store_max_id(
/*====================================*/
......@@ -757,7 +757,7 @@ the cluster definition if the table is a member in a cluster. Also loads
all foreign key constraints where the foreign key is in the table or where
a foreign key references columns in this table. Adds all these to the data
dictionary cache. */
UNIV_INTERN
dict_table_t*
dict_load_table(
/*============*/
......@@ -950,7 +950,7 @@ err_exit:
/***************************************************************************
Loads a table object based on the table id. */
UNIV_INTERN
dict_table_t*
dict_load_table_on_id(
/*==================*/
......@@ -1043,7 +1043,7 @@ dict_load_table_on_id(
This function is called when the database is booted. Loads system table
index definitions except for the clustered index which is added to the
dictionary cache at booting before calling this function. */
UNIV_INTERN
void
dict_load_sys_table(
/*================*/
......@@ -1264,7 +1264,7 @@ holder or where the table is referenced by a foreign key. Adds these
constraints to the data dictionary. Note that we know that the dictionary
cache already contains all constraints where the other relevant table is
already in the dictionary cache. */
UNIV_INTERN
ulint
dict_load_foreigns(
/*===============*/
......
......@@ -25,7 +25,7 @@ Created 1/8/1996 Heikki Tuuri
/**************************************************************************
Creates a table memory object. */
UNIV_INTERN
dict_table_t*
dict_mem_table_create(
/*==================*/
......@@ -73,7 +73,7 @@ dict_mem_table_create(
/********************************************************************
Free a table memory object. */
UNIV_INTERN
void
dict_mem_table_free(
/*================*/
......@@ -136,7 +136,7 @@ dict_add_col_name(
/**************************************************************************
Adds a column definition to a table. */
UNIV_INTERN
void
dict_mem_table_add_col(
/*===================*/
......@@ -189,7 +189,7 @@ dict_mem_table_add_col(
/**************************************************************************
Creates an index memory object. */
UNIV_INTERN
dict_index_t*
dict_mem_index_create(
/*==================*/
......@@ -230,7 +230,7 @@ dict_mem_index_create(
/**************************************************************************
Creates and initializes a foreign constraint memory object. */
UNIV_INTERN
dict_foreign_t*
dict_mem_foreign_create(void)
/*=========================*/
......@@ -252,7 +252,7 @@ dict_mem_foreign_create(void)
Adds a field definition to an index. NOTE: does not take a copy
of the column name if the field is a column. The memory occupied
by the column name may be released only after publishing the index. */
UNIV_INTERN
void
dict_mem_index_add_field(
/*=====================*/
......@@ -277,7 +277,7 @@ dict_mem_index_add_field(
/**************************************************************************
Frees an index memory object. */
UNIV_INTERN
void
dict_mem_index_free(
/*================*/
......
......@@ -13,7 +13,7 @@ Created 2/5/1996 Heikki Tuuri
/****************************************************************
Adds a new block to a dyn array. */
UNIV_INTERN
dyn_block_t*
dyn_array_add_block(
/*================*/
......
......@@ -17,12 +17,12 @@ Created 12/29/1997 Heikki Tuuri
#include "row0sel.h"
/* The RND function seed */
ulint eval_rnd = 128367121;
static ulint eval_rnd = 128367121;
/* Dummy adress used when we should allocate a buffer of size 0 in
the function below */
byte eval_dummy;
static byte eval_dummy;
/*********************************************************************
Allocate a buffer from global dynamic memory for a value of a que_node.
......@@ -30,7 +30,7 @@ NOTE that this memory must be explicitly freed when the query graph is
freed. If the node already has an allocated buffer, that buffer is freed
here. NOTE that this is the only function where dynamic memory should be
allocated for a query node val field. */
UNIV_INTERN
byte*
eval_node_alloc_val_buf(
/*====================*/
......@@ -71,7 +71,7 @@ eval_node_alloc_val_buf(
Free the buffer from global dynamic memory for a value of a que_node,
if it has been allocated in the above function. The freeing for pushed
column values is done in sel_col_prefetch_buf_free. */
UNIV_INTERN
void
eval_node_free_val_buf(
/*===================*/
......@@ -96,7 +96,7 @@ eval_node_free_val_buf(
/*********************************************************************
Evaluates a comparison node. */
UNIV_INTERN
ibool
eval_cmp(
/*=====*/
......@@ -768,7 +768,7 @@ eval_predefined(
/*********************************************************************
Evaluates a function node. */
UNIV_INTERN
void
eval_func(
/*======*/
......
......@@ -14,7 +14,7 @@ Created 1/20/1998 Heikki Tuuri
/**************************************************************************
Performs an execution step of an if-statement node. */
UNIV_INTERN
que_thr_t*
if_step(
/*====*/
......@@ -90,7 +90,7 @@ if_step(
/**************************************************************************
Performs an execution step of a while-statement node. */
UNIV_INTERN
que_thr_t*
while_step(
/*=======*/
......@@ -126,7 +126,7 @@ while_step(
/**************************************************************************
Performs an execution step of an assignment statement node. */
UNIV_INTERN
que_thr_t*
assign_step(
/*========*/
......@@ -153,7 +153,7 @@ assign_step(
/**************************************************************************
Performs an execution step of a for-loop node. */
UNIV_INTERN
que_thr_t*
for_step(
/*=====*/
......@@ -215,7 +215,7 @@ for_step(
/**************************************************************************
Performs an execution step of an exit statement node. */
UNIV_INTERN
que_thr_t*
exit_step(
/*======*/
......@@ -247,7 +247,7 @@ exit_step(
/**************************************************************************
Performs an execution step of a return-statement node. */
UNIV_INTERN
que_thr_t*
return_step(
/*========*/
......
This diff is collapsed.
......@@ -315,7 +315,7 @@ fseg_alloc_free_page_low(
/**************************************************************************
Reads the file space size stored in the header page. */
UNIV_INTERN
ulint
fsp_get_size_low(
/*=============*/
......@@ -867,7 +867,7 @@ fsp_init_file_page(
/***************************************************************
Parses a redo log record of a file page init. */
UNIV_INTERN
byte*
fsp_parse_init_file_page(
/*=====================*/
......@@ -887,7 +887,7 @@ fsp_parse_init_file_page(
/**************************************************************************
Initializes the fsp system. */
UNIV_INTERN
void
fsp_init(void)
/*==========*/
......@@ -899,7 +899,7 @@ fsp_init(void)
Writes the space id and compressed page size to a tablespace header.
This function is used past the buffer pool when we in fil0fil.c create
a new single-table tablespace. */
UNIV_INTERN
void
fsp_header_init_fields(
/*===================*/
......@@ -917,7 +917,7 @@ fsp_header_init_fields(
/**************************************************************************
Initializes the space header of a new created space and creates also the
insert buffer tree root if space == 0. */
UNIV_INTERN
void
fsp_header_init(
/*============*/
......@@ -978,7 +978,7 @@ fsp_header_init(
/**************************************************************************
Reads the space id from the first page of a tablespace. */
UNIV_INTERN
ulint
fsp_header_get_space_id(
/*====================*/
......@@ -1006,7 +1006,7 @@ fsp_header_get_space_id(
/**************************************************************************
Reads the compressed page size from the first page of a tablespace. */
UNIV_INTERN
ulint
fsp_header_get_zip_size(
/*====================*/
......@@ -1019,7 +1019,7 @@ fsp_header_get_zip_size(
/**************************************************************************
Increases the space size field of a space. */
UNIV_INTERN
void
fsp_header_inc_size(
/*================*/
......@@ -1048,7 +1048,7 @@ Gets the current free limit of a tablespace. The free limit means the
place of the first page which has never been put to the the free list
for allocation. The space above that address is initialized to zero.
Sets also the global variable log_fsp_current_free_limit. */
UNIV_INTERN
ulint
fsp_header_get_free_limit(
/*======================*/
......@@ -1087,7 +1087,7 @@ fsp_header_get_free_limit(
Gets the size of the tablespace from the tablespace header. If we do not
have an auto-extending data file, this should be equal to the size of the
data files. If there is an auto-extending data file, this can be smaller. */
UNIV_INTERN
ulint
fsp_header_get_tablespace_size(
/*===========================*/
......@@ -2138,7 +2138,7 @@ fseg_get_n_frag_pages(
/**************************************************************************
Creates a new segment. */
UNIV_INTERN
buf_block_t*
fseg_create_general(
/*================*/
......@@ -2271,7 +2271,7 @@ funct_exit:
/**************************************************************************
Creates a new segment. */
UNIV_INTERN
buf_block_t*
fseg_create(
/*========*/
......@@ -2322,7 +2322,7 @@ fseg_n_reserved_pages_low(
/**************************************************************************
Calculates the number of pages reserved by a segment, and how many pages are
currently used. */
UNIV_INTERN
ulint
fseg_n_reserved_pages(
/*==================*/
......@@ -2718,7 +2718,7 @@ fseg_alloc_free_page_low(
Allocates a single free page from a segment. This function implements
the intelligent allocation strategy which tries to minimize file space
fragmentation. */
UNIV_INTERN
ulint
fseg_alloc_free_page_general(
/*=========================*/
......@@ -2787,7 +2787,7 @@ fseg_alloc_free_page_general(
Allocates a single free page from a segment. This function implements
the intelligent allocation strategy which tries to minimize file space
fragmentation. */
UNIV_INTERN
ulint
fseg_alloc_free_page(
/*=================*/
......@@ -2871,7 +2871,7 @@ function we would liberally reserve several 64 page extents for every page
split or merge in a B-tree. But we do not want to waste disk space if the table
only occupies < 32 pages. That is why we apply different rules in that special
case, just ensuring that there are 3 free pages available. */
UNIV_INTERN
ibool
fsp_reserve_free_extents(
/*=====================*/
......@@ -2984,7 +2984,7 @@ This function should be used to get information on how much we still
will be able to insert new data to the database without running out the
tablespace. Only free extents are taken into account and we also subtract
the safety margin required by the above function fsp_reserve_free_extents. */
UNIV_INTERN
ullint
fsp_get_available_space_in_free_extents(
/*====================================*/
......@@ -3266,7 +3266,7 @@ crash:
/**************************************************************************
Frees a single page of a segment. */
UNIV_INTERN
void
fseg_free_page(
/*===========*/
......@@ -3369,7 +3369,7 @@ Frees part of a segment. This function can be used to free a segment by
repeatedly calling this function in different mini-transactions. Doing
the freeing in a single mini-transaction might result in too big a
mini-transaction. */
UNIV_INTERN
ibool
fseg_free_step(
/*===========*/
......@@ -3446,7 +3446,7 @@ fseg_free_step(
/**************************************************************************
Frees part of a segment. Differs from fseg_free_step because this function
leaves the header page unfreed. */
UNIV_INTERN
ibool
fseg_free_step_not_header(
/*======================*/
......@@ -3508,7 +3508,7 @@ fseg_free_step_not_header(
/***********************************************************************
Frees a segment. The freeing is performed in several mini-transactions,
so that there is no danger of bufferfixing too many buffer pages. */
UNIV_INTERN
void
fseg_free(
/*======*/
......@@ -3696,7 +3696,7 @@ fseg_validate_low(
/***********************************************************************
Validates a segment. */
UNIV_INTERN
ibool
fseg_validate(
/*==========*/
......@@ -3774,7 +3774,7 @@ fseg_print_low(
/***********************************************************************
Writes info of a segment. */
UNIV_INTERN
void
fseg_print(
/*=======*/
......@@ -3796,7 +3796,7 @@ fseg_print(
/***********************************************************************
Validates the file space system and its segments. */
UNIV_INTERN
ibool
fsp_validate(
/*=========*/
......@@ -4049,7 +4049,7 @@ fsp_validate(
/***********************************************************************
Prints info of a file space. */
UNIV_INTERN
void
fsp_print(
/*======*/
......
......@@ -53,7 +53,7 @@ flst_add_to_empty(
/************************************************************************
Adds a node as the last node in a list. */
UNIV_INTERN
void
flst_add_last(
/*==========*/
......@@ -96,7 +96,7 @@ flst_add_last(
/************************************************************************
Adds a node as the first node in a list. */
UNIV_INTERN
void
flst_add_first(
/*===========*/
......@@ -139,7 +139,7 @@ flst_add_first(
/************************************************************************
Inserts a node after another in a list. */
UNIV_INTERN
void
flst_insert_after(
/*==============*/
......@@ -194,7 +194,7 @@ flst_insert_after(
/************************************************************************
Inserts a node before another in a list. */
UNIV_INTERN
void
flst_insert_before(
/*===============*/
......@@ -248,7 +248,7 @@ flst_insert_before(
/************************************************************************
Removes a node. */
UNIV_INTERN
void
flst_remove(
/*========*/
......@@ -325,7 +325,7 @@ flst_remove(
Cuts off the tail of the list, including the node given. The number of
nodes which will be removed must be provided by the caller, as this function
does not measure the length of the tail. */
UNIV_INTERN
void
flst_cut_end(
/*=========*/
......@@ -382,7 +382,7 @@ flst_cut_end(
Cuts off the tail of the list, not including the given node. The number of
nodes which will be removed must be provided by the caller, as this function
does not measure the length of the tail. */
UNIV_INTERN
void
flst_truncate_end(
/*==============*/
......@@ -421,7 +421,7 @@ flst_truncate_end(
/************************************************************************
Validates a file-based list. */
UNIV_INTERN
ibool
flst_validate(
/*==========*/
......@@ -488,7 +488,7 @@ flst_validate(
/************************************************************************
Prints info of a file-based list. */
UNIV_INTERN
void
flst_print(
/*=======*/
......
......@@ -22,7 +22,7 @@ Created 8/22/1994 Heikki Tuuri
/*****************************************************************
Creates a hash table with >= n array cells. The actual number of cells is
chosen to be a prime number slightly bigger than n. */
UNIV_INTERN
hash_table_t*
ha_create_func(
/*===========*/
......@@ -68,7 +68,7 @@ ha_create_func(
/*****************************************************************
Empties a hash table and frees the memory heaps. */
UNIV_INTERN
void
ha_clear(
/*=====*/
......@@ -100,7 +100,7 @@ ha_clear(
Inserts an entry into a hash table. If an entry with the same fold number
is found, its node is updated to point to the new data, and no new node
is inserted. */
UNIV_INTERN
ibool
ha_insert_for_fold_func(
/*====================*/
......@@ -198,7 +198,7 @@ ha_insert_for_fold_func(
/***************************************************************
Deletes a hash node. */
UNIV_INTERN
void
ha_delete_hash_node(
/*================*/
......@@ -217,7 +217,7 @@ ha_delete_hash_node(
/*****************************************************************
Deletes an entry from a hash table. */
UNIV_INTERN
void
ha_delete(
/*======*/
......@@ -240,7 +240,7 @@ ha_delete(
/*************************************************************
Looks for an element when we know the pointer to the data, and updates
the pointer to data, if found. */
UNIV_INTERN
void
ha_search_and_update_if_found_func(
/*===============================*/
......@@ -276,7 +276,7 @@ ha_search_and_update_if_found_func(
/*********************************************************************
Removes from the chain determined by fold all nodes whose data pointer
points to the page given. */
UNIV_INTERN
void
ha_remove_all_nodes_to_page(
/*========================*/
......@@ -321,7 +321,7 @@ ha_remove_all_nodes_to_page(
/*****************************************************************
Validates a given range of the cells in hash table. */
UNIV_INTERN
ibool
ha_validate(
/*========*/
......@@ -366,7 +366,7 @@ ha_validate(
/*****************************************************************
Prints info of a hash table. */
UNIV_INTERN
void
ha_print_info(
/*==========*/
......
......@@ -65,7 +65,7 @@ data_len bytes need to be allocated) and the size of storage is going to
become more than "memlim" then "data" is not added and NULL is returned.
To disable this behavior "memlim" can be set to 0, which stands for
"no limit". */
UNIV_INTERN
const void*
ha_storage_put_memlim(
/*==================*/
......
......@@ -15,7 +15,7 @@ Created 5/20/1997 Heikki Tuuri
/****************************************************************
Reserves the mutex for a fold value in a hash table. */
UNIV_INTERN
void
hash_mutex_enter(
/*=============*/
......@@ -27,7 +27,7 @@ hash_mutex_enter(
/****************************************************************
Releases the mutex for a fold value in a hash table. */
UNIV_INTERN
void
hash_mutex_exit(
/*============*/
......@@ -39,7 +39,7 @@ hash_mutex_exit(
/****************************************************************
Reserves all the mutexes of a hash table, in an ascending order. */
UNIV_INTERN
void
hash_mutex_enter_all(
/*=================*/
......@@ -55,7 +55,7 @@ hash_mutex_enter_all(
/****************************************************************
Releases all the mutexes of a hash table. */
UNIV_INTERN
void
hash_mutex_exit_all(
/*================*/
......@@ -72,7 +72,7 @@ hash_mutex_exit_all(
/*****************************************************************
Creates a hash table with >= n array cells. The actual number of cells is
chosen to be a prime number slightly bigger than n. */
UNIV_INTERN
hash_table_t*
hash_create(
/*========*/
......@@ -108,7 +108,7 @@ hash_create(
/*****************************************************************
Frees a hash table. */
UNIV_INTERN
void
hash_table_free(
/*============*/
......@@ -122,7 +122,7 @@ hash_table_free(
/*****************************************************************
Creates a mutex array to protect a hash table. */
UNIV_INTERN
void
hash_create_mutexes_func(
/*=====================*/
......
This diff is collapsed.
......@@ -83,32 +83,22 @@ class ha_innobase: public handler
/* Init values for the class: */
public:
ha_innobase(handlerton *hton, TABLE_SHARE *table_arg);
~ha_innobase() {}
~ha_innobase();
/*
Get the row type from the storage engine. If this method returns
ROW_TYPE_NOT_USED, the information in HA_CREATE_INFO should be used.
*/
enum row_type get_row_type() const;
const char* table_type() const { return("InnoDB");}
const char *index_type(uint key_number) { return "BTREE"; }
const char* table_type() const;
const char* index_type(uint key_number);
const char** bas_ext() const;
Table_flags table_flags() const;
ulong index_flags(uint idx, uint part, bool all_parts) const {
return(HA_READ_NEXT | HA_READ_PREV | HA_READ_ORDER
| HA_READ_RANGE | HA_KEYREAD_ONLY);
}
uint max_supported_keys() const { return MAX_KEY; }
/* An InnoDB page must store >= 2 keys;
a secondary key record must also contain the
primary key value:
max key length is therefore set to slightly
less than 1 / 4 of page size which is 16 kB;
but currently MySQL does not work with keys
whose size is > MAX_KEY_LENGTH */
uint max_supported_key_length() const { return 3500; }
ulong index_flags(uint idx, uint part, bool all_parts) const;
uint max_supported_keys() const;
uint max_supported_key_length() const;
uint max_supported_key_part_length() const;
const key_map *keys_to_use_for_scanning() { return &key_map_full; }
const key_map* keys_to_use_for_scanning();
int open(const char *name, int mode, uint test_if_locked);
int close(void);
......@@ -187,7 +177,7 @@ class ha_innobase: public handler
virtual bool get_error_message(int error, String *buf);
uint8 table_cache_type() { return HA_CACHE_TBL_ASKTRANSACT; }
uint8 table_cache_type();
/*
ask handler about permission to cache table during query registration
*/
......@@ -197,7 +187,7 @@ class ha_innobase: public handler
ulonglong *engine_data);
static char *get_mysql_bin_log_name();
static ulonglong get_mysql_bin_log_pos();
bool primary_key_is_clustered() { return true; }
bool primary_key_is_clustered();
int cmp_ref(const uchar *ref1, const uchar *ref2);
/** Fast index creation (smart ALTER TABLE) @see handler0alter.cc @{ */
int add_index(TABLE *table_arg, KEY *key_info, uint num_of_keys);
......
......@@ -107,7 +107,7 @@ innobase_col_to_mysql(
/*****************************************************************
Copies an InnoDB record to table->record[0]. */
extern "C"
extern "C" UNIV_INTERN
void
innobase_rec_to_mysql(
/*==================*/
......@@ -157,7 +157,7 @@ null_field:
/*****************************************************************
Resets table->record[0]. */
extern "C"
extern "C" UNIV_INTERN
void
innobase_rec_reset(
/*===============*/
......@@ -613,7 +613,7 @@ innobase_create_temporary_tablename(
/***********************************************************************
Create indexes. */
UNIV_INTERN
int
ha_innobase::add_index(
/*===================*/
......@@ -917,7 +917,7 @@ convert_error:
/***********************************************************************
Prepare to drop some indexes of a table. */
UNIV_INTERN
int
ha_innobase::prepare_drop_index(
/*============================*/
......@@ -1076,7 +1076,7 @@ func_exit:
/***********************************************************************
Drop the indexes that were passed to a successful prepare_drop_index(). */
UNIV_INTERN
int
ha_innobase::final_drop_index(
/*==========================*/
......
......@@ -26,7 +26,7 @@ Created November 07, 2007 Vasil Dimov
/***********************************************************************
Retrieve THD::thread_id
http://bugs.mysql.com/30930 */
extern "C"
extern "C" UNIV_INTERN
unsigned long
ib_thd_get_thread_id(
/*=================*/
......
......@@ -138,11 +138,11 @@ access order rules. */
#define IBUF_POOL_SIZE_PER_MAX_SIZE 2
/* The insert buffer control structure */
ibuf_t* ibuf = NULL;
UNIV_INTERN ibuf_t* ibuf = NULL;
static ulint ibuf_rnd = 986058871;
static ulint ibuf_rnd = 986058871;
ulint ibuf_flush_count = 0;
UNIV_INTERN ulint ibuf_flush_count = 0;
#ifdef UNIV_IBUF_COUNT_DEBUG
/* Dimensions for the ibuf_count array */
......@@ -276,7 +276,7 @@ ibuf_exit(void)
/**********************************************************************
Returns TRUE if the current OS thread is performing an insert buffer
routine. */
UNIV_INTERN
ibool
ibuf_inside(void)
/*=============*/
......@@ -342,7 +342,7 @@ ibuf_tree_root_get(
#ifdef UNIV_IBUF_COUNT_DEBUG
/**********************************************************************
Gets the ibuf count for a given page. */
UNIV_INTERN
ulint
ibuf_count_get(
/*===========*/
......@@ -376,7 +376,7 @@ ibuf_count_set(
/**********************************************************************
Creates the insert buffer data structure at a database startup and initializes
the data structures for the insert buffer. */
UNIV_INTERN
void
ibuf_init_at_db_start(void)
/*=======================*/
......@@ -452,7 +452,7 @@ Creates the insert buffer data struct for a single tablespace. Reads the
root page of the insert buffer tree in the tablespace. This function can
be called only after the dictionary system has been initialized, as this
creates also the insert buffer table and index into this tablespace. */
UNIV_INTERN
ibuf_data_t*
ibuf_data_init_for_space(
/*=====================*/
......@@ -565,7 +565,7 @@ ibuf_data_init_for_space(
/*************************************************************************
Initializes an ibuf bitmap page. */
UNIV_INTERN
void
ibuf_bitmap_page_init(
/*==================*/
......@@ -599,7 +599,7 @@ ibuf_bitmap_page_init(
/*************************************************************************
Parses a redo log record of an ibuf bitmap page init. */
UNIV_INTERN
byte*
ibuf_parse_bitmap_init(
/*===================*/
......@@ -832,7 +832,7 @@ Sets the free bit of the page in the ibuf bitmap. This is done in a separate
mini-transaction, hence this operation does not restrict further work to only
ibuf bitmap operations, which would result if the latch to the bitmap page
were kept. */
UNIV_INTERN
void
ibuf_set_free_bits_func(
/*====================*/
......@@ -902,7 +902,7 @@ Resets the free bits of the page in the ibuf bitmap. This is done in a
separate mini-transaction, hence this operation does not restrict further
work to only ibuf bitmap operations, which would result if the latch to the
bitmap page were kept. */
UNIV_INTERN
void
ibuf_reset_free_bits(
/*=================*/
......@@ -917,7 +917,7 @@ ibuf_reset_free_bits(
Updates the free bits for an uncompressed page to reflect the present state.
Does this in the mtr given, which means that the latching order rules virtually
prevent any further operations for this OS thread until mtr is committed. */
UNIV_INTERN
void
ibuf_update_free_bits_low(
/*======================*/
......@@ -951,7 +951,7 @@ ibuf_update_free_bits_low(
Updates the free bits for a compressed page to reflect the present state.
Does this in the mtr given, which means that the latching order rules virtually
prevent any further operations for this OS thread until mtr is committed. */
UNIV_INTERN
void
ibuf_update_free_bits_zip(
/*======================*/
......@@ -982,7 +982,7 @@ ibuf_update_free_bits_zip(
Updates the free bits for the two pages to reflect the present state. Does
this in the mtr given, which means that the latching order rules virtually
prevent any further operations until mtr is committed. */
UNIV_INTERN
void
ibuf_update_free_bits_for_two_pages_low(
/*====================================*/
......@@ -1029,7 +1029,7 @@ ibuf_fixed_addr_page(
/***************************************************************************
Checks if a page is a level 2 or 3 page in the ibuf hierarchy of pages. */
UNIV_INTERN
ibool
ibuf_page(
/*======*/
......@@ -1075,7 +1075,7 @@ ibuf_page(
/***************************************************************************
Checks if a page is a level 2 or 3 page in the ibuf hierarchy of pages. */
UNIV_INTERN
ibool
ibuf_page_low(
/*==========*/
......@@ -1911,7 +1911,7 @@ ibuf_remove_free_page(
Frees excess pages from the ibuf free list. This function is called when an OS
thread calls fsp services to allocate a new file segment, or a new page to a
file segment, and the thread did not own the fsp latch before this call. */
UNIV_INTERN
void
ibuf_free_excess_pages(
/*===================*/
......@@ -2266,7 +2266,7 @@ loop:
/*************************************************************************
Contracts insert buffer trees by reading pages to the buffer pool. */
UNIV_INTERN
ulint
ibuf_contract(
/*==========*/
......@@ -2284,7 +2284,7 @@ ibuf_contract(
/*************************************************************************
Contracts insert buffer trees by reading pages to the buffer pool. */
UNIV_INTERN
ulint
ibuf_contract_for_n_pages(
/*======================*/
......@@ -2361,7 +2361,7 @@ ibuf_contract_after_insert(
/*************************************************************************
Gets an upper limit for the combined size of entries buffered in the insert
buffer for a given page. */
UNIV_INTERN
ulint
ibuf_get_volume_buffered(
/*=====================*/
......@@ -2539,7 +2539,7 @@ count_later:
/*************************************************************************
Reads the biggest tablespace id from the high end of the insert buffer
tree and updates the counter in fil_system. */
UNIV_INTERN
void
ibuf_update_max_tablespace_id(void)
/*===============================*/
......@@ -2854,7 +2854,7 @@ function_exit:
Makes an index insert to the insert buffer, instead of directly to the disk
page, if this is possible. Does not do insert if the index is clustered
or unique. */
UNIV_INTERN
ibool
ibuf_insert(
/*========*/
......@@ -3154,7 +3154,7 @@ The entries are deleted from the insert buffer. If the page is not read, but
created in the buffer pool, this function deletes its buffered entries from
the insert buffer; there can exist entries for such a page if the page
belonged to an index which subsequently was dropped. */
UNIV_INTERN
void
ibuf_merge_or_delete_for_page(
/*==========================*/
......@@ -3480,7 +3480,7 @@ Deletes all entries in the insert buffer for a given space id. This is used
in DISCARD TABLESPACE and IMPORT TABLESPACE.
NOTE: this does not update the page free bitmaps in the space. The space will
become CORRUPT when you call this function! */
UNIV_INTERN
void
ibuf_delete_for_discarded_space(
/*============================*/
......@@ -3614,7 +3614,7 @@ ibuf_validate_low(void)
/**********************************************************************
Looks if the insert buffer is empty. */
UNIV_INTERN
ibool
ibuf_is_empty(void)
/*===============*/
......@@ -3666,7 +3666,7 @@ ibuf_is_empty(void)
/**********************************************************************
Prints info of ibuf. */
UNIV_INTERN
void
ibuf_print(
/*=======*/
......
......@@ -12,7 +12,7 @@ Created 2/17/1996 Heikki Tuuri
/*************************************************************************
Updates the search info. */
UNIV_INTERN
void
btr_search_info_update_slow(
/*========================*/
......
......@@ -21,7 +21,7 @@ Allocate a block. The thread calling this function must hold
buf_pool_mutex and must not hold buf_pool_zip_mutex or any block->mutex.
The buf_pool_mutex may only be released and reacquired if
lru == BUF_BUDDY_USE_LRU. */
UNIV_INTERN
void*
buf_buddy_alloc_low(
/*================*/
......@@ -37,7 +37,7 @@ buf_buddy_alloc_low(
/**************************************************************************
Deallocate a block. */
UNIV_INTERN
void
buf_buddy_free_low(
/*===============*/
......
......@@ -13,7 +13,7 @@ Created 11/5/1995 Heikki Tuuri
Inserts a modified block into the flush list in the right sorted position.
This function is used by recovery, because there the modifications do not
necessarily come in the order of lsn's. */
UNIV_INTERN
void
buf_flush_insert_sorted_into_flush_list(
/*====================================*/
......
......@@ -7,21 +7,7 @@ Created 1/16/1996 Heikki Tuuri
*******************************************************/
#include "mach0data.h"
#ifndef UNIV_HOTBACKUP
/**********************************************************************
Get the variable length bounds of the given character set.
NOTE: the prototype of this function is copied from ha_innodb.cc! If you change
this function, you MUST change also the prototype here! */
extern
void
innobase_get_cset_width(
/*====================*/
ulint cset, /* in: MySQL charset-collation code */
ulint* mbminlen, /* out: minimum length of a char (in bytes) */
ulint* mbmaxlen); /* out: maximum length of a char (in bytes) */
#endif /* !UNIV_HOTBACKUP */
#include "ha_prototypes.h"
/*************************************************************************
Gets the MySQL charset-collation code for MySQL string types. */
......
......@@ -9,7 +9,7 @@ Created 4/18/1996 Heikki Tuuri
/**************************************************************************
Writes the current value of the row id counter to the dictionary header file
page. */
UNIV_INTERN
void
dict_hdr_flush_row_id(void);
/*=======================*/
......
......@@ -11,7 +11,7 @@ Created 2/5/1996 Heikki Tuuri
/****************************************************************
Adds a new block to a dyn array. */
UNIV_INTERN
dyn_block_t*
dyn_array_add_block(
/*================*/
......
......@@ -13,7 +13,7 @@ Created 12/29/1997 Heikki Tuuri
/*********************************************************************
Evaluates a function node. */
UNIV_INTERN
void
eval_func(
/*======*/
......@@ -24,7 +24,7 @@ NOTE that this memory must be explicitly freed when the query graph is
freed. If the node already has allocated buffer, that buffer is freed
here. NOTE that this is the only function where dynamic memory should be
allocated for a query node val field. */
UNIV_INTERN
byte*
eval_node_alloc_val_buf(
/*====================*/
......
......@@ -11,7 +11,7 @@ Created 8/18/1994 Heikki Tuuri
/***************************************************************
Deletes a hash node. */
UNIV_INTERN
void
ha_delete_hash_node(
/*================*/
......
......@@ -12,7 +12,7 @@ InnoDB's C-code. */
/*************************************************************************
Wrapper around MySQL's copy_and_convert function, see it for
documentation. */
UNIV_INTERN
ulint
innobase_convert_string(
/*====================*/
......@@ -27,7 +27,7 @@ innobase_convert_string(
/*********************************************************************
Convert a table or index name to the MySQL system_charset_info (UTF-8)
and quote it if needed. */
UNIV_INTERN
char*
innobase_convert_name(
/*==================*/
......@@ -46,7 +46,7 @@ server. Used in srv_conc_enter_innodb() to determine if the thread
should be allowed to enter InnoDB - the replication thread is treated
differently than other threads. Also used in
srv_conc_force_exit_innodb(). */
UNIV_INTERN
ibool
thd_is_replication_slave_thread(
/*============================*/
......@@ -58,7 +58,7 @@ Returns true if the transaction this thread is processing has edited
non-transactional tables. Used by the deadlock detector when deciding
which transaction to rollback in case of a deadlock - we try to avoid
rolling back transactions that have edited non-transactional tables. */
UNIV_INTERN
ibool
thd_has_edited_nontrans_tables(
/*===========================*/
......@@ -68,7 +68,7 @@ thd_has_edited_nontrans_tables(
/*****************************************************************
Prints info of a THD object (== user session thread) to the given file. */
UNIV_INTERN
void
innobase_mysql_print_thd(
/*=====================*/
......@@ -81,7 +81,7 @@ innobase_mysql_print_thd(
Converts a MySQL type to an InnoDB type. Note that this function returns
the 'mtype' of InnoDB. InnoDB differentiates between MySQL's old <= 4.1
VARCHAR and the new true VARCHAR in >= 5.0.3 by the 'prtype'. */
UNIV_INTERN
ulint
get_innobase_type_from_mysql_type(
/*==============================*/
......@@ -102,7 +102,7 @@ protect MySQL from setting thd->query NULL. If you print a thd of the current
thread, we know that MySQL cannot modify thd->query, and it is not necessary
to call this. Call innobase_mysql_end_print_arbitrary_thd() after you release
the kernel_mutex. */
UNIV_INTERN
void
innobase_mysql_prepare_print_arbitrary_thd(void);
/*============================================*/
......@@ -112,10 +112,19 @@ Releases the mutex reserved by innobase_mysql_prepare_print_arbitrary_thd().
In the InnoDB latching order, the mutex sits right above the
kernel_mutex. In debug builds, we assert that the kernel_mutex is
released before this function is invoked. */
UNIV_INTERN
void
innobase_mysql_end_print_arbitrary_thd(void);
/*========================================*/
/**********************************************************************
Get the variable length bounds of the given character set. */
UNIV_INTERN
void
innobase_get_cset_width(
/*====================*/
ulint cset, /* in: MySQL charset-collation code */
ulint* mbminlen, /* out: minimum length of a char (in bytes) */
ulint* mbmaxlen); /* out: maximum length of a char (in bytes) */
#endif
#endif
......@@ -55,7 +55,7 @@ Sets the free bit of the page in the ibuf bitmap. This is done in a separate
mini-transaction, hence this operation does not restrict further work to only
ibuf bitmap operations, which would result if the latch to the bitmap page
were kept. */
UNIV_INTERN
void
ibuf_set_free_bits_func(
/*====================*/
......
......@@ -745,9 +745,6 @@ lock_rec_get_page_no(
/* out: page number */
const lock_t* lock); /* in: lock */
/* The lock system */
extern lock_sys_t* lock_sys;
/* Lock modes and types */
#define LOCK_MODE_MASK 0xFUL /* mask used to extract mode from the
type_mode field in a lock */
......
......@@ -13,7 +13,7 @@ Created 12/9/1995 Heikki Tuuri
/**********************************************************
Checks by parsing that the catenated log segment for a single mtr is
consistent. */
UNIV_INTERN
ibool
log_check_log_recs(
/*===============*/
......
......@@ -13,7 +13,7 @@ extern ulint mem_current_allocated_memory;
/**********************************************************************
Initializes an allocated memory field in the debug version. */
UNIV_INTERN
void
mem_field_init(
/*===========*/
......@@ -21,7 +21,7 @@ mem_field_init(
ulint n); /* in: how many bytes the user requested */
/**********************************************************************
Erases an allocated memory field in the debug version. */
UNIV_INTERN
void
mem_field_erase(
/*============*/
......@@ -30,7 +30,7 @@ mem_field_erase(
/*******************************************************************
Initializes a buffer to a random combination of hex BA and BE.
Used to initialize allocated memory. */
UNIV_INTERN
void
mem_init_buf(
/*=========*/
......@@ -39,7 +39,7 @@ mem_init_buf(
/*******************************************************************
Initializes a buffer to a random combination of hex DE and AD.
Used to erase freed memory.*/
UNIV_INTERN
void
mem_erase_buf(
/*==========*/
......@@ -49,7 +49,7 @@ mem_erase_buf(
Inserts a created memory heap to the hash table of
current allocated memory heaps.
Initializes the hash table when first called. */
UNIV_INTERN
void
mem_hash_insert(
/*============*/
......@@ -64,7 +64,7 @@ the heap (not the total space occupied by the heap).
Also validates the heap.
NOTE: This function does not free the storage occupied by the
heap itself, only the node in the list of heaps. */
UNIV_INTERN
void
mem_hash_remove(
/*============*/
......
......@@ -12,7 +12,7 @@ Created 6/8/1994 Heikki Tuuri
/*******************************************************************
Creates a memory heap block where data can be allocated. */
UNIV_INTERN
mem_block_t*
mem_heap_create_block(
/*==================*/
......@@ -28,7 +28,7 @@ mem_heap_create_block(
ulint line); /* in: line where created */
/**********************************************************************
Frees a block from a memory heap. */
UNIV_INTERN
void
mem_heap_block_free(
/*================*/
......@@ -36,14 +36,14 @@ mem_heap_block_free(
mem_block_t* block); /* in: block to free */
/**********************************************************************
Frees the free_block field from a memory heap. */
UNIV_INTERN
void
mem_heap_free_block_free(
/*=====================*/
mem_heap_t* heap); /* in: heap */
/*******************************************************************
Adds a new block to a memory heap. */
UNIV_INTERN
mem_block_t*
mem_heap_add_block(
/*===============*/
......
......@@ -35,12 +35,6 @@ Created 10/4/1994 Heikki Tuuri
# define PAGE_CUR_DBG 6 /* As PAGE_CUR_LE, but skips search shortcut */
#endif /* UNIV_SEARCH_DEBUG */
#ifdef PAGE_CUR_ADAPT
# ifdef UNIV_SEARCH_PERF_STAT
extern ulint page_cur_short_succ;
# endif /* UNIV_SEARCH_PERF_STAT */
#endif /* PAGE_CUR_ADAPT */
#ifdef UNIV_DEBUG
/*************************************************************
Gets pointer to the page frame where the cursor is positioned. */
......
......@@ -872,7 +872,7 @@ page_get_data_size(
/****************************************************************
Allocates a block of memory from the free list of an index page. */
UNIV_INTERN
void
page_mem_alloc_free(
/*================*/
......
......@@ -329,7 +329,7 @@ page_zip_des_init(
/**************************************************************************
Write a log record of writing to the uncompressed header portion of a page. */
UNIV_INTERN
void
page_zip_write_header_log(
/*======================*/
......
......@@ -129,7 +129,7 @@ a field stored to another page: */
/***************************************************************
Sets the value of the ith field SQL null bit of an old-style record. */
UNIV_INTERN
void
rec_set_nth_field_null_bit(
/*=======================*/
......@@ -139,7 +139,7 @@ rec_set_nth_field_null_bit(
/***************************************************************
Sets an old-style record field to SQL null.
The physical size of the field is not changed. */
UNIV_INTERN
void
rec_set_nth_field_sql_null(
/*=======================*/
......
......@@ -82,8 +82,9 @@ extern ulint srv_log_file_size;
extern ulint srv_log_buffer_size;
extern ulong srv_flush_log_at_trx_commit;
extern byte srv_latin1_ordering[256];/* The sort order table of the latin1
character set */
/* The sort order table of the MySQL latin1_swedish_ci character set
collation */
extern const byte* srv_latin1_ordering;
extern ulong srv_buf_pool_size; /* requested size in bytes */
extern ulong srv_buf_pool_old_size; /* previously requested size */
extern ulong srv_buf_pool_curr_size; /* current size in bytes */
......
......@@ -11,7 +11,7 @@ Lock an rw-lock in shared mode for the current thread. If the rw-lock is
locked in exclusive mode, or there is an exclusive lock request waiting,
the function spins a preset time (controlled by SYNC_SPIN_ROUNDS),
waiting for the lock before suspending the thread. */
UNIV_INTERN
void
rw_lock_s_lock_spin(
/*================*/
......@@ -23,7 +23,7 @@ rw_lock_s_lock_spin(
#ifdef UNIV_SYNC_DEBUG
/**********************************************************************
Inserts the debug information for an rw-lock. */
UNIV_INTERN
void
rw_lock_add_debug_info(
/*===================*/
......@@ -34,7 +34,7 @@ rw_lock_add_debug_info(
ulint line); /* in: line where requested */
/**********************************************************************
Removes a debug information struct for an rw-lock. */
UNIV_INTERN
void
rw_lock_remove_debug_info(
/*======================*/
......
......@@ -18,7 +18,7 @@ says that "in" has to go in the same place as "out".*/
/**********************************************************************
Sets the waiters field in a mutex. */
UNIV_INTERN
void
mutex_set_waiters(
/*==============*/
......@@ -28,7 +28,7 @@ mutex_set_waiters(
Reserves a mutex for the current thread. If the mutex is reserved, the
function spins a preset time (controlled by SYNC_SPIN_ROUNDS) waiting
for the mutex before suspending the thread. */
UNIV_INTERN
void
mutex_spin_wait(
/*============*/
......@@ -39,7 +39,7 @@ mutex_spin_wait(
#ifdef UNIV_SYNC_DEBUG
/**********************************************************************
Sets the debug information for a reserved mutex. */
UNIV_INTERN
void
mutex_set_debug_info(
/*=================*/
......@@ -49,7 +49,7 @@ mutex_set_debug_info(
#endif /* UNIV_SYNC_DEBUG */
/**********************************************************************
Releases the threads waiting in the primary wait array for this mutex. */
UNIV_INTERN
void
mutex_signal_object(
/*================*/
......
......@@ -28,7 +28,7 @@ typedef byte trx_sysf_rseg_t;
/*********************************************************************
Writes the value of max_trx_id to the file based trx system header. */
UNIV_INTERN
void
trx_sys_flush_max_trx_id(void);
/*==========================*/
......
......@@ -169,6 +169,14 @@ by one. */
/* the above option enables basic recovery debugging:
new allocated file pages are reset */
/* Linkage specifier for non-static InnoDB symbols (variables and functions)
that are only referenced from within InnoDB, not from MySQL */
#ifdef __WIN__
# define UNIV_INTERN
#else
# define UNIV_INTERN __attribute__((visibility ("hidden")))
#endif
#if (!defined(UNIV_DEBUG) && !defined(UNIV_MUST_NOT_INLINE))
/* Definition for inline version */
......@@ -183,7 +191,7 @@ by one. */
definitions: */
#define UNIV_NONINL
#define UNIV_INLINE
#define UNIV_INLINE UNIV_INTERN
#endif /* UNIV_DEBUG */
......
......@@ -24,10 +24,10 @@ struct dulint_struct{
};
/* Zero value for a dulint */
extern dulint ut_dulint_zero;
extern const dulint ut_dulint_zero;
/* Maximum value for a dulint */
extern dulint ut_dulint_max;
extern const dulint ut_dulint_max;
/***********************************************************
Creates a 64-bit dulint out of two ulints. */
......
......@@ -196,7 +196,7 @@ ut_strcount(
Replace every occurrence of s1 in str with s2. Overlapping instances of s1
are only replaced once. */
char *
char*
ut_strreplace(
/*==========*/
/* out, own: modified string, must be
......
......@@ -25,7 +25,7 @@ record is stored. It can be undefined (ULINT_UNDEFINED) in two cases:
bit_no is calculated in this function by using
lock_rec_find_set_bit(). There is exactly one bit set in the bitmap
of a wait lock. */
UNIV_INTERN
void
lock_queue_iterator_reset(
/*======================*/
......@@ -59,7 +59,7 @@ lock_queue_iterator_reset(
Gets the previous lock in the lock queue, returns NULL if there are no
more locks (i.e. the current lock is the first one). The iterator is
receded (if not-NULL is returned). */
UNIV_INTERN
const lock_t*
lock_queue_iterator_get_prev(
/*=========================*/
......
This diff is collapsed.
This diff is collapsed.
......@@ -41,7 +41,7 @@ Created 9/20/1997 Heikki Tuuri
/* This is set to FALSE if the backup was originally taken with the
ibbackup --include regexp option: then we do not want to create tables in
directories which were not included */
ibool recv_replay_file_ops = TRUE;
UNIV_INTERN ibool recv_replay_file_ops = TRUE;
#endif /* UNIV_HOTBACKUP */
/* Log records are stored in the hash table in chunks at most of this size;
......@@ -51,13 +51,13 @@ this must be less than UNIV_PAGE_SIZE as it is stored in the buffer pool */
/* Read-ahead area in applying log records to file pages */
#define RECV_READ_AHEAD_AREA 32
recv_sys_t* recv_sys = NULL;
ibool recv_recovery_on = FALSE;
ibool recv_recovery_from_backup_on = FALSE;
UNIV_INTERN recv_sys_t* recv_sys = NULL;
UNIV_INTERN ibool recv_recovery_on = FALSE;
UNIV_INTERN ibool recv_recovery_from_backup_on = FALSE;
ibool recv_needed_recovery = FALSE;
UNIV_INTERN ibool recv_needed_recovery = FALSE;
ibool recv_lsn_checks_on = FALSE;
UNIV_INTERN ibool recv_lsn_checks_on = FALSE;
/* There are two conditions under which we scan the logs, the first
is normal startup and the second is when we do a recovery from an
......@@ -67,7 +67,7 @@ startup. If we find log entries that were written after the last checkpoint
we know that the server was not cleanly shutdown. We must then initialize
the crash recovery environment before attempting to store these entries in
the log hash table. */
ibool recv_log_scan_is_startup_type = FALSE;
UNIV_INTERN ibool recv_log_scan_is_startup_type = FALSE;
/* If the following is TRUE, the buffer pool file pages must be invalidated
after recovery and no ibuf operations are allowed; this becomes TRUE if
......@@ -79,37 +79,37 @@ buffer pool before the pages have been recovered to the up-to-date state */
/* Recovery is running and no operations on the log files are allowed
yet: the variable name is misleading */
ibool recv_no_ibuf_operations = FALSE;
UNIV_INTERN ibool recv_no_ibuf_operations = FALSE;
/* The following counter is used to decide when to print info on
log scan */
ulint recv_scan_print_counter = 0;
UNIV_INTERN ulint recv_scan_print_counter = 0;
ibool recv_is_from_backup = FALSE;
UNIV_INTERN ibool recv_is_from_backup = FALSE;
#ifdef UNIV_HOTBACKUP
ibool recv_is_making_a_backup = FALSE;
UNIV_INTERN ibool recv_is_making_a_backup = FALSE;
#else
# define recv_is_making_a_backup FALSE
#endif /* UNIV_HOTBACKUP */
ulint recv_previous_parsed_rec_type = 999999;
ulint recv_previous_parsed_rec_offset = 0;
ulint recv_previous_parsed_rec_is_multi = 0;
UNIV_INTERN ulint recv_previous_parsed_rec_type = 999999;
UNIV_INTERN ulint recv_previous_parsed_rec_offset = 0;
UNIV_INTERN ulint recv_previous_parsed_rec_is_multi = 0;
ulint recv_max_parsed_page_no = 0;
UNIV_INTERN ulint recv_max_parsed_page_no = 0;
/* This many frames must be left free in the buffer pool when we scan
the log and store the scanned log records in the buffer pool: we will
use these free frames to read in pages when we start applying the
log records to the database. */
ulint recv_n_pool_free_frames = 256;
UNIV_INTERN ulint recv_n_pool_free_frames = 256;
/* The maximum lsn we see for a page during the recovery process. If this
is bigger than the lsn we are able to scan up to, that is an indication that
the recovery failed and the database may be corrupt. */
ib_uint64_t recv_max_page_lsn;
UNIV_INTERN ib_uint64_t recv_max_page_lsn;
/* prototypes */
......@@ -123,7 +123,7 @@ recv_init_crash_recovery(void);
/************************************************************
Creates the recovery system. */
UNIV_INTERN
void
recv_sys_create(void)
/*=================*/
......@@ -143,7 +143,7 @@ recv_sys_create(void)
/************************************************************
Inits the recovery system for a recovery operation. */
UNIV_INTERN
void
recv_sys_init(
/*==========*/
......@@ -585,7 +585,7 @@ not_consistent:
/***********************************************************************
Reads the checkpoint info needed in hot backup. */
UNIV_INTERN
ibool
recv_read_cp_info_for_backup(
/*=========================*/
......@@ -693,7 +693,7 @@ log_block_checksum_is_ok_or_old_format(
/***********************************************************************
Scans the log segment and n_bytes_scanned is set to the length of valid
log scanned. */
UNIV_INTERN
void
recv_scan_log_seg_for_backup(
/*=========================*/
......@@ -1173,7 +1173,7 @@ recv_data_copy_to_buf(
Applies the hashed log records to the page, if the page lsn is less than the
lsn of a log record. This can be called when a buffer page has just been
read in, or also for a page already in the buffer pool. */
UNIV_INTERN
void
recv_recover_page(
/*==============*/
......@@ -1421,7 +1421,7 @@ recv_read_in_area(
/***********************************************************************
Empties the hash table of stored log records, applying them to appropriate
pages. */
UNIV_INTERN
void
recv_apply_hashed_log_recs(
/*=======================*/
......@@ -1571,7 +1571,7 @@ loop:
#ifdef UNIV_HOTBACKUP
/***********************************************************************
Applies log records in the hash table to a backup. */
UNIV_INTERN
void
recv_apply_log_recs_for_backup(void)
/*================================*/
......@@ -2224,7 +2224,7 @@ recv_sys_justify_left_parsing_buf(void)
/***********************************************************
Scans log from a buffer and stores new log data to the parsing buffer. Parses
and hashes the log records if new data found. */
UNIV_INTERN
ibool
recv_scan_log_recs(
/*===============*/
......@@ -2541,7 +2541,7 @@ Recovers from a checkpoint. When this function returns, the database is able
to start processing of new user transactions, but the function
recv_recovery_from_checkpoint_finish should be called later to complete
the recovery and free the resources used in it. */
UNIV_INTERN
ulint
recv_recovery_from_checkpoint_start(
/*================================*/
......@@ -2884,7 +2884,7 @@ recv_recovery_from_checkpoint_start(
/************************************************************
Completes recovery from a checkpoint. */
UNIV_INTERN
void
recv_recovery_from_checkpoint_finish(void)
/*======================================*/
......@@ -2956,7 +2956,7 @@ recv_recovery_from_checkpoint_finish(void)
/**********************************************************
Resets the logs. The contents of log files will be lost! */
UNIV_INTERN
void
recv_reset_logs(
/*============*/
......@@ -3027,7 +3027,7 @@ recv_reset_logs(
#ifdef UNIV_HOTBACKUP
/**********************************************************
Creates new log files after a backup has been restored. */
UNIV_INTERN
void
recv_reset_log_files_for_backup(
/*============================*/
......@@ -3310,7 +3310,7 @@ ask_again:
/************************************************************
Recovers from archived log files, and also from log files, if they exist. */
UNIV_INTERN
ulint
recv_recovery_from_archive_start(
/*=============================*/
......@@ -3426,7 +3426,7 @@ recv_recovery_from_archive_start(
/************************************************************
Completes recovery from archive. */
UNIV_INTERN
void
recv_recovery_from_archive_finish(void)
/*===================================*/
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -880,9 +880,9 @@ static int input (void );
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1
static int yylex (void);
UNIV_INTERN int yylex (void);
#define YY_DECL static int yylex (void)
#define YY_DECL UNIV_INTERN int yylex (void)
#endif /* !YY_DECL */
/* Code executed at the beginning of each rule, after yytext and yyleng
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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