- 05 Jun, 2023 17 commits
-
-
Sergei Golubchik authored
-
Sergei Golubchik authored
6.4.7-1 -> 23.02.3-1
-
Sergei Golubchik authored
-
Sergei Golubchik authored
where distro name is known. also it doesn't need s/-10.6// anymore and s/// is vim-friendlier than s###
-
Sergei Golubchik authored
for columnstore
-
Oleg Smirnov authored
When printing Item_direct_view_ref the printed field name must be complemented with the view name/derived table alias. For example, for "SELECT a FROM (SELECT a FROM t1) q" field `a` in the select list must be printed as `q`.`a`. But if the view was merged then the initial `q` does not make sense any more so field `a` must be printed as `t1`.`a`
-
Oleg Smirnov authored
During st_select_lex_unit::prepare() the member select_unit* st_select_lex_unit::union_result is being assigned to an instance of one of the following classes: - select_unit - select_unit_ext - select_unit_recursive - select_union_direct Select_union_direct used to pass the result of the query directly to the receiving select_result without filling a temporary table. This class wraps a select_result object and is currently used to process UNION ALL queries. Other select_unit_* classes involve some additional result processing. Pushed down units are processed on the engine side so the results must be also passed directly to a select_result object. So in the case when the unit pushdown is employed st_select_lex_unit::union_result must be assigned to an instance of select_union_direct.
-
Oleg Smirnov authored
Allow queries of multiple SELECTs combined together with UNIONs/EXCEPTs/INTERSECTs to be pushed down to foreign engines. If the foreign engine provides an interface method "create_unit" and the UNIT is a top-level unit of the SQL query then the server tries to push the whole SELECT_LEX_UNIT down to the engine for execution. The engine should perform necessary checks and if they succeed, execute the query. If the engine is unable to execute the whole unit, then another attempt is made to push down SELECTs composing the unit separately using the "create_select" interface method. In this case the results of separate SELECTs are combined at the server side thus composing the final result
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Marko Mäkelä authored
trx_purge_free_segment(), trx_purge_truncate_rseg_history(): Replace some unreachable code with debug assertions. A buffer-fix does prevent pages from being evicted from the buffer pool; see buf_page_t::can_relocate(). Tested by: Matthias Leich
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Sergei Petrunia authored
The code in choose_best_splitting() assumed that the join prefix is in join->positions[]. This is not necessarily the case. This function might be called when the join prefix is in join->best_positions[], too. Follow the approach from best_access_path(), which calls this function: pass the current join prefix as an argument, "const POSITION *join_positions" and use that.
-
- 04 Jun, 2023 3 commits
-
-
Daniel Black authored
wrong link, + a link page to a link page is a bit indirect.
-
Diogo Teles Sant'Anna authored
This would avoid duplication, as both the README and the SECURITY.md file were pointing to the same website.
-
Diogo Teles Sant'Anna authored
-
- 03 Jun, 2023 17 commits
-
-
Oleksandr Byelkin authored
-
Sergei Petrunia authored
This is 11.0 part of the fix: in 11.0, get_costs_for_tables() calls best_access_path() for all possible tables, for each call it saves a POSITION object with the access method and "loose_scan_pos" POSITION object. The latter is saved even if there is no possible LooseScan plan. Saving is done by copying POSITION objects which may generate a spurious UBSan error.
-
Otto Kekalainen authored
In commit f99a8918 this line was changed to not use awk, and new version copied both to init file and preinst file but overlooking that they use different variable names. Also fix minor syntax issues to make Shellcheck happy. All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.
-
Marko Mäkelä authored
buf_flush_page_cleaner(): Whenever buf_pool.ran_out(), invoke buf_pool.get_oldest_modification(0) so that all clean blocks will be removed from buf_pool.flush_list and buf_flush_LRU_list_batch() will be able to evict some pages. This fixes a regression that was likely caused by commit a55b951e (MDEV-26827).
-
Marko Mäkelä authored
srv_export_innodb_status(): Update export_vars.innodb_buffer_pool_read_requests as it was done before commit a55b951e (MDEV-26827). If innodb_status_variables[] pointed to a sharded variable, it would only access the first shard.
-
Marko Mäkelä authored
innodb_counter_info[]: Revert a change that was accidentally made in commit 204e7225
-
Marko Mäkelä authored
btr_cur_need_opposite_intention(): Check also page_zip_available() so that we will escalate to exclusive index latch when a non-leaf page may have to be split further due to ROW_FORMAT=COMPRESSED page overflow. Tested by: Matthias Leich
-
Marko Mäkelä authored
trx_purge_truncate_rseg_history(): Avoid a leak similar to the one that was fixed in MDEV-31324, in case a supposedly cached undo log page is not found in the rseg.undo_cached list.
-
Marko Mäkelä authored
trx_purge_truncate_history(): While waiting for a write-fixed block to become available, simply wait for an exclusive latch on it. Also, simplify the iteration: first check for oldest_modification>2 (to ignore clean pages or pages belonging to the temporary tablespace) and then compare the tablespace identifier. Before releasing buf_pool.flush_list_mutex we will buffer-fix the block of interest. In that way, buf_page_t::can_relocate() will not hold on the block and it must remain in the buffer pool until we have acquired an exclusive latch on it. If the block is still dirty, we will register it with the tablespace truncation mini-transaction; else, we will simply release the latch and buffer-fix and move to the next block. This also reverts commit c4d79399 because that fix should no longer be necessary; the wait for an exclusive block latch should allow buf_pool_t::release_freed_page() on the same block to proceed. Tested by: Axel Schwenke, Matthias Leich
-
Marko Mäkelä authored
trx_purge_truncate_history(): Relax a condition that would prevent undo log truncation if the undo log tablespaces were "contaminated" by the bug that commit e0084b9d fixed. That is, trx_purge_truncate_rseg_history() would have invoked flst_remove() on TRX_RSEG_HISTORY but not reduced TRX_RSEG_HISTORY_SIZE. To avoid any regression with normal operation, we implement this fixup during slow shutdown only. The condition on the history list being empty is necessary: without it, in the test innodb.undo_truncate_recover there may be much fewer than the expected 90,000 calls to row_purge() before the truncation. That is, we would truncate the undo tablespace before actually having processed all undo log records in it. To truncate such "contaminated" or "bloated" undo log tablespaces (when using innodb_undo_tablespaces=2 or more) you can execute the following SQL: BEGIN;INSERT mysql.innodb_table_stats VALUES('','',DEFAULT,0,0,0);ROLLBACK; SET GLOBAL innodb_undo_log_truncate=ON, innodb_fast_shutdown=0; SHUTDOWN; The first line creates a dummy InnoDB transaction, to ensure that there will be some history to be purged during shutdown and that the undo tablespaces will be truncated.
-
Marko Mäkelä authored
trx_purge_truncate_rseg_history(): Add a parameter to specify if the entire rollback segment is safe to be freed. If not, we may still be able to invoke trx_undo_truncate_start() and free some pages.
-
Marko Mäkelä authored
trx_purge_truncate_history(): Only call trx_purge_truncate_rseg_history() if the rollback segment is safe to process. This will avoid leaking undo log pages that are not yet ready to be processed. This fixes a regression that was introduced in commit 0de3be8c (MDEV-30671). trx_sys_t::any_active_transactions(): Separately count XA PREPARE transactions. srv_purge_should_exit(): Terminate slow shutdown if the history size does not change and XA PREPARE transactions exist in the system. This will avoid a hang of the test innodb.recovery_shutdown. Tested by: Matthias Leich
-
Sergei Golubchik authored
This reverts commit b05218e0.
-
Sergei Golubchik authored
This reverts commit 844ddb11. This fixes MDEV-30967, MDEV-31325, MDEV-31388
-
Igor Babaev authored
This bug could affect queries containing a subquery over splittable derived tables and having an outer references in its WHERE clause. If such subquery contained an equality condition whose left part was a reference to a column of the derived table and the right part referred only to outer columns then the server crashed in the function st_join_table::choose_best_splitting() The crashing code was added in the commit ce7ffe61 that made the code of the function sensitive to presence of the flag OUTER_REF_TABLE_BIT in the KEYUSE_EXT::needed_in_prefix fields. The field needed_in_prefix of the KEYUSE_EXT structure should not contain table maps with OUTER_REF_TABLE_BIT or RAND_TABLE_BIT. Note that this fix is quite conservative: for affected queries it just returns the query plans that were used before the above mentioned commit. In fact the equalities causing crashes should be pushed into derived tables without any usage of split optimization. Approved by Sergei Petrunia <sergey@mariadb.com>
-
Igor Babaev authored
EXPLAIN EXTENDED should always print the field item used in the left part of an equality expression from the SET clause of an update statement as a reference to table column. Approved by Oleksandr Byelkin <sanja@mariadb.com>
-
Daniel Bartholomew authored
-
- 27 May, 2023 3 commits
-
-
Monty authored
The problem was a wrong assert. I changed it to match the code in best_access_path(). The given test case was a bit tricky for the optimizer, which first decided on using a index scan (because of force index), but then test_if_skip_sort_order() decided to use range anyway to handle distinct.
-
Monty authored
Problem was an overflow when calculating number of join cache refills.
-
Monty authored
This was caused of two minor issues: - get_quick_record_count() returned the number of rows for range with least cost, when it should have returned the minum number of rows for any range. - When changing REF to RANGE, we also changed records_out, which should not be done (number of records in the result will not change). The above change can cause a small change in row estimates where the optimizer chooses a clustered key with more rows than a range one secondary key (unlikely case).
-