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
bb371b64
Commit
bb371b64
authored
Oct 16, 2012
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql-5.1 to mysql-5.5.
parents
04c77300
aec62476
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
6 deletions
+35
-6
storage/innobase/dict/dict0dict.c
storage/innobase/dict/dict0dict.c
+22
-5
storage/innobase/handler/handler0alter.cc
storage/innobase/handler/handler0alter.cc
+1
-1
storage/innobase/include/dict0dict.h
storage/innobase/include/dict0dict.h
+12
-0
No files found.
storage/innobase/dict/dict0dict.c
View file @
bb371b64
...
...
@@ -487,10 +487,12 @@ Looks for column n in an index.
ULINT_UNDEFINED if not contained */
UNIV_INTERN
ulint
dict_index_get_nth_col_pos
(
/*=======================*/
const
dict_index_t
*
index
,
/*!< in: index */
ulint
n
)
/*!< in: column number */
dict_index_get_nth_col_or_prefix_pos
(
/*=================================*/
const
dict_index_t
*
index
,
/*!< in: index */
ulint
n
,
/*!< in: column number */
ibool
inc_prefix
)
/*!< in: TRUE=consider
column prefixes too */
{
const
dict_field_t
*
field
;
const
dict_col_t
*
col
;
...
...
@@ -512,7 +514,8 @@ dict_index_get_nth_col_pos(
for
(
pos
=
0
;
pos
<
n_fields
;
pos
++
)
{
field
=
dict_index_get_nth_field
(
index
,
pos
);
if
(
col
==
field
->
col
&&
field
->
prefix_len
==
0
)
{
if
(
col
==
field
->
col
&&
(
inc_prefix
||
field
->
prefix_len
==
0
))
{
return
(
pos
);
}
...
...
@@ -521,6 +524,20 @@ dict_index_get_nth_col_pos(
return
(
ULINT_UNDEFINED
);
}
/********************************************************************//**
Looks for column n in an index.
@return position in internal representation of the index;
ULINT_UNDEFINED if not contained */
UNIV_INTERN
ulint
dict_index_get_nth_col_pos
(
/*=======================*/
const
dict_index_t
*
index
,
/*!< in: index */
ulint
n
)
/*!< in: column number */
{
return
(
dict_index_get_nth_col_or_prefix_pos
(
index
,
n
,
FALSE
));
}
#ifndef UNIV_HOTBACKUP
/********************************************************************//**
Returns TRUE if the index contains a column or a prefix of that column.
...
...
storage/innobase/handler/handler0alter.cc
View file @
bb371b64
...
...
@@ -151,7 +151,7 @@ innobase_rec_to_mysql(
field
->
reset
();
ipos
=
dict_index_get_nth_col_
pos
(
index
,
i
);
ipos
=
dict_index_get_nth_col_
or_prefix_pos
(
index
,
i
,
TRUE
);
if
(
UNIV_UNLIKELY
(
ipos
==
ULINT_UNDEFINED
))
{
null_field:
...
...
storage/innobase/include/dict0dict.h
View file @
bb371b64
...
...
@@ -910,6 +910,18 @@ dict_index_get_nth_col_pos(
const
dict_index_t
*
index
,
/*!< in: index */
ulint
n
);
/*!< in: column number */
/********************************************************************//**
Looks for column n in an index.
@return position in internal representation of the index;
ULINT_UNDEFINED if not contained */
UNIV_INTERN
ulint
dict_index_get_nth_col_or_prefix_pos
(
/*=================================*/
const
dict_index_t
*
index
,
/*!< in: index */
ulint
n
,
/*!< in: column number */
ibool
inc_prefix
);
/*!< in: TRUE=consider
column prefixes too */
/********************************************************************//**
Returns TRUE if the index contains a column or a prefix of that column.
@return TRUE if contains the column or its prefix */
UNIV_INTERN
...
...
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