Skip to content

Commit

Permalink
MDEV-17441 - InnoDB transition to C++11 atomics
Browse files Browse the repository at this point in the history
onlineddl_rowlog_rows transition to Atomic_counter.
  • Loading branch information
Sergey Vojtovich committed Dec 27, 2018
1 parent 4ef481f commit 5cc6b48
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion storage/innobase/include/row0log.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions storage/innobase/row/row0log.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 5cc6b48

Please sign in to comment.