From 74a873d0b6110377938728576792ab44ccc5a5b3 Mon Sep 17 00:00:00 2001 From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> Date: Thu, 5 Mar 2020 00:13:22 +0100 Subject: [PATCH] box: fail in box_check_config() on bad sql cache size It was calling box_check_sql_cache_size() assuming that it throws. But it returns 0/-1. Reviewed-by: Igor Munkin <imun@tarantool.org> Reviewed-by: Nikita Pettik <korablev@tarantool.org> --- src/box/box.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/box/box.cc b/src/box/box.cc index a5052dba4b..e8539847f5 100644 --- a/src/box/box.cc +++ b/src/box/box.cc @@ -669,7 +669,8 @@ box_check_config() box_check_memtx_memory(cfg_geti64("memtx_memory")); box_check_memtx_min_tuple_size(cfg_geti64("memtx_min_tuple_size")); box_check_vinyl_options(); - box_check_sql_cache_size(cfg_geti("sql_cache_size")); + if (box_check_sql_cache_size(cfg_geti("sql_cache_size")) != 0) + diag_raise(); } /* -- GitLab