Commit 5cc6b48f authored by Sergey Vojtovich's avatar Sergey Vojtovich

MDEV-17441 - InnoDB transition to C++11 atomics

onlineddl_rowlog_rows transition to Atomic_counter.
parent 4ef481f5
......@@ -36,7 +36,7 @@ Created 2011-05-26 Marko Makela
class ut_stage_alter_t;
extern ulint onlineddl_rowlog_rows;
extern Atomic_counter<ulint> onlineddl_rowlog_rows;
extern ulint onlineddl_rowlog_pct_used;
extern ulint onlineddl_pct_progress;
......
......@@ -42,7 +42,7 @@ Created 2011-05-26 Marko Makela
#include <algorithm>
#include <map>
ulint onlineddl_rowlog_rows;
Atomic_counter<ulint> onlineddl_rowlog_rows;
ulint onlineddl_rowlog_pct_used;
ulint onlineddl_pct_progress;
......@@ -605,7 +605,7 @@ row_log_table_close_func(
err_exit:
mutex_exit(&log->mutex);
my_atomic_addlint(&onlineddl_rowlog_rows, 1);
onlineddl_rowlog_rows++;
/* 10000 means 100.00%, 4525 means 45.25% */
onlineddl_rowlog_pct_used = static_cast<ulint>((log->tail.total * 10000) / srv_online_max_size);
}
......
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