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
26897301
Commit
26897301
authored
Oct 03, 2018
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP: Add row_log_t::instant
parent
fb978872
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
storage/innobase/row/row0log.cc
storage/innobase/row/row0log.cc
+14
-4
No files found.
storage/innobase/row/row0log.cc
View file @
26897301
...
...
@@ -222,6 +222,11 @@ struct row_log_t {
decryption or NULL */
const
char
*
path
;
/*!< where to create temporary file during
log operation */
/** the instantly dropped columns in the clustered index of
the source table; before row_log_table_apply() completes, the
table could be emptied, so that table->is_instant() no longer holds,
but all log records must be in the "instant" format. */
dict_instant_t
*
instant
;
/** the number of core fields in the clustered index of the
source table; before row_log_table_apply() completes, the
table could be emptied, so that table->is_instant() no longer holds,
...
...
@@ -236,14 +241,15 @@ struct row_log_t {
const
TABLE
*
old_table
;
/*< Use old table in case of error. */
uint64_t
n_rows
;
/*< Number of rows read from the table */
/** Determine whether the log should be in the 'instant ADD' format
/** Determine whether the log should be in the 'instant ALTER TABLE'
format
@param[in] index the clustered index of the source table
@return whether to use the 'instant A
DD COLUMN
' format */
@return whether to use the 'instant A
LTER TABLE
' format */
bool
is_instant
(
const
dict_index_t
*
index
)
const
{
ut_ad
(
table
);
ut_ad
(
n_core_fields
<=
index
->
n_fields
);
return
n_core_fields
!=
index
->
n_fields
;
ut_ad
(
n_core_fields
<=
index
->
n_fields
||
instant
);
return
instant
||
n_core_fields
!=
index
->
n_fields
;
}
const
byte
*
instant_field_value
(
ulint
n
,
ulint
*
len
)
const
...
...
@@ -2530,6 +2536,7 @@ row_log_table_apply_op(
}
rec_offs_set_n_fields
(
offsets
,
dup
->
index
->
n_fields
);
/* FIXME: pass log->instant as well */
rec_init_offsets_temp
(
mrec
,
dup
->
index
,
offsets
,
log
->
n_core_fields
,
log
->
non_core_fields
,
...
...
@@ -3205,6 +3212,9 @@ row_log_allocate(
log
->
head
.
total
=
0
;
log
->
path
=
path
;
log
->
n_core_fields
=
index
->
n_core_fields
;
#if 1
/* FIXME: when we add instant->heap, this must be a copy! */
log
->
instant
=
index
->
table
->
instant
;
#endif
ut_ad
(
!
table
||
log
->
is_instant
(
index
)
==
index
->
is_instant
());
log
->
allow_not_null
=
allow_not_null
;
log
->
old_table
=
old_table
;
...
...
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