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
fad94473
Commit
fad94473
authored
Sep 24, 2018
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify dict_index_t::instant_op_field()
parent
ca5e2429
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
14 deletions
+8
-14
storage/innobase/dict/dict0mem.cc
storage/innobase/dict/dict0mem.cc
+8
-14
No files found.
storage/innobase/dict/dict0mem.cc
View file @
fad94473
...
...
@@ -1319,7 +1319,6 @@ inline void dict_index_t::instant_op_field(
n_def
=
instant
.
n_def
+
table
->
n_dropped
();
unsigned
n_null
=
0
;
unsigned
n_non_drop_null
=
0
;
ulint
old_field_no
=
0
;
ulint
new_field_no
=
0
;
...
...
@@ -1327,8 +1326,9 @@ inline void dict_index_t::instant_op_field(
heap
,
n_fields
*
sizeof
*
temp_fields
));
for
(
unsigned
i
=
0
;
i
<
n_fields
;
i
++
)
{
dict_field_t
field
=
fields
[
old_field_no
];
dict_field_t
instant_field
=
instant
.
fields
[
new_field_no
];
const
dict_field_t
*
field
=
&
fields
[
old_field_no
];
const
dict_field_t
&
instant_field
=
instant
.
fields
[
new_field_no
];
dict_field_t
&
temp_field
=
temp_fields
[
i
];
bool
is_dropped
=
false
;
ulint
new_col_offset
=
0
;
...
...
@@ -1356,16 +1356,16 @@ inline void dict_index_t::instant_op_field(
new_col_offset
+=
1
;
}
field
=
instant_field
;
field
=
&
instant_field
;
}
else
{
new_col_offset
=
col_map
[
field
.
col
->
ind
];
new_col_offset
=
col_map
[
field
->
col
->
ind
];
old_field_no
++
;
}
new_field_no
++
;
temp_fields
[
i
].
prefix_len
=
field
.
prefix_len
;
temp_fields
[
i
].
fixed_len
=
field
.
fixed_len
;
temp_fields
[
i
].
prefix_len
=
field
->
prefix_len
;
temp_fields
[
i
].
fixed_len
=
field
->
fixed_len
;
const
char
*
end
=
table
->
col_names
;
for
(
unsigned
col
=
0
;
col
<
new_col_offset
;
col
++
)
{
...
...
@@ -1376,13 +1376,7 @@ inline void dict_index_t::instant_op_field(
temp_fields
[
i
].
col
=
&
table
->
cols
[
new_col_offset
];
}
if
(
temp_fields
[
i
].
col
->
is_nullable
())
{
n_null
++
;
if
(
!
is_dropped
)
{
n_non_drop_null
++
;
}
}
n_null
+=
temp_fields
[
i
].
col
->
is_nullable
();
}
fields
=
temp_fields
;
...
...
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