summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-25026 Various code paths are accessing freed pagesbb-10.5-MDEV-25026Marko Mäkelä2021-03-025-10/+26
| | | | | | | | | | | | | | | The test case encryption.innodb_encrypt_freed was failing in MemorySanitizer builds. recv_recover_page(): Mark non-recovered pages as freed. fil_crypt_rotate_page(): Before comparing the block->frame contents, check if the block was marked as freed. Other places: Whenever using BUF_GET_POSSIBLY_FREED, check the block->page.status before accessing the page frame. (Both uses of BUF_GET_IF_IN_POOL should be correct now.)
* MDEV-24858 SIGABRT in DbugExit from my_malloc in Query_cache::init_cache ↵Sergei Golubchik2021-03-012-2/+2
| | | | | | | | Regression disable warnings, as they're different on 32bit platforms Closes #1757
* MDEV-24858 SIGABRT in DbugExit from my_malloc in Query_cache::init_cache ↵Nayuta Yanagisawa2021-03-013-1/+12
| | | | | | Regression Add missing DBUG_RETURN to my_malloc.
* MDEV-24997 Assertion mtr->is_named_space(page_id.space()) in ibuf0ibuf.cc:624Thirunarayanan Balathandayuthapani2021-02-261-0/+1
| | | | | | | - This is caused by commit deadec4e689c9435e20ebb89fd8f84d3f0f90ff3 (MDEV-24569). InnoDB fails to set the tablespace associated with mini-transacton while resetting the change buffer bitmap bits of the page.
* Merge remote-tracking branch 10.4 into 10.5Daniel Black2021-02-262-1/+2
|\
| * Merge 10.3 into 10.4Marko Mäkelä2021-02-252-1/+2
| |\
| | * Merge 10.2 into 10.3Marko Mäkelä2021-02-252-1/+2
| | |\
| | | * Fixed the innodb_ext_key test by adding replace_columnVarun Gupta2021-02-252-1/+2
| | | |
* | | | Merge remote-tracking branch 'origin/10.4' into 10.5Daniel Black2021-02-2610-55/+272
|\ \ \ \ | |/ / /
| * | | Merge branch '10.3' into 10.4Daniel Black2021-02-251-1/+1
| |\ \ \ | | |/ /
| | * | mysys: lf_hash - fix l_search size_t keylenDaniel Black2021-02-251-1/+1
| | | | | | | | | | | | | | | | Correcting an incorrect merge from 10.2
| * | | Merge branch '10.3' into 10.4Daniel Black2021-02-258-47/+247
| |\ \ \ | | |/ /
| | * | Merge remote-tracking branch 'origin/10.2' into 10.3Daniel Black2021-02-252-15/+16
| | |\ \ | | | |/
| | | * MDEV-24728: Debian include client caching_sha2_password pluginDaniel Black2021-02-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of 4bc31a904f22 Include client libraries for auth caching_sha2_password and sha256_password in the libmariadb3 client library package.
| | | * MDEV-23510: arm64 lf_hash alignment of pointersDaniel Black2021-02-251-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | volatile != atomic. volatile has no memory barrier schemantics, its for mmaped IO so lets allow some optimizer gains and stop pretending it helps with memory atomicity. The MDEV lists a SEGV an assumption is made that an address was partially read. As C packs structs strictly in order and on arm64 the cache line size is 128 bits. A pointer (link - 64 bits), followed by a hashnr (uint32 - 32 bits), leaves the following key (uchar * 64 bits), neither naturally aligned to any pointer and worse, split across a cache line which is the processors view of an atomic reservation of memory. lf_dynarray_lvalue is assumed to return a 64 bit aligned address. As a solution move the 32bit hashnr to the end so we don't get the *key pointer split across two cache lines. Tested by: Krunal Bauskar Reviewer: Marko Mäkelä
| | * | MDEV-24910 Crash with SELECT that uses table value constructor as a subselectIgor Babaev2021-02-246-31/+231
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bug caused crashes of the server when processing queries with table value constructors (TVC) that contained subqueries and were used itself as subselects. For such TVCs the following transformation is applied at the prepare stage: VALUES (v1), ... (vn) => SELECT * FROM (VALUES (v1), ... (vn)) tvc_x. This transformation allows to reduce the problem of evaluation of TVCs used as subselects to the problem of evaluation of regular subselects. The transformation is implemented in the wrap_tvc(). The code the function to mimic the behaviour of the parser when processing the result of the transformation. However this imitation was not free of some flaws. First the function called the method exclude() that completely destroyed the select tree structures below the transformed TVC. Second the function used the procedure mysql_new_select to create st_select_lex nodes for both wrapping select of the transformation and TVC. This also led to constructing of invalid select tree structures. The patch actually re-engineers the code of wrap_tvc(). Approved by Oleksandr Byelkin <sanja@mariadb.com>
| * | | MDEV-24964 : Heap-buffer-overflow on wsrep_schema.cc ::remove_fragmentsJan Lindström2021-02-241-8/+28
| | | | | | | | | | | | | | | | | | | | | | | | Problem was that we used heap allocated key using too small array. Fixed by using dynamic memory allocation using actual needed size.
| * | | MDEV-24967 : Signal 11 on ha_innodb.cc::bg_wsrep_kill_trx line 18611Jan Lindström2021-02-241-4/+6
| | | | | | | | | | | | | | | | | | | | Null poiter reference in case where bf_thd has no trx .e.g. when we have MDL-conflict.
| * | | MDEV-20857: perf schema conflict name filename_hashDaniel Black2021-02-243-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | filename_hash is a function from libiberty.a from the system but also an expored name in the perf schema static library. We'll use a different name.
* | | | MDEV-23510: arm64 lf_hash alignment of pointersDaniel Black2021-02-253-24/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Like the 10.2 version 1635686b509111c10cdb0842a0dabc0ef07bdf56, except C++ on internal functions for my_assume_aligned. volatile != atomic. volatile has no memory barrier schemantics, its for mmaped IO so lets allow some optimizer gains and stop pretending it helps with memory atomicity. The MDEV lists a SEGV an assumption is made that an address was partially read. As C packs structs strictly in order and on arm64 the cache line size is 128 bits. A pointer (link - 64 bits), followed by a hashnr (uint32 - 32 bits), leaves the following key (uchar * 64 bits), neither naturally aligned to any pointer and worse, split across a cache line which is the processors view of an atomic reservation of memory. lf_dynarray_lvalue is assumed to return a 64 bit aligned address. As a solution move the 32bit hashnr to the end so we don't get the *key pointer split across two cache lines. Tested by: Krunal Bauskar Reviewer: Marko Mäkelä
* | | | MDEV-24967 : Signal 11 on ha_innodb.cc::bg_wsrep_kill_trx line 18611Jan Lindström2021-02-241-4/+6
| | | | | | | | | | | | | | | | | | | | Null poiter reference in case where bf_thd has no trx .e.g. when we have MDL-conflict.
* | | | MDEV-24953: 10.5.9 crashes with large IN() listSergei Petrunia2021-02-244-19/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was in and_all_keys(), the code of MDEV-9759 which calculates the new tree weight: First, it didn't take into account the case when (next->next_key_part=tmp) == NULL and dereferenced a NULL pointer when getting tmp->weight. Second, "if (param->alloced_sel_args > SEL_ARG::MAX_SEL_ARGS) break" could leave the loop with incorrect value of weight. Fixed by introducing SEL_ARG::update_weight_locally() and calling it at the end of the function. This allows to avoid caring about all the above cases.
* | | | Merge 10.4 into 10.5Marko Mäkelä2021-02-242-3/+11
|\ \ \ \ | |/ / /
| * | | Merge branch '10.3' into 10.4Vicențiu Ciorbaru2021-02-231-0/+7
| |\ \ \ | | |/ /
| | * | Merge branch '10.2' into 10.3Vicențiu Ciorbaru2021-02-231-0/+7
| | |\ \ | | | |/
| | | * Remove race condition during `make dist`Vicențiu Ciorbaru2021-02-231-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduced by 85828b8f22e7f4dfa6a5d4b0a1ab9e133e7feea7 This is running 2 git processes in parallel, which, if unlucky can cause either of them to fail with "File already exists" error.
| * | | Merge 10.3 into 10.4Marko Mäkelä2021-02-231-2/+1
| |\ \ \ | | |/ /
| | * | Merge 10.2 into 10.3Marko Mäkelä2021-02-231-2/+1
| | |\ \ | | | |/
| | | * MDEV-24913 Assertion !recv_no_log_write in log_write_up_to()Thirunarayanan Balathandayuthapani2021-02-231-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The commit 5fd3c7471e3e0673b50d309567c9747d36f09412(MDEV-24709) resets the recv_no_ibuf_operations in recv_recovery_from_checkpoint_start(), but InnoDB fails to reset the variable recv_no_log_write() during that time and that leads to the assert failure.
* | | | Merge branch '10.4' into 10.5Sergei Golubchik2021-02-2389-1359/+1850
|\ \ \ \ | |/ / /
| * | | Merge branch 'github/10.4' into 10.4Sergei Golubchik2021-02-234-8/+42
| |\ \ \
| | * | | MDEV-24114 SHOW CREATE USER doesnt display correct password expiry statusRobert Bindar2021-02-234-8/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given PASSWORD EXPIRE and PASSWORD EXPIRE [NEVER|INTERVAL x DAY] are two different mechanisms, SHOW CREATE USER should display all the information required to restore the state of an account which includes both a manual expired state and an automatic policy. The solution proposed here keeps a CREATE USER ... PASSWORD EXPIRE statement and adds an aditional ALTER USER .. PASSWORD EXPIRE [NEVER|INTERVAL x DAY] when necessary This way a tool can restore almost the complete state of an account as it was before a dump. The only information left still is the value of the password_last_changed column from mysql.global_priv
| * | | | Merge branch '10.3' into 10.4Sergei Golubchik2021-02-2367-1310/+1681
| |\ \ \ \ | | | |/ / | | |/| |
| | * | | MDEV-24929 Server crash in thr_multi_unlock or in get_schema_tables_resultMonty2021-02-224-7/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was caused by two different bugs: 1) Information_schema tables where not locked by lock_tables, but get_lock_data() was not filtering these out. This caused a crash when mysql_unlock_some_tables() tried to unlock tables early, including not locked information schema tables. Fixed by not locking SYSTEM_TMP_TABLES 2) In some cases the optimizer will notice that we do not need to read the information_schema tables at all. In this case join_tab->read_record is not set, which caused a crash in get_schema_tables_result() Fixed by ignoring const tables in get_schema_tables_result()
| | * | | Merge branch '10.2' into 10.3Sergei Golubchik2021-02-2262-1296/+1416
| | |\ \ \ | | | | |/ | | | |/|
| | | * | fix binlog_xa_recover testSergei Golubchik2021-02-223-42/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. wait for the binlog thread to reach the certain state, don't use a debug_sync that's incorrectly placed to detect the state 2. no need to do a (non-deterministic) `show binlog events` to verify what is guaranteed by the directly preceding line
| | | * | cleanup: renames, no need to create a new .inc fileSergei Golubchik2021-02-225-283/+281
| | | | | | | | | | | | | | | | | | | | if it's the whole content of a test anyway.
| | | * | mtr fixes for old (5.10.1) perlSergei Golubchik2021-02-221-4/+5
| | | | |
| | | * | support for mtr --valgdbSergei Golubchik2021-02-221-3/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add a new "debugger" to mtr, that runs the executable under valgrind in gdb. valgrind pid is auto-detected, but the delay (sleep) and vgdb path are hard-coded for now
| | | * | unify mtr handling of debuggersSergei Golubchik2021-02-222-750/+276
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "debugger" is anything that wraps execution of a target binary (mysqld or mysqltest). Currently the list includes: gdb, ddd, dbx, lldb, valgrind, strace, ktrace, rr, devenv, windbg, vsjitdebugger. for every debugger xxx, mtr will recognize four options: --xxx, --boot-xxx, --manual-xxx, --client-xxx. They all support an optional "=string" argument. String being a semicolon-separated list of commands (e.g. for gdb) or one (not semicolon-separated) command line of options (e.g. for valgrind). Or both (e.g. --gdb='-quiet -nh;info files' In embedded both --xxx and --client-xxx work. Functionality changed/removed: * --rr-args is gone * --rr-dir is gone * --manual-debug is gone * --debugger={devenv|vc|windbg|vc_express|vsjitdebugger} is gone * --strace-option is gone * --stracer={strace|ktrace} is gone * --valgrind only enables it for the server, not for everything * --valgrind-all is gone * --valgrind-mysqltest is gone * --valgrind-mysqld is gone * --valgrind-options is gone * --valgrind-option is gone * --valgrind-path is gone * --callgrind is gone * one cannot combine --valgrind --gdb anymore * valgrind report doesn't add a fake test line to the output * vc and vcexpress on windows are no longer supported
| | | * | cleanup: remove dead code in mtrSergei Golubchik2021-02-221-13/+1
| | | | |
| | | * | cleanup: stat tablesSergei Golubchik2021-02-221-30/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | don't allocate Column_statistics_collected objects that won't be used. minor style fixes (StringBuffer<>, etc)
| | | * | MDEV-23753: SIGSEGV in Column_stat::store_stat_fieldsSergei Golubchik2021-02-221-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | only collect persistent stats for columns explicitly listed by the user in the ANALYZE TABLE PERSISTENT FOR COLUMNS (...) clause. The engine can extend table->read_set as much as it wants, it should not affect the collected statistics. Test case from the 3b94309a6c applies - it used to crash, because ha_partition extended table->read_set after the loop that initialized some objects based on bits in the read_set but before the loop that used these objects based on bits in the read_set.
| | | * | Revert "MDEV-23753: SIGSEGV in Column_stat::store_stat_fields"Sergei Golubchik2021-02-221-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts the commit 3b94309a6c but keeps the test Because the fix is a hack that isn't supposed to do anything, and relies on a side-effect of rnd_init inside ha_partition. A different fix is coming up.
| | | * | Merge branch 'bb-10.2-release' into 10.2Sergei Golubchik2021-02-2233-625/+533
| | | |\ \
| | | * | | bump the VERSIONDaniel Bartholomew2021-02-221-1/+1
| | | | | |
| | | * | | MDEV-24863 AHI entries mismatch with the index while reloading the evicted ↵Thirunarayanan Balathandayuthapani2021-02-221-14/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tables. - This is caused by commit ad6171b91cac33e70bb28fa6865488b2c65e858c (MDEV-22456). InnoDB reloads the evicted table again from dictionary. In that case, AHI entries and current index object mismatches happens. When index object mismatches then InnoDB should drop the page hash AHI entries for the block. In btr_search_drop_page_hash_index(), InnoDB should take exclusive lock on the AHI latch if index is already freed to avoid the freed memory access during buf_pool_resize()
| | | * | | Suppress warning on galera_ssl_upgrade test.Jan Lindström2021-02-222-0/+9
| | | | | |
| | | * | | MDEV-24873 : galera.galera_as_slave_ctas MTR failed: Assertion ↵Jan Lindström2021-02-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `(&(&LOCK_thd_data)->m_mutex)->count > 0 && pthread_equal(pthread_self(), (&(&LOCK_thd_data)->m_mutex)->thread)' failed in sql_class.cc on THD::awake(killed_state) Problem was that thd::awake assumes now that you hold THD::LOCK_thd_data so we need to keep it when we call wsrep_thd_awake from wsrep_abort_transaction.
| | | * | | MDEV-24872 : galera.galera_insert_multi MTR failed: crash with SIGABRTJan Lindström2021-02-171-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem was that we tried to lock THD::LOCK_thd_data after we have acquired lock_sys mutex. This is against mutex ordering rules.