summaryrefslogtreecommitdiff
path: root/mysql-test
Commit message (Collapse)AuthorAgeFilesLines
* Fixed mdev-4380.Igor Babaev2013-04-083-0/+80
| | | | | | | | Uninitialized field next_equal_field of the Field objects created for the fields of a temporary table could hang the server.
* Fixed mdev-4378.Igor Babaev2013-04-083-0/+93
| | | | | Uninitialized field cond_selectivity of the Field objects created for the fields of a temporary table could cause an assertion abort.
* Fixed bug mdev-4363.Igor Babaev2013-04-063-3/+115
| | | | | | 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.
* Fixed bug mdev-4369.Igor Babaev2013-04-062-0/+82
| | | | | | | | | | | 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.
* Fixed bug mdev-4372.Igor Babaev2013-04-063-0/+83
| | | | | Range analysis of non-indexed columns should handle properly range trees with type == SEL_TREE::MAYBE.
* Fixed bug mdev-4373:Igor Babaev2013-04-063-0/+57
| | | | Valgrind complained on usage of uninitialized memory.
* Fixed bugs mdev-4357 and mdev-4359.Igor Babaev2013-04-055-26/+117
| | | | | | 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.
* Fixed bug mdev-4371.Igor Babaev2013-04-053-0/+90
| | | | Avoid possible division by 0.
* Fixed bug mdev-4370.Igor Babaev2013-04-053-0/+83
| | | | | | 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.
* Fixed bug mdev-4366.Igor Babaev2013-04-043-6/+93
| | | | | | 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.
* Fixed bug mdev-4367.Igor Babaev2013-04-033-0/+50
| | | | | When calculating selectivity of conditions one should take into account the cases when some tables to be joined are empty.
* Fixed bug mdev-4350.Igor Babaev2013-04-033-12/+115
| | | | | | Wrong formulas used by the function Histogram::point_selectivity() could result in a negative value of selectivity returned by the function.
* Merge 10.0-base->maria-10.0-mwl243.Igor Babaev2013-04-032-4/+4
|\
| * Fix buildbot failure in show_explain.test:Sergey Petrunya2013-04-022-4/+4
| | | | | | | | | | | | | | | | 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.
* | Fixed bug mdev-4349.Igor Babaev2013-04-033-0/+116
| | | | | | | | | | Range analysis of the condition for a non-indexed column may return an impossible range. This must be taken into account.
* | Fixed bug mdev-4348.Igor Babaev2013-04-013-0/+87
| | | | | | | | The bug was caused a wrong casting.
* | MergeIgor Babaev2013-04-0116-36/+686
|\ \ | |/
| * Merge 5.5->10.0-baseIgor Babaev2013-03-3116-36/+686
| |\
| | * Fix for MDEV-4144unknown2013-03-2910-30/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * Merge 5.3->5.5.Igor Babaev2013-03-282-1/+498
| | |\
| | | * Merge.Igor Babaev2013-03-272-1/+498
| | | |\
| | | | * Fixed bug mdev-4318.Igor Babaev2013-03-222-1/+498
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * | | MergeIgor Babaev2013-03-273-1/+127
| | |\ \ \
| | | * | | Fixed bug mdev-4311 (bug #68749).Igor Babaev2013-03-273-1/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | Take into account the number of null values in any used column whenIgor Babaev2013-03-313-10/+84
| | | | | | | | | | | | | | | | | | | | | | | | calculating selectivity of conditions.
* | | | | | Fixed a valgrind complain on usage of an uninitialized value. Igor Babaev2013-03-311-0/+7
| | | | | |
* | | | | | Merge 10.0-base -> mwl253.Igor Babaev2013-03-31349-2659/+5922
|\ \ \ \ \ \ | |/ / / / /
| * | | | | 5.5 mergeSergei Golubchik2013-03-27333-2589/+5757
| |\ \ \ \ \ | | |/ / / /
| | * | | | 5.3 mergeSergei Golubchik2013-03-2724-142/+732
| | |\ \ \ \ | | | | |/ / | | | |/| |
| | | * | | 5.2 mergeSergei Golubchik2013-03-266-2/+89
| | | |\ \ \
| | | | * \ \ 5.1 mergeSergei Golubchik2013-03-266-2/+89
| | | | |\ \ \
| | | | | * | | MDEV-4295 Server crashes in get_point on a query with Area, AsBinary, ↵Alexey Botchkov2013-03-192-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MultiPoint. Need to check if the number of points is 0 for the polygon.
| | | | | * | | MDEV-4296 Assertion `n_linear_rings > 0' fails in Gis_polygon::centroid_xy.Alexey Botchkov2013-03-192-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Forgotten DBUG_ASSERT should be replaced with the 'return error'.
| | | | | * | | MDEV-4269 fix.unknown2013-03-182-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Item_default_value inherited form Item_field so should create temporary table field similary.
| | | | | * | | MDEV-4252 geometry query crashes server.Alexey Botchkov2013-03-182-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | | | | * | | MDEV-4289 Assertion `0' fails in make_sortkey with GROUP_CONCAT, MAKE_SET, ↵Sergei Golubchik2013-03-182-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | | | | * | | MDEV-4252 geometry query crashes server.Alexey Botchkov2013-03-102-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
| | | * | | | | MDEV-4292 fix.unknown2013-03-262-10/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed printing column_get finction.
| | | * | | | | MDEV-4310 geometry function equals hangs forever.Alexey Botchkov2013-03-222-12/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Geometry::get_mbr() function can return an error on a bad data. We have to check for that and act respectively.
| | | * | | | | MergeSergey Petrunya2013-03-212-0/+165
| | | |\ \ \ \ \ | | | | |_|_|_|/ | | | |/| | | |
| | | | * | | | MDEV-4277: Crash inside mi_killed_in_mariadb() with myisammrgSergey Petrunya2013-03-212-0/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Set MI_INFO::external_ref for MyISAM tables that are parts of myisamMRG table.
| | | * | | | | MDEV-4293 Valgrind warnings (Conditional jump or move depends on ↵Sergei Golubchik2013-03-202-0/+22
| | | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | uninitialised value) in remove_eq_conds on time functions with NULL argument val_int() is expected to return 0 for NULL's
| | | * | | | MDEV-4283 Assertion `scale <= precision' fails in strings/decimal.cSergei Golubchik2013-03-182-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | | * | | | MDEV-4286 Server crashes in Protocol_text::store, stack smashing detectedSergei Golubchik2013-03-172-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AVG() returns a double, its max_length is reasonably limited by a double number length, even if the argument is many Kbytes long.
| | | * | | | MDEV-4281 Assertion `maybe_null && item->null_value' fails in make_sortkey ↵Sergei Golubchik2013-03-178-20/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | on CASE with different return types, GROUP_CONCAT, GROUP BY Fix Item::get_date() to mark the item NULL when returning an error.
| | * | | | | MDEV-4307 Support at least 48 utf8 characters in username in server and PAMSergei Golubchik2013-03-262-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend plugin auth api to support up to 512 bytes in the user names. Use the API versioning to support old auth plugins too!
| | * | | | | fix @@external_user variableSergei Golubchik2013-03-263-5/+5
| | | | | | |
| | * | | | | fixes for windowsSergei Golubchik2013-03-252-2/+4
| | | | | | |
| | * | | | | MDEV-249 QUERY CACHE INFORMATIONSergei Golubchik2013-03-207-2/+80
| | | |_|_|/ | | |/| | |
| | * | | | MDEV-4284 Assertion `cmp_items[(uint)cmp_type]' fails in sql/item_cmpfunc.ccSergei Golubchik2013-03-173-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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