diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2021-10-24 20:31:08 +0300 |
---|---|---|
committer | Sergei Petrunia <psergey@askmonty.org> | 2022-01-19 18:10:11 +0300 |
commit | ac0194bd0e6c0d3a8320606461753e0648bd2596 (patch) | |
tree | 44bb593577d9549480ecd3785c3a69a213ee9ad3 /sql/opt_histogram_json.cc | |
parent | 05877df472fa95cab763dfb1299e81681a12da73 (diff) | |
download | mariadb-git-ac0194bd0e6c0d3a8320606461753e0648bd2596.tar.gz |
MDEV-26892: JSON histograms become invalid with a specific (corrupt) value ..
Handle the case where the last value in the table cannot be represented
in utf8mb4.
Diffstat (limited to 'sql/opt_histogram_json.cc')
-rw-r--r-- | sql/opt_histogram_json.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/opt_histogram_json.cc b/sql/opt_histogram_json.cc index 89af9fe3c3f..44b058761a4 100644 --- a/sql/opt_histogram_json.cc +++ b/sql/opt_histogram_json.cc @@ -326,7 +326,10 @@ public: { // This is the final value group. if (!bucket_is_empty()) - finalize_bucket_with_end_value(elem); + { + if (finalize_bucket_with_end_value(elem)) + return 1; + } } return 0; } |