| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Adding a test case for rowid filter, the crash was fixed by MDEV-22191
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
| |
|
|
|
|
|
|
|
|
| |
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`)
|
| |
|
|
|
|
| |
support upgrades from 5.2 privilege tables
|
| |
|
|
|
|
|
| |
The bug was that the script tried to start mysqld while there was already
a running mysqld server. Fixed by killing the running one.
|
|\ |
|
| | |
|
| |
| |
| |
| | |
Patches of interest:374dae3ecc49, 374dae3ecc49
|
|\ \
| |/
| |
| |
| |
| |
| | |
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.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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).
|
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| | |
- 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.
|
|\ \
| |/ |
|
| | |
|
| |
| |
| |
| | |
MDEV-7861 main.innodb_mysql_lock fails sporadically in buildbot
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| |/ |
|
| |
| |
| |
| | |
Also, clean up the test innodb_gis.geometry a little further.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| | |
This should fix the following failure:
+ Warnings:
+ Warning 1639 debug sync point wait timed out
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
'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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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)
|
|\ \
| |/ |
|
| | |
|
|\ \
| |/ |
|
| | |
|
|\ \
| |/ |
|
| | |
|
| |
| |
| |
| | |
"Delete History"
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
(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..
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
default charset.
|
| |
| |
| |
| | |
Main select should be pushed first in case of SET STATEMENT.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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..
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| |/ |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
Quotes added to output.
|
| |
| |
| |
| |
| |
| | |
column
Use FLOOR rounding for DECIMAL_RESULT item_expr in partition function.
|