summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-12-04 14:45:11 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2019-12-04 15:34:28 +0200
commite5dfdc5606829c092ccc0a13f4e138617e49e0fe (patch)
tree81ae909fca0d6cac5d2ab0da0617181321b939aa
parentbf3034195fc8c7cd3aa3a93c712227e97ee31ea1 (diff)
downloadmariadb-git-e5dfdc5606829c092ccc0a13f4e138617e49e0fe.tar.gz
Cleanup: use constexpr for SRV_UNDO_TABLESPACE_SIZE_IN_PAGES
-rw-r--r--storage/innobase/include/srv0srv.h5
-rw-r--r--storage/innobase/srv/srv0srv.cc4
2 files changed, 3 insertions, 6 deletions
diff --git a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h
index d4556640c23..1d2155bfec7 100644
--- a/storage/innobase/include/srv0srv.h
+++ b/storage/innobase/include/srv0srv.h
@@ -321,8 +321,9 @@ extern my_bool srv_undo_log_truncate;
/* Enables or disables this prefix optimization. Disabled by default. */
extern my_bool srv_prefix_index_cluster_optimization;
-/** Default size of UNDO tablespace while it is created new. */
-extern const ulint SRV_UNDO_TABLESPACE_SIZE_IN_PAGES;
+/** Default size of UNDO tablespace (10MiB for innodb_page_size=16k) */
+constexpr ulint SRV_UNDO_TABLESPACE_SIZE_IN_PAGES= (10U << 20) /
+ UNIV_PAGE_SIZE_DEF;
extern char* srv_log_group_home_dir;
diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc
index 3c93e86c967..5d5023d83af 100644
--- a/storage/innobase/srv/srv0srv.cc
+++ b/storage/innobase/srv/srv0srv.cc
@@ -125,10 +125,6 @@ my_bool srv_undo_log_truncate;
/** Maximum size of undo tablespace. */
unsigned long long srv_max_undo_log_size;
-/** Default undo tablespace size in UNIV_PAGEs count (10MB). */
-const ulint SRV_UNDO_TABLESPACE_SIZE_IN_PAGES =
- ((1024 * 1024) * 10) / UNIV_PAGE_SIZE_DEF;
-
/** Set if InnoDB must operate in read-only mode. We don't do any
recovery and open all tables in RO mode instead of RW mode. We don't
sync the max trx id to disk either. */