summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* move fix_vcol_exprs into TABLEbb-10.5-MDEV-16039-nikitaNikita Malyavin2020-07-212-5/+7
|
* fix resultNikita Malyavin2020-07-161-13/+8
|
* MDEV-16039 Crash when selecting virtual columns generated using functions ↵Nikita Malyavin2020-07-169-51/+198
| | | | | | | | | | | | | | with DAYNAME() * Allocate items on thd->mem_root while refixing vcol exprs * Make vcol tree changes register and roll them back after the statement is executed. Explanation: Due to collation implementation specifics an Item tree could change while fixing. The tricky thing here is to make it on a proper arena. It's usually not a problem when a field is deterministic, however, makes a pain vice-versa, during allocation allocating. A non-deterministic field should be refixed on each statement, since it depends on the environment state. Changing the tree will be temporary and therefore it should be reverted after the statement execution.
* fix compilation with gcc-10Eugene Kosov2020-07-092-1/+10
| | | | | | | | | | | | | | ../sql/sql_class.cc: In constructor ‘start_new_trans::start_new_trans(THD*)’: ../include/m_string.h:61:49: error: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct Ha_data’; use assignment or value-initialization instead [-Werror=class-memaccess] 61 | # define bzero(A,B) memset((A),0,(B)) | ^ ../sql/sql_class.cc:5805:3: note: in expansion of macro ‘bzero’ 5805 | bzero(thd->ha_data, sizeof(thd->ha_data)); | ^~~~~ In file included from ../sql/sql_class.cc:33: ../sql/sql_class.h:2003:8: note: ‘struct Ha_data’ declared here 2003 | struct Ha_data | ^~~~~~~
* Add man page for new command aria_s3_copyOtto Kekäläinen2020-07-084-1/+55
| | | | | | Based on output of 'aria_s3_copy --help'. Also fix a typo in command help.
* MDEV-22930 Unnecessary contention on rw_lock_list_mutex in ↵Eugene Kosov2020-07-088-222/+61
| | | | | | | | | | | | | | | | | | | | ibuf_dummy_index_create() 1. Do not initialize dict_table_t::stats_latch in ibuf 2. Remove overengineering in GenericPolicy to speed up things dict_mem_table_create(): add new argument init_stats_latch ibuf_dummy_index_create(): do not initialize dict_table_t::stats_latch GenericPolicy: add new members m_filename and m_line sync_file_create_register() sync_file_created_deregister() sync_file_created_get() CreateTracker: remove rw_lock_t::created: a new debug member
* replace UT_LIST with ilist in rw_lock_list_tEugene Kosov2020-07-076-49/+35
|
* fix clang compilationEugene Kosov2020-07-062-107/+116
|
* MDEV-23071 remove potentially dangerouws casting to Item_in_subselectOleksandr Byelkin2020-07-069-118/+155
| | | | Remove types casting with a help of virtual functions.
* Fix cmake -DWITH_MSAN=ONMarko Mäkelä2020-07-051-2/+2
| | | | | commit ab4069909d1f8d0c4740b5bd90e1422ce1978187 accidentally misplaced #endif directives.
* After-merge fix for ASAN and MSANMarko Mäkelä2020-07-052-3/+7
| | | | | | | | | | | | | | | | | The merge commit 0fd89a1a89da73cec8e87e1f007637eaec51dcc0 of commit b6ec1e8bbf0ffca2d715aded694722e0c4b5d484 seems to cause occasional MemorySanitizer failures, because it failed to replace some MEM_UNDEFINED() calls with MEM_MAKE_ADDRESSABLE(). my_large_free(): Correctly invoke MEM_MAKE_ADDRESSABLE() after freeing memory. Failure to do so could cause bogus AddressSanitizer failures for memory allocated by my_large_malloc(). On MemorySanitizer, we will do nothing. buf_pool_t::chunk_t::create(): Replace the MEM_MAKE_ADDRESSABLE() that had been added in commit 484931325e7bcecddc6daf1a55c008ddd67497e4 to work around the issue.
* Merge 10.4 into 10.5Marko Mäkelä2020-07-041-0/+11
|\
| * Merge 10.3 into 10.4Marko Mäkelä2020-07-041-3/+16
| |\
| | * Fixup the parent commit for MSAN and ValgrindMarko Mäkelä2020-07-041-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 484931325e7bcecddc6daf1a55c008ddd67497e4 was a necessary fix for the buffer pool resizing tests in 10.5 in AddressSanitizer. However, that change would break the tests innodb.innodb_buffer_pool_resize and innodb.innodb_buffer_pool_resize_with_chunks when run in MemorySanitizer, or presumably in Valgrind as well. (Those tests run "forever" in Valgrind.) buf_pool_resize(): Cancel the effect of MEM_NOACCESS() in Valgrind and ASAN. In MSAN, MEM_NOACCESS() is a no-op, and hence we must do nothing special here. MEM_MAKE_ADDRESSABLE() would declare the memory contents undefined. In this particular case, we must actually declare the contents defined for Valgrind.
* | | MDEV-22535 fixup: Define a single-caller function inlineMarko Mäkelä2020-07-042-3/+4
| | | | | | | | | | | | Let us avoid any overhead in release builds, for an empty function.
* | | After-merge fixes for ASANMarko Mäkelä2020-07-044-19/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The merge commit 0fd89a1a89da73cec8e87e1f007637eaec51dcc0 of commit b6ec1e8bbf0ffca2d715aded694722e0c4b5d484 was slightly incomplete. ReadView::mem_valid(): Use the correct primitive MEM_MAKE_ADDRESSABLE(), because MEM_UNDEFINED() now has no effect on ASAN. recv_sys_t::alloc(), recv_sys_t::add(): Use MEM_MAKE_ADDRESSABLE() instead of MEM_UNDEFINED(), to get the correct behaviour for ASAN. For Valgrind and MSAN, there is no change in behaviour. recv_sys_t::free(), recv_sys_t::clear(): Before freeing memory to buf_pool.free_list, invoke MEM_MAKE_ADDRESSABLE() on the entire buf_block_t::frame, to cancel the effect of MEM_NOACCESS() in recv_sys_t::alloc().
* | | optimize ha_delete_table_forceSergei Golubchik2020-07-041-11/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | first try discovering engines, then the rest. otherwise every DROP TABLE non_existent; will do lots of i/o trying to remove .MYI/.MYD/.MAI/.MAD/.CSV/etc files this matches the old behavior where DROP TABLE always tried to discover the table before dropping.
* | | continue DROP TEMPORARY TABLE t1, t2, t3 after error.Sergei Golubchik2020-07-043-16/+51
| | | | | | | | | | | | | | | | | | normal DROP TABLE with many tables continues after an error, trying to drop as many tables as possible. But DROP TEMPORARY TABLE was aborting on the first error. Change it to behave as DROP TABLE does.
* | | replace HTON_AUTOMATIC_DELETE_TABLE with return -1 from drop_table()Sergei Golubchik2020-07-0411-51/+31
| | |
* | | remove mysql_declare_plugin declaration from some pluginsSergei Golubchik2020-07-048-144/+0
| | |
* | | MDEV-11412 Ensure that table is truly dropped when using DROP TABLESergei Golubchik2020-07-046-73/+85
| | | | | | | | | | | | | | | | | | | | | don't do table discovery on DROP. DROP falls back to "force" approach when a table isn't found and will try to drop in all engines anyway. That is, trying to discover in all engines before the drop is redundant and may be expensive.
* | | rewrite bug#26704 test caseSergei Golubchik2020-07-044-113/+34
| | | | | | | | | | | | | | | | | | | | | drop-no_root needs DROP DATABASE to fail. But `chmod 000` is not reliable after drop table force anymore. Make DROP DATABASE to fail by creating an extra file in the db dir
* | | small cleanupSergei Golubchik2020-07-042-26/+21
| | |
* | | cleanup: make dd_frm_type to work as documentedSergei Golubchik2020-07-046-35/+26
| | | | | | | | | | | | remove redundant argument, return all possible enum values
* | | MDEV-11412 Ensure that table is truly dropped when using DROP TABLESergei Golubchik2020-07-044-75/+13
| | | | | | | | | | | | | | | | | | | | | minor post-review fixes * remove duplicate tests * first file indicates table existance even with discovery * don't duplicate trigger dropping code
* | | optimization: use hton->drop_table in few simple casesSergei Golubchik2020-07-0411-3/+24
| | |
* | | introduce hton->drop_table() methodSergei Golubchik2020-07-049-95/+70
| | | | | | | | | | | | | | | | | | | | | | | | first step in moving drop table out of the handler. todo: other methods that don't need an open table for now hton->drop_table is optional, for backward compatibility reasons
* | | test dropping of a MEMORY tableSergei Golubchik2020-07-042-0/+14
| | |
* | | cleanup, less #ifdef'sSergei Golubchik2020-07-047-10/+8
| | |
* | | Disable rpl_parallel2 temporarly until we have a proper fix for it in 10.5Monty2020-07-041-0/+1
| | |
* | | Merge remote-tracking branch 'origin/10.4' into 10.5Monty2020-07-0340-173/+182
|\ \ \ | |/ /
| * | Merge remote-tracking branch 'origin/10.3' into 10.4Monty2020-07-037-4/+16
| |\ \ | | |/
| | * Fix for MSAN from Marko related to buf_pool_resizeMonty2020-07-031-0/+5
| | |
| | * Don't give errors for default value copy in create_tmp_tableMonty2020-07-033-0/+41
| | |
| | * Fixed errors found by MSANMonty2020-07-024-3/+5
| | |
| * | Merge branch '10.4-MDEV-22222' of ↵10.4-MDEV-22222Julius Goryavsky2020-07-033-0/+39
| |\ \ | | | | | | | | | | | | https://github.com/codership/mariadb-server into 10.4-MDEV-22222
| | * | MDEV-22222: Assertion `state() == s_executing || state() == s_preparing || ↵mkaruza2020-06-283-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | state() == s_prepared || state() == s_must_abort || state() == s_aborting || state() == s_cert_failed || state() == s_must_replay' failed in wsrep::transaction::before_rollback LOCK TABLE will do implicit commit, we need to properly handle transaction after commit.
| * | | Don't give errors for default value copy in create_tmp_tableMonty2020-07-031-0/+7
| | | |
| * | | Merge remote-tracking branch 'origin/10.3' into 10.4Monty2020-07-0339-180/+165
| |\ \ \ | | | |/ | | |/|
| | * | MDEV-20377 post-fix: Introduce MEM_MAKE_ADDRESSABLEMarko Mäkelä2020-07-0218-87/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In AddressSanitizer, we only want memory poisoning to happen in connection with custom memory allocation or freeing. The primary use of MEM_UNDEFINED is for declaring memory uninitialized in Valgrind or MemorySanitizer. We do not want MEM_UNDEFINED to have the unwanted side effect that AddressSanitizer would no longer be able to complain about accessing unallocated memory. MEM_UNDEFINED(): Define as no-op for AddressSanitizer. MEM_MAKE_ADDRESSABLE(): Define as MEM_UNDEFINED() or ASAN_UNPOISON_MEMORY_REGION(). MEM_CHECK_ADDRESSABLE(): Wrap also __asan_region_is_poisoned().
| | * | Fixed bugs found by valgrindMonty2020-07-0232-126/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Some of the bug fixes are backports from 10.5! - The fix in innobase/fil/fil0fil.cc is just a backport to get less error messages in mysqld.1.err when running with valgrind. - Renamed HAVE_valgrind_or_MSAN to HAVE_valgrind
| | * | Don't copy uninitialized bytes when copying varstringsMonty2020-07-025-10/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using field_conv(), which is called in case of field1=field2 copy in fill_records(), full varstring's was copied, including unitialized bytes. This caused valgrind to compilain about usage of unitialized bytes when using Aria static length records. Fixed by not using memcpy when copying varstrings but instead just copy the real bytes.
| | * | MDEV-22535 TABLE::initialize_quick_structures() takes 0.5% in oltp_read_onlyMonty2020-07-022-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Removed not needed bzero in void TABLE::initialize_quick_structures(). - Replaced bzero with TRASH_ALLOC() to have this change verfied with memory checkers - Added missing table->quick_keys.is_set in table_cond_selectivity()
* | | | Atomic write support for ScaleFlux NVMe SSD'sQi Wu2020-07-031-2/+112
| | | |
* | | | compilation fixSergei Golubchik2020-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | include/my_valgrind.h:88:112: error: ‘void* memset(void*, int, size_t)’ writing to an object of non-trivial type ‘key_map’ {aka ‘class Bitmap<64>’}; use assignment instead [-Werror=class-memaccess] in this case it's safe, Bitmap<> is trivial enough
* | | | MDEV-22535 TABLE::initialize_quick_structures() takes 0.5% in oltp_read_onlyMonty2020-07-028-146/+181
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed by: - Make all quick_* variable allocated according to real number keys instead of MAX_KEY - Store all the quick* items in separated allocated structure (OPT_RANGE) - Ensure we don't access any quick* variable without first checking opt_range_keys.is_set(). Thanks to this, we don't need any pre-initialization of quick* variables anymore. Some renames was done to use the new structure: table->quick_keys -> table->opt_range_keys table->quick_rows[X] -> table->opt_range[X].rows table->quick_key_parts[X] -> table->opt_range[X].key_parts table->quick_costs[X] -> table->opt_range[X].cost table->quick_index_only_costs[X] -> table->opt_range[X].index_only_cost table->quick_n_ranges[X] -> table->opt_range[X].ranges table->quick_condition_rows -> table->opt_range_condition_rows This patch should both decrease memory needed for TABLE objects (3528 -> 984 + keyinfo) and increase performance, thanks to less initializations per query, and more localized memory, thanks to the opt_range structure.
* | | | Fixed typo in InnoDB when compiling with VALGRINDMonty2020-07-021-1/+1
| | | |
* | | | Merge 10.4 into 10.5Marko Mäkelä2020-07-02234-789/+3048
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2020-07-02213-748/+2485
| |\ \ \ | | |/ /
| | * | Merge 10.2 into 10.3Marko Mäkelä2020-07-02210-698/+2371
| | |\ \