- 19 Jan, 2022 40 commits
-
-
Sergei Petrunia authored
Followup: remove this line from get_column_range_cardinality() set_if_bigger(res, col_stats->get_avg_frequency()); and make sure it is only used with the binary histograms. For JSON histograms, it makes the estimates unnecessarily imprecise.
-
Sergei Petrunia authored
Added a testcase
-
Sergei Petrunia authored
Fix special handling for values that are right next to buckets with ndv=1.
-
Sergei Petrunia authored
-
Sergei Petrunia authored
Fix the code in Histogram_json_hb::range_selectivity that handles special cases: a non-inclusive endpoint hitting a bucket boundary...
-
Sergei Petrunia authored
In read_bucket_endpoint(), handle all possible parser states.
-
Sergei Petrunia authored
Encode such characters in hex.
-
Sergei Petrunia authored
-
Sergei Petrunia authored
Save extra information in the histogram: "target_histogram_size": nnn, "collected_at": "(date and time)", "collected_by": "(server version)",
-
Sergei Petrunia authored
Also report JSON histogram load errors into error log, like it is already done with other histogram/statistics load errors. Add test coverage to see what happens if one upgrades but does NOT run mysql_upgrade.
-
Sergei Petrunia authored
-
Sergei Petrunia authored
Previous JSON parser was using an API which made the parsing inefficient: the same JSON contents was parsed again and again. Switch to using a lower-level parsing API which allows to do parsing in an efficient way.
-
Sergei Petrunia authored
-
Sergei Petrunia authored
- Make Histogram_json_hb::range_selectivity handle singleton buckets specially when computing selectivity of the max. endpoint bound. (for min. endpoint, we already do that). - Also, fixed comments for Histogram_json_hb::find_bucket
-
Sergei Petrunia authored
When loading the histogram, use table->field[N], not table->s->field[N]. When we used the latter we would corrupt the fields's default value. One of the consequences of that would be that AUTO_INCREMENT fields would stop working correctly.
-
Sergei Petrunia authored
Handle the case where the last value in the table cannot be represented in utf8mb4.
-
Sergei Petrunia authored
.. for non-existent values. Handle this special case.
-
Sergei Petrunia authored
Fix a bug in position_in_interval(). Do not overwrite one interval endpoint with another.
-
Sergei Petrunia authored
The problem was introduced in fix for MDEV-26724. That patch has made it possible for histogram collection to fail. In particular, it fails for non-assigned characters. When histogram construction fails, we also abort the computation of COUNT(DISTINCT). When we try to use the value, we get valgrind failures. Switched the code to abort the statistics collection in this case.
-
Sergei Petrunia authored
When computing bucket_capacity= records/histogram->get_width(), round the value UP, not down.
-
Sergei Petrunia authored
Part#3: - make json_escape() return different errors on conversion error and on out-of-space condition. - Make histogram code handle conversion errors.
-
Sergei Petrunia authored
-
Sergei Petrunia authored
Fix the description
-
Sergei Petrunia authored
Change it to LONGBLOB. Also, update_statistics_for_table() should not "swallow" an error from open_stat_tables.
-
Sergei Petrunia authored
.. part#2: correctly pass the charset to JSON [un]escape functions
-
Sergei Petrunia authored
MDEV-26595: ASAN use-after-poison my_strnxfrm_simple_internal / Histogram_json_hb::range_selectivity Add testcase
-
Sergei Petrunia authored
Item_func_decode_histogram::val_str should correctly set null_value when "decoding" JSON histogram.
-
Sergei Petrunia authored
Correctly handle empty string when [un]escaping JSON
-
Sergei Petrunia authored
Escape values when serializing to JSON. Un-escape when reading back.
-
Sergei Petrunia authored
-
Sergei Petrunia authored
Do not put Histogram objects on MEM_ROOT at all
-
Sergei Petrunia authored
-
Sergei Petrunia authored
Provide buffer of sufficient size.
-
Sergei Petrunia authored
-
Sergei Petrunia authored
-
Sergei Petrunia authored
-
Sergei Petrunia authored
Aslo add more test coverage
-
Sergei Petrunia authored
- Use String::c_ptr_safe() instead of String::c_ptr - Do proper datatype conversions in Histogram_json_hb::parse - Remove Histogram_json_hb::Bucket::end_value. Introduce get_end_value() instead.
-
Sergei Petrunia authored
-
Sergei Petrunia authored
Basic ideas: 1. Store "popular" values in their own buckets. 2. Also store ndv (Number of Distinct Values) in each bucket. Because of #1, the buckets are now variable-size, so store the size in each bucket. Adjust selectivity estimation functions accordingly.
-