| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Uninitialized field next_equal_field of the Field objects created
for the fields of a temporary table could hang the server.
|
|
|
|
|
| |
Uninitialized field cond_selectivity of the Field objects created
for the fields of a temporary table could cause an assertion abort.
|
|
|
|
|
|
| |
When calculating the selectivity of a range in the function
get_column_range_cardinality a check whether NULL values are
included into into the range must be done.
|
|
|
|
|
|
|
|
|
|
|
| |
The function was adjusted to be able to aggregate
the counters of the merged elements.
Before this change it was not possible to guarantee the correctness
of the counters passed to the the call-back parameter walk_action.
As a result, when some elements of a Unique object were flushed into
disk the function passed to merge_walk() as the call-back parameter
could return wrong counters of elements. This could lead to building
wrong histograms.
|
|
|
|
|
| |
Range analysis of non-indexed columns should handle properly range trees
with type == SEL_TREE::MAYBE.
|
|
|
|
| |
Valgrind complained on usage of uninitialized memory.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Avoid possible division by 0.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
When calculating selectivity of conditions one should take into account
the cases when some tables to be joined are empty.
|
|
|
|
|
|
| |
Wrong formulas used by the function Histogram::point_selectivity()
could result in a negative value of selectivity returned by the
function.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
mysqltest: At line 477: query 'show explain for $thr2' failed: 1933: Target is not running an EXPLAINable command
After the fix for MDEV-4144, subquery with WHERE pk= (select ...) became a degenerate, constant
SELECT. It is not executed in normal way anymore, so it is not possible to catch it in-execution.
|
| |
| |
| |
| |
| | |
Range analysis of the condition for a non-indexed column may
return an impossible range. This must be taken into account.
|
| |
| |
| |
| | |
The bug was caused a wrong casting.
|
|\ \
| |/ |
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Analysis:
The reason for the inefficent plan was that Item_subselect::is_expensive()
didn't detect the special case when a subquery was optimized, but had no
join plan because it either has no table, or its tables have been optimized
away, or the optimizer detected that the result set is empty.
Solution:
Identify the special cases above in the Item_subselect::is_expensive(),
and consider such degenerate subqueries inexpensive.
|
| | |\ |
|
| | | |\ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
In some cases, when using views the optimizer incorrectly determined
possible join orders for queries with nested outer and inner joins.
This could lead to invalid execution plans for such queries.
|
| | |\ \ \ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This bug was introduced by the patch for WL#3220.
If the memory allocated for the tree to store unique elements
to be counted is not big enough to include all of them then
an external file is used to store the elements.
The unique elements are guaranteed not to be nulls. So, when
reading them from the file we don't have to care about the null
flags of the read values. However, we should remove the flag
at the very beginning of the process. If we don't do it and
if the last value written into the record buffer for the field
whose distinct values needs to be counted happens to be null,
then all values read from the file are considered to be nulls
and are not counted in.
The fix does not remove a possible null flag for the read values.
Rather it just counts the values in the same way it was done
before WL #3220.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
calculating selectivity of conditions.
|
| | | | | | |
|
|\ \ \ \ \ \
| |/ / / / / |
|
| |\ \ \ \ \
| | |/ / / / |
|
| | |\ \ \ \
| | | | |/ /
| | | |/| | |
|
| | | |\ \ \ |
|
| | | | |\ \ \ |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
MultiPoint.
Need to check if the number of points is 0 for the polygon.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Forgotten DBUG_ASSERT should be replaced with the 'return error'.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Item_default_value inherited form Item_field so should create temporary table field similary.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Additional fixes for possible overflows in length-related
calculations in 'spatial' implementations.
Checks added to the ::get_data_size() methods.
max_n_points decreased to occupy less 2G size. An
object of that size is practically inoperable anyway.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
GROUP BY
Item_func_make_set wasn't taking into account the first argument when
calculating maybe_null.
sql/item_strfunc.cc:
rewrite Item_func_make_set, removing separate storage of the first argument
sql/item_strfunc.h:
rewrite Item_func_make_set, removing separate storage of the first argument
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The bug was found by Alyssa Milburn.
If the number of points of a geometry feature read from
binary representation is greater than 0x10000000, then
the (uint32) (num_points * 16) will cut the higher byte,
which leads to various errors.
Fixed by additional check if (num_points > max_n_points).
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Fixed printing column_get finction.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The Geometry::get_mbr() function can return an error on
a bad data. We have to check for that and act respectively.
|
| | | |\ \ \ \ \
| | | | |_|_|_|/
| | | |/| | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
- Set MI_INFO::external_ref for MyISAM tables that are parts of myisamMRG table.
|
| | | |/ / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
uninitialised value) in remove_eq_conds on time functions with NULL argument
val_int() is expected to return 0 for NULL's
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
with decimals=NOT_FIXED_DEC it is possible to have 'decimals' larger
than 'max_length', it's not an error for temporal functions.
But when Item_func_numhybrid converts the value to DECIMAL_RESULT,
it must limit 'decimals' to be a valid scale of a decimal number.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
AVG() returns a double, its max_length is reasonably
limited by a double number length, even if the argument
is many Kbytes long.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
on CASE with different return types, GROUP_CONCAT, GROUP BY
Fix Item::get_date() to mark the item NULL when returning an error.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Extend plugin auth api to support up to 512 bytes in the user names.
Use the API versioning to support old auth plugins too!
|
| | | | | | | |
|
| | | | | | | |
|
| | | |_|_|/
| | |/| | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Flip the switch and create Item_cache based on the argument's cmp_type, not argument's result_type().
Fix subselect_engine to calculate cmp_type correctly
sql/item_subselect.h:
mdev:4284
|