Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | MDEV-28882: Assertion `tmp >= 0' failed in best_access_path | Sergei Petrunia | 2022-06-22 | 1 | -1/+20 |
| | | | | | | | | | | Histogram_json_hb::range_selectivity() may return small negative numbers due to rounding errors in the histogram. Make sure the returned value is non-negative. Add an assert to catch negative values that are not small. (attempt #2) | ||||
* | Fix JSON statistics time format and added tests for it and server version.mariadb-10.8.1 | Oleksandr Byelkin | 2022-02-07 | 1 | -14/+5 |
| | |||||
* | MDEV-27229 fixup: GCC -Wunused-function | Marko Mäkelä | 2022-01-25 | 1 | -0/+2 |
| | |||||
* | MDEV-26519 fixup: GCC 11 -Og -Wmaybe-uninitialized | Marko Mäkelä | 2022-01-20 | 1 | -2/+2 |
| | | | | | | GCC does not understand that the variable have_ndv determines whether the variable ndv_ll is initialized. Let us add a redundant initialization to pacify GCC. | ||||
* | Code cleanup | Sergei Petrunia | 2022-01-19 | 1 | -1/+1 |
| | |||||
* | JSON_HB histogram: represent values of BIT() columns in hex always | Sergei Petrunia | 2022-01-19 | 1 | -5/+17 |
| | |||||
* | MDEV-26901: Estimation for filtered rows less precise ... #4 | Sergei Petrunia | 2022-01-19 | 1 | -1/+1 |
| | | | | | | | | | | | In Histogram_json_hb::point_selectivity(), do return selectivity of 0.0 when the histogram says so. The logic of "Do not return 0.0 estimate as it causes a multiply-by-zero meltdown in cost and cardinality calculations" is moved into records_in_column_ranges() where it is one *once* per column pair (as opposed to doing once per range, which can cause the error to add-up to large number when there are many ranges) | ||||
* | MDEV-27229: Estimation for filtered rows less precise ... #5 | Sergei Petrunia | 2022-01-19 | 1 | -1/+1 |
| | | | | | | | | | 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. | ||||
* | MDEV-27229: Estimation for filtered rows less precise ... #5 | Sergei Petrunia | 2022-01-19 | 1 | -51/+88 |
| | | | | Fix special handling for values that are right next to buckets with ndv=1. | ||||
* | MDEV-27230: Estimation for filtered rows less precise ... | Sergei Petrunia | 2022-01-19 | 1 | -0/+1 |
| | | | | | Fix the code in Histogram_json_hb::range_selectivity that handles special cases: a non-inclusive endpoint hitting a bucket boundary... | ||||
* | MDEV-27203: Valgrind / MSAN errors in Histogram_json_hb::parse_bucket | Sergei Petrunia | 2022-01-19 | 1 | -0/+7 |
| | | | | In read_bucket_endpoint(), handle all possible parser states. | ||||
* | MDEV-26764: JSON_HB Histograms: handle BINARY and unassigned characters | Sergei Petrunia | 2022-01-19 | 1 | -17/+83 |
| | | | | Encode such characters in hex. | ||||
* | More test coverage | Sergei Petrunia | 2022-01-19 | 1 | -2/+0 |
| | |||||
* | MDEV-26519: Improved histograms | Sergei Petrunia | 2022-01-19 | 1 | -27/+87 |
| | | | | | | | | Save extra information in the histogram: "target_histogram_size": nnn, "collected_at": "(date and time)", "collected_by": "(server version)", | ||||
* | MDEV-26519: Improved histograms: Better error reporting, test coverage | Sergei Petrunia | 2022-01-19 | 1 | -0/+4 |
| | | | | | | | | 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. | ||||
* | Rename histogram_hb_v2 -> histogram_hb | Sergei Petrunia | 2022-01-19 | 1 | -2/+2 |
| | |||||
* | MDEV-26519: Improved histograms: Make JSON parser efficient | Sergei Petrunia | 2022-01-19 | 1 | -154/+300 |
| | | | | | | | | 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. | ||||
* | MDEV-27062: Make histogram_type=JSON_HB the new default | Sergei Petrunia | 2022-01-19 | 1 | -1/+1 |
| | |||||
* | MDEV-26886: Estimation for filtered rows less precise with JSON histogram | Sergei Petrunia | 2022-01-19 | 1 | -28/+44 |
| | | | | | | | | - 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 | ||||
* | MDEV-26892: JSON histograms become invalid with a specific (corrupt) value .. | Sergei Petrunia | 2022-01-19 | 1 | -1/+4 |
| | | | | | Handle the case where the last value in the table cannot be represented in utf8mb4. | ||||
* | MDEV-26849: JSON Histograms: point selectivity estimates are off | Sergei Petrunia | 2022-01-19 | 1 | -4/+6 |
| | | | | | | .. for non-existent values. Handle this special case. | ||||
* | MDEV-26750: Estimation for filtered rows is far off with JSON_HB histogram | Sergei Petrunia | 2022-01-19 | 1 | -6/+19 |
| | | | | | Fix a bug in position_in_interval(). Do not overwrite one interval endpoint with another. | ||||
* | MDEV-26709: JSON histogram may contain bucketS than histogram_size allows | Sergei Petrunia | 2022-01-19 | 1 | -2/+9 |
| | | | | | When computing bucket_capacity= records/histogram->get_width(), round the value UP, not down. | ||||
* | MDEV-26724 Endless loop in json_escape_to_string upon ... empty string | Sergei Petrunia | 2022-01-19 | 1 | -1/+4 |
| | | | | | | | Part#3: - make json_escape() return different errors on conversion error and on out-of-space condition. - Make histogram code handle conversion errors. | ||||
* | MDEV-26724 Endless loop in json_escape_to_string upon ... empty string | Sergei Petrunia | 2022-01-19 | 1 | -7/+9 |
| | | | | .. part#2: correctly pass the charset to JSON [un]escape functions | ||||
* | MDEV-26724 Endless loop in json_escape_to_string upon ... empty string | Sergei Petrunia | 2022-01-19 | 1 | -2/+2 |
| | | | | Correctly handle empty string when [un]escaping JSON | ||||
* | MDEV-26711: Values in JSON histograms are not properly quoted | Sergei Petrunia | 2022-01-19 | 1 | -18/+134 |
| | | | | Escape values when serializing to JSON. Un-escape when reading back. | ||||
* | Use JSON_NAME, not the "histogram_hb_v2" constant | Sergei Petrunia | 2022-01-19 | 1 | -1/+1 |
| | |||||
* | Fix off-by-one error in Histogram_json_hb::find_bucket | Sergei Petrunia | 2022-01-19 | 1 | -9/+67 |
| | |||||
* | MDEV-26590: Stack smashing/buffer overflow in Histogram_json_hb::parse | Sergei Petrunia | 2022-01-19 | 1 | -7/+9 |
| | | | | Provide buffer of sufficient size. | ||||
* | Address review input | Sergei Petrunia | 2022-01-19 | 1 | -1/+4 |
| | |||||
* | Fix the previous cset: next() should have element_count as parameter | Sergei Petrunia | 2022-01-19 | 1 | -1/+1 |
| | |||||
* | Fix compile warnings/error on Windows | Sergei Petrunia | 2022-01-19 | 1 | -3/+3 |
| | |||||
* | Fixes in opt_histogram_json.cc in the last commits | Sergei Petrunia | 2022-01-19 | 1 | -21/+56 |
| | | | | Aslo add more test coverage | ||||
* | Fix compile error on windows | Sergei Petrunia | 2022-01-19 | 1 | -1/+1 |
| | |||||
* | MDEV-26519: JSON Histograms: improve histogram collection | Sergei Petrunia | 2022-01-19 | 1 | -130/+323 |
| | | | | | | | | | | | 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. | ||||
* | Fix compilation on windows | Sergei Petrunia | 2022-01-19 | 1 | -2/+2 |
| | |||||
* | Correctly decode string field values for pos_in_interval_for_string call | Sergei Petrunia | 2022-01-19 | 1 | -17/+30 |
| | |||||
* | Fix compilation on windows part #3 | Sergei Petrunia | 2022-01-19 | 1 | -1/+1 |
| | |||||
* | More code cleanups | Sergei Petrunia | 2022-01-19 | 1 | -1/+1 |
| | | | | | Remove Histogram_*::is_available(), it is not applicable anymore. Fix compilation on Windows | ||||
* | Move JSON histograms code into its own files | Sergei Petrunia | 2022-01-19 | 1 | -0/+391 |