38
38
less than data2, respectively */
39
39
ulint mtype, /* in: main type */
40
40
ulint prtype, /* in: precise type */
41
byte* data1, /* in: data field (== a pointer to a memory
41
const byte* data1, /* in: data field (== a pointer to a memory
43
43
ulint len1, /* in: data field length or UNIV_SQL_NULL */
44
byte* data2, /* in: data field (== a pointer to a memory
44
const byte* data2, /* in: data field (== a pointer to a memory
46
46
ulint len2); /* in: data field length or UNIV_SQL_NULL */
47
47
/*****************************************************************
48
48
This function is used to compare two data fields for which we know the
52
52
cmp_data_data_slow(
53
53
/*===============*/
55
55
less than data2, respectively */
56
56
ulint mtype, /* in: main type */
57
57
ulint prtype, /* in: precise type */
58
byte* data1, /* in: data field (== a pointer to a memory
58
const byte* data1, /* in: data field (== a pointer to a memory
60
60
ulint len1, /* in: data field length or UNIV_SQL_NULL */
61
byte* data2, /* in: data field (== a pointer to a memory
61
const byte* data2, /* in: data field (== a pointer to a memory
63
63
ulint len2); /* in: data field length or UNIV_SQL_NULL */
64
64
/*****************************************************************
71
71
/* out: 1, 0, -1, if dfield1 is greater, equal,
72
72
less than dfield2, respectively */
73
dfield_t* dfield1,/* in: data field; must have type field set */
74
dfield_t* dfield2);/* in: data field */
73
const dfield_t* dfield1,/* in: data field; must have type field set */
74
const dfield_t* dfield2);/* in: data field */
75
75
/*****************************************************************
76
76
This function is used to compare a data tuple to a physical record.
77
77
Only dtuple->n_fields_cmp first fields are taken into account for
89
89
common first fields are compared, or
90
90
until the first externally stored field in
92
dtuple_t* dtuple, /* in: data tuple */
93
rec_t* rec, /* in: physical record which differs from
92
const dtuple_t* dtuple, /* in: data tuple */
93
const rec_t* rec, /* in: physical record which differs from
94
94
dtuple in some of the common fields, or which
95
95
has an equal number or more fields than
104
104
value for current comparison */
105
105
/******************************************************************
106
106
Compares a data tuple to a physical record. */
111
111
/* out: 1, 0, -1, if dtuple is greater, equal,
112
112
less than rec, respectively; see the comments
113
113
for cmp_dtuple_rec_with_match */
114
dtuple_t* dtuple, /* in: data tuple */
115
rec_t* rec, /* in: physical record */
114
const dtuple_t* dtuple, /* in: data tuple */
115
const rec_t* rec, /* in: physical record */
116
116
const ulint* offsets);/* in: array returned by rec_get_offsets() */
117
117
/******************************************************************
118
118
Checks if a dtuple is a prefix of a record. The last field in dtuple
119
119
is allowed to be a prefix of the corresponding field in the record. */
122
122
cmp_dtuple_is_prefix_of_rec(
123
123
/*========================*/
124
124
/* out: TRUE if prefix */
125
dtuple_t* dtuple, /* in: data tuple */
126
rec_t* rec, /* in: physical record */
125
const dtuple_t* dtuple, /* in: data tuple */
126
const rec_t* rec, /* in: physical record */
127
127
const ulint* offsets);/* in: array returned by rec_get_offsets() */
128
#ifndef UNIV_HOTBACKUP
129
/*****************************************************************
130
Compare two physical records that contain the same number of columns,
131
none of which are stored externally. */
136
/* out: 1, 0 , -1 if rec1 is greater,
137
equal, less, respectively, than rec2 */
138
const rec_t* rec1, /* in: physical record */
139
const rec_t* rec2, /* in: physical record */
140
const ulint* offsets1,/* in: rec_get_offsets(rec1, index) */
141
const ulint* offsets2,/* in: rec_get_offsets(rec2, index) */
142
const dict_index_t* index); /* in: data dictionary index */
143
#endif /* !UNIV_HOTBACKUP */
128
144
/*****************************************************************
129
145
This function is used to compare two physical records. Only the common
130
146
first fields are compared, and if an externally stored field is
131
147
encountered, then 0 is returned. */
134
150
cmp_rec_rec_with_match(
135
151
/*===================*/
136
152
/* out: 1, 0 , -1 if rec1 is greater, equal,
137
153
less, respectively, than rec2; only the common
138
154
first fields are compared */
139
rec_t* rec1, /* in: physical record */
140
rec_t* rec2, /* in: physical record */
155
const rec_t* rec1, /* in: physical record */
156
const rec_t* rec2, /* in: physical record */
141
157
const ulint* offsets1,/* in: rec_get_offsets(rec1, index) */
142
158
const ulint* offsets2,/* in: rec_get_offsets(rec2, index) */
143
159
dict_index_t* index, /* in: data dictionary index */
159
175
/* out: 1, 0 , -1 if rec1 is greater, equal,
160
176
less, respectively, than rec2; only the common
161
177
first fields are compared */
162
rec_t* rec1, /* in: physical record */
163
rec_t* rec2, /* in: physical record */
178
const rec_t* rec1, /* in: physical record */
179
const rec_t* rec2, /* in: physical record */
164
180
const ulint* offsets1,/* in: rec_get_offsets(rec1, index) */
165
181
const ulint* offsets2,/* in: rec_get_offsets(rec2, index) */
166
182
dict_index_t* index); /* in: data dictionary index */