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
69756a59
Commit
69756a59
authored
Oct 03, 2014
by
Rich Prohaska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DB-735 use thd_killed
parent
d24fd98e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
17 deletions
+17
-17
storage/tokudb/ha_tokudb.cc
storage/tokudb/ha_tokudb.cc
+6
-6
storage/tokudb/ha_tokudb_admin.cc
storage/tokudb/ha_tokudb_admin.cc
+3
-3
storage/tokudb/hatoku_hton.cc
storage/tokudb/hatoku_hton.cc
+6
-6
storage/tokudb/hatoku_hton.h
storage/tokudb/hatoku_hton.h
+2
-2
No files found.
storage/tokudb/ha_tokudb.cc
View file @
69756a59
...
...
@@ -471,7 +471,7 @@ typedef struct index_read_info {
static
int
ai_poll_fun
(
void
*
extra
,
float
progress
)
{
LOADER_CONTEXT
context
=
(
LOADER_CONTEXT
)
extra
;
if
(
context
->
thd
->
killed
)
{
if
(
thd_killed
(
context
->
thd
)
)
{
sprintf
(
context
->
write_status_msg
,
"The process has been killed, aborting add index."
);
return
ER_ABORTING_CONNECTION
;
}
...
...
@@ -486,7 +486,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
(
context
->
thd
->
killed
)
{
if
(
thd_killed
(
context
->
thd
)
)
{
sprintf
(
context
->
write_status_msg
,
"The process has been killed, aborting bulk load."
);
return
ER_ABORTING_CONNECTION
;
}
...
...
@@ -3316,7 +3316,7 @@ int ha_tokudb::end_bulk_insert(bool abort) {
ai_metadata_update_required
=
false
;
loader_error
=
0
;
if
(
loader
)
{
if
(
!
abort_loader
&&
!
thd
->
killed
)
{
if
(
!
abort_loader
&&
!
thd
_killed
(
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"
);
...
...
@@ -3326,7 +3326,7 @@ int ha_tokudb::end_bulk_insert(bool abort) {
error
=
loader
->
close
(
loader
);
loader
=
NULL
;
if
(
error
)
{
if
(
thd
->
killed
)
{
if
(
thd
_killed
(
thd
)
)
{
my_error
(
ER_QUERY_INTERRUPTED
,
MYF
(
0
));
}
goto
cleanup
;
...
...
@@ -3461,7 +3461,7 @@ int ha_tokudb::is_index_unique(bool* is_unique, DB_TXN* txn, DB* db, KEY* key_in
share
->
rows
,
key_info
->
name
);
thd_proc_info
(
thd
,
status_msg
);
if
(
thd
->
killed
)
{
if
(
thd
_killed
(
thd
)
)
{
my_error
(
ER_QUERY_INTERRUPTED
,
MYF
(
0
));
error
=
ER_QUERY_INTERRUPTED
;
goto
cleanup
;
...
...
@@ -7712,7 +7712,7 @@ int ha_tokudb::tokudb_add_index(
thd_progress_report
(
thd
,
num_processed
,
(
long
long
unsigned
)
share
->
rows
);
#endif
if
(
thd
->
killed
)
{
if
(
thd
_killed
(
thd
)
)
{
error
=
ER_ABORTING_CONNECTION
;
goto
cleanup
;
}
...
...
storage/tokudb/ha_tokudb_admin.cc
View file @
69756a59
...
...
@@ -102,7 +102,7 @@ struct analyze_progress_extra {
static
int
analyze_progress
(
void
*
v_extra
,
uint64_t
rows
)
{
struct
analyze_progress_extra
*
extra
=
(
struct
analyze_progress_extra
*
)
v_extra
;
THD
*
thd
=
extra
->
thd
;
if
(
thd
->
killed
)
if
(
thd
_killed
(
thd
))
return
ER_ABORTING_CONNECTION
;
time_t
t_now
=
time
(
0
);
...
...
@@ -190,7 +190,7 @@ typedef struct hot_optimize_context {
static
int
hot_poll_fun
(
void
*
extra
,
float
progress
)
{
HOT_OPTIMIZE_CONTEXT
context
=
(
HOT_OPTIMIZE_CONTEXT
)
extra
;
if
(
context
->
thd
->
killed
)
{
if
(
thd_killed
(
context
->
thd
)
)
{
sprintf
(
context
->
write_status_msg
,
"The process has been killed, aborting hot optimize."
);
return
ER_ABORTING_CONNECTION
;
}
...
...
@@ -271,7 +271,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
(
context
->
thd
->
killed
)
if
(
thd_killed
(
context
->
thd
)
)
result
=
ER_ABORTING_CONNECTION
;
return
result
;
}
...
...
storage/tokudb/hatoku_hton.cc
View file @
69756a59
...
...
@@ -1522,7 +1522,7 @@ static int tokudb_file_map(TABLE *table, THD *thd) {
error
=
schema_table_store_record
(
thd
,
table
);
}
if
(
!
error
&&
thd
->
killed
)
if
(
!
error
&&
thd
_killed
(
thd
)
)
error
=
ER_QUERY_INTERRUPTED
;
}
if
(
error
==
DB_NOTFOUND
)
{
...
...
@@ -1669,7 +1669,7 @@ static int tokudb_fractal_tree_info(TABLE *table, THD *thd) {
if
(
!
error
)
{
error
=
tokudb_report_fractal_tree_info_for_db
(
&
curr_key
,
&
curr_val
,
table
,
thd
);
}
if
(
!
error
&&
thd
->
killed
)
if
(
!
error
&&
thd
_killed
(
thd
)
)
error
=
ER_QUERY_INTERRUPTED
;
}
if
(
error
==
DB_NOTFOUND
)
{
...
...
@@ -1884,7 +1884,7 @@ static int tokudb_fractal_tree_block_map(TABLE *table, THD *thd) {
if
(
!
error
)
{
error
=
tokudb_report_fractal_tree_block_map_for_db
(
&
curr_key
,
&
curr_val
,
table
,
thd
);
}
if
(
!
error
&&
thd
->
killed
)
if
(
!
error
&&
thd
_killed
(
thd
)
)
error
=
ER_QUERY_INTERRUPTED
;
}
if
(
error
==
DB_NOTFOUND
)
{
...
...
@@ -2054,7 +2054,7 @@ static int tokudb_trx_callback(uint64_t txn_id, uint64_t client_id, iterate_row_
table
->
field
[
0
]
->
store
(
txn_id
,
false
);
table
->
field
[
1
]
->
store
(
client_id
,
false
);
int
error
=
schema_table_store_record
(
thd
,
table
);
if
(
!
error
&&
thd
->
killed
)
if
(
!
error
&&
thd
_killed
(
thd
)
)
error
=
ER_QUERY_INTERRUPTED
;
return
error
;
}
...
...
@@ -2140,7 +2140,7 @@ static int tokudb_lock_waits_callback(DB *db, uint64_t requesting_txnid, const D
int
error
=
schema_table_store_record
(
thd
,
table
);
if
(
!
error
&&
thd
->
killed
)
if
(
!
error
&&
thd
_killed
(
thd
)
)
error
=
ER_QUERY_INTERRUPTED
;
return
error
;
...
...
@@ -2231,7 +2231,7 @@ static int tokudb_locks_callback(uint64_t txn_id, uint64_t client_id, iterate_ro
error
=
schema_table_store_record
(
thd
,
table
);
if
(
!
error
&&
thd
->
killed
)
if
(
!
error
&&
thd
_killed
(
thd
)
)
error
=
ER_QUERY_INTERRUPTED
;
}
return
error
;
...
...
storage/tokudb/hatoku_hton.h
View file @
69756a59
...
...
@@ -481,12 +481,12 @@ static uint64_t tokudb_get_killed_time_callback(uint64_t default_killed_time) {
static
int
tokudb_killed_callback
(
void
)
{
THD
*
thd
=
current_thd
;
return
thd
->
killed
;
return
thd
_killed
(
thd
)
;
}
static
bool
tokudb_killed_thd_callback
(
void
*
extra
)
{
THD
*
thd
=
static_cast
<
THD
*>
(
extra
);
return
thd
->
killed
!=
0
;
return
thd
_killed
(
thd
)
!=
0
;
}
enum
{
...
...
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