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
3819529d
Commit
3819529d
authored
Sep 12, 2011
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql-5.1 to mysql-5.5.
parents
fa60b162
cc496eb7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
storage/innobase/row/row0sel.c
storage/innobase/row/row0sel.c
+13
-4
No files found.
storage/innobase/row/row0sel.c
View file @
3819529d
/*****************************************************************************
/*****************************************************************************
Copyright (c) 1997, 201
0, Innobase Oy
. All Rights Reserved.
Copyright (c) 1997, 201
1, Oracle and/or its affiliates
. All Rights Reserved.
Copyright (c) 2008, Google Inc.
Copyright (c) 2008, Google Inc.
Portions of this file contain modifications contributed and copyrighted by
Portions of this file contain modifications contributed and copyrighted by
...
@@ -105,14 +105,22 @@ row_sel_sec_rec_is_for_blob(
...
@@ -105,14 +105,22 @@ row_sel_sec_rec_is_for_blob(
ulint
clust_len
,
/*!< in: length of clust_field */
ulint
clust_len
,
/*!< in: length of clust_field */
const
byte
*
sec_field
,
/*!< in: column in secondary index */
const
byte
*
sec_field
,
/*!< in: column in secondary index */
ulint
sec_len
,
/*!< in: length of sec_field */
ulint
sec_len
,
/*!< in: length of sec_field */
ulint
prefix_len
,
/*!< in: index column prefix length
in bytes */
dict_table_t
*
table
)
/*!< in: table */
dict_table_t
*
table
)
/*!< in: table */
{
{
ulint
len
;
ulint
len
;
byte
buf
[
REC_VERSION_56_MAX_INDEX_COL_LEN
];
byte
buf
[
REC_VERSION_56_MAX_INDEX_COL_LEN
];
ulint
zip_size
=
dict_table_flags_to_zip_size
(
table
->
flags
);
ulint
zip_size
=
dict_table_flags_to_zip_size
(
table
->
flags
);
ulint
max_prefix_len
=
DICT_MAX_FIELD_LEN_BY_FORMAT
(
table
);
/* This function should never be invoked on an Antelope format
table, because they should always contain enough prefix in the
clustered index record. */
ut_ad
(
dict_table_get_format
(
table
)
>=
DICT_TF_FORMAT_ZIP
);
ut_a
(
clust_len
>=
BTR_EXTERN_FIELD_REF_SIZE
);
ut_a
(
clust_len
>=
BTR_EXTERN_FIELD_REF_SIZE
);
ut_ad
(
prefix_len
>=
sec_len
);
ut_ad
(
prefix_len
>
0
);
ut_a
(
prefix_len
<=
sizeof
buf
);
if
(
UNIV_UNLIKELY
if
(
UNIV_UNLIKELY
(
!
memcmp
(
clust_field
+
clust_len
-
BTR_EXTERN_FIELD_REF_SIZE
,
(
!
memcmp
(
clust_field
+
clust_len
-
BTR_EXTERN_FIELD_REF_SIZE
,
...
@@ -124,7 +132,7 @@ row_sel_sec_rec_is_for_blob(
...
@@ -124,7 +132,7 @@ row_sel_sec_rec_is_for_blob(
return
(
FALSE
);
return
(
FALSE
);
}
}
len
=
btr_copy_externally_stored_field_prefix
(
buf
,
max_
prefix_len
,
len
=
btr_copy_externally_stored_field_prefix
(
buf
,
prefix_len
,
zip_size
,
zip_size
,
clust_field
,
clust_len
);
clust_field
,
clust_len
);
...
@@ -138,7 +146,7 @@ row_sel_sec_rec_is_for_blob(
...
@@ -138,7 +146,7 @@ row_sel_sec_rec_is_for_blob(
}
}
len
=
dtype_get_at_most_n_mbchars
(
prtype
,
mbminmaxlen
,
len
=
dtype_get_at_most_n_mbchars
(
prtype
,
mbminmaxlen
,
sec
_len
,
len
,
(
const
char
*
)
buf
);
prefix
_len
,
len
,
(
const
char
*
)
buf
);
return
(
!
cmp_data_data
(
mtype
,
prtype
,
buf
,
len
,
sec_field
,
sec_len
));
return
(
!
cmp_data_data
(
mtype
,
prtype
,
buf
,
len
,
sec_field
,
sec_len
));
}
}
...
@@ -230,6 +238,7 @@ row_sel_sec_rec_is_for_clust_rec(
...
@@ -230,6 +238,7 @@ row_sel_sec_rec_is_for_clust_rec(
col
->
mbminmaxlen
,
col
->
mbminmaxlen
,
clust_field
,
clust_len
,
clust_field
,
clust_len
,
sec_field
,
sec_len
,
sec_field
,
sec_len
,
ifield
->
prefix_len
,
clust_index
->
table
))
{
clust_index
->
table
))
{
goto
inequal
;
goto
inequal
;
}
}
...
...
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