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
ecd14356
Commit
ecd14356
authored
Sep 21, 2018
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify dict_index_t::is_instant()
parent
2e55684e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
27 deletions
+3
-27
storage/innobase/include/dict0mem.h
storage/innobase/include/dict0mem.h
+3
-27
No files found.
storage/innobase/include/dict0mem.h
View file @
ecd14356
...
...
@@ -1130,23 +1130,6 @@ struct dict_index_t {
return
n
;
}
/** Get the number of exist fields from the index.
@return number of non-dropped fields in the index. */
unsigned
get_n_exist_fields
()
const
{
unsigned
n
=
0
;
for
(
ulint
i
=
0
;
i
<
n_fields
;
i
++
)
{
const
dict_col_t
*
col
=
fields
[
i
].
col
;
if
(
!
col
->
is_dropped
())
{
n
++
;
}
}
DBUG_ASSERT
(
n
<=
n_def
);
return
n
;
}
/** Get the number of non-drop nullable fields from the index.
@return number of non-drop nullable fields in the index. */
unsigned
get_n_non_drop_nullable_fields
()
const
...
...
@@ -2165,20 +2148,14 @@ inline bool dict_index_t::is_readable() const { return table->is_readable(); }
inline
bool
dict_index_t
::
is_instant
()
const
{
ut_ad
(
n_core_fields
>
0
);
ut_ad
(
n_core_fields
<=
n_fields
||
is_drop_field_exist
());
ut_ad
(
n_core_fields
==
n_fields
||
(
type
&
~
(
DICT_UNIQUE
|
DICT_CORRUPT
))
==
DICT_CLUSTERED
);
ut_ad
(
n_core_fields
==
n_fields
||
table
->
supports_instant
());
ut_ad
(
n_core_fields
==
n_fields
||
!
table
->
is_temporary
());
if
(
type
&
DICT_IBUF
)
{
return
false
;
}
if
(
n_core_fields
==
n_fields
)
{
return
n_core_fields
!=
get_n_exist_fields
();
}
return
true
;
/* MDEV-15562 FIXME: reordered columns */
return
n_core_fields
!=
n_fields
||
is_drop_field_exist
();
}
inline
bool
dict_index_t
::
is_corrupted
()
const
...
...
@@ -2192,7 +2169,6 @@ inline bool dict_index_t::is_corrupted() const
/** Whether the index has dropped fields. */
inline
bool
dict_index_t
::
is_drop_field_exist
()
const
{
ut_ad
(
!
table
->
n_dropped_cols
||
is_instant
());
ut_ad
(
!
table
->
n_dropped_cols
||
is_primary
());
return
table
->
n_dropped_cols
>
0
;
}
...
...
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