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() {
if (!abort_loader && !thd->killed) {
error = loader->close(loader);
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++) {
if (table_share->key_info[i].flags & HA_NOSAME) {
......
......@@ -517,9 +517,10 @@ void txn_progress_func(TOKU_TXN_PROGRESS progress, void* extra) {
TXN_PROGRESS_INFO progress_info = (TXN_PROGRESS_INFO)extra;
int r;
if (progress->stalled_on_checkpoint) {
if (progress->is_commit) {
r = sprintf(
progress_info->status,
"Writing committed changes to disk, processed %"PRId64" out of %"PRId64,
"Writing committed changes to disk, processing commit of transaction, %"PRId64" out of %"PRId64,
progress->entries_processed,
progress->entries_total
);
......@@ -528,12 +529,33 @@ void txn_progress_func(TOKU_TXN_PROGRESS progress, void* extra) {
else {
r = sprintf(
progress_info->status,
"processed %"PRId64" out of %"PRId64,
"Writing committed changes to disk, processing abort of transaction, %"PRId64" out of %"PRId64,
progress->entries_processed,
progress->entries_total
);
assert(r >= 0);
}
}
else {
if (progress->is_commit) {
r = sprintf(
progress_info->status,
"processing commit of transaction, %"PRId64" out of %"PRId64,
progress->entries_processed,
progress->entries_total
);
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);
}
......
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