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
32eb5823
Commit
32eb5823
authored
Jul 24, 2018
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove pointer indirection for BtrBulk::m_page_bulks
parent
4a456eac
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
31 deletions
+17
-31
storage/innobase/btr/btr0bulk.cc
storage/innobase/btr/btr0bulk.cc
+16
-16
storage/innobase/include/btr0bulk.h
storage/innobase/include/btr0bulk.h
+1
-10
storage/innobase/row/row0ftsort.cc
storage/innobase/row/row0ftsort.cc
+0
-1
storage/innobase/row/row0merge.cc
storage/innobase/row/row0merge.cc
+0
-4
No files found.
storage/innobase/btr/btr0bulk.cc
View file @
32eb5823
...
...
@@ -730,10 +730,10 @@ BtrBulk::logFreeCheck()
void
BtrBulk
::
release
()
{
ut_ad
(
m_root_level
+
1
==
m_page_bulks
->
size
());
ut_ad
(
m_root_level
+
1
==
m_page_bulks
.
size
());
for
(
ulint
level
=
0
;
level
<=
m_root_level
;
level
++
)
{
PageBulk
*
page_bulk
=
m_page_bulks
->
at
(
level
);
PageBulk
*
page_bulk
=
m_page_bulks
.
at
(
level
);
page_bulk
->
release
();
}
...
...
@@ -743,10 +743,10 @@ BtrBulk::release()
void
BtrBulk
::
latch
()
{
ut_ad
(
m_root_level
+
1
==
m_page_bulks
->
size
());
ut_ad
(
m_root_level
+
1
==
m_page_bulks
.
size
());
for
(
ulint
level
=
0
;
level
<=
m_root_level
;
level
++
)
{
PageBulk
*
page_bulk
=
m_page_bulks
->
at
(
level
);
PageBulk
*
page_bulk
=
m_page_bulks
.
at
(
level
);
page_bulk
->
latch
();
}
}
...
...
@@ -764,7 +764,7 @@ BtrBulk::insert(
dberr_t
err
=
DB_SUCCESS
;
/* Check if we need to create a PageBulk for the level. */
if
(
level
+
1
>
m_page_bulks
->
size
())
{
if
(
level
+
1
>
m_page_bulks
.
size
())
{
PageBulk
*
new_page_bulk
=
UT_NEW_NOKEY
(
PageBulk
(
m_index
,
m_trx_id
,
FIL_NULL
,
level
,
m_flush_observer
));
...
...
@@ -773,16 +773,16 @@ BtrBulk::insert(
return
(
err
);
}
m_page_bulks
->
push_back
(
new_page_bulk
);
ut_ad
(
level
+
1
==
m_page_bulks
->
size
());
m_page_bulks
.
push_back
(
new_page_bulk
);
ut_ad
(
level
+
1
==
m_page_bulks
.
size
());
m_root_level
=
level
;
is_left_most
=
true
;
}
ut_ad
(
m_page_bulks
->
size
()
>
level
);
ut_ad
(
m_page_bulks
.
size
()
>
level
);
PageBulk
*
page_bulk
=
m_page_bulks
->
at
(
level
);
PageBulk
*
page_bulk
=
m_page_bulks
.
at
(
level
);
if
(
is_left_most
&&
level
>
0
&&
page_bulk
->
getRecNo
()
==
0
)
{
/* The node pointer must be marked as the predefined minimum
...
...
@@ -838,7 +838,7 @@ BtrBulk::insert(
/* Set new page bulk to page_bulks. */
ut_ad
(
sibling_page_bulk
->
getLevel
()
<=
m_root_level
);
m_page_bulks
->
at
(
level
)
=
sibling_page_bulk
;
m_page_bulks
.
at
(
level
)
=
sibling_page_bulk
;
UT_DELETE
(
page_bulk
);
page_bulk
=
sibling_page_bulk
;
...
...
@@ -871,11 +871,11 @@ BtrBulk::insert(
if
(
big_rec
!=
NULL
)
{
ut_ad
(
dict_index_is_clust
(
m_index
));
ut_ad
(
page_bulk
->
getLevel
()
==
0
);
ut_ad
(
page_bulk
==
m_page_bulks
->
at
(
0
));
ut_ad
(
page_bulk
==
m_page_bulks
.
at
(
0
));
/* Release all latched but leaf node. */
for
(
ulint
level
=
1
;
level
<=
m_root_level
;
level
++
)
{
PageBulk
*
page_bulk
=
m_page_bulks
->
at
(
level
);
PageBulk
*
page_bulk
=
m_page_bulks
.
at
(
level
);
page_bulk
->
release
();
}
...
...
@@ -884,7 +884,7 @@ BtrBulk::insert(
/* Latch */
for
(
ulint
level
=
1
;
level
<=
m_root_level
;
level
++
)
{
PageBulk
*
page_bulk
=
m_page_bulks
->
at
(
level
);
PageBulk
*
page_bulk
=
m_page_bulks
.
at
(
level
);
page_bulk
->
latch
();
}
}
...
...
@@ -909,17 +909,17 @@ BtrBulk::finish(dberr_t err)
ut_ad
(
!
dict_table_is_temporary
(
m_index
->
table
));
if
(
m_page_bulks
->
size
()
==
0
)
{
if
(
m_page_bulks
.
size
()
==
0
)
{
/* The table is empty. The root page of the index tree
is already in a consistent state. No need to flush. */
return
(
err
);
}
ut_ad
(
m_root_level
+
1
==
m_page_bulks
->
size
());
ut_ad
(
m_root_level
+
1
==
m_page_bulks
.
size
());
/* Finish all page bulks */
for
(
ulint
level
=
0
;
level
<=
m_root_level
;
level
++
)
{
PageBulk
*
page_bulk
=
m_page_bulks
->
at
(
level
);
PageBulk
*
page_bulk
=
m_page_bulks
.
at
(
level
);
last_page_no
=
page_bulk
->
getPageNo
();
...
...
storage/innobase/include/btr0bulk.h
View file @
32eb5823
...
...
@@ -292,20 +292,11 @@ class BtrBulk
/** Destructor */
~
BtrBulk
()
{
UT_DELETE
(
m_page_bulks
);
#ifdef UNIV_DEBUG
fil_space_dec_redo_skipped_count
(
m_index
->
space
);
#endif
/* UNIV_DEBUG */
}
/** Initialization
Note: must be called right after constructor. */
void
init
()
{
m_page_bulks
=
UT_NEW_NOKEY
(
page_bulk_vector
());
}
/** Insert a tuple
@param[in] tuple tuple to insert.
@return error code */
...
...
@@ -379,7 +370,7 @@ class BtrBulk
FlushObserver
*
m_flush_observer
;
/** Page cursor vector for all level */
page_bulk_vector
*
m_page_bulks
;
page_bulk_vector
m_page_bulks
;
};
#endif
storage/innobase/row/row0ftsort.cc
View file @
32eb5823
...
...
@@ -1689,7 +1689,6 @@ row_fts_merge_insert(
/* Create bulk load instance */
ins_ctx
.
btr_bulk
=
UT_NEW_NOKEY
(
BtrBulk
(
aux_index
,
trx
->
id
,
observer
));
ins_ctx
.
btr_bulk
->
init
();
/* Create tuple for insert */
ins_ctx
.
tuple
=
dtuple_create
(
heap
,
dict_index_get_n_fields
(
aux_index
));
...
...
storage/innobase/row/row0merge.cc
View file @
32eb5823
...
...
@@ -2404,8 +2404,6 @@ row_merge_read_clustered_index(
BtrBulk
(
index
[
i
],
trx
->
id
,
observer
));
clust_btr_bulk
->
init
();
}
else
{
clust_btr_bulk
->
latch
();
}
...
...
@@ -2519,7 +2517,6 @@ row_merge_read_clustered_index(
BtrBulk
btr_bulk
(
index
[
i
],
trx
->
id
,
observer
);
btr_bulk
.
init
();
err
=
row_merge_insert_index_tuples
(
trx
->
id
,
index
[
i
],
old_table
,
...
...
@@ -4888,7 +4885,6 @@ row_merge_build_indexes(
if
(
error
==
DB_SUCCESS
)
{
BtrBulk
btr_bulk
(
sort_idx
,
trx
->
id
,
flush_observer
);
btr_bulk
.
init
();
pct_cost
=
(
COST_BUILD_INDEX_STATIC
+
(
total_dynamic_cost
*
merge_files
[
i
].
offset
/
...
...
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