Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
d71e0c2d
Commit
d71e0c2d
authored
Oct 16, 2006
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: Add const qualifiers to read-only rec_t* parameters
of rec accessor functions.
parent
26d81785
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
164 additions
and
163 deletions
+164
-163
include/rem0rec.h
include/rem0rec.h
+44
-44
include/rem0rec.ic
include/rem0rec.ic
+80
-79
page/page0zip.c
page/page0zip.c
+4
-4
rem/rem0rec.c
rem/rem0rec.c
+36
-36
No files found.
include/rem0rec.h
View file @
d71e0c2d
...
@@ -81,8 +81,8 @@ ulint
...
@@ -81,8 +81,8 @@ ulint
rec_get_next_offs
(
rec_get_next_offs
(
/*==============*/
/*==============*/
/* out: the page offset of the next
/* out: the page offset of the next
chained record
*/
chained record, or 0 if none
*/
rec_t
*
rec
,
/* in: physical record */
const
rec_t
*
rec
,
/* in: physical record */
ulint
comp
);
/* in: nonzero=compact page format */
ulint
comp
);
/* in: nonzero=compact page format */
/**********************************************************
/**********************************************************
The following function is used to set the next record offset field
The following function is used to set the next record offset field
...
@@ -110,7 +110,7 @@ ulint
...
@@ -110,7 +110,7 @@ ulint
rec_get_n_fields_old
(
rec_get_n_fields_old
(
/*=================*/
/*=================*/
/* out: number of data fields */
/* out: number of data fields */
rec_t
*
rec
);
/* in: physical record */
const
rec_t
*
rec
);
/* in: physical record */
/**********************************************************
/**********************************************************
The following function is used to get the number of fields
The following function is used to get the number of fields
in a record. */
in a record. */
...
@@ -119,7 +119,7 @@ ulint
...
@@ -119,7 +119,7 @@ ulint
rec_get_n_fields
(
rec_get_n_fields
(
/*=============*/
/*=============*/
/* out: number of data fields */
/* out: number of data fields */
rec_t
*
rec
,
/* in: physical record */
const
rec_t
*
rec
,
/* in: physical record */
dict_index_t
*
index
);
/* in: record descriptor */
dict_index_t
*
index
);
/* in: record descriptor */
/**********************************************************
/**********************************************************
The following function is used to get the number of records owned by the
The following function is used to get the number of records owned by the
...
@@ -129,7 +129,7 @@ ulint
...
@@ -129,7 +129,7 @@ ulint
rec_get_n_owned_old
(
rec_get_n_owned_old
(
/*================*/
/*================*/
/* out: number of owned records */
/* out: number of owned records */
rec_t
*
rec
);
/* in: old-style physical record */
const
rec_t
*
rec
);
/* in: old-style physical record */
/**********************************************************
/**********************************************************
The following function is used to set the number of owned records. */
The following function is used to set the number of owned records. */
UNIV_INLINE
UNIV_INLINE
...
@@ -147,7 +147,7 @@ ulint
...
@@ -147,7 +147,7 @@ ulint
rec_get_n_owned_new
(
rec_get_n_owned_new
(
/*================*/
/*================*/
/* out: number of owned records */
/* out: number of owned records */
rec_t
*
rec
);
/* in: new-style physical record */
const
rec_t
*
rec
);
/* in: new-style physical record */
/**********************************************************
/**********************************************************
The following function is used to set the number of owned records. */
The following function is used to set the number of owned records. */
UNIV_INLINE
UNIV_INLINE
...
@@ -165,7 +165,7 @@ ulint
...
@@ -165,7 +165,7 @@ ulint
rec_get_info_bits
(
rec_get_info_bits
(
/*==============*/
/*==============*/
/* out: info bits */
/* out: info bits */
rec_t
*
rec
,
/* in: physical record */
const
rec_t
*
rec
,
/* in: physical record */
ulint
comp
);
/* in: nonzero=compact page format */
ulint
comp
);
/* in: nonzero=compact page format */
/**********************************************************
/**********************************************************
The following function is used to set the info bits of a record. */
The following function is used to set the info bits of a record. */
...
@@ -190,7 +190,7 @@ ulint
...
@@ -190,7 +190,7 @@ ulint
rec_get_status
(
rec_get_status
(
/*===========*/
/*===========*/
/* out: status bits */
/* out: status bits */
rec_t
*
rec
);
/* in: physical record */
const
rec_t
*
rec
);
/* in: physical record */
/**********************************************************
/**********************************************************
The following function is used to set the status bits of a new-style record. */
The following function is used to set the status bits of a new-style record. */
...
@@ -209,7 +209,7 @@ ulint
...
@@ -209,7 +209,7 @@ ulint
rec_get_info_and_status_bits
(
rec_get_info_and_status_bits
(
/*=========================*/
/*=========================*/
/* out: info bits */
/* out: info bits */
rec_t
*
rec
,
/* in: physical record */
const
rec_t
*
rec
,
/* in: physical record */
ulint
comp
);
/* in: nonzero=compact page format */
ulint
comp
);
/* in: nonzero=compact page format */
/**********************************************************
/**********************************************************
The following function is used to set the info and status
The following function is used to set the info and status
...
@@ -228,7 +228,7 @@ ulint
...
@@ -228,7 +228,7 @@ ulint
rec_get_deleted_flag
(
rec_get_deleted_flag
(
/*=================*/
/*=================*/
/* out: nonzero if delete marked */
/* out: nonzero if delete marked */
rec_t
*
rec
,
/* in: physical record */
const
rec_t
*
rec
,
/* in: physical record */
ulint
comp
);
/* in: nonzero=compact page format */
ulint
comp
);
/* in: nonzero=compact page format */
/**********************************************************
/**********************************************************
The following function is used to set the deleted bit. */
The following function is used to set the deleted bit. */
...
@@ -254,7 +254,7 @@ ibool
...
@@ -254,7 +254,7 @@ ibool
rec_get_node_ptr_flag
(
rec_get_node_ptr_flag
(
/*==================*/
/*==================*/
/* out: TRUE if node pointer */
/* out: TRUE if node pointer */
rec_t
*
rec
);
/* in: physical record */
const
rec_t
*
rec
);
/* in: physical record */
/**********************************************************
/**********************************************************
The following function is used to get the order number
The following function is used to get the order number
of an old-style record in the heap of the index page. */
of an old-style record in the heap of the index page. */
...
@@ -263,7 +263,7 @@ ulint
...
@@ -263,7 +263,7 @@ ulint
rec_get_heap_no_old
(
rec_get_heap_no_old
(
/*================*/
/*================*/
/* out: heap order number */
/* out: heap order number */
rec_t
*
rec
);
/* in: physical record */
const
rec_t
*
rec
);
/* in: physical record */
/**********************************************************
/**********************************************************
The following function is used to set the heap number
The following function is used to set the heap number
field in an old-style record. */
field in an old-style record. */
...
@@ -281,7 +281,7 @@ ulint
...
@@ -281,7 +281,7 @@ ulint
rec_get_heap_no_new
(
rec_get_heap_no_new
(
/*================*/
/*================*/
/* out: heap order number */
/* out: heap order number */
rec_t
*
rec
);
/* in: physical record */
const
rec_t
*
rec
);
/* in: physical record */
/**********************************************************
/**********************************************************
The following function is used to set the heap number
The following function is used to set the heap number
field in a new-style record. */
field in a new-style record. */
...
@@ -299,7 +299,7 @@ ibool
...
@@ -299,7 +299,7 @@ ibool
rec_get_1byte_offs_flag
(
rec_get_1byte_offs_flag
(
/*====================*/
/*====================*/
/* out: TRUE if 1-byte form */
/* out: TRUE if 1-byte form */
rec_t
*
rec
);
/* in: physical record */
const
rec_t
*
rec
);
/* in: physical record */
/**********************************************************
/**********************************************************
Determine how many of the first n columns in a compact
Determine how many of the first n columns in a compact
...
@@ -321,7 +321,7 @@ ulint*
...
@@ -321,7 +321,7 @@ ulint*
rec_get_offsets_func
(
rec_get_offsets_func
(
/*=================*/
/*=================*/
/* out: the new offsets */
/* out: the new offsets */
rec_t
*
rec
,
/* in: physical record */
const
rec_t
*
rec
,
/* in: physical record */
dict_index_t
*
index
,
/* in: record descriptor */
dict_index_t
*
index
,
/* in: record descriptor */
ulint
*
offsets
,
/* in: array consisting of offsets[0]
ulint
*
offsets
,
/* in: array consisting of offsets[0]
allocated elements, or an array from
allocated elements, or an array from
...
@@ -357,7 +357,7 @@ ibool
...
@@ -357,7 +357,7 @@ ibool
rec_offs_validate
(
rec_offs_validate
(
/*==============*/
/*==============*/
/* out: TRUE if valid */
/* out: TRUE if valid */
rec_t
*
rec
,
/* in: record or NULL */
const
rec_t
*
rec
,
/* in: record or NULL */
dict_index_t
*
index
,
/* in: record descriptor or NULL */
dict_index_t
*
index
,
/* in: record descriptor or NULL */
const
ulint
*
offsets
);
/* in: array returned by rec_get_offsets() */
const
ulint
*
offsets
);
/* in: array returned by rec_get_offsets() */
/****************************************************************
/****************************************************************
...
@@ -367,7 +367,7 @@ UNIV_INLINE
...
@@ -367,7 +367,7 @@ UNIV_INLINE
void
void
rec_offs_make_valid
(
rec_offs_make_valid
(
/*================*/
/*================*/
rec_t
*
rec
,
/* in: record */
const
rec_t
*
rec
,
/* in: record */
dict_index_t
*
index
,
/* in: record descriptor */
dict_index_t
*
index
,
/* in: record descriptor */
ulint
*
offsets
);
/* in: array returned by rec_get_offsets() */
ulint
*
offsets
);
/* in: array returned by rec_get_offsets() */
...
@@ -392,7 +392,7 @@ ulint
...
@@ -392,7 +392,7 @@ ulint
rec_get_nth_field_size
(
rec_get_nth_field_size
(
/*===================*/
/*===================*/
/* out: field size in bytes */
/* out: field size in bytes */
rec_t
*
rec
,
/* in: record */
const
rec_t
*
rec
,
/* in: record */
ulint
n
);
/* in: index of the field */
ulint
n
);
/* in: index of the field */
/****************************************************************
/****************************************************************
The following function is used to get a pointer to the nth
The following function is used to get a pointer to the nth
...
@@ -489,7 +489,7 @@ ulint
...
@@ -489,7 +489,7 @@ ulint
rec_get_data_size_old
(
rec_get_data_size_old
(
/*==================*/
/*==================*/
/* out: size */
/* out: size */
rec_t
*
rec
);
/* in: physical record */
const
rec_t
*
rec
);
/* in: physical record */
/**************************************************************
/**************************************************************
The following function returns the number of fields in a record. */
The following function returns the number of fields in a record. */
UNIV_INLINE
UNIV_INLINE
...
@@ -563,7 +563,7 @@ rec_t*
...
@@ -563,7 +563,7 @@ rec_t*
rec_copy_prefix_to_buf
(
rec_copy_prefix_to_buf
(
/*===================*/
/*===================*/
/* out, own: copied record */
/* out, own: copied record */
rec_t
*
rec
,
/* in: physical record */
const
rec_t
*
rec
,
/* in: physical record */
dict_index_t
*
index
,
/* in: record descriptor */
dict_index_t
*
index
,
/* in: record descriptor */
ulint
n_fields
,
/* in: number of fields to copy */
ulint
n_fields
,
/* in: number of fields to copy */
byte
**
buf
,
/* in/out: memory buffer
byte
**
buf
,
/* in/out: memory buffer
...
@@ -576,7 +576,7 @@ ulint
...
@@ -576,7 +576,7 @@ ulint
rec_fold
(
rec_fold
(
/*=====*/
/*=====*/
/* out: the folded value */
/* out: the folded value */
rec_t
*
rec
,
/* in: the physical record */
const
rec_t
*
rec
,
/* in: the physical record */
const
ulint
*
offsets
,
/* in: array returned by
const
ulint
*
offsets
,
/* in: array returned by
rec_get_offsets() */
rec_get_offsets() */
ulint
n_fields
,
/* in: number of complete
ulint
n_fields
,
/* in: number of complete
...
@@ -632,7 +632,7 @@ void
...
@@ -632,7 +632,7 @@ void
rec_copy_prefix_to_dtuple
(
rec_copy_prefix_to_dtuple
(
/*======================*/
/*======================*/
dtuple_t
*
tuple
,
/* in: data tuple */
dtuple_t
*
tuple
,
/* in: data tuple */
rec_t
*
rec
,
/* in: physical record */
const
rec_t
*
rec
,
/* in: physical record */
dict_index_t
*
index
,
/* in: record descriptor */
dict_index_t
*
index
,
/* in: record descriptor */
ulint
n_fields
,
/* in: number of fields to copy */
ulint
n_fields
,
/* in: number of fields to copy */
mem_heap_t
*
heap
);
/* in: memory heap */
mem_heap_t
*
heap
);
/* in: memory heap */
...
@@ -643,7 +643,7 @@ ibool
...
@@ -643,7 +643,7 @@ ibool
rec_validate
(
rec_validate
(
/*=========*/
/*=========*/
/* out: TRUE if ok */
/* out: TRUE if ok */
rec_t
*
rec
,
/* in: physical record */
const
rec_t
*
rec
,
/* in: physical record */
const
ulint
*
offsets
);
/* in: array returned by rec_get_offsets() */
const
ulint
*
offsets
);
/* in: array returned by rec_get_offsets() */
/*******************************************************************
/*******************************************************************
Prints an old-style physical record. */
Prints an old-style physical record. */
...
@@ -652,7 +652,7 @@ void
...
@@ -652,7 +652,7 @@ void
rec_print_old
(
rec_print_old
(
/*==========*/
/*==========*/
FILE
*
file
,
/* in: file where to print */
FILE
*
file
,
/* in: file where to print */
rec_t
*
rec
);
/* in: physical record */
const
rec_t
*
rec
);
/* in: physical record */
/*******************************************************************
/*******************************************************************
Prints a physical record. */
Prints a physical record. */
...
@@ -660,7 +660,7 @@ void
...
@@ -660,7 +660,7 @@ void
rec_print_new
(
rec_print_new
(
/*==========*/
/*==========*/
FILE
*
file
,
/* in: file where to print */
FILE
*
file
,
/* in: file where to print */
rec_t
*
rec
,
/* in: physical record */
const
rec_t
*
rec
,
/* in: physical record */
const
ulint
*
offsets
);
/* in: array returned by rec_get_offsets() */
const
ulint
*
offsets
);
/* in: array returned by rec_get_offsets() */
/*******************************************************************
/*******************************************************************
Prints a physical record. */
Prints a physical record. */
...
@@ -669,7 +669,7 @@ void
...
@@ -669,7 +669,7 @@ void
rec_print
(
rec_print
(
/*======*/
/*======*/
FILE
*
file
,
/* in: file where to print */
FILE
*
file
,
/* in: file where to print */
rec_t
*
rec
,
/* in: physical record */
const
rec_t
*
rec
,
/* in: physical record */
dict_index_t
*
index
);
/* in: record descriptor */
dict_index_t
*
index
);
/* in: record descriptor */
#define REC_INFO_BITS 6
/* This is single byte bit-field */
#define REC_INFO_BITS 6
/* This is single byte bit-field */
...
...
include/rem0rec.ic
View file @
d71e0c2d
...
@@ -152,7 +152,7 @@ UNIV_INLINE
...
@@ -152,7 +152,7 @@ UNIV_INLINE
ulint
ulint
rec_get_bit_field_1(
rec_get_bit_field_1(
/*================*/
/*================*/
rec_t* rec, /* in: pointer to record origin */
const
rec_t* rec, /* in: pointer to record origin */
ulint offs, /* in: offset from the origin down */
ulint offs, /* in: offset from the origin down */
ulint mask, /* in: mask used to filter bits */
ulint mask, /* in: mask used to filter bits */
ulint shift) /* in: shift right applied after masking */
ulint shift) /* in: shift right applied after masking */
...
@@ -192,7 +192,7 @@ UNIV_INLINE
...
@@ -192,7 +192,7 @@ UNIV_INLINE
ulint
ulint
rec_get_bit_field_2(
rec_get_bit_field_2(
/*================*/
/*================*/
rec_t* rec, /* in: pointer to record origin */
const
rec_t* rec, /* in: pointer to record origin */
ulint offs, /* in: offset from the origin down */
ulint offs, /* in: offset from the origin down */
ulint mask, /* in: mask used to filter bits */
ulint mask, /* in: mask used to filter bits */
ulint shift) /* in: shift right applied after masking */
ulint shift) /* in: shift right applied after masking */
...
@@ -291,9 +291,9 @@ UNIV_INLINE
...
@@ -291,9 +291,9 @@ UNIV_INLINE
ulint
ulint
rec_get_next_offs(
rec_get_next_offs(
/*==============*/
/*==============*/
/* out: the page offset of the next chained record, or
/* out: the page offset of the next
0 if none */
chained record, or
0 if none */
rec_t* rec, /* in: physical record */
const
rec_t* rec, /* in: physical record */
ulint comp) /* in: nonzero=compact page format */
ulint comp) /* in: nonzero=compact page format */
{
{
ulint field_value;
ulint field_value;
...
@@ -403,7 +403,7 @@ ulint
...
@@ -403,7 +403,7 @@ ulint
rec_get_n_fields_old(
rec_get_n_fields_old(
/*=================*/
/*=================*/
/* out: number of data fields */
/* out: number of data fields */
rec_t* rec) /* in: physical record */
const
rec_t* rec) /* in: physical record */
{
{
ulint ret;
ulint ret;
...
@@ -443,7 +443,7 @@ ulint
...
@@ -443,7 +443,7 @@ ulint
rec_get_status(
rec_get_status(
/*===========*/
/*===========*/
/* out: status bits */
/* out: status bits */
rec_t* rec) /* in: physical record */
const
rec_t* rec) /* in: physical record */
{
{
ulint ret;
ulint ret;
...
@@ -464,7 +464,7 @@ ulint
...
@@ -464,7 +464,7 @@ ulint
rec_get_n_fields(
rec_get_n_fields(
/*=============*/
/*=============*/
/* out: number of data fields */
/* out: number of data fields */
rec_t*
rec, /* in: physical record */
const rec_t*
rec, /* in: physical record */
dict_index_t* index) /* in: record descriptor */
dict_index_t* index) /* in: record descriptor */
{
{
ut_ad(rec);
ut_ad(rec);
...
@@ -496,7 +496,7 @@ ulint
...
@@ -496,7 +496,7 @@ ulint
rec_get_n_owned_old(
rec_get_n_owned_old(
/*================*/
/*================*/
/* out: number of owned records */
/* out: number of owned records */
rec_t* rec) /* in: old-style physical record */
const
rec_t* rec) /* in: old-style physical record */
{
{
return(rec_get_bit_field_1(rec, REC_OLD_N_OWNED,
return(rec_get_bit_field_1(rec, REC_OLD_N_OWNED,
REC_N_OWNED_MASK, REC_N_OWNED_SHIFT));
REC_N_OWNED_MASK, REC_N_OWNED_SHIFT));
...
@@ -524,7 +524,7 @@ ulint
...
@@ -524,7 +524,7 @@ ulint
rec_get_n_owned_new(
rec_get_n_owned_new(
/*================*/
/*================*/
/* out: number of owned records */
/* out: number of owned records */
rec_t* rec) /* in: new-style physical record */
const
rec_t* rec) /* in: new-style physical record */
{
{
return(rec_get_bit_field_1(rec, REC_NEW_N_OWNED,
return(rec_get_bit_field_1(rec, REC_NEW_N_OWNED,
REC_N_OWNED_MASK, REC_N_OWNED_SHIFT));
REC_N_OWNED_MASK, REC_N_OWNED_SHIFT));
...
@@ -556,7 +556,7 @@ ulint
...
@@ -556,7 +556,7 @@ ulint
rec_get_info_bits(
rec_get_info_bits(
/*==============*/
/*==============*/
/* out: info bits */
/* out: info bits */
rec_t* rec, /* in: physical record */
const
rec_t* rec, /* in: physical record */
ulint comp) /* in: nonzero=compact page format */
ulint comp) /* in: nonzero=compact page format */
{
{
return(rec_get_bit_field_1(
return(rec_get_bit_field_1(
...
@@ -610,7 +610,7 @@ ulint
...
@@ -610,7 +610,7 @@ ulint
rec_get_info_and_status_bits(
rec_get_info_and_status_bits(
/*=========================*/
/*=========================*/
/* out: info bits */
/* out: info bits */
rec_t* rec, /* in: physical record */
const
rec_t* rec, /* in: physical record */
ulint comp) /* in: nonzero=compact page format */
ulint comp) /* in: nonzero=compact page format */
{
{
ulint bits;
ulint bits;
...
@@ -651,7 +651,7 @@ ulint
...
@@ -651,7 +651,7 @@ ulint
rec_get_deleted_flag(
rec_get_deleted_flag(
/*=================*/
/*=================*/
/* out: nonzero if delete marked */
/* out: nonzero if delete marked */
rec_t* rec, /* in: physical record */
const
rec_t* rec, /* in: physical record */
ulint comp) /* in: nonzero=compact page format */
ulint comp) /* in: nonzero=compact page format */
{
{
if (UNIV_EXPECT(comp, REC_OFFS_COMPACT)) {
if (UNIV_EXPECT(comp, REC_OFFS_COMPACT)) {
...
@@ -723,7 +723,7 @@ ibool
...
@@ -723,7 +723,7 @@ ibool
rec_get_node_ptr_flag(
rec_get_node_ptr_flag(
/*==================*/
/*==================*/
/* out: TRUE if node pointer */
/* out: TRUE if node pointer */
rec_t* rec) /* in: physical record */
const
rec_t* rec) /* in: physical record */
{
{
return(REC_STATUS_NODE_PTR == rec_get_status(rec));
return(REC_STATUS_NODE_PTR == rec_get_status(rec));
}
}
...
@@ -736,7 +736,7 @@ ulint
...
@@ -736,7 +736,7 @@ ulint
rec_get_heap_no_old(
rec_get_heap_no_old(
/*================*/
/*================*/
/* out: heap order number */
/* out: heap order number */
rec_t* rec) /* in: physical record */
const
rec_t* rec) /* in: physical record */
{
{
return(rec_get_bit_field_2(rec, REC_OLD_HEAP_NO,
return(rec_get_bit_field_2(rec, REC_OLD_HEAP_NO,
REC_HEAP_NO_MASK, REC_HEAP_NO_SHIFT));
REC_HEAP_NO_MASK, REC_HEAP_NO_SHIFT));
...
@@ -764,7 +764,7 @@ ulint
...
@@ -764,7 +764,7 @@ ulint
rec_get_heap_no_new(
rec_get_heap_no_new(
/*================*/
/*================*/
/* out: heap order number */
/* out: heap order number */
rec_t* rec) /* in: physical record */
const
rec_t* rec) /* in: physical record */
{
{
return(rec_get_bit_field_2(rec, REC_NEW_HEAP_NO,
return(rec_get_bit_field_2(rec, REC_NEW_HEAP_NO,
REC_HEAP_NO_MASK, REC_HEAP_NO_SHIFT));
REC_HEAP_NO_MASK, REC_HEAP_NO_SHIFT));
...
@@ -792,7 +792,7 @@ ibool
...
@@ -792,7 +792,7 @@ ibool
rec_get_1byte_offs_flag(
rec_get_1byte_offs_flag(
/*====================*/
/*====================*/
/* out: TRUE if 1-byte form */
/* out: TRUE if 1-byte form */
rec_t* rec) /* in: physical record */
const
rec_t* rec) /* in: physical record */
{
{
#if TRUE != 1
#if TRUE != 1
#error "TRUE != 1"
#error "TRUE != 1"
...
@@ -828,9 +828,9 @@ UNIV_INLINE
...
@@ -828,9 +828,9 @@ UNIV_INLINE
ulint
ulint
rec_1_get_field_end_info(
rec_1_get_field_end_info(
/*=====================*/
/*=====================*/
/* out: offset of the start of the field, SQL null
/* out: offset of the start of the
flag ORed */
field, SQL null
flag ORed */
rec_t* rec, /* in: record */
const
rec_t* rec, /* in: record */
ulint n) /* in: field index */
ulint n) /* in: field index */
{
{
ut_ad(rec_get_1byte_offs_flag(rec));
ut_ad(rec_get_1byte_offs_flag(rec));
...
@@ -847,9 +847,10 @@ UNIV_INLINE
...
@@ -847,9 +847,10 @@ UNIV_INLINE
ulint
ulint
rec_2_get_field_end_info(
rec_2_get_field_end_info(
/*=====================*/
/*=====================*/
/* out: offset of the start of the field, SQL null
/* out: offset of the start of the
flag and extern storage flag ORed */
field, SQL null flag and extern
rec_t* rec, /* in: record */
storage flag ORed */
const rec_t* rec, /* in: record */
ulint n) /* in: field index */
ulint n) /* in: field index */
{
{
ut_ad(!rec_get_1byte_offs_flag(rec));
ut_ad(!rec_get_1byte_offs_flag(rec));
...
@@ -921,7 +922,7 @@ ibool
...
@@ -921,7 +922,7 @@ ibool
rec_offs_validate(
rec_offs_validate(
/*==============*/
/*==============*/
/* out: TRUE if valid */
/* out: TRUE if valid */
rec_t*
rec, /* in: record or NULL */
const rec_t*
rec, /* in: record or NULL */
dict_index_t* index, /* in: record descriptor or NULL */
dict_index_t* index, /* in: record descriptor or NULL */
const ulint* offsets)/* in: array returned by rec_get_offsets() */
const ulint* offsets)/* in: array returned by rec_get_offsets() */
{
{
...
@@ -975,7 +976,7 @@ UNIV_INLINE
...
@@ -975,7 +976,7 @@ UNIV_INLINE
void
void
rec_offs_make_valid(
rec_offs_make_valid(
/*================*/
/*================*/
rec_t*
rec __attribute__((unused)),
const rec_t*
rec __attribute__((unused)),
/* in: record */
/* in: record */
dict_index_t* index __attribute__((unused)),
dict_index_t* index __attribute__((unused)),
/* in: record descriptor */
/* in: record descriptor */
...
@@ -1142,9 +1143,9 @@ UNIV_INLINE
...
@@ -1142,9 +1143,9 @@ UNIV_INLINE
ulint
ulint
rec_1_get_prev_field_end_info(
rec_1_get_prev_field_end_info(
/*==========================*/
/*==========================*/
/* out: offset of the start of the PREVIOUS field, SQL
/* out: offset of the start of the
null flag ORed */
PREVIOUS field, SQL
null flag ORed */
rec_t* rec, /* in: record */
const
rec_t* rec, /* in: record */
ulint n) /* in: field index */
ulint n) /* in: field index */
{
{
ut_ad(rec_get_1byte_offs_flag(rec));
ut_ad(rec_get_1byte_offs_flag(rec));
...
@@ -1161,9 +1162,9 @@ UNIV_INLINE
...
@@ -1161,9 +1162,9 @@ UNIV_INLINE
ulint
ulint
rec_2_get_prev_field_end_info(
rec_2_get_prev_field_end_info(
/*==========================*/
/*==========================*/
/* out: offset of the start of the PREVIOUS field, SQL
/* out: offset of the start of the
null flag ORed */
PREVIOUS field, SQL
null flag ORed */
rec_t* rec, /* in: record */
const
rec_t* rec, /* in: record */
ulint n) /* in: field index */
ulint n) /* in: field index */
{
{
ut_ad(!rec_get_1byte_offs_flag(rec));
ut_ad(!rec_get_1byte_offs_flag(rec));
...
@@ -1214,7 +1215,7 @@ ulint
...
@@ -1214,7 +1215,7 @@ ulint
rec_1_get_field_start_offs(
rec_1_get_field_start_offs(
/*=======================*/
/*=======================*/
/* out: offset of the start of the field */
/* out: offset of the start of the field */
rec_t* rec, /* in: record */
const
rec_t* rec, /* in: record */
ulint n) /* in: field index */
ulint n) /* in: field index */
{
{
ut_ad(rec_get_1byte_offs_flag(rec));
ut_ad(rec_get_1byte_offs_flag(rec));
...
@@ -1237,7 +1238,7 @@ ulint
...
@@ -1237,7 +1238,7 @@ ulint
rec_2_get_field_start_offs(
rec_2_get_field_start_offs(
/*=======================*/
/*=======================*/
/* out: offset of the start of the field */
/* out: offset of the start of the field */
rec_t* rec, /* in: record */
const
rec_t* rec, /* in: record */
ulint n) /* in: field index */
ulint n) /* in: field index */
{
{
ut_ad(!rec_get_1byte_offs_flag(rec));
ut_ad(!rec_get_1byte_offs_flag(rec));
...
@@ -1262,7 +1263,7 @@ ulint
...
@@ -1262,7 +1263,7 @@ ulint
rec_get_field_start_offs(
rec_get_field_start_offs(
/*=====================*/
/*=====================*/
/* out: offset of the start of the field */
/* out: offset of the start of the field */
rec_t* rec, /* in: record */
const
rec_t* rec, /* in: record */
ulint n) /* in: field index */
ulint n) /* in: field index */
{
{
ut_ad(rec);
ut_ad(rec);
...
@@ -1290,7 +1291,7 @@ ulint
...
@@ -1290,7 +1291,7 @@ ulint
rec_get_nth_field_size(
rec_get_nth_field_size(
/*===================*/
/*===================*/
/* out: field size in bytes */
/* out: field size in bytes */
rec_t* rec, /* in: record */
const
rec_t* rec, /* in: record */
ulint n) /* in: index of the field */
ulint n) /* in: index of the field */
{
{
ulint os;
ulint os;
...
@@ -1359,7 +1360,7 @@ ulint
...
@@ -1359,7 +1360,7 @@ ulint
rec_get_data_size_old(
rec_get_data_size_old(
/*==================*/
/*==================*/
/* out: size */
/* out: size */
rec_t* rec) /* in: physical record */
const
rec_t* rec) /* in: physical record */
{
{
ut_ad(rec);
ut_ad(rec);
...
@@ -1478,7 +1479,7 @@ rec_copy(
...
@@ -1478,7 +1479,7 @@ rec_copy(
ut_ad(rec && buf);
ut_ad(rec && buf);
ut_ad(rec_offs_validate((rec_t*) rec, NULL, offsets));
ut_ad(rec_offs_validate((rec_t*) rec, NULL, offsets));
ut_ad(rec_validate(
(rec_t*)
rec, offsets));
ut_ad(rec_validate(rec, offsets));
extra_len = rec_offs_extra_size(offsets);
extra_len = rec_offs_extra_size(offsets);
data_len = rec_offs_data_size(offsets);
data_len = rec_offs_data_size(offsets);
...
@@ -1567,7 +1568,7 @@ ulint
...
@@ -1567,7 +1568,7 @@ ulint
rec_fold(
rec_fold(
/*=====*/
/*=====*/
/* out: the folded value */
/* out: the folded value */
rec_t*
rec, /* in: the physical record */
const rec_t*
rec, /* in: the physical record */
const ulint* offsets, /* in: array returned by
const ulint* offsets, /* in: array returned by
rec_get_offsets() */
rec_get_offsets() */
ulint n_fields, /* in: number of complete
ulint n_fields, /* in: number of complete
...
@@ -1577,13 +1578,13 @@ rec_fold(
...
@@ -1577,13 +1578,13 @@ rec_fold(
dulint tree_id) /* in: index tree id */
dulint tree_id) /* in: index tree id */
{
{
ulint i;
ulint i;
byte* data;
const
byte* data;
ulint len;
ulint len;
ulint fold;
ulint fold;
ulint n_fields_rec;
ulint n_fields_rec;
ut_ad(rec_offs_validate(rec, NULL, offsets));
ut_ad(rec_offs_validate(rec, NULL, offsets));
ut_ad(rec_validate(
(rec_t*)
rec, offsets));
ut_ad(rec_validate(rec, offsets));
ut_ad(n_fields + n_bytes > 0);
ut_ad(n_fields + n_bytes > 0);
n_fields_rec = rec_offs_n_fields(offsets);
n_fields_rec = rec_offs_n_fields(offsets);
...
@@ -1601,7 +1602,7 @@ rec_fold(
...
@@ -1601,7 +1602,7 @@ rec_fold(
fold = ut_fold_dulint(tree_id);
fold = ut_fold_dulint(tree_id);
for (i = 0; i < n_fields; i++) {
for (i = 0; i < n_fields; i++) {
data = rec_get_nth_field(rec, offsets, i, &len);
data = rec_get_nth_field(
(rec_t*)
rec, offsets, i, &len);
if (len != UNIV_SQL_NULL) {
if (len != UNIV_SQL_NULL) {
fold = ut_fold_ulint_pair(fold,
fold = ut_fold_ulint_pair(fold,
...
@@ -1610,7 +1611,7 @@ rec_fold(
...
@@ -1610,7 +1611,7 @@ rec_fold(
}
}
if (n_bytes > 0) {
if (n_bytes > 0) {
data = rec_get_nth_field(rec, offsets, i, &len);
data = rec_get_nth_field(
(rec_t*)
rec, offsets, i, &len);
if (len != UNIV_SQL_NULL) {
if (len != UNIV_SQL_NULL) {
if (len > n_bytes) {
if (len > n_bytes) {
...
...
page/page0zip.c
View file @
d71e0c2d
...
@@ -283,7 +283,7 @@ page_zip_get_n_prev_extern(
...
@@ -283,7 +283,7 @@ page_zip_get_n_prev_extern(
ut_ad
(
dict_table_is_comp
(
index
->
table
));
ut_ad
(
dict_table_is_comp
(
index
->
table
));
ut_ad
(
dict_index_is_clust
(
index
));
ut_ad
(
dict_index_is_clust
(
index
));
heap_no
=
rec_get_heap_no_new
(
(
rec_t
*
)
rec
);
heap_no
=
rec_get_heap_no_new
(
rec
);
ut_ad
(
heap_no
>=
2
);
/* exclude infimum and supremum */
ut_ad
(
heap_no
>=
2
);
/* exclude infimum and supremum */
left
=
heap_no
-
2
;
left
=
heap_no
-
2
;
if
(
UNIV_UNLIKELY
(
!
left
))
{
if
(
UNIV_UNLIKELY
(
!
left
))
{
...
@@ -2496,7 +2496,7 @@ page_zip_write_rec(
...
@@ -2496,7 +2496,7 @@ page_zip_write_rec(
slot
=
page_zip_dir_find
(
page_zip
,
page_offset
(
rec
));
slot
=
page_zip_dir_find
(
page_zip
,
page_offset
(
rec
));
ut_a
(
slot
);
ut_a
(
slot
);
/* Copy the delete mark. */
/* Copy the delete mark. */
if
(
rec_get_deleted_flag
(
(
rec_t
*
)
rec
,
TRUE
))
{
if
(
rec_get_deleted_flag
(
rec
,
TRUE
))
{
*
slot
|=
PAGE_ZIP_DIR_SLOT_DEL
>>
8
;
*
slot
|=
PAGE_ZIP_DIR_SLOT_DEL
>>
8
;
}
else
{
}
else
{
*
slot
&=
~
(
PAGE_ZIP_DIR_SLOT_DEL
>>
8
);
*
slot
&=
~
(
PAGE_ZIP_DIR_SLOT_DEL
>>
8
);
...
@@ -2507,7 +2507,7 @@ page_zip_write_rec(
...
@@ -2507,7 +2507,7 @@ page_zip_write_rec(
-
PAGE_DIR
-
PAGE_DIR_SLOT_SIZE
-
PAGE_DIR
-
PAGE_DIR_SLOT_SIZE
*
page_dir_get_n_slots
(
page
));
*
page_dir_get_n_slots
(
page
));
heap_no
=
rec_get_heap_no_new
(
(
rec_t
*
)
rec
);
heap_no
=
rec_get_heap_no_new
(
rec
);
ut_ad
(
heap_no
>=
2
);
/* not infimum or supremum */
ut_ad
(
heap_no
>=
2
);
/* not infimum or supremum */
ut_ad
(
heap_no
<
page_dir_get_n_heap
(
page
));
ut_ad
(
heap_no
<
page_dir_get_n_heap
(
page
));
...
@@ -2790,7 +2790,7 @@ page_zip_write_blob_ptr(
...
@@ -2790,7 +2790,7 @@ page_zip_write_blob_ptr(
ut_ad
(
page_zip_simple_validate
(
page_zip
));
ut_ad
(
page_zip_simple_validate
(
page_zip
));
ut_ad
(
page_zip
->
size
>
PAGE_DATA
+
page_zip_dir_size
(
page_zip
));
ut_ad
(
page_zip
->
size
>
PAGE_DATA
+
page_zip_dir_size
(
page_zip
));
ut_ad
(
rec_offs_comp
(
offsets
));
ut_ad
(
rec_offs_comp
(
offsets
));
ut_ad
(
rec_offs_validate
(
(
rec_t
*
)
rec
,
NULL
,
offsets
));
ut_ad
(
rec_offs_validate
(
rec
,
NULL
,
offsets
));
ut_ad
(
rec_offs_nth_extern
(
offsets
,
n
));
ut_ad
(
rec_offs_nth_extern
(
offsets
,
n
));
ut_ad
(
page_zip
->
m_start
>=
PAGE_DATA
);
ut_ad
(
page_zip
->
m_start
>=
PAGE_DATA
);
...
...
rem/rem0rec.c
View file @
d71e0c2d
...
@@ -134,7 +134,7 @@ ibool
...
@@ -134,7 +134,7 @@ ibool
rec_validate_old
(
rec_validate_old
(
/*=============*/
/*=============*/
/* out: TRUE if ok */
/* out: TRUE if ok */
rec_t
*
rec
);
/* in: physical record */
const
rec_t
*
rec
);
/* in: physical record */
/**********************************************************
/**********************************************************
Determine how many of the first n columns in a compact
Determine how many of the first n columns in a compact
...
@@ -156,7 +156,7 @@ rec_get_n_extern_new(
...
@@ -156,7 +156,7 @@ rec_get_n_extern_new(
ulint
i
;
ulint
i
;
ut_ad
(
dict_table_is_comp
(
index
->
table
));
ut_ad
(
dict_table_is_comp
(
index
->
table
));
ut_ad
(
rec_get_status
(
(
rec_t
*
)
rec
)
==
REC_STATUS_ORDINARY
);
ut_ad
(
rec_get_status
(
rec
)
==
REC_STATUS_ORDINARY
);
ut_ad
(
n
==
ULINT_UNDEFINED
||
n
<=
dict_index_get_n_fields
(
index
));
ut_ad
(
n
==
ULINT_UNDEFINED
||
n
<=
dict_index_get_n_fields
(
index
));
if
(
n
==
ULINT_UNDEFINED
)
{
if
(
n
==
ULINT_UNDEFINED
)
{
...
@@ -229,7 +229,7 @@ void
...
@@ -229,7 +229,7 @@ void
rec_init_offsets
(
rec_init_offsets
(
/*=============*/
/*=============*/
/* out: the offsets */
/* out: the offsets */
rec_t
*
rec
,
/* in: physical record */
const
rec_t
*
rec
,
/* in: physical record */
dict_index_t
*
index
,
/* in: record descriptor */
dict_index_t
*
index
,
/* in: record descriptor */
ulint
*
offsets
)
/* in/out: array of offsets;
ulint
*
offsets
)
/* in/out: array of offsets;
in: n=rec_offs_n_fields(offsets) */
in: n=rec_offs_n_fields(offsets) */
...
@@ -379,7 +379,7 @@ ulint*
...
@@ -379,7 +379,7 @@ ulint*
rec_get_offsets_func
(
rec_get_offsets_func
(
/*=================*/
/*=================*/
/* out: the new offsets */
/* out: the new offsets */
rec_t
*
rec
,
/* in: physical record */
const
rec_t
*
rec
,
/* in: physical record */
dict_index_t
*
index
,
/* in: record descriptor */
dict_index_t
*
index
,
/* in: record descriptor */
ulint
*
offsets
,
/* in: array consisting of offsets[0]
ulint
*
offsets
,
/* in: array consisting of offsets[0]
allocated elements, or an array from
allocated elements, or an array from
...
@@ -1112,13 +1112,13 @@ void
...
@@ -1112,13 +1112,13 @@ void
rec_copy_prefix_to_dtuple
(
rec_copy_prefix_to_dtuple
(
/*======================*/
/*======================*/
dtuple_t
*
tuple
,
/* in: data tuple */
dtuple_t
*
tuple
,
/* in: data tuple */
rec_t
*
rec
,
/* in: physical record */
const
rec_t
*
rec
,
/* in: physical record */
dict_index_t
*
index
,
/* in: record descriptor */
dict_index_t
*
index
,
/* in: record descriptor */
ulint
n_fields
,
/* in: number of fields to copy */
ulint
n_fields
,
/* in: number of fields to copy */
mem_heap_t
*
heap
)
/* in: memory heap */
mem_heap_t
*
heap
)
/* in: memory heap */
{
{
dfield_t
*
field
;
dfield_t
*
field
;
byte
*
data
;
const
byte
*
data
;
ulint
len
;
ulint
len
;
byte
*
buf
=
NULL
;
byte
*
buf
=
NULL
;
ulint
i
;
ulint
i
;
...
@@ -1137,7 +1137,7 @@ rec_copy_prefix_to_dtuple(
...
@@ -1137,7 +1137,7 @@ rec_copy_prefix_to_dtuple(
for
(
i
=
0
;
i
<
n_fields
;
i
++
)
{
for
(
i
=
0
;
i
<
n_fields
;
i
++
)
{
field
=
dtuple_get_nth_field
(
tuple
,
i
);
field
=
dtuple_get_nth_field
(
tuple
,
i
);
data
=
rec_get_nth_field
(
rec
,
offsets
,
i
,
&
len
);
data
=
rec_get_nth_field
(
(
rec_t
*
)
rec
,
offsets
,
i
,
&
len
);
if
(
len
!=
UNIV_SQL_NULL
)
{
if
(
len
!=
UNIV_SQL_NULL
)
{
buf
=
mem_heap_alloc
(
heap
,
len
);
buf
=
mem_heap_alloc
(
heap
,
len
);
...
@@ -1157,11 +1157,11 @@ rec_t*
...
@@ -1157,11 +1157,11 @@ rec_t*
rec_copy_prefix_to_buf_old
(
rec_copy_prefix_to_buf_old
(
/*=======================*/
/*=======================*/
/* out, own: copied record */
/* out, own: copied record */
rec_t
*
rec
,
/* in: physical record */
const
rec_t
*
rec
,
/* in: physical record */
ulint
n_fields
,
/* in: number of fields to copy */
ulint
n_fields
,
/* in: number of fields to copy */
ulint
area_end
,
/* in: end of the prefix data */
ulint
area_end
,
/* in: end of the prefix data */
byte
**
buf
,
/* in/out: memory buffer for the copied prefix,
byte
**
buf
,
/* in/out: memory buffer for
or NULL */
the copied prefix,
or NULL */
ulint
*
buf_size
)
/* in/out: buffer size */
ulint
*
buf_size
)
/* in/out: buffer size */
{
{
rec_t
*
copy_rec
;
rec_t
*
copy_rec
;
...
@@ -1202,15 +1202,15 @@ rec_t*
...
@@ -1202,15 +1202,15 @@ rec_t*
rec_copy_prefix_to_buf
(
rec_copy_prefix_to_buf
(
/*===================*/
/*===================*/
/* out, own: copied record */
/* out, own: copied record */
rec_t
*
rec
,
/* in: physical record */
const
rec_t
*
rec
,
/* in: physical record */
dict_index_t
*
index
,
/* in: record descriptor */
dict_index_t
*
index
,
/* in: record descriptor */
ulint
n_fields
,
/* in: number of fields to copy */
ulint
n_fields
,
/* in: number of fields to copy */
byte
**
buf
,
/* in/out: memory buffer
byte
**
buf
,
/* in/out: memory buffer
for the copied prefix, or NULL */
for the copied prefix, or NULL */
ulint
*
buf_size
)
/* in/out: buffer size */
ulint
*
buf_size
)
/* in/out: buffer size */
{
{
byte
*
nulls
;
const
byte
*
nulls
;
byte
*
lens
;
const
byte
*
lens
;
ulint
i
;
ulint
i
;
ulint
prefix_len
;
ulint
prefix_len
;
ulint
null_mask
;
ulint
null_mask
;
...
@@ -1315,9 +1315,9 @@ ibool
...
@@ -1315,9 +1315,9 @@ ibool
rec_validate_old
(
rec_validate_old
(
/*=============*/
/*=============*/
/* out: TRUE if ok */
/* out: TRUE if ok */
rec_t
*
rec
)
/* in: physical record */
const
rec_t
*
rec
)
/* in: physical record */
{
{
byte
*
data
;
const
byte
*
data
;
ulint
len
;
ulint
len
;
ulint
n_fields
;
ulint
n_fields
;
ulint
len_sum
=
0
;
ulint
len_sum
=
0
;
...
@@ -1334,7 +1334,7 @@ rec_validate_old(
...
@@ -1334,7 +1334,7 @@ rec_validate_old(
}
}
for
(
i
=
0
;
i
<
n_fields
;
i
++
)
{
for
(
i
=
0
;
i
<
n_fields
;
i
++
)
{
data
=
rec_get_nth_field_old
(
rec
,
i
,
&
len
);
data
=
rec_get_nth_field_old
(
(
rec_t
*
)
rec
,
i
,
&
len
);
if
(
!
((
len
<
UNIV_PAGE_SIZE
)
||
(
len
==
UNIV_SQL_NULL
)))
{
if
(
!
((
len
<
UNIV_PAGE_SIZE
)
||
(
len
==
UNIV_SQL_NULL
)))
{
fprintf
(
stderr
,
fprintf
(
stderr
,
...
@@ -1375,7 +1375,7 @@ ibool
...
@@ -1375,7 +1375,7 @@ ibool
rec_validate
(
rec_validate
(
/*=========*/
/*=========*/
/* out: TRUE if ok */
/* out: TRUE if ok */
rec_t
*
rec
,
/* in: physical record */
const
rec_t
*
rec
,
/* in: physical record */
const
ulint
*
offsets
)
/* in: array returned by rec_get_offsets() */
const
ulint
*
offsets
)
/* in: array returned by rec_get_offsets() */
{
{
const
byte
*
data
;
const
byte
*
data
;
...
@@ -1397,7 +1397,7 @@ rec_validate(
...
@@ -1397,7 +1397,7 @@ rec_validate(
ut_a
(
rec_offs_comp
(
offsets
)
||
n_fields
<=
rec_get_n_fields_old
(
rec
));
ut_a
(
rec_offs_comp
(
offsets
)
||
n_fields
<=
rec_get_n_fields_old
(
rec
));
for
(
i
=
0
;
i
<
n_fields
;
i
++
)
{
for
(
i
=
0
;
i
<
n_fields
;
i
++
)
{
data
=
rec_get_nth_field
(
rec
,
offsets
,
i
,
&
len
);
data
=
rec_get_nth_field
(
(
rec_t
*
)
rec
,
offsets
,
i
,
&
len
);
if
(
!
((
len
<
UNIV_PAGE_SIZE
)
||
(
len
==
UNIV_SQL_NULL
)))
{
if
(
!
((
len
<
UNIV_PAGE_SIZE
)
||
(
len
==
UNIV_SQL_NULL
)))
{
fprintf
(
stderr
,
fprintf
(
stderr
,
...
@@ -1418,11 +1418,11 @@ rec_validate(
...
@@ -1418,11 +1418,11 @@ rec_validate(
}
}
}
}
if
(
len_sum
!=
(
ulint
)(
rec_get_end
(
rec
,
offsets
)
-
rec
))
{
if
(
len_sum
!=
rec_offs_data_size
(
offsets
))
{
fprintf
(
stderr
,
fprintf
(
stderr
,
"InnoDB: Error: record len should be %lu, len %lu
\n
"
,
"InnoDB: Error: record len should be %lu, len %lu
\n
"
,
(
ulong
)
len_sum
,
(
ulong
)
len_sum
,
(
ulong
)
(
rec_get_end
(
rec
,
offsets
)
-
rec
));
(
ulong
)
rec_offs_data_size
(
offsets
));
return
(
FALSE
);
return
(
FALSE
);
}
}
...
@@ -1442,7 +1442,7 @@ void
...
@@ -1442,7 +1442,7 @@ void
rec_print_old
(
rec_print_old
(
/*==========*/
/*==========*/
FILE
*
file
,
/* in: file where to print */
FILE
*
file
,
/* in: file where to print */
rec_t
*
rec
)
/* in: physical record */
const
rec_t
*
rec
)
/* in: physical record */
{
{
const
byte
*
data
;
const
byte
*
data
;
ulint
len
;
ulint
len
;
...
@@ -1461,7 +1461,7 @@ rec_print_old(
...
@@ -1461,7 +1461,7 @@ rec_print_old(
for
(
i
=
0
;
i
<
n
;
i
++
)
{
for
(
i
=
0
;
i
<
n
;
i
++
)
{
data
=
rec_get_nth_field_old
(
rec
,
i
,
&
len
);
data
=
rec_get_nth_field_old
(
(
rec_t
*
)
rec
,
i
,
&
len
);
fprintf
(
file
,
" %lu:"
,
(
ulong
)
i
);
fprintf
(
file
,
" %lu:"
,
(
ulong
)
i
);
...
@@ -1493,7 +1493,7 @@ void
...
@@ -1493,7 +1493,7 @@ void
rec_print_new
(
rec_print_new
(
/*==========*/
/*==========*/
FILE
*
file
,
/* in: file where to print */
FILE
*
file
,
/* in: file where to print */
rec_t
*
rec
,
/* in: physical record */
const
rec_t
*
rec
,
/* in: physical record */
const
ulint
*
offsets
)
/* in: array returned by rec_get_offsets() */
const
ulint
*
offsets
)
/* in: array returned by rec_get_offsets() */
{
{
const
byte
*
data
;
const
byte
*
data
;
...
@@ -1516,7 +1516,7 @@ rec_print_new(
...
@@ -1516,7 +1516,7 @@ rec_print_new(
for
(
i
=
0
;
i
<
rec_offs_n_fields
(
offsets
);
i
++
)
{
for
(
i
=
0
;
i
<
rec_offs_n_fields
(
offsets
);
i
++
)
{
data
=
rec_get_nth_field
(
rec
,
offsets
,
i
,
&
len
);
data
=
rec_get_nth_field
(
(
rec_t
*
)
rec
,
offsets
,
i
,
&
len
);
fprintf
(
file
,
" %lu:"
,
(
ulong
)
i
);
fprintf
(
file
,
" %lu:"
,
(
ulong
)
i
);
...
@@ -1547,7 +1547,7 @@ void
...
@@ -1547,7 +1547,7 @@ void
rec_print
(
rec_print
(
/*======*/
/*======*/
FILE
*
file
,
/* in: file where to print */
FILE
*
file
,
/* in: file where to print */
rec_t
*
rec
,
/* in: physical record */
const
rec_t
*
rec
,
/* in: physical record */
dict_index_t
*
index
)
/* in: record descriptor */
dict_index_t
*
index
)
/* in: record descriptor */
{
{
ut_ad
(
index
);
ut_ad
(
index
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment