summaryrefslogtreecommitdiff
path: root/storage/tokudb
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.4 into 10.5Marko Mäkelä2020-05-181-0/+8
|\
| * Merge 10.3 into 10.4Marko Mäkelä2020-05-161-0/+8
| |\ | | | | | | | | | | | | We will expose some more std::atomic internals in Atomic_counter, so that dict_index_t::lock will support the default assignment operator.
| | * Merge 10.2 into 10.3Marko Mäkelä2020-05-151-0/+8
| | |\
| | | * MDEV-19622: Fix a TokuDB resultMarko Mäkelä2020-05-141-0/+8
| | | |
* | | | Merge branch '10.4' into 10.5Sergei Golubchik2020-05-092-8/+8
|\ \ \ \ | |/ / /
| * | | MDEV-21794: Optimizer flag rowid_filter leads to long querySergei Petrunia2020-05-072-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rowid Filter check is just like Index Condition Pushdown check: before we check the filter, we must check if we have walked out of the range we are scanning. (If we did, we should return, and not continue the scan). Consequences of this: - Rowid filtering doesn't work for keys that have partially-covered blob columns (just like Index Condition Pushdown) - The rowid filter function has three return values: CHECK_POS (passed) CHECK_NEG (filtered out), CHECK_OUT_OF_RANGE. All of the above is implemented in this patch
* | | | Merge 10.4 into 10.5Marko Mäkelä2020-05-052-4/+4
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2020-05-052-4/+4
| |\ \ \ | | |/ /
| | * | Merge branch '10.2' into 10.3Oleksandr Byelkin2020-05-042-4/+4
| | |\ \ | | | |/
| | | * Merge branch '10.1' into 10.2Oleksandr Byelkin2020-05-022-4/+4
| | | |\
| | | | * Merge branch 'merge-tokudb-5.6' into 10.1Oleksandr Byelkin2020-04-301-1/+1
| | | | |\
| | | | | * 5.6.47-87.0Oleksandr Byelkin2020-04-301-1/+1
| | | | | |
| | | | * | Merge branch '5.5' into 10.1Oleksandr Byelkin2020-04-301-3/+3
| | | | |\ \
| | | | | * | don't enable -Werror in ft-indexSergei Golubchik2020-04-291-3/+3
| | | | | | |
* | | | | | | Merge 10.4 into 10.5Marko Mäkelä2020-04-251-37/+37
|\ \ \ \ \ \ \ | |/ / / / / / | | | | | | | | | | | | | | | | | | | | | The functional changes of commit 5836191c8f0658d5d75484766fdcc3d838b0a5c1 (MDEV-21168) are omitted due to MDEV-742 having addressed the issue.
| * | | | | | Merge 10.3 into 10.4Marko Mäkelä2020-04-161-37/+37
| |\ \ \ \ \ \ | | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-151-37/+37
| | |\ \ \ \ \ | | | |/ / / /
| | | * | | | MDEV-20604: Duplicate key value is silently truncated to 64 characters in ↵Oleksandr Byelkin2020-04-011-37/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | print_keydup_error Added indication of truncated string for "s" and "M" formats
* | | | | | | Split tdc_remove_table()Sergey Vojtovich2020-04-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TDC_RT_REMOVE_ALL -> tdc_remove_table(). Some occurrences replaced with TDC_element::flush() (whenver TABLE_SHARE is available). TDC_RT_REMOVE_NOT_OWN[_KEEP_SHARE] -> TDC_element::flush(). These modes assume that current thread owns TABLE_SHARE reference, which means we can avoid hash lookup and flush unused TABLE instances directly. TDC_RT_REMOVE_UNUSED -> TDC_element::flush_unused(). Only [ab]used by mysql_admin_table() currently. Should be removed eventually. Part of MDEV-17882 - Cleanup refresh version
* | | | | | | Updated optimizer costs in multi_range_read_info_const() and sql_select.ccMonty2020-03-2710-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* | | | | | | Added page_range to records_in_range() to improve range statisticsMonty2020-03-272-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prototype change: - virtual ha_rows records_in_range(uint inx, key_range *min_key, - key_range *max_key) + virtual ha_rows records_in_range(uint inx, const key_range *min_key, + const key_range *max_key, + page_range *res) The handler can ignore the page_range parameter. In the case the handler updates the parameter, the optimizer can deduce the following: - If previous range's last key is on the same block as next range's first key - If the current key range is in one block - We can also assume that the first and last block read are cached! This can be used for a better calculation of IO seeks when we estimate the cost of a range index scan. The parameter is fully implemented for MyISAM, Aria and InnoDB. A separate patch will update handler::multi_range_read_info_const() to take the benefits of this change and also remove the double records_in_range() calls that are not anymore needed.
* | | | | | | Replace handler::primary_key_is_clustered() with handler::pk_is_clustering_key()Monty2020-03-242-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was done to both simplify the code and also to be easier to handle storage engines that are clustered on some other index than the primary key. As pk_is_clustering_key() and is_clustering_key now are using only index_flags, these where removed from all storage engines.
* | | | | | | merge 10.4 to 10.5Monty2020-03-182-0/+12
|\ \ \ \ \ \ \ | |/ / / / / /
| * | | | | | Removed double records_in_range calls from multi_range_read_info_constMonty2020-03-172-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* | | | | | | Fix various spelling errorsOtto Kekäläinen2020-03-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | e.g. - dont -> don't - occurence -> occurrence - succesfully -> successfully - easyly -> easily Also remove trailing space in selected files. These changes span: - server core - Connect and Innobase storage engine code - OQgraph, Sphinx and TokuDB storage engines Related to MDEV-21769.
* | | | | | | MDEV-742 XA PREPAREd transaction survive disconnect/server restartAndrei Elkin2020-03-142-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lifted long standing limitation to the XA of rolling it back at the transaction's connection close even if the XA is prepared. Prepared XA-transaction is made to sustain connection close or server restart. The patch consists of - binary logging extension to write prepared XA part of transaction signified with its XID in a new XA_prepare_log_event. The concusion part - with Commit or Rollback decision - is logged separately as Query_log_event. That is in the binlog the XA consists of two separate group of events. That makes the whole XA possibly interweaving in binlog with other XA:s or regular transaction but with no harm to replication and data consistency. Gtid_log_event receives two more flags to identify which of the two XA phases of the transaction it represents. With either flag set also XID info is added to the event. When binlog is ON on the server XID::formatID is constrained to 4 bytes. - engines are made aware of the server policy to keep up user prepared XA:s so they (Innodb, rocksdb) don't roll them back anymore at their disconnect methods. - slave applier is refined to cope with two phase logged XA:s including parallel modes of execution. This patch does not address crash-safe logging of the new events which is being addressed by MDEV-21469. CORNER CASES: read-only, pure myisam, binlog-*, @@skip_log_bin, etc Are addressed along the following policies. 1. The read-only at reconnect marks XID to fail for future completion with ER_XA_RBROLLBACK. 2. binlog-* filtered XA when it changes engine data is regarded as loggable even when nothing got cached for binlog. An empty XA-prepare group is recorded. Consequent Commit-or-Rollback succeeds in the Engine(s) as well as recorded into binlog. 3. The same applies to the non-transactional engine XA. 4. @@skip_log_bin=OFF does not record anything at XA-prepare (obviously), but the completion event is recorded into binlog to admit inconsistency with slave. The following actions are taken by the patch. At XA-prepare: when empty binlog cache - don't do anything to binlog if RO, otherwise write empty XA_prepare (assert(binlog-filter case)). At Disconnect: when Prepared && RO (=> no binlogging was done) set Xid_cache_element::error := ER_XA_RBROLLBACK *keep* XID in the cache, and rollback the transaction. At XA-"complete": Discover the error, if any don't binlog the "complete", return the error to the user. Kudos ----- Alexey Botchkov took to drive this work initially. Sergei Golubchik, Sergei Petrunja, Marko Mäkelä provided a number of good recommendations. Sergei Voitovich made a magnificent review and improvements to the code. They all deserve a bunch of thanks for making this work done!
* | | | | | | Merge branch '10.4' into 10.5Oleksandr Byelkin2020-02-125-6/+263
|\ \ \ \ \ \ \ | |/ / / / / /
| * | | | | | Merge branch '10.3' into 10.4Oleksandr Byelkin2020-02-115-6/+263
| |\ \ \ \ \ \ | | |/ / / / /
| | * | | | | MDEV-20076: SHOW GRANTS does not quote role names properlybb-10.3-MDEV-20076Oleksandr Byelkin2020-02-051-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Quotes added to output.
| | * | | | | Merge 10.2 into 10.3Marko Mäkelä2020-01-314-0/+257
| | |\ \ \ \ \ | | | |/ / / /
| | | * | | | MDEV-14330: move tokudb manpages to right packagesVicențiu Ciorbaru2020-01-284-0/+257
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move tokuftdump and tokuft_logprint man pages to storage/tokudb. The man pages are now part of tokudb-engine cmake component. This change is mostly for RPM & DEB based packaging generated through CMake & CPack. Debian upstream already handles this change via the custom scripts in debian/
* | | | | | | Merge 10.4 into 10.5Marko Mäkelä2020-01-2829-122/+239
|\ \ \ \ \ \ \ | |/ / / / / /
| * | | | | | Merge branch '10.3' into 10.4Oleksandr Byelkin2020-01-242-11/+0
| |\ \ \ \ \ \ | | |/ / / / /
| | * | | | | Merge branch '10.2' into 10.3Oleksandr Byelkin2020-01-242-11/+0
| | |\ \ \ \ \ | | | |/ / / /
| | | * | | | Remove an unused tokuvalgrind scriptMarko Mäkelä2020-01-232-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the only symlink in the repository. Symlinks can cause trouble when using file systems or operating systems that do not support them. Also remove the unused file DartConfig.cmake that refers to the script.
| * | | | | | Merge branch '10.3' into 10.4Oleksandr Byelkin2020-01-2127-111/+239
| |\ \ \ \ \ \ | | |/ / / / /
| | * | | | | Merge branch '10.2' into 10.3Oleksandr Byelkin2020-01-2127-111/+239
| | |\ \ \ \ \ | | | |/ / / /
| | | * | | | Merge branch '10.1' into 10.2Oleksandr Byelkin2020-01-2027-111/+239
| | | |\ \ \ \ | | | | |/ / /
| | | | * | | Merge branch 'merge-tokudb-5.6' into 10.1Oleksandr Byelkin2020-01-1927-111/+239
| | | | |\ \ \ | | | | | | |/ | | | | | |/|
| | | | | * | 5.6.46-86.2Oleksandr Byelkin2020-01-1928-112/+249
| | | | | | |
| | | | * | | fix a bad mergeSergei Golubchik2019-12-201-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in 10.1+ one should use MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-address-of-packed-member") and it's already done in storage/tokudb/PerconaFT/CMakeLists.txt
| | | | * | | Merge remote-tracking branch 'origin/5.5' into 10.1Alexander Barkov2019-12-161-0/+6
| | | | |\ \ \ | | | | | | |/ | | | | | |/|
| | | | | * | tokudb: disable check_huge_pages_in_practice()Sergei Golubchik2019-12-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | crashes on Debian 10
| | | | | * | tokudb: fix to compile with gcc 9.2.0Sergei Golubchik2019-12-131-0/+6
| | | | | | |
* | | | | | | MDEV-21581 Helper functions and methods for CHARSET_INFOAlexander Barkov2020-01-281-8/+5
| | | | | | |
* | | | | | | Merge 10.4 into 10.5Marko Mäkelä2019-12-162-3/+3
|\ \ \ \ \ \ \ | |/ / / / / /
| * | | | | | Merge branch '10.3' into 10.4Oleksandr Byelkin2019-12-092-3/+3
| |\ \ \ \ \ \ | | |/ / / / /
| | * | | | | Lintian complains on spelling errorFaustin Lammler2019-12-022-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The lintian check complains on spelling error: https://salsa.debian.org/mariadb-team/mariadb-10.3/-/jobs/95739
* | | | | | | Removed kill_delayed_threads_for_table()Sergey Vojtovich2019-11-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After 7fb9d64 it is used only by ALTER/DROP SERVER, which most probably wasn't intentional as Federated never supported delayed inserts anyway. If delayed inserts will ever become an issue with ALTER/DROP SERVER, we should kill them by acquiring X-lock instead. Part of MDEV-17882 - Cleanup refresh version
* | | | | | | Merge 10.4 into 10.5Oleksandr Byelkin2019-11-0718-132/+231
|\ \ \ \ \ \ \ | |/ / / / / /