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
021f78f6
Commit
021f78f6
authored
Nov 23, 2016
by
Kristian Nielsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use thd_kill_level() over old thd_killed() in TokuDB.
parent
660a2928
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
20 deletions
+20
-20
storage/tokudb/ha_tokudb.cc
storage/tokudb/ha_tokudb.cc
+8
-8
storage/tokudb/ha_tokudb_admin.cc
storage/tokudb/ha_tokudb_admin.cc
+4
-4
storage/tokudb/hatoku_hton.h
storage/tokudb/hatoku_hton.h
+2
-2
storage/tokudb/tokudb_information_schema.cc
storage/tokudb/tokudb_information_schema.cc
+6
-6
No files found.
storage/tokudb/ha_tokudb.cc
View file @
021f78f6
...
...
@@ -533,7 +533,7 @@ typedef struct index_read_info {
static
int
ai_poll_fun
(
void
*
extra
,
float
progress
)
{
LOADER_CONTEXT
context
=
(
LOADER_CONTEXT
)
extra
;
if
(
thd_kill
ed
(
context
->
thd
))
{
if
(
thd_kill
_level
(
context
->
thd
))
{
sprintf
(
context
->
write_status_msg
,
"The process has been killed, aborting add index."
);
return
ER_ABORTING_CONNECTION
;
}
...
...
@@ -548,7 +548,7 @@ static int ai_poll_fun(void *extra, float progress) {
static
int
loader_poll_fun
(
void
*
extra
,
float
progress
)
{
LOADER_CONTEXT
context
=
(
LOADER_CONTEXT
)
extra
;
if
(
thd_kill
ed
(
context
->
thd
))
{
if
(
thd_kill
_level
(
context
->
thd
))
{
sprintf
(
context
->
write_status_msg
,
"The process has been killed, aborting bulk load."
);
return
ER_ABORTING_CONNECTION
;
}
...
...
@@ -3435,7 +3435,7 @@ int ha_tokudb::end_bulk_insert(bool abort) {
ai_metadata_update_required
=
false
;
loader_error
=
0
;
if
(
loader
)
{
if
(
!
abort_loader
&&
!
thd_kill
ed
(
thd
))
{
if
(
!
abort_loader
&&
!
thd_kill
_level
(
thd
))
{
DBUG_EXECUTE_IF
(
"tokudb_end_bulk_insert_sleep"
,
{
const
char
*
orig_proc_info
=
tokudb_thd_get_proc_info
(
thd
);
thd_proc_info
(
thd
,
"DBUG sleep"
);
...
...
@@ -3445,7 +3445,7 @@ int ha_tokudb::end_bulk_insert(bool abort) {
error
=
loader
->
close
(
loader
);
loader
=
NULL
;
if
(
error
)
{
if
(
thd_kill
ed
(
thd
))
{
if
(
thd_kill
_level
(
thd
))
{
my_error
(
ER_QUERY_INTERRUPTED
,
MYF
(
0
));
}
goto
cleanup
;
...
...
@@ -3580,7 +3580,7 @@ int ha_tokudb::is_index_unique(bool* is_unique, DB_TXN* txn, DB* db, KEY* key_in
share
->
row_count
(),
key_info
->
name
);
thd_proc_info
(
thd
,
status_msg
);
if
(
thd_kill
ed
(
thd
))
{
if
(
thd_kill
_level
(
thd
))
{
my_error
(
ER_QUERY_INTERRUPTED
,
MYF
(
0
));
error
=
ER_QUERY_INTERRUPTED
;
goto
cleanup
;
...
...
@@ -5245,7 +5245,7 @@ int ha_tokudb::fill_range_query_buf(
// otherwise, if we simply see that the current key is no match,
// we tell the cursor to continue and don't store
// the key locally
if
(
result
==
ICP_OUT_OF_RANGE
||
thd_kill
ed
(
thd
))
{
if
(
result
==
ICP_OUT_OF_RANGE
||
thd_kill
_level
(
thd
))
{
icp_went_out_of_range
=
true
;
error
=
0
;
DEBUG_SYNC
(
ha_thd
(),
"tokudb_icp_asc_scan_out_of_range"
);
...
...
@@ -5613,7 +5613,7 @@ int ha_tokudb::get_next(
static_cast
<
tokudb_trx_data
*>
(
thd_get_ha_data
(
thd
,
tokudb_hton
));
trx
->
stmt_progress
.
queried
++
;
track_progress
(
thd
);
if
(
thd_kill
ed
(
thd
))
if
(
thd_kill
_level
(
thd
))
error
=
ER_ABORTING_CONNECTION
;
}
cleanup:
...
...
@@ -8351,7 +8351,7 @@ int ha_tokudb::tokudb_add_index(
(
long
long
unsigned
)
share
->
row_count
());
#endif
if
(
thd_kill
ed
(
thd
))
{
if
(
thd_kill
_level
(
thd
))
{
error
=
ER_ABORTING_CONNECTION
;
goto
cleanup
;
}
...
...
storage/tokudb/ha_tokudb_admin.cc
View file @
021f78f6
...
...
@@ -225,7 +225,7 @@ int recount_rows_t::analyze_recount_rows_progress(
_ticks
=
0
;
uint64_t
now
=
tokudb
::
time
::
microsec
();
_total_elapsed_time
=
now
-
_recount_start
;
if
((
_thd
&&
thd_kill
ed
(
_thd
))
||
cancelled
())
{
if
((
_thd
&&
thd_kill
_level
(
_thd
))
||
cancelled
())
{
// client killed
return
ER_ABORTING_CONNECTION
;
}
...
...
@@ -540,7 +540,7 @@ int standard_t::analyze_key_progress(void) {
uint64_t
now
=
tokudb
::
time
::
microsec
();
_total_elapsed_time
=
now
-
_analyze_start
;
_key_elapsed_time
=
now
-
_analyze_key_start
;
if
((
_thd
&&
thd_kill
ed
(
_thd
))
||
cancelled
())
{
if
((
_thd
&&
thd_kill
_level
(
_thd
))
||
cancelled
())
{
// client killed
return
ER_ABORTING_CONNECTION
;
}
else
if
(
_time_limit
>
0
&&
...
...
@@ -876,7 +876,7 @@ typedef struct hot_optimize_context {
static
int
hot_optimize_progress_fun
(
void
*
extra
,
float
progress
)
{
HOT_OPTIMIZE_CONTEXT
context
=
(
HOT_OPTIMIZE_CONTEXT
)
extra
;
if
(
thd_kill
ed
(
context
->
thd
))
{
if
(
thd_kill
_level
(
context
->
thd
))
{
sprintf
(
context
->
write_status_msg
,
"The process has been killed, aborting hot optimize."
);
...
...
@@ -1003,7 +1003,7 @@ struct check_context {
static
int
ha_tokudb_check_progress
(
void
*
extra
,
float
progress
)
{
struct
check_context
*
context
=
(
struct
check_context
*
)
extra
;
int
result
=
0
;
if
(
thd_kill
ed
(
context
->
thd
))
if
(
thd_kill
_level
(
context
->
thd
))
result
=
ER_ABORTING_CONNECTION
;
return
result
;
}
...
...
storage/tokudb/hatoku_hton.h
View file @
021f78f6
...
...
@@ -172,12 +172,12 @@ inline uint64_t tokudb_get_killed_time_callback(uint64_t default_killed_time) {
inline
int
tokudb_killed_callback
(
void
)
{
THD
*
thd
=
current_thd
;
return
thd_kill
ed
(
thd
);
return
thd_kill
_level
(
thd
);
}
inline
bool
tokudb_killed_thd_callback
(
void
*
extra
,
uint64_t
deleted_rows
)
{
THD
*
thd
=
static_cast
<
THD
*>
(
extra
);
return
thd_kill
ed
(
thd
)
!=
0
;
return
thd_kill
_level
(
thd
)
!=
0
;
}
...
...
storage/tokudb/tokudb_information_schema.cc
View file @
021f78f6
...
...
@@ -87,7 +87,7 @@ int trx_callback(
uint64_t
tnow
=
(
uint64_t
)
::
time
(
NULL
);
table
->
field
[
2
]
->
store
(
tnow
>=
start_time
?
tnow
-
start_time
:
0
,
false
);
int
error
=
schema_table_store_record
(
thd
,
table
);
if
(
!
error
&&
thd_kill
ed
(
thd
))
if
(
!
error
&&
thd_kill
_level
(
thd
))
error
=
ER_QUERY_INTERRUPTED
;
return
error
;
}
...
...
@@ -221,7 +221,7 @@ int lock_waits_callback(
int
error
=
schema_table_store_record
(
thd
,
table
);
if
(
!
error
&&
thd_kill
ed
(
thd
))
if
(
!
error
&&
thd_kill
_level
(
thd
))
error
=
ER_QUERY_INTERRUPTED
;
return
error
;
...
...
@@ -365,7 +365,7 @@ int locks_callback(
error
=
schema_table_store_record
(
thd
,
table
);
if
(
!
error
&&
thd_kill
ed
(
thd
))
if
(
!
error
&&
thd_kill
_level
(
thd
))
error
=
ER_QUERY_INTERRUPTED
;
}
return
error
;
...
...
@@ -497,7 +497,7 @@ int report_file_map(TABLE* table, THD* thd) {
error
=
schema_table_store_record
(
thd
,
table
);
}
if
(
!
error
&&
thd_kill
ed
(
thd
))
if
(
!
error
&&
thd_kill
_level
(
thd
))
error
=
ER_QUERY_INTERRUPTED
;
}
if
(
error
==
DB_NOTFOUND
)
{
...
...
@@ -702,7 +702,7 @@ int report_fractal_tree_info(TABLE* table, THD* thd) {
if
(
error
)
error
=
0
;
// ignore read uncommitted errors
}
if
(
!
error
&&
thd_kill
ed
(
thd
))
if
(
!
error
&&
thd_kill
_level
(
thd
))
error
=
ER_QUERY_INTERRUPTED
;
}
if
(
error
==
DB_NOTFOUND
)
{
...
...
@@ -993,7 +993,7 @@ int report_fractal_tree_block_map(TABLE* table, THD* thd) {
table
,
thd
);
}
if
(
!
error
&&
thd_kill
ed
(
thd
))
if
(
!
error
&&
thd_kill
_level
(
thd
))
error
=
ER_QUERY_INTERRUPTED
;
}
if
(
error
==
DB_NOTFOUND
)
{
...
...
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