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
93634462
Commit
93634462
authored
Sep 27, 2018
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove dict_col_t::dropped
dict_col_t::DROPPED: Magic value for dict_col_t::ind
parent
16278657
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
storage/innobase/dict/dict0mem.cc
storage/innobase/dict/dict0mem.cc
+3
-5
storage/innobase/handler/handler0alter.cc
storage/innobase/handler/handler0alter.cc
+1
-2
storage/innobase/include/dict0mem.h
storage/innobase/include/dict0mem.h
+7
-4
No files found.
storage/innobase/dict/dict0mem.cc
View file @
93634462
...
...
@@ -713,9 +713,9 @@ dict_mem_fill_column_struct(
dtype_get_mblen
(
mtype
,
prtype
,
&
mbminlen
,
&
mbmaxlen
);
column
->
mbminlen
=
mbminlen
;
column
->
mbmaxlen
=
mbmaxlen
;
column
->
dropped
=
false
;
column
->
def_val
.
data
=
NULL
;
column
->
def_val
.
len
=
UNIV_SQL_DEFAULT
;
ut_ad
(
!
column
->
is_dropped
());
}
/**********************************************************************//**
...
...
@@ -1337,8 +1337,7 @@ inline void dict_index_t::instant_add_field(const dict_index_t& instant)
DBUG_ASSERT
(
!
icol
->
is_virtual
());
if
(
icol
->
is_dropped
())
{
ut_d
(
n_dropped
++
);
f
.
col
->
dropped
=
true
;
f
.
col
->
ind
=
0
;
f
.
col
->
set_dropped
();
f
.
name
=
NULL
;
}
else
{
f
.
col
=
&
table
->
cols
[
icol
-
instant
.
table
->
cols
];
...
...
@@ -1596,11 +1595,10 @@ void dict_table_t::construct_dropped_columns(const byte* data)
for
(
unsigned
i
=
0
;
i
<
n_dropped_cols
;
i
++
)
{
dict_col_t
&
drop_col
=
dropped_cols
[
i
];
bool
is_fixed
=
false
;
drop_col
.
dropped
=
true
;
drop_col
.
set_dropped
()
;
while
(
j
<
num_non_pk_fields
)
{
if
(
non_pk_col_map
[
j
++
]
==
0
)
{
drop_col
.
ind
=
j
+
clust_index
->
n_uniq
+
1
;
break
;
}
}
...
...
storage/innobase/handler/handler0alter.cc
View file @
93634462
...
...
@@ -369,8 +369,7 @@ struct ha_innobase_inplace_ctx : public inplace_alter_handler_ctx
(
&
instant_table
->
instant
->
dropped
[
d
++
])
dict_col_t
(
old_table
->
cols
[
i
]);
drop
->
dropped
=
true
;
drop
->
ind
=
0
;
drop
->
set_dropped
();
}
}
#ifndef DBUG_OFF
...
...
storage/innobase/include/dict0mem.h
View file @
93634462
...
...
@@ -587,9 +587,10 @@ struct dict_col_t{
this column. Our current max limit is
3072 (REC_VERSION_56_MAX_INDEX_COL_LEN)
bytes. */
/** Whether the column has been instantly dropped. */
unsigned
dropped
:
1
;
private:
/** Special value of ind for a dropped column */
static
const
unsigned
DROPPED
=
1023
;
public:
/** Detach the column from an index.
@param[in] index index to be detached from */
...
...
@@ -649,8 +650,10 @@ struct dict_col_t{
DBUG_ASSERT
(
def_val
.
len
!=
UNIV_SQL_DEFAULT
||
!
def_val
.
data
);
return
def_val
.
len
!=
UNIV_SQL_DEFAULT
;
}
/** Flag the column instantly dropped */
void
set_dropped
()
{
ind
=
DROPPED
;
}
/** @return whether the column was instantly dropped */
bool
is_dropped
()
const
{
return
dropped
;
}
bool
is_dropped
()
const
{
return
ind
==
DROPPED
;
}
/** @return whether the column was instantly dropped
@param[in] index the clustered index */
inline
bool
is_dropped
(
const
dict_index_t
&
index
)
const
;
...
...
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