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
3bfafd13
Commit
3bfafd13
authored
Sep 06, 2018
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
MDEV-16330 code cleanup (pull request #848)
parents
90c4f566
28461fe5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
43 deletions
+5
-43
storage/innobase/handler/handler0alter.cc
storage/innobase/handler/handler0alter.cc
+5
-43
No files found.
storage/innobase/handler/handler0alter.cc
View file @
3bfafd13
...
...
@@ -8491,36 +8491,17 @@ change_fields_versioning_try(
DBUG_RETURN
(
false
);
}
uint
virtual_count
=
0
;
List_iterator_fast
<
Create_field
>
it
(
ha_alter_info
->
alter_info
->
create_list
);
for
(
uint
i
=
0
;
i
<
table
->
s
->
fields
;
i
++
)
{
const
Field
*
field
=
table
->
field
[
i
];
if
(
innobase_is_v_fld
(
field
))
{
virtual_count
++
;
continue
;
}
const
Create_field
*
create_field
=
NULL
;
while
(
const
Create_field
*
cf
=
it
++
)
{
if
(
cf
->
field
==
field
)
{
create_field
=
cf
;
break
;
}
}
it
.
rewind
();
DBUG_ASSERT
(
create_field
);
while
(
const
Create_field
*
create_field
=
it
++
)
{
if
(
create_field
->
versioning
==
Column_definition
::
VERSIONING_NOT_SET
)
{
continue
;
}
const
dict_table_t
*
new_table
=
ctx
->
new_table
;
ulint
pos
=
i
-
virtual_count
;
const
uint
pos
=
innodb_col_no
(
create_field
->
field
)
;
const
dict_col_t
*
col
=
dict_table_get_nth_col
(
new_table
,
pos
);
DBUG_ASSERT
(
!
col
->
vers_sys_start
());
...
...
@@ -8560,31 +8541,12 @@ change_fields_versioning_cache(
DBUG_ASSERT
(
ctx
);
DBUG_ASSERT
(
ha_alter_info
->
handler_flags
&
ALTER_COLUMN_UNVERSIONED
);
uint
virtual_count
=
0
;
List_iterator_fast
<
Create_field
>
it
(
ha_alter_info
->
alter_info
->
create_list
);
for
(
uint
i
=
0
;
i
<
table
->
s
->
fields
;
i
++
)
{
const
Field
*
field
=
table
->
field
[
i
];
if
(
innobase_is_v_fld
(
field
))
{
virtual_count
++
;
continue
;
}
const
Create_field
*
create_field
=
NULL
;
while
(
const
Create_field
*
cf
=
it
++
)
{
if
(
cf
->
field
==
field
)
{
create_field
=
cf
;
break
;
}
}
it
.
rewind
();
DBUG_ASSERT
(
create_field
);
dict_col_t
*
col
=
dict_table_get_nth_col
(
ctx
->
new_table
,
i
-
virtual_count
);
while
(
const
Create_field
*
create_field
=
it
++
)
{
dict_col_t
*
col
=
dict_table_get_nth_col
(
ctx
->
new_table
,
innodb_col_no
(
create_field
->
field
));
if
(
create_field
->
versioning
==
Column_definition
::
WITHOUT_VERSIONING
)
{
...
...
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