From 524322ad3efdd5d27d3c321dfa7ba17234d9a98a Mon Sep 17 00:00:00 2001 From: Michael Okoko Date: Wed, 7 Jul 2021 22:45:43 +0100 Subject: [PATCH] Properly initialize bucket bounds vector Signed-off-by: Michael Okoko --- sql/sql_statistics.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/sql_statistics.cc b/sql/sql_statistics.cc index 85ee5a90609..56e20ecf48e 100644 --- a/sql/sql_statistics.cc +++ b/sql/sql_statistics.cc @@ -35,6 +35,7 @@ #include "my_json_writer.h" #include +#include /* The system variable 'use_stat_tables' can take one of the @@ -1595,7 +1596,7 @@ public: class Histogram_builder_json : public Histogram_builder { -std::vector bucket_bounds; +std::vector bucket_bounds = {}; public: Histogram_builder_json(Field *col, uint col_len, ha_rows rows) @@ -1611,7 +1612,6 @@ public: count= 0; count_distinct= 0; count_distinct_single_occurence= 0; - bucket_bounds = {}; } ~Histogram_builder_json() override = default;