Commit 3ad7bd73 authored by marko's avatar marko

branches/zip: Add some const qualifiers to input parameters.

rec_get_converted_size_comp(), rec_convert_dtuple_to_rec_comp(),
rec_convert_dtuple_to_rec_new(), rec_convert_dtuple_to_rec(): Add a
const qualifier to dict_index_t*.

row_search_on_row_ref(): Add const qualifiers to the dict_table_t*
and dtuple_t* parameters.  Note that pcur is an "out" parameter
and mtr is "in/out".
parent 36608705
...@@ -621,10 +621,11 @@ void ...@@ -621,10 +621,11 @@ void
rec_convert_dtuple_to_rec_comp( rec_convert_dtuple_to_rec_comp(
/*===========================*/ /*===========================*/
rec_t* rec, /* in: origin of record */ rec_t* rec, /* in: origin of record */
ulint extra, /* in: number of bytes to reserve between ulint extra, /* in: number of bytes to
the record header and the data payload reserve between the record
(usually REC_N_NEW_EXTRA_BYTES) */ header and the data payload
dict_index_t* index, /* in: record descriptor */ (normally REC_N_NEW_EXTRA_BYTES) */
const dict_index_t* index, /* in: record descriptor */
ulint status, /* in: status bits of the record */ ulint status, /* in: status bits of the record */
const dfield_t* fields, /* in: array of data fields */ const dfield_t* fields, /* in: array of data fields */
ulint n_fields);/* in: number of data fields */ ulint n_fields);/* in: number of data fields */
...@@ -639,9 +640,10 @@ rec_convert_dtuple_to_rec( ...@@ -639,9 +640,10 @@ rec_convert_dtuple_to_rec(
of physical record */ of physical record */
byte* buf, /* in: start address of the byte* buf, /* in: start address of the
physical record */ physical record */
dict_index_t* index, /* in: record descriptor */ const dict_index_t* index, /* in: record descriptor */
const dtuple_t* dtuple, /* in: data tuple */ const dtuple_t* dtuple, /* in: data tuple */
ulint n_ext); /* in: number of externally stored columns */ ulint n_ext); /* in: number of
externally stored columns */
/************************************************************** /**************************************************************
Returns the extra size of an old-style physical record if we know its Returns the extra size of an old-style physical record if we know its
data size and number of fields. */ data size and number of fields. */
...@@ -660,9 +662,11 @@ Determines the size of a data tuple in ROW_FORMAT=COMPACT. */ ...@@ -660,9 +662,11 @@ Determines the size of a data tuple in ROW_FORMAT=COMPACT. */
ulint ulint
rec_get_converted_size_comp( rec_get_converted_size_comp(
/*========================*/ /*========================*/
/* out: size */ /* out: total size */
dict_index_t* index, /* in: record descriptor; const dict_index_t* index, /* in: record descriptor;
dict_table_is_comp() is assumed to hold */ dict_table_is_comp() is
assumed to hold, even if
it does not */
ulint status, /* in: status bits of the record */ ulint status, /* in: status bits of the record */
const dfield_t* fields, /* in: array of data fields */ const dfield_t* fields, /* in: array of data fields */
ulint n_fields,/* in: number of data fields */ ulint n_fields,/* in: number of data fields */
......
...@@ -218,12 +218,12 @@ ibool ...@@ -218,12 +218,12 @@ ibool
row_search_on_row_ref( row_search_on_row_ref(
/*==================*/ /*==================*/
/* out: TRUE if found */ /* out: TRUE if found */
btr_pcur_t* pcur, /* in/out: persistent cursor, which must btr_pcur_t* pcur, /* out: persistent cursor, which must
be closed by the caller */ be closed by the caller */
ulint mode, /* in: BTR_MODIFY_LEAF, ... */ ulint mode, /* in: BTR_MODIFY_LEAF, ... */
dict_table_t* table, /* in: table */ const dict_table_t* table, /* in: table */
dtuple_t* ref, /* in: row reference */ const dtuple_t* ref, /* in: row reference */
mtr_t* mtr); /* in: mtr */ mtr_t* mtr); /* in/out: mtr */
/************************************************************************* /*************************************************************************
Fetches the clustered index record for a secondary index record. The latches Fetches the clustered index record for a secondary index record. The latches
on the secondary index record are preserved. */ on the secondary index record are preserved. */
......
...@@ -733,8 +733,10 @@ ulint ...@@ -733,8 +733,10 @@ ulint
rec_get_converted_size_comp( rec_get_converted_size_comp(
/*========================*/ /*========================*/
/* out: total size */ /* out: total size */
dict_index_t* index, /* in: record descriptor; const dict_index_t* index, /* in: record descriptor;
dict_table_is_comp() is assumed to hold */ dict_table_is_comp() is
assumed to hold, even if
it does not */
ulint status, /* in: status bits of the record */ ulint status, /* in: status bits of the record */
const dfield_t* fields, /* in: array of data fields */ const dfield_t* fields, /* in: array of data fields */
ulint n_fields,/* in: number of data fields */ ulint n_fields,/* in: number of data fields */
...@@ -1001,10 +1003,11 @@ void ...@@ -1001,10 +1003,11 @@ void
rec_convert_dtuple_to_rec_comp( rec_convert_dtuple_to_rec_comp(
/*===========================*/ /*===========================*/
rec_t* rec, /* in: origin of record */ rec_t* rec, /* in: origin of record */
ulint extra, /* in: number of bytes to reserve between ulint extra, /* in: number of bytes to
the record header and the data payload reserve between the record
header and the data payload
(normally REC_N_NEW_EXTRA_BYTES) */ (normally REC_N_NEW_EXTRA_BYTES) */
dict_index_t* index, /* in: record descriptor */ const dict_index_t* index, /* in: record descriptor */
ulint status, /* in: status bits of the record */ ulint status, /* in: status bits of the record */
const dfield_t* fields, /* in: array of data fields */ const dfield_t* fields, /* in: array of data fields */
ulint n_fields)/* in: number of data fields */ ulint n_fields)/* in: number of data fields */
...@@ -1122,8 +1125,9 @@ rec_convert_dtuple_to_rec_new( ...@@ -1122,8 +1125,9 @@ rec_convert_dtuple_to_rec_new(
/*==========================*/ /*==========================*/
/* out: pointer to the origin /* out: pointer to the origin
of physical record */ of physical record */
byte* buf, /* in: start address of the physical record */ byte* buf, /* in: start address of
dict_index_t* index, /* in: record descriptor */ the physical record */
const dict_index_t* index, /* in: record descriptor */
const dtuple_t* dtuple) /* in: data tuple */ const dtuple_t* dtuple) /* in: data tuple */
{ {
ulint extra_size; ulint extra_size;
...@@ -1157,9 +1161,10 @@ rec_convert_dtuple_to_rec( ...@@ -1157,9 +1161,10 @@ rec_convert_dtuple_to_rec(
of physical record */ of physical record */
byte* buf, /* in: start address of the byte* buf, /* in: start address of the
physical record */ physical record */
dict_index_t* index, /* in: record descriptor */ const dict_index_t* index, /* in: record descriptor */
const dtuple_t* dtuple, /* in: data tuple */ const dtuple_t* dtuple, /* in: data tuple */
ulint n_ext) /* in: number of externally stored columns */ ulint n_ext) /* in: number of
externally stored columns */
{ {
rec_t* rec; rec_t* rec;
......
...@@ -647,12 +647,12 @@ ibool ...@@ -647,12 +647,12 @@ ibool
row_search_on_row_ref( row_search_on_row_ref(
/*==================*/ /*==================*/
/* out: TRUE if found */ /* out: TRUE if found */
btr_pcur_t* pcur, /* in/out: persistent cursor, which must btr_pcur_t* pcur, /* out: persistent cursor, which must
be closed by the caller */ be closed by the caller */
ulint mode, /* in: BTR_MODIFY_LEAF, ... */ ulint mode, /* in: BTR_MODIFY_LEAF, ... */
dict_table_t* table, /* in: table */ const dict_table_t* table, /* in: table */
dtuple_t* ref, /* in: row reference */ const dtuple_t* ref, /* in: row reference */
mtr_t* mtr) /* in: mtr */ mtr_t* mtr) /* in/out: mtr */
{ {
ulint low_match; ulint low_match;
rec_t* rec; rec_t* rec;
......
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