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
aa2f263e
Commit
aa2f263e
authored
Sep 29, 2020
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup: Remove constant parameters async=false, index_name=NULL
parent
74bd3683
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
41 deletions
+6
-41
storage/innobase/btr/btr0defragment.cc
storage/innobase/btr/btr0defragment.cc
+1
-6
storage/innobase/handler/ha_innodb.cc
storage/innobase/handler/ha_innodb.cc
+4
-31
storage/innobase/handler/ha_innodb.h
storage/innobase/handler/ha_innodb.h
+1
-2
storage/innobase/include/btr0defragment.h
storage/innobase/include/btr0defragment.h
+0
-2
No files found.
storage/innobase/btr/btr0defragment.cc
View file @
aa2f263e
...
...
@@ -157,8 +157,6 @@ synchronized defragmentation. */
os_event_t
btr_defragment_add_index
(
dict_index_t
*
index
,
/*!< index to be added */
bool
async
,
/*!< whether this is an async
defragmentation */
dberr_t
*
err
)
/*!< out: error code */
{
mtr_t
mtr
;
...
...
@@ -191,10 +189,7 @@ btr_defragment_add_index(
return
NULL
;
}
btr_pcur_t
*
pcur
=
btr_pcur_create_for_mysql
();
os_event_t
event
=
NULL
;
if
(
!
async
)
{
event
=
os_event_create
(
0
);
}
os_event_t
event
=
os_event_create
(
0
);
btr_pcur_open_at_index_side
(
true
,
index
,
BTR_SEARCH_LEAF
,
pcur
,
true
,
0
,
&
mtr
);
btr_pcur_move_to_next
(
pcur
,
&
mtr
);
...
...
storage/innobase/handler/ha_innodb.cc
View file @
aa2f263e
...
...
@@ -14705,25 +14705,14 @@ ha_innobase::analyze(
/*****************************************************************//**
Defragment table.
@return error number */
UNIV_INTERN
int
ha_innobase
::
defragment_table
(
/*==========================*/
const
char
*
name
,
/*!< in: table name */
const
char
*
index_name
,
/*!< in: index name */
bool
async
)
/*!< in: whether to wait until finish */
inline
int
ha_innobase
::
defragment_table
(
const
char
*
name
)
{
char
norm_name
[
FN_REFLEN
];
dict_table_t
*
table
=
NULL
;
dict_index_t
*
index
=
NULL
;
ibool
one_index
=
(
index_name
!=
0
);
int
ret
=
0
;
dberr_t
err
=
DB_SUCCESS
;
if
(
!
srv_defragment
)
{
return
ER_FEATURE_DISABLED
;
}
normalize_table_name
(
norm_name
,
name
);
table
=
dict_table_open_on_name
(
norm_name
,
FALSE
,
...
...
@@ -14751,10 +14740,6 @@ ha_innobase::defragment_table(
continue
;
}
if
(
one_index
&&
strcasecmp
(
index_name
,
index
->
name
)
!=
0
)
{
continue
;
}
if
(
btr_defragment_find_index
(
index
))
{
// We borrow this error code. When the same index is
// already in the defragmentation queue, issue another
...
...
@@ -14770,7 +14755,7 @@ ha_innobase::defragment_table(
break
;
}
os_event_t
event
=
btr_defragment_add_index
(
index
,
async
,
&
err
);
os_event_t
event
=
btr_defragment_add_index
(
index
,
&
err
);
if
(
err
!=
DB_SUCCESS
)
{
push_warning_printf
(
...
...
@@ -14786,7 +14771,7 @@ ha_innobase::defragment_table(
break
;
}
if
(
!
async
&&
event
)
{
if
(
event
)
{
while
(
os_event_wait_time
(
event
,
1000000
))
{
if
(
thd_killed
(
current_thd
))
{
btr_defragment_remove_index
(
index
);
...
...
@@ -14800,19 +14785,9 @@ ha_innobase::defragment_table(
if
(
ret
)
{
break
;
}
if
(
one_index
)
{
one_index
=
FALSE
;
break
;
}
}
dict_table_close
(
table
,
FALSE
,
FALSE
);
if
(
ret
==
0
&&
one_index
)
{
ret
=
ER_NO_SUCH_INDEX
;
}
return
ret
;
}
...
...
@@ -14838,9 +14813,7 @@ ha_innobase::optimize(
bool
try_alter
=
true
;
if
(
!
m_prebuilt
->
table
->
is_temporary
()
&&
srv_defragment
)
{
int
err
;
err
=
defragment_table
(
m_prebuilt
->
table
->
name
.
m_name
,
NULL
,
false
);
int
err
=
defragment_table
(
m_prebuilt
->
table
->
name
.
m_name
);
if
(
err
==
0
)
{
try_alter
=
false
;
...
...
storage/innobase/handler/ha_innodb.h
View file @
aa2f263e
...
...
@@ -219,8 +219,7 @@ class ha_innobase: public handler
int
delete_table
(
const
char
*
name
);
int
rename_table
(
const
char
*
from
,
const
char
*
to
);
int
defragment_table
(
const
char
*
name
,
const
char
*
index_name
,
bool
async
);
inline
int
defragment_table
(
const
char
*
name
);
int
check
(
THD
*
thd
,
HA_CHECK_OPT
*
check_opt
);
char
*
update_table_comment
(
const
char
*
comment
);
...
...
storage/innobase/include/btr0defragment.h
View file @
aa2f263e
...
...
@@ -64,8 +64,6 @@ is a synchronized defragmentation. */
os_event_t
btr_defragment_add_index
(
dict_index_t
*
index
,
/*!< index to be added */
bool
async
,
/*!< whether this is an async
defragmentation */
dberr_t
*
err
);
/*!< out: error code */
/******************************************************************//**
When table is dropped, this function is called to mark a table as removed in
...
...
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