summaryrefslogtreecommitdiff
path: root/mysql-test/suite/maria
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.4 into 10.5Marko Mäkelä2020-05-313-0/+51
|\
| * Merge 10.3 into 10.4Marko Mäkelä2020-05-303-0/+51
| |\
| | * Merge 10.2 into 10.3Marko Mäkelä2020-05-273-0/+51
| | |\
| | | * Fixed crash in aria recovery when using bulk insertMonty2020-05-263-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-20578 Got error 126 when executing undo undo_key_delete upon Aria crash recovery The crash happens in this scenario: - Table with unique keys and non unique keys - Batch insert (LOAD DATA or INSERT ... SELECT) with REPLACE - Some insert succeeds followed by duplicate key error In the above scenario the table gets corrupted. The bug was that we don't generate any undo entry for the failed insert as the whole insert can be ignored by undo. The code did however not take into account that when bulk insert is used, we would write cached keys to the file on failure and undo would wrongly ignore these. Fixed by moving the writing of the cache keys after we write the aborted-insert event to the log.
* | | | SHOW TABLE STATUS now shows if an Aria table is transactional or notMonty2020-05-292-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change also affects information_schema.tables The create table option "transactional=0 | 1" is now always shown for storage engines that supports both transactional/crash safe tables and non transactional tables. Before this patch the transactional=... option was only shown if the user specified transactional=... in the CREATE TABLE or ALTER TABLE statement. The reason for the change was to be able to make it easy to know if an Aria table is transactional or not.
* | | | MDEV-22686 # Assertion `trn' failed in ha_maria::start_stmtMonty2020-05-242-0/+64
| | | | | | | | | | | | | | | | Calling stmt rollback closed the transaction, which caused the above issue
* | | | Aria will now register it's transactionsMonty2020-05-236-0/+288
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-22531 Remove maria::implicit_commit() MDEV-22607 Assertion `ha_info->ht() != binlog_hton' failed in MYSQL_BIN_LOG::unlog_xa_prepare From the handler point of view, Aria now looks like a transactional engine. One effect of this is that we don't need to call maria::implicit_commit() anymore. This change also forces the server to call trans_commit_stmt() after doing any read or writes to system tables. This work will also make it easier to later allow users to have system tables in other engines than Aria. To handle the case that Aria doesn't support rollback, a new handlerton flag, HTON_NO_ROLLBACK, was added to engines that has transactions without rollback (for the moment only binlog and Aria). Other things - Moved freeing of MARIA_SHARE to a separate function as the MARIA_SHARE can be still part of a transaction even if the table has closed. - Changed Aria checkpoint to use the new MARIA_SHARE free function. This fixes a possible memory leak when using S3 tables - Changed testing of binlog_hton to instead test for HTON_NO_ROLLBACK - Removed checking of has_transaction_manager() in handler.cc as we can assume that as the transaction was started by the engine, it does support transactions. - Added new class 'start_new_trans' that can be used to start indepdendent sub transactions, for example while reading mysql.proc, using help or status tables etc. - open_system_tables...() and open_proc_table_for_Read() doesn't anymore take a Open_tables_backup list. This is now handled by 'start_new_trans'. - Split thd::has_transactions() to thd::has_transactions() and thd::has_transactions_and_rollback() - Added handlerton code to free cached transactions objects. Needed by InnoDB. squash! 2ed35999f2a2d84f1c786a21ade5db716b6f1bbc
* | | | Fixed failing tests in buildbotMonty2020-03-271-4/+4
| | | | | | | | | | | | | | | | | | | | - Updated icp_tests.inc and result files - Updates usage of records_in_range() protype in cassandra
* | | | Updated optimizer costs in multi_range_read_info_const() and sql_select.ccMonty2020-03-272-6/+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
* | | | merge 10.4 to 10.5Monty2020-03-182-4/+4
|\ \ \ \ | |/ / /
| * | | Removed double records_in_range calls from multi_range_read_info_constMonty2020-03-172-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* | | | MDEV-18650: Options deprecated in previous versions - storage_engineVicențiu Ciorbaru2020-02-1328-66/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove usage of deprecated variable storage_engine. It was deprecated in 5.5 but it never issued a deprecation warning. Make it issue a warning in 10.5.1. Replaced with default_storage_engine.
* | | | Merge 10.4 into 10.5Marko Mäkelä2020-01-282-0/+46
|\ \ \ \ | |/ / /
| * | | fix testsOleksandr Byelkin2020-01-241-0/+1
| | | |
| * | | Merge branch '10.3' into 10.4Oleksandr Byelkin2020-01-242-0/+45
| |\ \ \ | | |/ /
| | * | Merge branch '10.2' into 10.3Oleksandr Byelkin2020-01-242-0/+45
| | |\ \ | | | |/
| | | * MDEV-14183: aria_pack segfaults in compress_maria_fileVlad Lesin2020-01-232-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Post-push fix. aria_pack_mdev14183 test is unstable. The fix is the following: 1. Disable the test for embedded server. 2. Create non-"transactional" Aria table in the test, as aria_pack does not support "transactional" Aria tables.
| | | * MDEV-14183: aria_pack segfaults in compress_maria_fileVlad Lesin2020-01-212-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Column definition order in st_maria_share::columndef can differ from order of fields in record(see also st_maria_share::column_nr, st_maria_columndef::column_nr, _ma_column_nr_write(), _ma_column_nr_read()). This was not taken into account in aria_pack tool. The fix is to initialize elements of HUFF_COUNTS array in the correct order.
* | | | MDEV-8844 Unreadable control characters printed as is in warningsAlexander Barkov2019-12-061-1/+1
| | | |
* | | | Merge 10.4 into 10.5Oleksandr Byelkin2019-11-072-0/+79
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2019-11-012-0/+79
| |\ \ \ | | |/ /
| | * | Merge 10.2 into 10.3Marko Mäkelä2019-10-182-0/+79
| | |\ \ | | | |/
| | | * Fixed bug in lock tables + alter table with Aria tables.Monty2019-10-162-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-18451 Server crashes in maria_create_trn_for_mysql upon ALTER TABLE Problem was that when table was locked many times, not all instances where removed from the transaction by _ma_remove_table_from_trnman()
| | | * MDEV-10748 Server crashes in ha_maria::implicit_commitMonty2019-10-152-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem was in a combination of LOCK TABLES on several Aria tables followed by an ALTER TABLE. After the ALTER TABLE there was a force close + reopen of the alter table. The close failed because the table was still part of a transaction. Fixed by calling extra(HA_EXTRA_PREPARE_FOR_FORCED_CLOSE) as part of closing the table, which ensures that the table is not anymore part of the current transaction.
* | | | Merge 10.4 into 10.5Marko Mäkelä2019-09-241-1/+1
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2019-09-231-1/+1
| |\ \ \ | | |/ / | | | | | | | | Disable MDEV-20576 assertions until MDEV-20595 has been fixed.
| | * | Merge 10.2 into 10.3Marko Mäkelä2019-09-231-1/+1
| | |\ \ | | | |/
| | | * Merge 10.1 into 10.2Marko Mäkelä2019-09-231-1/+1
| | | |\
| | | | * MDEV-18094: Query with order by limit picking index scan over filesortVarun Gupta2019-09-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the function test_if_cheaper_ordering we make a decision if using an index is better than using filesort for ordering. If we chose to do range access then in test_quick_select we should make sure that cost for table scan is set to DBL_MAX so that it is not picked.
* | | | | Merge 10.4 into 10.5Marko Mäkelä2019-09-068-25/+30
|\ \ \ \ \ | |/ / / /
| * | | | Merge branch '10.3' into 10.4Sergei Golubchik2019-09-068-25/+30
| |\ \ \ \ | | |/ / /
| | * | | Merge branch '10.2' into 10.3Monty2019-09-038-25/+30
| | |\ \ \ | | | |/ /
| | | * | Updated mtr files to support different compiled in optionsMonty2019-09-018-25/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows one to run the test suite even if any of the following options are changed: - character-set-server - collation-server - join-cache-level - log-basename - max-allowed-packet - optimizer-switch - query-cache-size and query-cache-type - skip-name-resolve - table-definition-cache - table-open-cache - Some innodb options etc Changes: - Don't print out the value of system variables as one can't depend on them to being constants. - Don't set global variables to 'default' as the default may not be the same as the test was started with if there was an additional option file. Instead save original value and reset it at end of test. - Test that depends on the latin1 character set should include default_charset.inc or set the character set to latin1 - Test that depends on the original optimizer switch, should include default_optimizer_switch.inc - Test that depends on the value of a specific system variable should set it in the test (like optimizer_use_condition_selectivity) - Split subselect3.test into subselect3.test and subselect3.inc to make it easier to set and reset system variables. - Added .opt files for test that required specfic options that could be changed by external configuration files. - Fixed result files in rockdsb & tokudb that had not been updated for a while.
* | | | | Merge 10.4 into 10.5Marko Mäkelä2019-09-062-0/+15
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.3 into 10.4, except for MDEV-20265Marko Mäkelä2019-08-232-0/+15
| |\ \ \ \ | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MDEV-20265 commit e746f451d57def4be679caafc29976741b3e89f7 introduces DBUG_ASSERT(right_op == r_tbl) in st_select_lex::add_cross_joined_table(), and that assertion would fail in several tests that exercise joins. That commit was skipped in this merge, and a separate fix of MDEV-20265 will be necessary in 10.4.
| | * | | MDEV-19254 Server crashes in maria_status with partitioned tableMonty2019-08-192-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | Bug was that storage_engine::info() was called with not opened table in ha_partition::info(). Fixed by ensuring that we are using an opened table.
* | | | | Fixed some test that failed randomlyMonty2019-08-231-3/+3
| | | | |
* | | | | MDEV-20279 Increase Aria index length limitMonty2019-08-239-47/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Limit increased from 1000 to 2000. Avoiding stack overflow by only storing keys and pages on the stack in recursive functions if there is plenty of space on it. Other things: - Use less stack space for b-tree operations as we now only allocate as much space as needed instead of always allocating HA_MAX_KEY_LENGTH. - Replaced most usage of my_safe_alloca() in Aria with the stack_alloc interface. - Moved my_setstacksize() to mysys/my_pthread.c
* | | | | Merge 10.4 into 10.5Marko Mäkelä2019-08-134-4/+58
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.3 into 10.4Marko Mäkelä2019-07-024-4/+58
| |\ \ \ \ | | |/ / /
| | * | | Merge 10.2 into 10.3Marko Mäkelä2019-07-024-4/+58
| | |\ \ \ | | | |/ /
| | | * | MDEV-14996 kill during FLUSH TABLES FOR EXPORT causes assertMonty2019-06-272-0/+27
| | | | |
| | | * | MDEV-17576 Assertion in maria_extra upon ALTER on table with triggers and locksMonty2019-06-252-4/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was that the code in maria_extra assumed that there could be only one table open when doing maria_extra(MA_FORCE_REOPEN) However in the case of triggers, there can be multiple copies of the table open. Fixed by removing assert.
* | | | | Merge 10.4 into 10.5Marko Mäkelä2019-06-204-0/+121
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.3 into 10.4Marko Mäkelä2019-06-194-0/+121
| |\ \ \ \ | | |/ / /
| | * | | Merge 10.2 into 10.3Marko Mäkelä2019-06-194-0/+121
| | |\ \ \ | | | |/ /
| | | * | MDEV-19595 fixedMichael Widenius2019-06-192-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test cases for the MDEV found several independent bugs in MariaDB server and Aria: - If a temporary table was marked as crashed, it could never be deleted. - Opening of a crashed temporary table gave an error message but the error was never forwarded to the caller which caused an assert() in my_ok() - init_read_record() did mmap of all temporary tables, which is probably not a good idea as this area can potentially be very big. Changed code to only mmap internal temporary tables. - mmap-ed tables where not unmapped in case of repair/optimize which caused bad data in table and crashes if the original table files where replaced with new ones (as the old mmap was still in place). Fixed by removing the mmap in case of repair. - Cleaned up usage of code that disabled mmap in Aria
| | | * | MDEV-19055 Failures with temporary tables and AriaMichael Widenius2019-06-172-0/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was two separate problems: - Aria pagecache didn't properly handle re-reading of blocks that have given errors before (this triggered an assert) - temporary tables that where opened several times where not properly closed in ALTER, REPAIR or OPTIMIZE table Other things - Added a couple of asserts that will make it easier to find problems like this in the future.
* | | | | Make it trivial to get stack traces from external programs.Monty2019-05-231-0/+7
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | To get a stacktrace in a program like aria_chk, one only have to do: #include <my_stacktrace.h> call my_init_stacktrace(1) in main().
* | | | Make maria-autozerofill a bit more rebustMonty2019-05-131-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove warning about aria_control_file - Write to unique test file Other things: - Fixed typo in aria_chk --help