summaryrefslogtreecommitdiff
path: root/mysql-test/main
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-22377: Subquery in an [UPDATE] query uses full scan instead of rangebb-10.4-mdev22377Sergei Petrunia2020-04-306-8/+60
| | | | | | | | | | | | | | | | | When doing IN->EXISTS rewrite, Item_in_subselect::inject_in_to_exists_cond injects equalities into subquery's WHERE condition. The problem is that build_equal_items() has already been called for the subquery's WHERE, and tampering with the WHERE condition can prevent equality propagation from working. If the subquery's WHERE is an Item_cond_and with multiple equalities: - Item_equal objects form a suffix sub-list of the list in WHERE's Item_cond_and::list. The suffix is stored in JOIN::cond_equal->current_level. - Item_cond_and::m_cond_equal must also be preserved. This patch makes inject_in_to_exists_cond() not to break these properties
* MDEV-22160: SIGSEGV in st_join_table::save_explain_data on SELECTVarun Gupta2020-04-293-0/+48
| | | | Adding a test case for rowid filter, the crash was fixed by MDEV-22191
* MDEV-22401: Optimizer trace: multi-component range is not printed correctlySergei Petrunia2020-04-292-0/+43
| | | | | | | | | | | | | | KEY_MULTI_RANGE::range_flag does not have correct flag bits for per-endpoint flags (NEAR_MIN, NEAR_MAX, NO_MIN_RANGE, NO_MAX_RANGE). It only has bits for flags that describe both endpoints. So - Document this. - Switch optimizer trace to using {start|end}_key.flag values, instead. This fixes the bug. - Switch records_in_column_ranges() to doing that too. (This used to work, because KEY_MULTI_RANGE::range_flag had correct flag value for the last key component, and EITS only uses one-component pseudo-indexes)
* fix the test for windowsSergei Golubchik2020-04-282-2/+4
|
* MDEV-20257 Server crashes in Grant_table_base::init_read_record upon ↵Sergei Golubchik2020-04-272-0/+28
| | | | | | | | crash-upgrade when opening the `user` table separately, reset `thd->open_tables` for the duration of open, otherwise auto-repair fallback-and-retry will close *all* tables (but reopen only `user`)
* more verbose testsSergei Golubchik2020-04-2712-0/+32
|
* MDEV-21244 mysql_upgrade creating empty global_priv tableSergei Golubchik2020-04-272-0/+21
| | | | support upgrades from 5.2 privilege tables
* Fixup d1c3342d07dbf56dc355b9e61efc3938807bcb3a for --embeddedMarko Mäkelä2020-04-241-0/+1
|
* Fixed default_storage_engine.testMonty2020-04-232-0/+5
| | | | | The bug was that the script tried to start mysqld while there was already a running mysqld server. Fixed by killing the running one.
* Merge 10.3 into 10.4Marko Mäkelä2020-04-225-1/+41
|\
| * Merge 10.2 into 10.3Marko Mäkelä2020-04-224-0/+40
| |
| * MDEV-22263: main.func_debug fails on a valgrind build with wrong resultAnel Husakovic2020-04-201-1/+1
| | | | | | | | Patches of interest:374dae3ecc49, 374dae3ecc49
* | Merge 10.3 into 10.4Marko Mäkelä2020-04-1643-148/+680
|\ \ | |/ | | | | | | | | | | In main.index_merge_myisam we remove the test that was added in commit a2d24def8cc42d27c72d833abfb39ef24a2b96ba because it duplicates the test case that was added in commit 5af12e463549e4bbc2ce6ab720d78937d5e5db4e.
| * Merge 10.2 into 10.3Marko Mäkelä2020-04-1533-62/+374
| |
| * MDEV-21673 Calling stored procedure twice in the same session causes MariaDB ↵Igor Babaev2020-04-042-0/+213
| | | | | | | | | | | | | | | | | | | | | | to crash This bug could happen only with a stored procedure containing queries with more than one reference to a CTE that used local variables / parameters. This bug was the result of an incomplete merge of the fix for the bug MDEV-17154. The merge covered usage of parameter markers occurred in a CTE that was referenced more than once, but missed coverage of local variables.
| * MDEV-22137 correct documentation of tcp_keepalive_time system variableVladislav Vaintroub2020-04-031-4/+4
| |
| * MDEV-20515 multi-update tries to position updated table by null referenceAleksey Midenkov2020-04-022-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cause Join tmp table inserts null row because of OUTER JOIN, that's expected. Since `multi_update::prepare2()` converted `Item_temptable_rowid` into `Item_field` (28dbdf3) `multi_update::send_data()` accesses join tmp record directly and treats it as a normal row ignoring null status of ref field. NULL ref field is then treated as normal in `multi_update::do_updates()` which tries to position updated table by reference 0. Note that reference 0 may be valid reference and the first row of table can be wrongly updated (see multi_update.test). Fix Do not add row into multi-update tmp table in case of null ref field. Join tmp table does not have null_row status at this time (as well as `STATUS_NULL_ROW`) and cannot be skipped by these properties (see first comment in multi_update::send_data()). But it has all null fields (including the ref field).
| * MDEV-17091 - Assertion failed after dropping versioningNikita Malyavin2020-04-022-0/+42
| | | | | | | | | | | | | | | | Assertion `old_part_id == m_last_part' failed in ha_partition::update_row or `part_id == m_last_part' in ha_partition::delete_row upon UPDATE/DELETE after dropping versioning PRIMARY KEY change hadn't been treated as partition reorganization in case of partitioning by KEY() (without parameters). * set `*partition_changed= true` in the described case. * since add/drop system versioning does not affect alter_info->key_list, it required separate attention
| * MDEV-21348 - column compression memory leakSergey Vojtovich2020-04-022-0/+20
| | | | | | | | | | | | | | | | | | | | The Storage-Engine Independent Column Compression does not call deflateEnd() when deflate() does not return Z_STREAM_END. This for instance happens when the data is already (externally) compressed and deflate() needs more space than the original data. This patch is based on contribution by Martijn Broenland.
* | MDEV-22014: Rowid Filtering is not displayed well in the optimizer traceSergei Petrunia2020-04-024-257/+175
| | | | | | | | | | | | - Print the rowid filters that are available for use with each table. - Make print_best_access_for_table() print which filter it has picked. - Make best_access_path() print the filter for considered ref accesses.
* | Merge 10.3 into 10.4Marko Mäkelä2020-03-306-3/+205
|\ \ | |/
| * Merge 10.2 into 10.3Marko Mäkelä2020-03-304-0/+62
| |
| * Make mysql.innodb_mysql_lock deterministicMonty2020-03-262-3/+7
| | | | | | | | MDEV-7861 main.innodb_mysql_lock fails sporadically in buildbot
| * MDEV-21883 Server crashes when joining a subselect with 32 tables and GROUP BYIgor Babaev2020-03-232-0/+136
| | | | | | | | | | | | | | | | This bug could cause a crash for any query that used a derived table/view/CTE whose specification was a SELECT with a GROUP BY clause and a FROM list containing 32 or more table references. The problem appeared only in the cases when the splitting optimization could be applied to such derived table/view/CTE.
* | Merge 10.3 into 10.4Marko Mäkelä2020-03-205-7/+84
|\ \ | |/
| * Merge 10.2 into 10.3Marko Mäkelä2020-03-205-5/+82
| | | | | | | | Also, clean up the test innodb_gis.geometry a little further.
* | Merge branch '10.3' into 10.4Vicențiu Ciorbaru2020-03-182-4/+4
|\ \ | |/
| * Fixed multi_update_debug.testMonty2020-03-162-4/+4
| | | | | | | | | | | | | | This should fix the following failure: + Warnings: + Warning 1639 debug sync point wait timed out
* | MDEV-21932 A fast plan with ROR index-merge is ignored whenbb-10.4-monty3Igor Babaev2020-03-172-0/+92
| | | | | | | | | | | | | | | | | | 'index_merge_sort_union=off' When index_merge_sort_union is set to 'off' and index_merge_union is set to 'on' then any evaluated index merge scan must consist only of ROR scans. The cheapest out of such index merges must be chosen. This index merge might not be the cheapest index merge.
* | Removed double records_in_range calls from multi_range_read_info_constMonty2020-03-1732-223/+242
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This was to remove a performance regression between 10.3 and 10.4 In 10.5 we will have a better implementation of records_in_range that will enable us to get more statistics. This change was not done in 10.4 because the 10.5 will be part of a larger change that is not suitable for the GA 10.4 version Other things: - Changed default handler block_size to 8192 to fix things statistics for engines that doesn't set the block size. - Fixed a bug in spider when using multiple part const ranges (Patch from Kentoku)
* | Merge 10.3 into 10.4Marko Mäkelä2020-03-162-0/+160
|\ \ | |/
| * Merge 10.2 into 10.3Marko Mäkelä2020-03-132-0/+160
| |
* | Merge branch '10.3' into 10.4Oleksandr Byelkin2020-03-116-28/+72
|\ \ | |/
| * Merge branch '10.2' into 10.3Oleksandr Byelkin2020-03-116-28/+70
| |
* | Merge commit '10.3' into 10.4Oleksandr Byelkin2020-03-1111-5/+516
|\ \ | |/
| * Merge branch '10.2' into 10.3Oleksandr Byelkin2020-03-065-2/+30
| |
| * MDEV-20382: SHOW PRIVILEGES displays "Delete versioning rows" rather than ↵Anel Husakovic2020-03-051-1/+1
| | | | | | | | "Delete History"
| * MDEV-21554 Crash in JOIN_CACHE_BKAH::skip_index_tuple when mrr=on andIgor Babaev2020-02-253-5/+473
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | join_cache_level=6+ The patch fixes two similar bugs in the commit 8eeb689e9fc57afe19a8dbff354b5f9f167867a9 that added multi_range_read support to partitions. The commit opened a possibility to join a partition table using BKA+MRR. However in some cases it could lead to wrong results or even crashes. This could happened when - index condition pushdown was used to join the table or - the joined table was an inner table of an outer join and 'not exist' optimization was applied or - the join table was the inner table of a semi-join and the first match optimization was applied The bugs were in the code of the call-back functions - partition_multi_range_key_skip_record() and - partition_multi_range_key_skip_index_tuple(). Each of this function consist only of an invocation of another function. Yet a wrong parameter was passed at this invocation. The fix was suggested by Sergey Petrunia and it is apparently in line with original design. The corresponding comprehensive test cases demonstrating the problems caused by the bugs were constructed by me.
| * MDEV-21628: Index condition pushdown condition ... not used with BKASergei Petrunia2020-02-192-0/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Backport to 10.3) Partitioning storage now supports MRR but doesn't support Index Condition Pushdown (aka ICP). This causes counter-intuitive query plans for queries that use BKA and conditions that depend on index fields: - If the condition refers to other tables, BKA's variant of ICP is used to handle it. - If the condition depends on this table only, the optimizer will try to use regular ICP for it, which will fail because the storage engine doesn't support ICP. Make the optimizer be smarter in the second case: if we were not able to use regular ICP, use BKA's variant of ICP..
* | Added keyread_time() to HEAPMonty2020-03-091-1/+1
| | | | | | | | | | | | | | 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 also get_sweep_read_cost() for HEAP tables.
* | MDEV-21841 CONV() function doesn't truncate its output to 21 when uses ↵Roman Nozdrin2020-02-292-0/+26
| | | | | | | | default charset.
* | MDEV-21684: mysqld crash with signal 11 when renaming table+max_statement_timebb-10.4-MDEV-21684Oleksandr Byelkin2020-02-262-0/+69
| | | | | | | | Main select should be pushed first in case of SET STATEMENT.
* | MDEV-21610 Different query results from 10.4.11 to 10.4.12Igor Babaev2020-02-182-0/+486
| | | | | | | | | | | | | | | | | | | | | | This patch fixes the following defects/bugs. 1. If BKA[H] algorithm was used to join a table for which the optimizer had decided to employ a rowid filter the filter actually was not built. 2. The patch for the bug MDEV-21356 that added the code canceling pushing rowid filter into an engine for the table joined with employment of BKA[H] and MRR was not quite correct for Innodb engine because this cancellation was done after InnoDB code had already bound the the pushed filter to internal InnoDB structures.
* | MDEV-21628: Index condition pushdown condition ... not used with BKASergei Petrunia2020-02-142-0/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Partitioning storage now supports MRR but doesn't support Index Condition Pushdown (aka ICP). This causes counter-intuitive query plans for queries that use BKA and conditions that depend on index fields: - If the condition refers to other tables, BKA's variant of ICP is used to handle it. - If the condition depends on this table only, the optimizer will try to use regular ICP for it, which will fail because the storage engine doesn't support ICP. Make the optimizer be smarter in the second case: if we were not able to use regular ICP, use BKA's variant of ICP..
* | MDEV-20867 - Perform careful review of "Server crashes with BACKUP STAGE and ↵Sergey Vojtovich2020-02-132-45/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | FLUSH TABLE table_name" Reverted original patch (c2e0a0b). For consistency with "LOCK TABLE <table_name> READ" and "FLUSH TABLES WITH READ LOCK", which are forbidden under "BACKUP STAGE", forbid "FLUSH TABLE <table_name> FOR EXPORT" and "FLUSH TABLE <table_name> WITH READ LOCK" as well. It'd allow consistent fixes for problems like MDEV-18643.
* | Merge branch '10.3' into 10.4Oleksandr Byelkin2020-02-1144-548/+921
|\ \ | |/
| * Merge branch '10.2' into 10.3Oleksandr Byelkin2020-02-102-17/+19
| |
| * MDEV-21614 Wrong query results with optimizer_switch="split_materialized=on"Igor Babaev2020-02-072-0/+132
| | | | | | | | | | | | | | Do not materialize a semi-join nest if it contains a materialized derived table /view that potentially can be subject to the split optimization. Splitting of materialization of such nest would help, but currently there is no code to support this technique.
| * MDEV-20076: SHOW GRANTS does not quote role names properlybb-10.3-MDEV-20076Oleksandr Byelkin2020-02-0534-509/+654
| | | | | | | | Quotes added to output.
| * MDEV-21195 INSERT chooses wrong partition for RANGE partitioning by DECIMAL ↵Aleksey Midenkov2020-02-022-0/+90
| | | | | | | | | | | | column Use FLOOR rounding for DECIMAL_RESULT item_expr in partition function.