summaryrefslogtreecommitdiff
path: root/mysql-test
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.2 into 10.3Marko Mäkelä2020-05-206-34/+31
|\
| * Merge 10.1 into 10.2Marko Mäkelä2020-05-204-6/+13
| |\
| | * MDEV-22258 Limit innodb_encryption_threads to 255Marko Mäkelä2020-05-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For no good reason, innodb_encryption_threads was limited to 4,294,967,295. Expectedly, the server would crash if such an insane value was specified. Let us limit the maximum to 255. The encryption threads are not doing much useful work. They are basically only dirtying pages by performing dummy writes via the redo log. The encryption key rotation or the in-place addition or removal of encryption will take place in the page cleaner. In a quick test on a 20-core CPU (40 threads in total), the sweet spot on an otherwise idle server seemed to be innodb_encryption_threads=16 for the test encryption.encrypt_and_grep. The new limit 255 should be more than enough for even bigger servers.
| | * MDEV-22472 rpl.rpl_fail_register failed in buildbot with wrong resultAndrei Elkin2020-05-191-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | This is a new test from upstream that did not expect the correct value of the command slot of the Dump thread when the latter gets killed. The test is made to expect "Killed" string as the command in show-processlist as it is supposed to when a thread gets killed.
| | * MDEV-22636 XML output for mtr doesn't work with valgrind optionRasmus Johansson2020-05-191-0/+1
| | |
| | * MDEV-22631 some test causes MTR interruption without generating summary and XMLRasmus Johansson2020-05-192-3/+11
| | |
| * | MDEV-18838 : galera.galera_toi_truncate: Test failure: mysqltest: query ↵Jan Lindström2020-05-202-28/+18
| | | | | | | | | | | | | | | | | | 'reap' succeeded - should have failed with errno 1213 Test cleanup.
| * | MDEV-22636 XML output for mtr doesn't work with valgrind optionRasmus Johansson2020-05-191-0/+1
| | |
* | | MDEV-22391 Assertion `0' failed in Item_type_holder::val_str on utf16 ↵Alexander Barkov2020-05-204-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | charset table query Problem: When handling a query like this: VALUES ('') UNION SELECT _utf16 0x0020 COLLATE utf16_bin; Type_handler_string_result::Item_hybrid_func_fix_attributes() tried to apply character set conversion Item_type_holder, which causes a crash on DBUG_ASSERT(0) inside Item_type_holder::val_str(). Fix: Overriding Item_type_holder's methods to avoid this, as follows: bool const_item() const { return false; } bool is_expensive() { return true; }
* | | MDEV-22636 XML output for mtr doesn't work with valgrind optionRasmus Johansson2020-05-191-0/+1
| | |
* | | Merge 10.2 into 10.3Marko Mäkelä2020-05-196-0/+99
|\ \ \ | |/ /
| * | Don't run main.sp2 in emebedded serverMonty2020-05-191-0/+2
| | |
| * | MDEV-22591 Debug build crashes on EXECUTE IMMEDIATE '... WHERE ?' USING IGNOREAlexander Barkov2020-05-192-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removing a wrong DBUG_ASSERT: When Item_param gets "unfixed" in cleanup(), its "fixed" gets assigned to false, while item_item keeps the value. So the assert was wrong. Perhaps, instead of removing the assert, it was possible to reset item_type to NO_VALUE in cleanup. But this is not very important: it's implemented in 10.4 in a better way: Item_param::is_fixed() always returns true and it does not need to be "unfixed".
| * | Merge 10.1 into 10.2Marko Mäkelä2020-05-192-0/+8
| |\ \ | | |/
| | * MDEV-22520 Assertion `gathered_length == thd->lex->comment.length` failed in ↵Andrei Elkin2020-05-182-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | binlog_defragment The assert was caused by early cleanup of a user variable participant in BINLOG @var,@var where it plays twice. That was unexpected by the base code to clear its value prematurely. Fixed with relocating the user var destruction after operations with its value is over.
| * | Fixed assert in Aria on SHOW PROCEDURE STATUSMonty2020-05-192-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-18457 Assertion `(bitmap->map + (bitmap->full_head_size/6*6)) <= full_head_end failed The problem was that full_head_size was not calculated correctly in the case when insert_order was inforced, which is the case for SHOW commands.
* | | MDEV-21995 Server crashes in Item_field::real_type_handler with table value ↵Alexander Barkov2020-05-192-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | constructor 1. Code simplification: Item_default_value handled all these values: a. DEFAULT(field) b. DEFAULT c. IGNORE and had various conditions to distinguish (a) from (b) and from (c). Introducing a new abstract class Item_contextually_typed_value_specification, to handle (b) and (c), so the hierarchy now looks as follows: Item Item_result_field Item_ident Item_field Item_default_value - DEFAULT(field) Item_contextually_typed_value_specification Item_default_specification - DEFAULT Item_ignore_specification - IGNORE 2. Introducing a new virtual method is_evaluable_expression() to determine if an Item is: - a normal expression, so its val_xxx()/get_date() methods can be called - or a just an expression substitute, whose value methods cannot be called. 3. Disallowing Items that are not evalualble expressions in table value constructors.
* | | Merge 10.2 into 10.3Marko Mäkelä2020-05-182-4/+4
|\ \ \ | |/ /
| * | Merge 10.1 into 10.2Marko Mäkelä2020-05-182-4/+4
| |\ \ | | |/
| | * MDEV-21976: mtr main.udf - broaden localhost (#1543)Daniel Black2020-05-182-4/+4
| | | | | | | | | | | | Localhost, depending on the platform can return any 127.0.0.1/8 address.
* | | Merge remote-tracking branch 'origin/10.2' into 10.3Alexander Barkov2020-05-162-0/+113
|\ \ \ | |/ /
| * | Merge remote-tracking branch 'origin/10.1' into 10.2Alexander Barkov2020-05-162-0/+113
| |\ \ | | |/ | | | | | | Also, adding 10.2 related changes for MDEV-22579
| | * MDEV-22579 No error when inserting DEFAULT(non_virtual_column) into a ↵Alexander Barkov2020-05-152-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | virtual column The code erroneously allowed both: INSERT INTO t1 (vcol) VALUES (DEFAULT); INSERT INTO t1 (vcol) VALUES (DEFAULT(non_virtual_column)); The former is OK, but the latter is not. Adding a new virtual method in Item: virtual bool vcol_assignment_allowed_value() const { return false; } Item_null, Item_param and Item_default_value override it. Item_default_value overrides it in the way to: - allow DEFAULT - disallow DEFAULT(col)
* | | Merge 10.2 into 10.3Marko Mäkelä2020-05-163-0/+60
|\ \ \ | |/ /
| * | MDEV-13626: Make test more robustMarko Mäkelä2020-05-151-0/+4
| | | | | | | | | | | | | | | In commit b1742a5c951633213d756600ee73ba7bfa7800ff we forgot FLUSH TABLES, potentially causing errors for MyISAM system tables.
| * | Merge 10.1 into 10.2Marko Mäkelä2020-05-152-0/+56
| |\ \ | | |/
| | * MDEV-22498: SIGSEGV in Bitmap<64u>::merge on SELECTVarun Gupta2020-05-142-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | For the case when the optimizer does the IN-EXISTS transformation, the equality condition is injected in the WHERE OR HAVING clause of the subquery. If the select list of the subquery has a reference to the parent select make sure to use the reference and not the original item.
* | | MDEV-18100: Clean up testMarko Mäkelä2020-05-162-0/+6
| | |
* | | Merge 10.2 into 10.3Marko Mäkelä2020-05-152-96/+0
|\ \ \ | |/ /
| * | MDEV-22456 Dropping the adaptive hash index may cause DDL to lock up InnoDBMarko Mäkelä2020-05-152-96/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the InnoDB buffer pool contains many pages for a table or index that is being dropped or rebuilt, and if many of such pages are pointed to by the adaptive hash index, dropping the adaptive hash index may consume a lot of time. The time-consuming operation of dropping the adaptive hash index entries is being executed while the InnoDB data dictionary cache dict_sys is exclusively locked. It is not actually necessary to drop all adaptive hash index entries at the time a table or index is being dropped or rebuilt. We can let the LRU replacement policy of the buffer pool take care of this gradually. For this to work, we must detach the dict_table_t and dict_index_t objects from the main dict_sys cache, and once the last adaptive hash index entry for the detached table is removed (when the garbage page is evicted from the buffer pool) we can free the dict_table_t and dict_index_t object. Related to this, in MDEV-16283, we made ALTER TABLE...DISCARD TABLESPACE skip both the buffer pool eviction and the drop of the adaptive hash index. We shifted the burden to ALTER TABLE...IMPORT TABLESPACE or DROP TABLE. We can remove the eviction from DROP TABLE. We must retain the eviction in the ALTER TABLE...IMPORT TABLESPACE code path, so that in case the discarded table is being re-imported with the same tablespace identifier, the fresh data from the imported tablespace will replace any stale pages in the buffer pool. rpl.rpl_failed_drop_tbl_binlog: Remove the test. DROP TABLE can no longer be interrupted inside InnoDB. fseg_free_page(), fseg_free_step(), fseg_free_step_not_header(), fseg_free_page_low(), fseg_free_extent(): Remove the parameter that specifies whether the adaptive hash index should be dropped. btr_search_lazy_free(): Lazily free an index when the last reference to it is dropped from the adaptive hash index. buf_pool_clear_hash_index(): Declare static, and move to the same compilation unit with the bulk of the adaptive hash index code. dict_index_t::clone(), dict_index_t::clone_if_needed(): Clone an index that is being rebuilt while adaptive hash index entries exist. The original index will be inserted into dict_table_t::freed_indexes and dict_index_t::set_freed() will be called. dict_index_t::set_freed(), dict_index_t::freed(): Note that or check whether the index has been freed. We will use the impossible page number 1 to denote this condition. dict_index_t::n_ahi_pages(): Replaces btr_search_info_get_ref_count(). dict_index_t::detach_columns(): Move the assignment n_fields=0 to ha_innobase_inplace_ctx::clear_added_indexes(). We must have access to the columns when freeing the adaptive hash index. Note: dict_table_t::v_cols[] will remain valid. If virtual columns are dropped or added, the table definition will be reloaded in ha_innobase::commit_inplace_alter_table(). buf_page_mtr_lock(): Drop a stale adaptive hash index if needed. We will also reduce the number of btr_get_search_latch() calls and enclose some more code inside #ifdef BTR_CUR_HASH_ADAPT in order to benefit cmake -DWITH_INNODB_AHI=OFF.
* | | Merge 10.2 into 10.3Marko Mäkelä2020-05-156-161/+14
|\ \ \ | |/ /
| * | Fix for using uninitialized memoryMonty2020-05-152-40/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-22073 MSAN use-of-uninitialized-value in collect_statistics_for_table() Other things: innodb.analyze_table was changed to mainly test statistic collection. Was discussed with Marko.
| * | Fixed bugs found by valgrindMonty2020-05-151-0/+2
| | | | | | | | | | | | | | | | | | Other things: - Removed innodb_encryption_tables.test from valgrind as it takes a REALLY long time
| * | MDEV-21336 Memory leaks related to innodb_debug_syncMarko Mäkelä2020-05-143-121/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This essentially reverts commit b393e2cb0c079b30563dcc87a62002c9c778643c. The leak might have been fixed, but because the DEBUG_SYNC instrumentation for InnoDB purge threads was reverted in 10.5 commit 5e62b6a5e06eb02cbde1e34e95e26f42d87fce02 as part of introducing a thread pool, it is easiest to revert the entire change.
* | | MDEV-18100: User defined aggregate functions not working correctly when the ↵Varun Gupta2020-05-152-0/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | schema is changed The issue here was that when the schema was changed the value for the THD::server_status is ored with SERVER_SESSION_STATE_CHANGED. For custom aggregate functions, currently we check if the server_status is equal to SERVER_STATUS_LAST_ROW_SENT then we should terminate the execution of the custom aggregate function as there are no more rows to fetch. So the check should be that if the server status has the bit set for SERVER_STATUS_LAST_ROW_SENT then we should terminate the execution of the custom aggregate function.
* | | MDEV-22560 Crash on a table value constructor with an SP variableAlexander Barkov2020-05-152-0/+24
| | | | | | | | | | | | | | | fix_fields_for_tvc() could call fix_fields() for Items that have already been fixed before. Changing fix_fields() to fix_fields_if_needed().
* | | Merge remote-tracking branch 'origin/10.2' into 10.3Alexander Barkov2020-05-142-0/+30
|\ \ \ | |/ /
| * | Merge remote-tracking branch 'origin/10.1' into 10.2Alexander Barkov2020-05-142-0/+30
| |\ \ | | |/
| | * MDEV-22502 MDB crashes in CREATE TABLE AS SELECT when the precision of ↵Alexander Barkov2020-05-142-0/+30
| | | | | | | | | | | | | | | | | | | | | returning type = 0. TRUNCATE(decimal_5_5) erroneously tried to create a DECIMAL(0,0) column. Creating a DECIMAL(1,0) column instead.
* | | Merge remote-tracking branch 'origin/10.2' into 10.3Alexander Barkov2020-05-147-2/+810
|\ \ \ | |/ /
| * | Merge remote-tracking branch 'origin/10.1' into 10.2Alexander Barkov2020-05-142-0/+765
| |\ \ | | |/
| | * MDEV-22503 MDB limits DECIMAL column precision to 16 doing CTAS with ↵Alexander Barkov2020-05-142-0/+765
| | | | | | | | | | | | | | | | | | | | | | | | floor/ceil over DECIMAL(X,Y) where X > 16 The DECIMAL data type branch in Item_func_int_val::fix_length_and_dec() incorrectly used DOUBLE-style length calculation, which resulted in a smaller data type than the actual result of FLOOR()/CEIL() needs.
| * | Ensure that auto_increment fields are marked properly on updateMonty2020-05-135-0/+43
| | | | | | | | | | | | | | | | | | MDEV-19622 Assertion failures in ha_partition::set_auto_increment_if_higher upon UPDATE on Aria table
* | | Merge 10.2 into 10.3Marko Mäkelä2020-05-1315-74/+95
|\ \ \ | |/ /
| * | Merge 10.1 into 10.2Marko Mäkelä2020-05-135-9/+14
| |\ \ | | |/
| | * Merge branch '10.1-release' into 10.1Oleksandr Byelkin2020-05-119-346/+413
| | |\
| | * | MDEV-22501 Various issues when using --innodb-data-file-size-debug=-1Marko Mäkelä2020-05-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let us limit the maximum value of the debug parameter innodb_data_file_size to 256 MiB. It is only being used in the test innodb.log_data_file_size, and the size of the system tablespace should never exceed some 70 MiB in ./mtr. Thus, 256 MiB should be a reasonable limit. The fact that negative values that are passed to unsigned parameters wrap around to the maximum value appears to be a regression due to commit 18ef02b04dfae21148c7397d088c7ffdfcd23c4e and has been filed as bug MDEV-22219.
| | * | Windows, mtr : Fix "Subroutine HAVE_WIN32_CONSOLE redefined at (eval 25) ↵Vladislav Vaintroub2020-05-071-1/+1
| | | | | | | | | | | | | | | | line 1."
| | * | MDEV-22344: Fix typos in commentsAnel Husakovic2020-05-062-2/+2
| | | |
| | * | postfix after e3f5789ac0b2 - var/log/stdout.log contains escape sequences.Vladislav Vaintroub2020-05-051-1/+1
| | | |