Commit graph

15 commits

Author SHA1 Message Date
Igor Babaev
1ae352afbe Fixed bugs mdev-4357 and mdev-4359.
The values of the column HIST_TYPE from the statistical table
mysql.column_stats were stored in the table and read from the
table incorrectly.
2013-04-05 23:48:49 -07:00
Igor Babaev
503731d80f Fixed bug mdev-4371.
Avoid possible division by 0.
2013-04-05 13:01:46 -07:00
Igor Babaev
daaa5834c9 Fixed bug mdev-4370.
Don't try to a histogram if it is not read into the cache for statistical data.
It may happen so if optimizer_use_condition_selectivity is set to 3. This 
setting orders the optimizer not use histograms to calculate selectivity.
2013-04-05 11:24:28 -07:00
Igor Babaev
4079a5dc3f Fixed bug mdev-4366.
When performing the range analysis for a conjunction the function
calculate_cond_selectivity_for_table should take in to account that
the analysis of some conjuncts may return SEL_ARG::IMPOSSIBLE.
2013-04-04 14:11:31 -07:00
Igor Babaev
50d4d1ca18 Fixed bug mdev-4367.
When calculating selectivity of conditions one should take into account
the cases when some tables to be joined are empty.
2013-04-03 23:50:14 -07:00
Igor Babaev
d62ee4e970 Fixed bug mdev-4350.
Wrong formulas used by the function Histogram::point_selectivity()
could result in a negative value of selectivity returned by the
function.
2013-04-03 20:00:10 -07:00
Igor Babaev
915a8ae42c Fixed bug mdev-4349.
Range analysis of the condition for a non-indexed column may
return an impossible range. This must be taken into account.
2013-04-03 00:54:24 -07:00
Igor Babaev
70badba5e0 Fixed bug mdev-4348.
The bug was caused a wrong casting.
2013-04-01 20:49:20 -07:00
Igor Babaev
e370530493 Take into account the number of null values in any used column when
calculating selectivity of conditions.
2013-03-31 23:41:47 -07:00
Igor Babaev
2713bab291 Merge 10.0-base -> mwl253. 2013-03-31 09:10:01 -07:00
Igor Babaev
78bab78395 Merge 2013-03-30 22:00:04 -07:00
Igor Babaev
9e1ca1053b Added the type of histogram for mwl #253.
Introduced double precision height-balanced histograms.
2013-03-30 18:57:07 -07:00
Igor Babaev
9055498634 Fixed several bugs for mwl #253.
One of them is quite serious: the function table_cond_selectivity used
the TABLE_REF structure for ref/eq_ref access methods as if they had been
filled. In  fact these structure are filled after the best execution plan
has been chosen.

The other bugs happened due to:
- an erroneous attempt at get statistics on the result of materialization
  of a view
- incorrect handling of ranges with no left/right limits when calculating
  selectivity of range conditions on non-indexed columns
- lack of cleanup for some newly introduced fields
2013-03-30 15:37:21 -07:00
Igor Babaev
1009832c13 Added histogams for table columns. 2013-03-25 23:48:29 -07:00
Igor Babaev
fc1c8ffdad The pilot patch for mwl#253. 2013-03-11 07:44:24 -07:00