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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
06b6f544
Commit
06b6f544
authored
Sep 19, 2007
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: row_ext_lookup_ith(): New function, sliced from
row_ext_lookup().
parent
685f665b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
9 deletions
+46
-9
include/row0ext.h
include/row0ext.h
+14
-0
include/row0ext.ic
include/row0ext.ic
+32
-9
No files found.
include/row0ext.h
View file @
06b6f544
...
...
@@ -29,6 +29,20 @@ row_ext_create(
Looks up a column prefix of an externally stored column. */
UNIV_INLINE
byte
*
row_ext_lookup_ith
(
/*===============*/
/* out: column prefix, or NULL if
the column is not stored externally */
row_ext_t
*
ext
,
/* in/out: column prefix cache */
ulint
i
,
/* in: ith element of ext */
const
byte
*
field
,
/* in: locally stored part of the column */
ulint
f_len
,
/* in: length of field, in bytes */
ulint
*
len
);
/* out: length of prefix, in bytes,
at most REC_MAX_INDEX_COL_LEN */
/************************************************************************
Looks up a column prefix of an externally stored column. */
UNIV_INLINE
byte
*
row_ext_lookup
(
/*===========*/
/* out: column prefix, or NULL if
...
...
include/row0ext.ic
View file @
06b6f544
...
...
@@ -50,6 +50,37 @@ row_ext_create(
return(ret);
}
/************************************************************************
Looks up a column prefix of an externally stored column. */
UNIV_INLINE
byte*
row_ext_lookup_ith(
/*===============*/
/* out: column prefix, or NULL if
the column is not stored externally */
row_ext_t* ext, /* in/out: column prefix cache */
ulint i, /* in: index of ext->ext[] */
const byte* field, /* in: locally stored part of the column */
ulint f_len, /* in: length of field, in bytes */
ulint* len) /* out: length of prefix, in bytes,
at most REC_MAX_INDEX_COL_LEN */
{
ut_ad(ext);
ut_ad(field);
ut_ad(len);
ut_ad(i < ext->n_ext);
/* Return from the cache if found */
if (ext->len[i]) {
*len = ext->len[i];
ut_ad(*len > f_len);
return(ext->buf + i * REC_MAX_INDEX_COL_LEN);
}
/* Update the cache */
return(row_ext_lookup_low(ext, i, field, f_len, len));
}
/************************************************************************
Looks up a column prefix of an externally stored column. */
UNIV_INLINE
...
...
@@ -73,15 +104,7 @@ row_ext_lookup(
for (i = 0; i < ext->n_ext; i++) {
if (col == ext->ext[i]) {
/* Return from the cache if found */
if (ext->len[i]) {
*len = ext->len[i];
ut_ad(*len > f_len);
return(ext->buf + i * REC_MAX_INDEX_COL_LEN);
}
/* Update the cache */
return(row_ext_lookup_low(ext, i, field, f_len, len));
return(row_ext_lookup_ith(ext, i, field, f_len, len));
}
}
...
...
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