summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-26206 gap lock is not set if implicit lock existsbb-10.5-MDEV-26206-post-pushVlad Lesin2021-08-181-4/+7
| | | | | | | | | | | | Post-push fix for 10.5+. The fix influence MDEV-14479. Before the fix lock_rec_convert_impl_to_expl() did not create explicit lock if caller's transaction owns found implicit lock(see MDEV-14479 for details). After the fix lock_rec_convert_impl_to_expl() can create explicit lock under the above conditions if the requested lock mode is not LOCK_REC_NOT_GAP. And that is why we need to check if the table is X-locked before lock_rec_convert_impl_to_expl() call.
* Merge 10.4 into 10.5Marko Mäkelä2021-08-1875-400/+1425
|\
| * Merge 10.3 into 10.4Marko Mäkelä2021-08-1873-447/+1270
| |\
| | * Merge 10.2 into 10.3Marko Mäkelä2021-08-183-7/+10
| | |\
| | | * MDEV-26131 fixupMarko Mäkelä2021-08-181-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | PageConverter::update_index_page(): Always validate the PAGE_INDEX_ID. Failure to do so could cause a crash when iterating secondary index pages. This was caught by the 10.4 test innodb.full_crc32_import.
| | | * MDEV-20931 fixup: innodb.import_corrupted test case cleanupMarko Mäkelä2021-08-181-0/+1
| | | |
| | | * MDEV-26350: select_lex->ref_pointer_array.size() % 5 == 0Daniel Black2021-08-181-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to an integer overflow an invalid size of ref_pointer_array could be allocated. Using size_t allows this continue. Allocation failures are handled gracefully if the value is too big. Thanks to Zuming Jiang for the bug report and fuzzing MariaDB. Reviewer: Sanja
| | * | MDEV-21555 Assertion secondary index is out of sync on delete from versioned ↵Aleksey Midenkov2021-08-183-17/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | table Delete-marked record is on the secondary index and the clustered index already purged the corresponding record. We cannot detect if such record is historical and we should not: the algorithm of row_ins_check_foreign_constraint() skips such record anyway.
| | * | MDEV-18734 ASAN additional fix for 10.3Aleksey Midenkov2021-08-181-0/+5
| | | | | | | | | | | | | | | | Do swap_blobs() for new partition_read_multi_range mode.
| | * | Merge 10.2 into 10.3Marko Mäkelä2021-08-1839-301/+909
| | |\ \ | | | |/ | | | | | | | | MDEV-18734 FIXME: vcol.partition triggers ASAN heap-use-after-free
| | | * MDEV-26131 fixup: ./mtr --embedded encryption.innodb_importMarko Mäkelä2021-08-181-0/+1
| | | |
| | | * MDEV-20931 ALTER...IMPORT can crash the serverEugene Kosov2021-08-179-33/+166
| | | | | | | | | | | | | | | | | | | | Main idea: don't log-and-crash but propogate error to the upper layers of stack to handle it and show to a user.
| | | * MDEV-26131 SEGV in ha_innobase::discard_or_import_tablespaceThirunarayanan Balathandayuthapani2021-08-166-112/+246
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Import operation without .cfg file fails when there is mismatch of index between metadata table and .ibd file. Moreover, MDEV-19022 shows that InnoDB can end up with index tree where non-leaf page has only one child page. So it is unsafe to find the secondary index root page. This patch does the following when importing the table without .cfg file: 1) If the metadata contains more than one index then InnoDB stops the import operation and report the user to drop all secondary indexes before doing import operation. 2) When the metadata contain only clustered index then InnoDB finds the index id by reading page 0 & page 3 instead of traversing the whole tablespace.
| | | * MDEV-26376 pars_info_bind_id() unnecessarily copies stringsMarko Mäkelä2021-08-168-51/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pars_info_bind_id(): Remove the parameter copy_name. It was always being passed as constant TRUE or true. It turns out that copying the string is completely unnecessary. In all calls except the one in fts_get_select_columns_str() and fts_doc_fetch_by_doc_id(), the parameter is being passed as a compile-time constant, and therefore the pointer cannot become stale. In that special call, the string that is being passed is allocated from the same memory heap that pars_info_bind_id() would have been using. pars_info_add_id(): Remove (unused declaration).
| | | * MDEV-26101: Galera WSREP SST broken on 10.6 under FreeBSDJulius Goryavsky2021-08-162-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | This commit fixes a call to the sockstat utility for FreeBSD, where this utility requires an extra "-s" parameter to display the connection status and prints one extra column.
| | | * MDEV-26340: rsync uses `--whole-file` only in wan modeJulius Goryavsky2021-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | This commit fixes a mistake where the --whole-file option is used by rsync SST in WAN mode instead of LAN.
| | | * MDEV-26211: Cluster joiner node is failed to start when using TLSJulius Goryavsky2021-08-152-30/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for reading new SSL configuration options (ssl-ca, ssl-cert and ssl-key) if the [sst] section with old options (tca, tcert and tkey) is missing in the config file, even if not specified authentication mode via the ssl-mode option. Before this change, new parameters were read only if the ssl-mode option was present in the configuration file and it was not equal to the 'DISABLED' value. Also added diagnostics (information level) which warns the user that due to the presence of the tca, tcert and/or tkey parameters in the [sst] section, new SSL configuration options will be ignored (if their values do not match the old ones).
| | | * mysql_client_test: test_bug40365 gcc-11.2.1 indentation complaintDaniel Black2021-08-151-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Observed in 10.4 however same code in 10.2 mariadb-server-10.4/tests/mysql_client_test.c:18209:5: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation] 18209 | if (!opt_silent) | ^~ In file included from mariadb-server-10.4/tests/mysql_client_test.c:38: mariadb-server-10.4/tests/mysql_client_fw.c:133:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 133 | ((void) ((expr) ? 0 : (die(__FILE__, __LINE__, #expr), 0))) | ^ mariadb-server-10.4/tests/mysql_client_test.c:18212:7: note: in expansion of macro ‘DIE_UNLESS’ 18212 | DIE_UNLESS(tm[i].year == 0); | ^~~~~~~~~~ $ /usr/bin/cc --version cc (GCC) 11.2.1 20210728 (Red Hat 11.2.1-1)
| | | * Fix cmake warning caused by 751ebe44fda4deb715fc2235548517c287f2a559Vladislav Vaintroub2021-08-091-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CMake Warning (dev) at cmake/plugin.cmake:288 (GET_TARGET_PROPERTY): Policy CMP0045 is not set: Error on non-existent target... Also, fix condition argument in ADD_FEATURE_INFO. It is not a string but boolean
| | | * MDEV-18734 ASAN heap-use-after-free upon sorting by blob column from ↵Aleksey Midenkov2021-08-059-59/+381
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | partitioned table ha_partition stores records in array of m_ordered_rec_buffer and uses it for prio queue in ordered index scan. When the records are restored from the array the blob buffers may be already freed or rewritten. The solution is to take temporary ownership of cached blob buffers via String::swap(). When the record is restored from m_ordered_rec_buffer the ownership is returned to table fields. Cleanups: init_record_priority_queue(): removed needless !m_ordered_rec_buffer check as there is same assertion few lines before. dbug_print_row() for arbitrary row pointer
| | | * bump the VERSIONDaniel Bartholomew2021-08-051-1/+1
| | | |
| | | * cleanup: specifying plugin dependencies in CMakeLists.txtSergei Golubchik2021-08-034-14/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. rename option DEPENDENCIES in MYSQL_ADD_PLUGIN() to DEPENDS to be consistent with other cmake commands and macros 2. use this DEPENDS option in plugins 3. add dependencies to the plugin embedded target too 4. plugins don't need to add GenError dependency explicitly, all plugins depend on it automatically
| | * | MDEV-26206 gap lock is not set if implicit lock existsVlad Lesin2021-08-174-3/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If lock type is LOCK_GAP or LOCK_ORDINARY, and the transaction holds implicit lock for the record, then explicit gap-lock will not be set for the record, as lock_rec_convert_impl_to_expl() returns true and lock_rec_convert_impl_to_expl() bypasses lock_rec_lock() call. The fix converts explicit lock to implicit one if requested lock type is not LOCK_REC_NOT_GAP. innodb_information_schema test result is also changed as after the fix the following statements execution: SET autocommit=0; INSERT INTO t1 VALUES (5,10); SELECT * FROM t1 FOR UPDATE; leads to additional gap lock requests.
| | * | bump the VERSIONDaniel Bartholomew2021-08-051-1/+1
| | | |
| | * | MDEV-24523 Execution of JSON_REPLACE failed on SpiderYongxin Xu2021-08-056-1/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | JSON_REPLACE() function executed with an error on Spider SE. This patch fixes the problem, and it also fixes the MDEV-24541. The problem is that Item_func_json_insert::func_name() returns the wrong function name "json_update". The Spider SE reconstructs a query based on the return value in some cases. Thus, if the return value is wrong, the Spider SE may generate a wrong query.
| * | | MDEV-25717 Assertion `owning_thread_id_ == wsrep::this_thread::get_id()'Daniele Sciascia2021-08-185-3/+193
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A test case to reproduce the issue. The actual fix is in galera library. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
| * | | MDEV-26308 : Galera test failure on galera.galera_split_brainLeandro Pacheco2021-08-1811-43/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Contains following fixes: * allow TOI commands to timeout while trying to acquire TOI with override lock_wait_timeout with a LONG_TIMEOUT only after succesfully entering TOI * only ignore lock_wait_timeout on TOI * fix galera_split_brain test as TOI operation now returns ER_LOCK_WAIT_TIMEOUT after lock_wait_timeout * explicitly test for TOI Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
| * | | MDEV-26372 enforce-storage-engine=InnoDB has no usability as an option to ↵Marko Mäkelä2021-08-161-43/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mysqld-install-db Creation of tables by the three names mysql.user, mysql.host, mysql.db was being blocked in the function row_mysql_is_system_table(). Since commit 4abb8216a054e14afbeb81e8529e02bab6fa14ac (MDEV-17658), mysql.user is a view, not a table. Since commit ead9a34a3e934f607c2ea7a6c68f7f6d9d29b5bd (MDEV-15851), mysql.host is not being created at all. Let us remove the special handling of table names in InnoDB, and allow mysql.db to be created in InnoDB. The special handling was originally added in commit e84ef2b747e31235036429760bfda488b82db0bb without any explanation. Reviewed by: Sergei Golubchik
| * | | MDEV-20215: binlog.show_concurrent_rotate failed in buildbot with wrong resultBrandon Nesterenko2021-08-135-3/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: ======= There are two issues that are addressed in this patch: 1) SHOW BINARY LOGS uses caching to store the binary logs that exist in the log directory; however, if new events are written to the logs, the caching strategy is unaware. This is okay for users, as it is okay for SHOW to return slightly old data. The test, however, can result in inconsistent data. It runs two connections concurrently, where one shows the logs, and the other adds a new file. The output of SHOW BINARY LOGS then depends on when the cache is built, with respect to the time that the second connection rotates the logs. 2) There is a race condition between RESET MASTER and SHOW BINARY LOGS. More specifically, where they both need the binary log lock to begin, SHOW BINARY LOGS only needs the lock to build its cache. If RESET MASTER is issued after SHOW BINARY LOGS has built its cache and before it has returned the results, the presented data may be incorrect. Solution: ======== 1) As it is okay for users to see stale data, to make the test consistent, use DEBUG_SYNC to force the race condition (problem 2) to make SHOW BINARY LOGS build a cache before RESET MASTER is called. Then, use additional logic from the next part of the solution to rebuild the cache. 2) Use an Atomic_counter to keep track of the number of times RESET MASTER has been called. If the value of the counter changes after building the cache, the cache should be rebuilt and the analysis should be restarted. Reviewed By: ============ Andrei Elkin: <andrei.elkin@mariadb.com>
| * | | MENT-1019.bb-10.4-hfAlexey Botchkov2021-08-113-4/+9
| | | | | | | | | | | | | | | | Audit-plugin related fixes.
| * | | mariabackup - fix string format in error messageVladislav Vaintroub2021-08-111-1/+1
| | | |
| * | | Fix test failure on galera_as_slave_replay by adding wait_conditionsJan Lindström2021-08-062-7/+23
| | | |
| * | | bump the VERSIONDaniel Bartholomew2021-08-051-1/+1
| | | |
* | | | MDEV-26223 Galera cluster node consider old server_id value even after ↵bb-10.5-rasmusmkaruza2021-08-181-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modification of server_id [wsrep_gtid_mode=ON] If cluster is bootstrapped in existing database, we should use provided configuration variables for wsrep_gtid_domain_id and server_id instead of recovered ones. If 'new' combination of wsrep_gtid_domain_id & server_id already existed somewere before in binlog we should continue from last seqno, if combination is new we start from seqno 0. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
* | | | MDEV-16264 fixup: Add missing 'static'Marko Mäkelä2021-08-171-2/+2
| | | |
* | | | MDEV-26273 InnoDB FTS DDL fails when innodb_force_recovery is set to 2Thirunarayanan Balathandayuthapani2021-08-163-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | InnoDB DDL fails when it tries to sync the table when innodb_force_recovery is set to 2. Problem is that fts_optimize_wq is not initialized when there are no background threads. fts_sync_during_ddl() should check whether fts_optimize_wq is initialized.
* | | | deb: columnstore not 32bit (fix)Daniel Black2021-08-161-2/+1
| | | | | | | | | | | | | | | | | | | | Fix for previous commit, shell logic for repeat configure stages corrected to use subshell.
* | | | deb: columnstore not 32bitDaniel Black2021-08-132-24/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Columnstore badly failed on 32bit. The way Debian triggers somehow doesn't detect the amd64 in the architecture of columnstore so we explicitly disable it to prevent failures on x86_32. The architecture from the control file is sufficient to not build of arm64 and other unsupported achitectures so we don't need to disable columnstore by default. The logic around not building columnstore on Travis/Gitlab ci can be preserved with a autobake-deb.sh restructure.
* | | | deb: s390x no WolfSSL workaround as upstream fixed in 4.6.0Daniel Black2021-08-131-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://github.com/wolfSSL/wolfssl/issues/2828 lists 4.6.0 a as the fixed version as we currently have 4.8.0. Since the time of the above issue, Debian has allowed OpenSSL linking.
* | | | MDEV-26325 Shutdown hangs whenever named pipes were used for connections.Vladislav Vaintroub2021-08-121-1/+4
| | | | | | | | | | | | | | | | | | | | This was a regression introduced in MDEV-18353, where to CONNECT objects were incorrectly counted for named pipes.
* | | | MENT-977 log priv host / priv user.bb-10.5-hfAlexey Botchkov2021-08-102-0/+28
| | | | | | | | | | | | | | | | Add server functions to provide necessary data.
* | | | bump the VERSIONDaniel Bartholomew2021-08-051-1/+1
| | | |
* | | | Update columnstoremariadb-10.5.12Oleksandr Byelkin2021-08-021-0/+0
| | | |
* | | | update PCRE2Oleksandr Byelkin2021-08-021-2/+2
| | | |
* | | | Merge branch '10.4' into 10.5Oleksandr Byelkin2021-08-0211-116/+120
|\ \ \ \ | |/ / /
| * | | Merge branch '10.3' into 10.4mariadb-10.4.21Oleksandr Byelkin2021-08-029-50/+119
| |\ \ \ | | |/ /
| | * | Merge branch '10.2' into 10.3mariadb-10.3.31Oleksandr Byelkin2021-08-029-50/+119
| | |\ \ | | | |/
| | | * MDEV-26220 Server crashes with indexed by prefix virtual columnmariadb-10.2.40Nikita Malyavin2021-08-024-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Server crashes in Field::register_field_in_read_map upon select from partitioned table with indexed by prefix virtual column. After several read-mark fixes a problem has surfaced: Since KEY (c(10),a) uses only a prefix of c, a new field is created, duplicated from table->field[3], with a new length. However, vcol_inco->expr is not copied. Therefore, (*key_info)->key_part[i].field->vcol_info->expr was left NULL in ha_partition::index_init(). Solution: copy vcol_info from table field when it's set up.
| | | * Revert "MDEV-26220 Server crashes with indexed by prefix virtual column"Oleksandr Byelkin2021-08-024-99/+48
| | | | | | | | | | | | | | | | This reverts commit 9b8e207ce03b2ab7a766348738055be9520561bd.
| | | * MDEV-23752 SHOW EXPLAIN FOR thd waits for sleepSergei Golubchik2021-07-312-19/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix main.processlist_notembedded test * before EXPLAINing `select sleep` wait for select to start (fixes "Target is not running an EXPLAINable command") * after killing sleep, wait for it to die (fixes test failures on --repeat when old sleep shows on a test rerun) * unify with 10.3, copy minor changes from there (`--echo End of 5.5` vs `--echo # End of 5.5`, etc)