Commit d6c68479 authored by marko's avatar marko

branches/zip: Add const qualifiers to function parameters, mostly dtuple_t.

parent cdb096b6
......@@ -279,7 +279,7 @@ btr_cur_search_to_nth_level(
/*========================*/
dict_index_t* index, /* in: index */
ulint level, /* in: the tree level of search */
dtuple_t* tuple, /* in: data tuple; NOTE: n_fields_cmp in
const dtuple_t* tuple, /* in: data tuple; NOTE: n_fields_cmp in
tuple must be set so that it cannot get
compared to the node ptr page number field! */
ulint mode, /* in: PAGE_CUR_L, ...;
......@@ -855,7 +855,7 @@ btr_cur_insert_if_possible(
btr_cur_t* cursor, /* in: cursor on page after which to insert;
cursor stays valid */
page_zip_des_t* page_zip,/* in: compressed page of cursor */
dtuple_t* tuple, /* in: tuple to insert; the size info need not
const dtuple_t* tuple, /* in: tuple to insert; the size info need not
have been stored to tuple */
const ulint* ext, /* in: array of extern field numbers */
ulint n_ext, /* in: number of elements in ext */
......@@ -906,7 +906,7 @@ btr_cur_ins_lock_and_undo(
not zero, the parameters index and thr
should be specified */
btr_cur_t* cursor, /* in: cursor on page after which to insert */
dtuple_t* entry, /* in: entry to insert */
const dtuple_t* entry, /* in: entry to insert */
que_thr_t* thr, /* in: query thread or NULL */
ibool* inherit)/* out: TRUE if the inserted new record maybe
should inherit LOCK_GAP type locks from the
......@@ -1031,7 +1031,7 @@ btr_cur_optimistic_insert(
specified */
btr_cur_t* cursor, /* in: cursor on page after which to insert;
cursor stays valid */
dtuple_t* entry, /* in: entry to insert */
dtuple_t* entry, /* in/out: entry to insert */
rec_t** rec, /* out: pointer to inserted record if
succeed */
big_rec_t** big_rec,/* out: big rec vector whose fields have to
......@@ -1233,7 +1233,7 @@ btr_cur_pessimistic_insert(
insertion will certainly succeed */
btr_cur_t* cursor, /* in: cursor after which to insert;
cursor stays valid */
dtuple_t* entry, /* in: entry to insert */
dtuple_t* entry, /* in/out: entry to insert */
rec_t** rec, /* out: pointer to inserted record if
succeed */
big_rec_t** big_rec,/* out: big rec vector whose fields have to
......@@ -2908,9 +2908,9 @@ btr_estimate_n_rows_in_range(
/*=========================*/
/* out: estimated number of rows */
dict_index_t* index, /* in: index */
dtuple_t* tuple1, /* in: range start, may also be empty tuple */
const dtuple_t* tuple1, /* in: range start, may also be empty tuple */
ulint mode1, /* in: search mode for range start */
dtuple_t* tuple2, /* in: range end, may also be empty tuple */
const dtuple_t* tuple2, /* in: range end, may also be empty tuple */
ulint mode2) /* in: search mode for range end */
{
btr_path_t path1[BTR_PATH_ARRAY_N_SLOTS];
......@@ -3362,20 +3362,20 @@ in entry, so that they are not freed in a rollback. */
void
btr_cur_mark_dtuple_inherited_extern(
/*=================================*/
dtuple_t* entry, /* in: updated entry to be inserted to
clustered index */
ulint* ext_vec, /* in: array of extern fields in the
dtuple_t* entry, /* in/out: updated entry to be
inserted to clustered index */
const ulint* ext_vec, /* in: array of extern fields in the
original record */
ulint n_ext_vec, /* in: number of elements in ext_vec */
upd_t* update) /* in: update vector */
{
dfield_t* dfield;
ulint byte_val;
byte* data;
ulint len;
ibool is_updated;
ulint j;
ulint i;
dfield_t* dfield;
ulint byte_val;
byte* data;
ulint len;
ibool is_updated;
ulint j;
ulint i;
if (ext_vec == NULL) {
......@@ -3448,8 +3448,8 @@ Marks all extern fields in a dtuple as owned by the record. */
void
btr_cur_unmark_dtuple_extern_fields(
/*================================*/
dtuple_t* entry, /* in: clustered index entry */
ulint* ext_vec, /* in: array of numbers of fields
dtuple_t* entry, /* in/out: clustered index entry */
const ulint* ext_vec, /* in: array of numbers of fields
which have been stored externally */
ulint n_ext_vec) /* in: number of elements in ext_vec */
{
......
......@@ -544,7 +544,7 @@ void
btr_pcur_open_on_user_rec(
/*======================*/
dict_index_t* index, /* in: index */
dtuple_t* tuple, /* in: tuple on which search done */
const dtuple_t* tuple, /* in: tuple on which search done */
ulint mode, /* in: PAGE_CUR_L, ... */
ulint latch_mode, /* in: BTR_SEARCH_LEAF or
BTR_MODIFY_LEAF */
......
......@@ -540,7 +540,7 @@ btr_search_check_guess(
protected, not the next or previous record
in the chain: we cannot look at the next or
previous record to check our guess! */
dtuple_t* tuple, /* in: data tuple */
const dtuple_t* tuple, /* in: data tuple */
ulint mode, /* in: PAGE_CUR_L, PAGE_CUR_LE, PAGE_CUR_G,
or PAGE_CUR_GE */
mtr_t* mtr) /* in: mtr */
......@@ -680,7 +680,7 @@ btr_search_guess_on_hash(
/* out: TRUE if succeeded */
dict_index_t* index, /* in: index */
btr_search_t* info, /* in: index search info */
dtuple_t* tuple, /* in: logical record */
const dtuple_t* tuple, /* in: logical record */
ulint mode, /* in: PAGE_CUR_L, ... */
ulint latch_mode, /* in: BTR_SEARCH_LEAF, ...;
NOTE that only if has_search_latch
......
......@@ -496,7 +496,7 @@ dtuple_convert_big_rec(
too many fixed-length or short fields
in entry or the index is clustered */
dict_index_t* index, /* in: index */
dtuple_t* entry, /* in: index entry */
const dtuple_t* entry, /* in: index entry */
const ulint* ext_vec,/* in: array of externally stored fields,
or NULL: if a field already is externally
stored, then we cannot move it to the vector
......
......@@ -3620,7 +3620,7 @@ dict_index_check_search_tuple(
/*==========================*/
/* out: TRUE if ok */
dict_index_t* index, /* in: index tree */
dtuple_t* tuple) /* in: tuple used in a search */
const dtuple_t* tuple) /* in: tuple used in a search */
{
ut_a(index);
ut_a(dtuple_get_n_fields_cmp(tuple)
......
......@@ -1402,7 +1402,7 @@ ibuf_entry_build(
must be kept because we copy pointers to its
fields */
dict_index_t* index, /* in: non-clustered index */
dtuple_t* entry, /* in: entry for a non-clustered index */
const dtuple_t* entry, /* in: entry for a non-clustered index */
ulint space, /* in: space id */
ulint page_no,/* in: index page number where entry should
be inserted */
......@@ -2555,7 +2555,7 @@ ibuf_insert_low(
/*============*/
/* out: DB_SUCCESS, DB_FAIL, DB_STRONG_FAIL */
ulint mode, /* in: BTR_MODIFY_PREV or BTR_MODIFY_TREE */
dtuple_t* entry, /* in: index entry to insert */
const dtuple_t* entry, /* in: index entry to insert */
dict_index_t* index, /* in: index where to insert; must not be
unique or clustered */
ulint space, /* in: space id where to insert */
......@@ -2819,7 +2819,7 @@ ibool
ibuf_insert(
/*========*/
/* out: TRUE if success */
dtuple_t* entry, /* in: index entry to insert */
const dtuple_t* entry, /* in: index entry to insert */
dict_index_t* index, /* in: index where to insert */
ulint space, /* in: space id where to insert */
ulint zip_size,/* in: compressed page size in bytes, or 0 */
......
......@@ -106,7 +106,7 @@ btr_cur_search_to_nth_level(
/*========================*/
dict_index_t* index, /* in: index */
ulint level, /* in: the tree level of search */
dtuple_t* tuple, /* in: data tuple; NOTE: n_fields_cmp in
const dtuple_t* tuple, /* in: data tuple; NOTE: n_fields_cmp in
tuple must be set so that it cannot get
compared to the node ptr page number field! */
ulint mode, /* in: PAGE_CUR_L, ...;
......@@ -171,7 +171,7 @@ btr_cur_optimistic_insert(
specified */
btr_cur_t* cursor, /* in: cursor on page after which to insert;
cursor stays valid */
dtuple_t* entry, /* in: entry to insert */
dtuple_t* entry, /* in/out: entry to insert */
rec_t** rec, /* out: pointer to inserted record if
succeed */
big_rec_t** big_rec,/* out: big rec vector whose fields have to
......@@ -199,7 +199,7 @@ btr_cur_pessimistic_insert(
insertion will certainly succeed */
btr_cur_t* cursor, /* in: cursor after which to insert;
cursor stays valid */
dtuple_t* entry, /* in: entry to insert */
dtuple_t* entry, /* in/out: entry to insert */
rec_t** rec, /* out: pointer to inserted record if
succeed */
big_rec_t** big_rec,/* out: big rec vector whose fields have to
......@@ -411,9 +411,9 @@ btr_estimate_n_rows_in_range(
/*=========================*/
/* out: estimated number of rows */
dict_index_t* index, /* in: index */
dtuple_t* tuple1, /* in: range start, may also be empty tuple */
const dtuple_t* tuple1, /* in: range start, may also be empty tuple */
ulint mode1, /* in: search mode for range start */
dtuple_t* tuple2, /* in: range end, may also be empty tuple */
const dtuple_t* tuple2, /* in: range end, may also be empty tuple */
ulint mode2); /* in: search mode for range end */
/***********************************************************************
Estimates the number of different key values in a given index, for
......@@ -448,9 +448,9 @@ in entry, so that they are not freed in a rollback. */
void
btr_cur_mark_dtuple_inherited_extern(
/*=================================*/
dtuple_t* entry, /* in: updated entry to be inserted to
clustered index */
ulint* ext_vec, /* in: array of extern fields in the
dtuple_t* entry, /* in/out: updated entry to be
inserted to clustered index */
const ulint* ext_vec, /* in: array of extern fields in the
original record */
ulint n_ext_vec, /* in: number of elements in ext_vec */
upd_t* update); /* in: update vector */
......@@ -460,8 +460,8 @@ Marks all extern fields in a dtuple as owned by the record. */
void
btr_cur_unmark_dtuple_extern_fields(
/*================================*/
dtuple_t* entry, /* in: clustered index entry */
ulint* ext_vec, /* in: array of numbers of fields
dtuple_t* entry, /* in/out: clustered index entry */
const ulint* ext_vec, /* in: array of numbers of fields
which have been stored externally */
ulint n_ext_vec); /* in: number of elements in ext_vec */
/***********************************************************************
......
......@@ -68,7 +68,7 @@ void
btr_pcur_open(
/*==========*/
dict_index_t* index, /* in: index */
dtuple_t* tuple, /* in: tuple on which search done */
const dtuple_t* tuple, /* in: tuple on which search done */
ulint mode, /* in: PAGE_CUR_L, ...;
NOTE that if the search is made using a unique
prefix of a record, mode should be
......@@ -86,7 +86,7 @@ void
btr_pcur_open_with_no_init(
/*=======================*/
dict_index_t* index, /* in: index */
dtuple_t* tuple, /* in: tuple on which search done */
const dtuple_t* tuple, /* in: tuple on which search done */
ulint mode, /* in: PAGE_CUR_L, ...;
NOTE that if the search is made using a unique
prefix of a record, mode should be
......@@ -148,7 +148,7 @@ void
btr_pcur_open_on_user_rec(
/*======================*/
dict_index_t* index, /* in: index */
dtuple_t* tuple, /* in: tuple on which search done */
const dtuple_t* tuple, /* in: tuple on which search done */
ulint mode, /* in: PAGE_CUR_L, ... */
ulint latch_mode, /* in: BTR_SEARCH_LEAF or
BTR_MODIFY_LEAF */
......
......@@ -480,7 +480,7 @@ void
btr_pcur_open(
/*==========*/
dict_index_t* index, /* in: index */
dtuple_t* tuple, /* in: tuple on which search done */
const dtuple_t* tuple, /* in: tuple on which search done */
ulint mode, /* in: PAGE_CUR_L, ...;
NOTE that if the search is made using a unique
prefix of a record, mode should be
......@@ -519,7 +519,7 @@ void
btr_pcur_open_with_no_init(
/*=======================*/
dict_index_t* index, /* in: index */
dtuple_t* tuple, /* in: tuple on which search done */
const dtuple_t* tuple, /* in: tuple on which search done */
ulint mode, /* in: PAGE_CUR_L, ...;
NOTE that if the search is made using a unique
prefix of a record, mode should be
......
......@@ -60,7 +60,7 @@ btr_search_guess_on_hash(
/* out: TRUE if succeeded */
dict_index_t* index, /* in: index */
btr_search_t* info, /* in: index search info */
dtuple_t* tuple, /* in: logical record */
const dtuple_t* tuple, /* in: logical record */
ulint mode, /* in: PAGE_CUR_L, ... */
ulint latch_mode, /* in: BTR_SEARCH_LEAF, ... */
btr_cur_t* cursor, /* out: tree cursor */
......
......@@ -352,7 +352,7 @@ dtuple_convert_big_rec(
too many fixed-length or short fields
in entry or the index is clustered */
dict_index_t* index, /* in: index */
dtuple_t* entry, /* in: index entry */
const dtuple_t* entry, /* in: index entry */
const ulint* ext_vec,/* in: array of externally stored fields,
or NULL: if a field already is externally
stored, then we cannot move it to the vector
......
......@@ -856,7 +856,7 @@ dict_index_check_search_tuple(
/*==========================*/
/* out: TRUE if ok */
dict_index_t* index, /* in: index */
dtuple_t* tuple); /* in: tuple used in a search */
const dtuple_t* tuple); /* in: tuple used in a search */
#endif /* UNIV_DEBUG */
/**************************************************************************
Builds a node pointer out of a physical record and a page number. */
......
......@@ -187,7 +187,7 @@ ibool
ibuf_insert(
/*========*/
/* out: TRUE if success */
dtuple_t* entry, /* in: index entry to insert */
const dtuple_t* entry, /* in: index entry to insert */
dict_index_t* index, /* in: index where to insert */
ulint space, /* in: space id where to insert */
ulint zip_size,/* in: compressed page size in bytes, or 0 */
......
......@@ -131,7 +131,7 @@ page_cur_tuple_insert(
otherwise */
page_cur_t* cursor, /* in: a page cursor */
page_zip_des_t* page_zip,/* in/out: compressed page, or NULL */
dtuple_t* tuple, /* in: pointer to a data tuple */
const dtuple_t* tuple, /* in: pointer to a data tuple */
dict_index_t* index, /* in: record descriptor */
const ulint* ext, /* in: array of extern field numbers */
ulint n_ext, /* in: number of elements in ext */
......@@ -201,7 +201,7 @@ page_cur_search(
/* out: number of matched fields on the left */
page_t* page, /* in: index page */
dict_index_t* index, /* in: record descriptor */
dtuple_t* tuple, /* in: data tuple */
const dtuple_t* tuple, /* in: data tuple */
ulint mode, /* in: PAGE_CUR_L, PAGE_CUR_LE, PAGE_CUR_G,
or PAGE_CUR_GE */
page_cur_t* cursor);/* out: page cursor */
......@@ -213,7 +213,7 @@ page_cur_search_with_match(
/*=======================*/
page_t* page, /* in: index page */
dict_index_t* index, /* in: record descriptor */
dtuple_t* tuple, /* in: data tuple */
const dtuple_t* tuple, /* in: data tuple */
ulint mode, /* in: PAGE_CUR_L, PAGE_CUR_LE, PAGE_CUR_G,
or PAGE_CUR_GE */
ulint* iup_matched_fields,
......
......@@ -149,7 +149,7 @@ page_cur_search(
/* out: number of matched fields on the left */
page_t* page, /* in: index page */
dict_index_t* index, /* in: record descriptor */
dtuple_t* tuple, /* in: data tuple */
const dtuple_t* tuple, /* in: data tuple */
ulint mode, /* in: PAGE_CUR_L, PAGE_CUR_LE, PAGE_CUR_G,
or PAGE_CUR_GE */
page_cur_t* cursor) /* out: page cursor */
......@@ -182,7 +182,7 @@ page_cur_tuple_insert(
otherwise */
page_cur_t* cursor, /* in: a page cursor */
page_zip_des_t* page_zip,/* in/out: compressed page, or NULL */
dtuple_t* tuple, /* in: pointer to a data tuple */
const dtuple_t* tuple, /* in: pointer to a data tuple */
dict_index_t* index, /* in: record descriptor */
const ulint* ext, /* in: array of extern field numbers */
ulint n_ext, /* in: number of elements in ext */
......
......@@ -266,8 +266,8 @@ page_cmp_dtuple_rec_with_match(
/* out: 1, 0, -1, if dtuple is greater, equal,
less than rec, respectively, when only the
common first fields are compared */
dtuple_t* dtuple, /* in: data tuple */
rec_t* rec, /* in: physical record on a page; may also
const dtuple_t* dtuple, /* in: data tuple */
const rec_t* rec, /* in: physical record on a page; may also
be page infimum or supremum, in which case
matched-parameter values below are not
affected */
......
......@@ -385,8 +385,8 @@ page_cmp_dtuple_rec_with_match(
/* out: 1, 0, -1, if dtuple is greater, equal,
less than rec, respectively, when only the
common first fields are compared */
dtuple_t* dtuple, /* in: data tuple */
rec_t* rec, /* in: physical record on a page; may also
const dtuple_t* dtuple, /* in: data tuple */
const rec_t* rec, /* in: physical record on a page; may also
be page infimum or supremum, in which case
matched-parameter values below are not
affected */
......
......@@ -622,7 +622,7 @@ rec_get_converted_size(
/*===================*/
/* out: size */
dict_index_t* index, /* in: record descriptor */
dtuple_t* dtuple, /* in: data tuple */
const dtuple_t* dtuple, /* in: data tuple */
const ulint* ext, /* in: array of extern field numbers */
ulint n_ext); /* in: number of elements in ext */
/******************************************************************
......@@ -632,7 +632,7 @@ The fields are copied to the memory heap. */
void
rec_copy_prefix_to_dtuple(
/*======================*/
dtuple_t* tuple, /* in: data tuple */
dtuple_t* tuple, /* out: data tuple */
const rec_t* rec, /* in: physical record */
dict_index_t* index, /* in: record descriptor */
ulint n_fields, /* in: number of fields to copy */
......
......@@ -1515,7 +1515,7 @@ rec_get_converted_size_new(
/*=======================*/
/* out: size */
dict_index_t* index, /* in: record descriptor */
dtuple_t* dtuple, /* in: data tuple */
const dtuple_t* dtuple, /* in: data tuple */
const ulint* ext, /* in: array of extern field numbers */
ulint n_ext); /* in: number of elements in ext */
/**************************************************************
......@@ -1527,7 +1527,7 @@ rec_get_converted_size(
/*===================*/
/* out: size */
dict_index_t* index, /* in: record descriptor */
dtuple_t* dtuple, /* in: data tuple */
const dtuple_t* dtuple, /* in: data tuple */
const ulint* ext, /* in: array of extern field numbers */
ulint n_ext) /* in: number of elements in ext */
{
......
......@@ -91,7 +91,7 @@ Sets the trx id or roll ptr field of a clustered index entry. */
void
row_upd_index_entry_sys_field(
/*==========================*/
dtuple_t* entry, /* in: index entry, where the memory buffers
const dtuple_t* entry, /* in: index entry, where the memory buffers
for sys fields are already allocated:
the function just copies the new values to
them */
......
......@@ -187,7 +187,7 @@ trx_undo_report_row_operation(
TRX_UNDO_MODIFY_OP */
que_thr_t* thr, /* in: query thread */
dict_index_t* index, /* in: clustered index */
dtuple_t* clust_entry, /* in: in the case of an insert,
const dtuple_t* clust_entry, /* in: in the case of an insert,
index entry to insert into the
clustered index, otherwise NULL */
upd_t* update, /* in: in the case of an update,
......
......@@ -33,7 +33,7 @@ page_cur_try_search_shortcut(
/* out: TRUE on success */
page_t* page, /* in: index page */
dict_index_t* index, /* in: record descriptor */
dtuple_t* tuple, /* in: data tuple */
const dtuple_t* tuple, /* in: data tuple */
ulint* iup_matched_fields,
/* in/out: already matched fields in upper
limit record */
......@@ -146,7 +146,7 @@ page_cur_rec_field_extends(
/*=======================*/
/* out: TRUE if rec field
extends tuple field */
dtuple_t* tuple, /* in: data tuple */
const dtuple_t* tuple, /* in: data tuple */
rec_t* rec, /* in: record */
const ulint* offsets,/* in: array returned by rec_get_offsets() */
ulint n) /* in: compare nth field */
......@@ -195,7 +195,7 @@ page_cur_search_with_match(
/*=======================*/
page_t* page, /* in: index page */
dict_index_t* index, /* in: record descriptor */
dtuple_t* tuple, /* in: data tuple */
const dtuple_t* tuple, /* in: data tuple */
ulint mode, /* in: PAGE_CUR_L, PAGE_CUR_LE, PAGE_CUR_G,
or PAGE_CUR_GE */
ulint* iup_matched_fields,
......
......@@ -624,7 +624,7 @@ rec_get_converted_size_new(
/*=======================*/
/* out: size */
dict_index_t* index, /* in: record descriptor */
dtuple_t* dtuple,
const dtuple_t* dtuple,
const ulint* ext, /* in: array of extern field numbers */
ulint n_ext) /* in: number of elements in ext */
{
......@@ -1111,7 +1111,7 @@ are copied to the memory heap. */
void
rec_copy_prefix_to_dtuple(
/*======================*/
dtuple_t* tuple, /* in: data tuple */
dtuple_t* tuple, /* out: data tuple */
const rec_t* rec, /* in: physical record */
dict_index_t* index, /* in: record descriptor */
ulint n_fields, /* in: number of fields to copy */
......
......@@ -336,7 +336,7 @@ Sets the trx id or roll ptr field of a clustered index entry. */
void
row_upd_index_entry_sys_field(
/*==========================*/
dtuple_t* entry, /* in: index entry, where the memory buffers
const dtuple_t* entry, /* in: index entry, where the memory buffers
for sys fields are already allocated:
the function just copies the new values to
them */
......
......@@ -1011,7 +1011,7 @@ trx_undo_report_row_operation(
TRX_UNDO_MODIFY_OP */
que_thr_t* thr, /* in: query thread */
dict_index_t* index, /* in: clustered index */
dtuple_t* clust_entry, /* in: in the case of an insert,
const dtuple_t* clust_entry, /* in: in the case of an insert,
index entry to insert into the
clustered index, otherwise NULL */
upd_t* update, /* in: in the case of an update,
......
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