mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-6442: Assertion `join->best_read < double(...)' failed with optimizer_use_condition_selectivity >=3
- Fix the crash by making get_column_range_cardinality() to handle the special case where Column_stats objects is an all-zeros object (the question of what is the point of having Field::read_stats point to such object remains a mystery) - Added a few comments. Learning the code still.
This commit is contained in:
@ -280,7 +280,14 @@ public:
|
||||
};
|
||||
|
||||
|
||||
/* Statistical data on a column */
|
||||
/*
|
||||
Statistical data on a column
|
||||
|
||||
Note: objects of this class may be "empty", where they have almost all fields
|
||||
as zeros, for example, get_avg_frequency() will return 0.
|
||||
|
||||
objects are allocated in alloc_statistics_for_table[_share].
|
||||
*/
|
||||
|
||||
class Column_statistics
|
||||
{
|
||||
@ -296,7 +303,8 @@ public:
|
||||
are available for the column
|
||||
*/
|
||||
uint32 column_stat_nulls;
|
||||
|
||||
|
||||
/* For the below two, see comments in get_column_range_cardinality() */
|
||||
/* Minimum value for the column */
|
||||
Field *min_value;
|
||||
/* Maximum value for the column */
|
||||
|
Reference in New Issue
Block a user