Commit 1e28cffa authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

[t:2727],[t:2728], make commit progress indicator more clear, have proper...

[t:2727],[t:2728], make commit progress indicator more clear, have proper error show up when process is killed during loader->close

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@21077 c7de825b-a66e-492c-adef-691d508d4ae1
parent 160ebcde
...@@ -2916,7 +2916,12 @@ int ha_tokudb::end_bulk_insert() { ...@@ -2916,7 +2916,12 @@ int ha_tokudb::end_bulk_insert() {
if (!abort_loader && !thd->killed) { if (!abort_loader && !thd->killed) {
error = loader->close(loader); error = loader->close(loader);
loader = NULL; loader = NULL;
if (error) { goto cleanup; } if (error) {
if (thd->killed) {
my_error(ER_QUERY_INTERRUPTED, MYF(0));
}
goto cleanup;
}
for (uint i = 0; i < table_share->keys; i++) { for (uint i = 0; i < table_share->keys; i++) {
if (table_share->key_info[i].flags & HA_NOSAME) { if (table_share->key_info[i].flags & HA_NOSAME) {
......
...@@ -517,22 +517,44 @@ void txn_progress_func(TOKU_TXN_PROGRESS progress, void* extra) { ...@@ -517,22 +517,44 @@ void txn_progress_func(TOKU_TXN_PROGRESS progress, void* extra) {
TXN_PROGRESS_INFO progress_info = (TXN_PROGRESS_INFO)extra; TXN_PROGRESS_INFO progress_info = (TXN_PROGRESS_INFO)extra;
int r; int r;
if (progress->stalled_on_checkpoint) { if (progress->stalled_on_checkpoint) {
r = sprintf( if (progress->is_commit) {
progress_info->status, r = sprintf(
"Writing committed changes to disk, processed %"PRId64" out of %"PRId64, progress_info->status,
progress->entries_processed, "Writing committed changes to disk, processing commit of transaction, %"PRId64" out of %"PRId64,
progress->entries_total progress->entries_processed,
); progress->entries_total
assert(r >= 0); );
assert(r >= 0);
}
else {
r = sprintf(
progress_info->status,
"Writing committed changes to disk, processing abort of transaction, %"PRId64" out of %"PRId64,
progress->entries_processed,
progress->entries_total
);
assert(r >= 0);
}
} }
else { else {
r = sprintf( if (progress->is_commit) {
progress_info->status, r = sprintf(
"processed %"PRId64" out of %"PRId64, progress_info->status,
progress->entries_processed, "processing commit of transaction, %"PRId64" out of %"PRId64,
progress->entries_total progress->entries_processed,
); progress->entries_total
assert(r >= 0); );
assert(r >= 0);
}
else {
r = sprintf(
progress_info->status,
"processing abort of transaction, %"PRId64" out of %"PRId64,
progress->entries_processed,
progress->entries_total
);
assert(r >= 0);
}
} }
thd_proc_info(progress_info->thd, progress_info->status); thd_proc_info(progress_info->thd, progress_info->status);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment