summaryrefslogtreecommitdiff
path: root/mysql-test/main/select_pkeycache.result
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.5 into 10.6Marko Mäkelä2023-04-111-1/+1
|\
| * Merge remote-tracking branch '10.4' into 10.5Oleksandr Byelkin2023-03-311-1/+1
| |\
| | * MDEV-30218 Incorrect optimization for rowid_filteringIgor Babaev2023-02-151-1/+1
| | | | | | | | | | | | Correction over the last patch for this MDEV.
* | | Merge branch '10.5' into 10.6Oleksandr Byelkin2023-01-311-4/+60
|\ \ \ | |/ /
| * | Merge branch '10.4' into 10.5Oleksandr Byelkin2023-01-271-4/+60
| |\ \ | | |/
| | * MDEV-29294 Assertion `functype() == ((Item_cond *) new_item)->functype()' ↵Oleg Smirnov2023-01-201-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | failed in Item_cond::remove_eq_conds on SELECT Item_singlerow_subselect may be converted to Item_cond during optimization. So there is a possibility of constructing nested Item_cond_and or Item_cond_or which is not allowed (such conditions must be flattened). This commit checks if such kind of optimization has been applied and flattens the condition if needed
* | | Merge 10.5 into 10.6Marko Mäkelä2023-01-031-4/+4
|\ \ \ | |/ /
| * | Merge 10.4 into 10.5Marko Mäkelä2023-01-031-4/+4
| |\ \ | | |/
* | | Merge branch '10.5' into 10.6Oleksandr Byelkin2022-11-021-5/+5
|\ \ \ | |/ /
| * | Merge branch '10.4' into 10.5Oleksandr Byelkin2022-10-261-5/+5
| |\ \ | | |/
| | * MDEV-28846 Poor performance when rowid filter contains no elementsIgor Babaev2022-10-251-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a range rowid filter was used with an index ref access the cost of accessing the index entries for the records rejected by the filter was not taken into account. For a ref access by an index with big average number of records per key this led to poor execution plans if selectivity of the used filter was high. The patch resolves this problem. It also introduces a minor optimization that skips look-ups into a filter that turns out to be empty. With this patch the output of ANALYZE stmt reports the number of look-ups into used rowid filters. The patch also back-ports from 10.5 the code that properly sets the field TABLE::file::table for opened temporary tables. The test cases that were supposed to use rowid filters have been adjusted in order to use similar execution plans after this fix. Approved by Oleksandr Byelkin <sanja@mariadb.com>
* | | Merge 10.5 into 10.6Marko Mäkelä2022-09-201-1/+1
|\ \ \ | |/ /
| * | Merge remote-tracking branch 'origin/10.4' into 10.5Alexander Barkov2022-09-141-1/+1
| |\ \ | | |/
| | * Merge 10.3 into 10.4Marko Mäkelä2022-09-131-1/+1
| | |\
| | | * MDEV-29446 Change SHOW CREATE TABLE to display default collationAlexander Barkov2022-09-121-1/+1
| | | |
* | | | Merge 10.5 into 10.6Marko Mäkelä2022-07-271-5/+5
|\ \ \ \ | |/ / /
| * | | Merge 10.4 into 10.5Marko Mäkelä2022-07-271-5/+5
| |\ \ \ | | |/ /
| | * | Merge branch '10.3' into 10.4Oleksandr Byelkin2022-07-271-5/+5
| | |\ \ | | | |/
| | | * MDEV-21445 Strange/inconsistent behavior of IN condition when mixing numbers ↵Alexander Barkov2022-07-061-5/+5
| | | | | | | | | | | | | | | | and strings
* | | | Merge 10.5 into 10.6Marko Mäkelä2022-04-211-0/+46
|\ \ \ \ | |/ / /
| * | | Merge 10.4 into 10.5Marko Mäkelä2022-04-211-0/+46
| |\ \ \ | | |/ /
| | * | Merge 10.3 into 10.4Marko Mäkelä2022-04-211-0/+46
| | |\ \ | | | |/
| | | * Merge remote-tracking branch 'origin/10.2' into 10.3Alexander Barkov2022-04-141-0/+46
| | | |
* | | | MDEV-7317: Make an index ignorable to the optimizerVarun Gupta2021-03-041-4/+4
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This feature adds the functionality of ignorability for indexes. Indexes are not ignored be default. To control index ignorability explicitly for a new index, use IGNORE or NOT IGNORE as part of the index definition for CREATE TABLE, CREATE INDEX, or ALTER TABLE. Primary keys (explicit or implicit) cannot be made ignorable. The table INFORMATION_SCHEMA.STATISTICS get a new column named IGNORED that would store whether an index needs to be ignored or not.
* | | Updated optimizer costs in multi_range_read_info_const() and sql_select.ccMonty2020-03-271-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - multi_range_read_info_const now uses the new records_in_range interface - Added handler::avg_io_cost() - Don't calculate avg_io_cost() in get_sweep_read_cost if avg_io_cost is not 1.0. In this case we trust the avg_io_cost() from the handler. - Changed test_quick_select to use TIME_FOR_COMPARE instead of TIME_FOR_COMPARE_IDX to align this with the rest of the code. - Fixed bug when using test_if_cheaper_ordering where we didn't use keyread if index was changed - Fixed a bug where we didn't use index only read when using order-by-index - Added keyread_time() to HEAP. The default keyread_time() was optimized for blocks and not suitable for HEAP. The effect was the HEAP prefered table scans over ranges for btree indexes. - Fixed get_sweep_read_cost() for HEAP tables - Ensure that range and ref have same cost for simple ranges Added a small cost (MULTI_RANGE_READ_SETUP_COST) to ranges to ensure we favior ref for range for simple queries. - Fixed that matching_candidates_in_table() uses same number of records as the rest of the optimizer - Added avg_io_cost() to JT_EQ_REF cost. This helps calculate the cost for HEAP and temporary tables better. A few tests changed because of this. - heap::read_time() and heap::keyread_time() adjusted to not add +1. This was to ensure that handler::keyread_time() doesn't give higher cost for heap tables than for normal tables. One effect of this is that heap and derived tables stored in heap will prefer key access as this is now regarded as cheap. - Changed cost for index read in sql_select.cc to match multi_range_read_info_const(). All index cost calculation is now done trough one function. - 'ref' will now use quick_cost for keys if it exists. This is done so that for '=' ranges, 'ref' is prefered over 'range'. - scan_time() now takes avg_io_costs() into account - get_delayed_table_estimates() uses block_size and avg_io_cost() - Removed default argument to test_if_order_by_key(); simplifies code
* | | MDEV-19713 Remove big_tables system variableSergei Golubchik2019-09-281-4/+4
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mark big_tables deprecated, the server can put temp tables on disk as needed avoiding "table full" errors. in case someone would really need to force a tmp table to be created on disk from the start and for testing allow tmp_memory_table_size to be set to 0. fix tests to use that instead (and add a test that it actually works). make sure in-memory TREE size limit is never 0 (it's [ab]using tmp_memory_table_size at the moment) remove few sys_vars.*_basic tests
* | Merge branch '10.3' into 10.4Sergei Golubchik2019-09-061-4/+3
|\ \ | |/
| * Merge branch '10.2' into 10.3Monty2019-09-031-4/+3
| |
* | Merge branch '10.3' into 10.4Oleksandr Byelkin2019-05-191-7/+7
|\ \ | |/
| * MDEV-19468 Hybrid type expressions return wrong format for FLOATAlexander Barkov2019-05-151-7/+7
| |
* | MDEV-13628: ORed condition in pushed index condition is not removed from the ↵Varun Gupta2019-05-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WHERE So to push index condition for each join tab we have calculate the index condition that can be pushed and then remove this index condition from the original condition. This is done through the function make_cond_remainder. The problem is the function make_cond_remainder does not remove index condition when there is an OR operator. Fixed this by making the function make_cond_remainder to keep in mind of the OR operator. Also updated results for multiple test files which were incorrectly updated by the commit e0c1b3f24246d22e6785315f9a8448bd9a590422 code which was supposed to remove the condition present in the index condition was not getting executed when the condition had OR operator, with AND the pushed index condition was getting removed from where. This problem affects all versions starting from 5.5 but this is a performance improvement, so fixing it in 10.4
* | MDEV-7486: Condition pushdown from HAVING into WHEREGalina Shalygina2019-02-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Condition can be pushed from the HAVING clause into the WHERE clause if it depends only on the fields that are used in the GROUP BY list or depends on the fields that are equal to grouping fields. Aggregate functions can't be pushed down. How the pushdown is performed on the example: SELECT t1.a,MAX(t1.b) FROM t1 GROUP BY t1.a HAVING (t1.a>2) AND (MAX(c)>12); => SELECT t1.a,MAX(t1.b) FROM t1 WHERE (t1.a>2) GROUP BY t1.a HAVING (MAX(c)>12); The implementation scheme: 1. Extract the most restrictive condition cond from the HAVING clause of the select that depends only on the fields that are used in the GROUP BY list of the select (directly or indirectly through equalities) 2. Save cond as a condition that can be pushed into the WHERE clause of the select 3. Remove cond from the HAVING clause if it is possible The optimization is implemented in the function st_select_lex::pushdown_from_having_into_where(). New test file having_cond_pushdown.test is created.
* | MDEV-16188 Introduced the notion of adjusted filter gain.Igor Babaev2019-02-141-4/+4
| | | | | | | | | | | | Due to inconsistent usage of different cost models to calculate the cost of ref accesses we have to make the calculation of the gain promising by usage a range filter more complex.
* | MDEV-16188 Post merge fixes:fixed warnings on WindowsIgor Babaev2019-02-061-3/+3
| | | | | | | | Also adjusted some result files after Galina's last patch for ANALYZE.
* | Fixed the results after the merge of 10.4 into bb-10.4-mdev16188.Igor Babaev2019-02-031-0/+1
| |
* | Merge branch '10.4' into bb-10.4-mdev16188Igor Babaev2019-02-031-0/+3
|\ \
| * | MDEV-15253: Default optimizer setting changes for MariaDB 10.4Varun Gupta2018-12-091-0/+3
| | | | | | | | | | | | | | | use_stat_tables= PREFERABLY optimizer_use_condition_selectivity= 4
* | | MDEV-16188 Use in-memory PK filters built from range index scansIgor Babaev2019-02-031-27/+68
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch contains a full implementation of the optimization that allows to use in-memory rowid / primary filters built for range   conditions over indexes. In many cases usage of such filters reduce   the number of disk seeks spent for fetching table rows. In this implementation the choice of what possible filter to be applied   (if any) is made purely on cost-based considerations. This implementation re-achitectured the partial implementation of the feature pushed by Galina Shalygina in the commit 8d5a11122c32f4d9eb87536886c6e893377bdd07. Besides this patch contains a better implementation of the generic   handler function handler::multi_range_read_info_const() that takes into account gaps between ranges when calculating the cost of range index scans. It also contains some corrections of the implementation of the handler function records_in_range() for MyISAM. This patch supports the feature for InnoDB and MyISAM.
* | MDEV-17563 Different results using table or view when comparing values of ↵Alexander Barkov2018-11-081-16/+16
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | time type MDEV-17625 Different warnings when comparing a garbage to DATETIME vs TIME - Splitting processes of data type conversion (to TIME/DATE,DATETIME) and warning generation. Warning are now only get collected during conversion (in an "int" variable), and are pushed in the very end of conversion (not in parallel). Warnings generated by the low level routines str_to_xxx() and number_to_xxx() can now be changed at the end, when TIME_FUZZY_DATES is applied, from "Invalid value" to "Truncated invalid value". Now "Illegal value" is issued only when the low level routine returned an error and TIME_FUZZY_DATES was not set. Otherwise, if the low level routine returned "false" (success), or if NULL was converted to a zero datetime by TIME_FUZZY_DATES, then "Truncated illegal value" is issued. This gives better warnings. - Methods Type_handler::Item_get_date() and Type_handler::Item_func_hybrid_field_type_get_date() now only convert and collect warning information, but do not push warnings. - Changing the return data type for Type_handler::Item_get_date() and Type_handler::Item_func_hybrid_field_type_get_date() from "bool" to "void". The conversion result (success vs error) can be checked by testing ltime->time_type. MYSQL_TIME_{NONE|ERROR} mean mean error, other values mean success. - Adding new wrapper methods Type_handler::Item_get_date_with_warn() and Type_handler::Item_func_hybrid_field_type_get_date_with_warn() to do conversion followed by raising warnings, and changing the code to call new Type_handler::***_with_warn() methods. - Adding a helper class Temporal::Status, a wrapper for MYSQL_TIME_STATUS with automatic initialization. - Adding a helper class Temporal::Warn, to collect warnings but without actually raising them. Moving a part of ErrConv into a separate class ErrBuff, and deriving both Temporal::Warn and ErrConv from ErrBuff. The ErrBuff part of Temporal::Warn is used to collect textual representation of the input data. - Adding a helper class Temporal::Warn_push. It's used to collect warning information during conversion, and automatically pushes warnings to the diagnostics area on its destructor time (in case of non-zero warning). - Moving more code from various functions inside class Temporal. - Adding more Temporal_hybrid constructors and protected Temporal methods make_from_xxx(), which convert and only collect warning information, but do not actually raise warnings. - Now the low level functions str_to_datetime() and str_to_time() always set status->warning if the return value is "true" (error). - Now the low level functions number_to_time() and number_to_datetime() set the "*was_cut" argument if the return value is "true" (error). - Adding a few DBUG_ASSERTs to make sure that str_to_xxx() and number_to_xxx() always set warnings on error. - Adding new warning flags MYSQL_TIME_WARN_EDOM and MYSQL_TIME_WARN_ZERO_DATE for the code symmetry. Before this change there was a special code path for (rc==true && was_cut==0) which was treated by Field_temporal::store_invalid_with_warning as "zero date violation". Now was_cut==0 always means that there are no any error/warnings/notes to be raised, not matter what rc is. - Using new Temporal_hybrid constructors in combination with Temporal::Warn_push inside str_to_datetime_with_warn(), double_to_datetime_with_warn(), int_to_datetime_with_warn(), Field::get_date(), Item::get_date_from_string(), and a few other places. - Removing methods Dec_ptr::to_datetime_with_warn(), Year::to_time_with_warn(), my_decimal::to_datetime_with_warn(), Dec_ptr::to_datetime_with_warn(). Fixing Sec6::to_time() and Sec6::to_datetime() to convert and only collect warnings, without raising warnings. Now warning raising functionality resides in Temporal::Warn_push. - Adding classes Longlong_hybrid_null and Double_null, to return both value and the "IS NULL" flag. Adding methods Item::to_double_null(), to_longlong_hybrid_null(), Item_func_hybrid_field_type::to_longlong_hybrid_null_op(), Item_func_hybrid_field_type::to_double_null_op(). Removing separate classes VInt and VInt_op, as they have been replaced by a single class Longlong_hybrid_null. - Adding a helper method Temporal::type_name_by_timestamp_type(), moving a part of make_truncated_value_warning() into it, and reusing in Temporal::Warn::push_conversion_warnings(). - Removing Item::make_zero_date() and Item_func_hybrid_field_type::make_zero_mysql_time(). They provided duplicate functionality. Now this code resides in Temporal::make_fuzzy_date(). The latter is now called for all Item types when data type conversion (to DATE/TIME/DATETIME) is involved, including Item_field and Item_direct_view_ref. This fixes MDEV-17563: Item_direct_view_ref now correctly converts NULL to a zero date when TIME_FUZZY_DATES says so.
* Create 'main' test directory and move 't' and 'r' thereMichael Widenius2018-03-291-0/+5550