summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-22983: Mariabackup's --help option disappearedOleksandr Byelkin2020-07-013-1/+13
| | | | return --help option
* MDEV-22910: SIGSEGV in Opt_trace_context::is_started & SIGSEGV in ↵Varun Gupta2020-06-304-4/+46
| | | | | | | | Json_writer::add_table_name (on optimized builds) Make sure to initialize members of TABLE::reginfo when TABLE::init is called. In this case the problem was that table->reginfo.join_tab was set for the SELECT query and then was reused by the UPDATE query. This case occurred only when the SELECT query had a degenerate join.
* MDEV-21773: added missing include file to mtr testsJulius Goryavsky2020-06-303-2/+3
|
* MDEV-23052 - add mysql_install_db.exe test with existing directory.Vladislav Vaintroub2020-06-302-0/+26
|
* MDEV-23052 mysql_install_db.exe can run on existing non-empty directory,Vladislav Vaintroub2020-06-301-7/+15
| | | | | | and remove it on error Disable existing non-empty datadir for mysql_install_db.exe
* Revert "Fix cross-compilation for systemd files"Otto Kekäläinen2020-06-271-3/+0
| | | | | This reverts commit 9fff91b59bc9ce22c77164f0129a765e3be3e9f3 which was pushed on master by accident.
* Fix cross-compilation for systemd filesOtto Kekäläinen2020-06-271-0/+3
| | | | | | | | Upstreamed from https://salsa.debian.org/mariadb-team/mariadb-10.4/-/blob/master/debian/patches/930314-cross-build.patch which has been running in Debian successfully for a year now. Original bug report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930314
* Merge branch '10.4-MDEV-22729-2' into 10.4Julius Goryavsky2020-06-252-19/+6
|\
| * MDEV-22729: additional changes after merge10.4-MDEV-22729-2Julius Goryavsky2020-06-231-2/+3
| |
| * Merge branch '10.4-MDEV-22729' of ↵Julius Goryavsky2020-06-192-28/+15
| |\ | | | | | | | | | https://github.com/codership/mariadb-server into 10.4-MDEV-22729-2
| | * MDEV-22729 fixes for galera.galera_slave_replay testsjaakola2020-05-272-28/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test was changing wsrep_on option in node_3, which is native MariaDB server (i.e. not a cluster node). Native NariaDB server should not manipulate wsrep replication state, this problem is fixed. galera.galera_slave_replay test phase 2 will cause certification failure for async slave SQL handler thread. This certification failure is now monitored and required to happen in the test. The test phase 2, generates scenario, where async slave SQL handler faces certification failure and galera slave applier is paused when this happens. This makes the test vulnerable for anomaly described in MDEV-22632. Therefore the fix in this commit depends on MDEV-22632, and should be merged after the fix for MDEV-22632.
* | | Disable sporadically failing galera_toi_truncate test caseJan Lindström2020-06-241-0/+1
| | |
* | | Stabilize glera_var_cluster_conf_id test case.Jan Lindström2020-06-241-2/+2
| | |
* | | MDEV-22632 wsrep XID checkpointing can happen out of order for certification ↵sjaakola2020-06-245-13/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | failure When a transaction fails in certification phase, it has connsumed one GTID, but as transaction must rollback, it will not go for commit ordering, and because of this also the wsrep XID checkpointing can happen out of order. This PR will make the thread, which has failed for certiication failure to wait for its commit order turn for checkpointing wsrep IXD in innodb rollback segment. There is a specific test for wsrep XID checkpointing ordering in mtr test: mysql-wsrep-bugs-607, which is added in this PR. Test galera_slave_replay depends also on this fix, as the second test phase may also assert for bad wsrep XID checkpointing order. galera_slave_replay.test had also other problems, which caused the test to fail immediately, thse are now fixes in this PR as well.
* | | MDEV-22993: Crash on EXPLAIN with PUSHED DOWN SELECT and subquerySergei Petrunia2020-06-243-38/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - select_describe() should not attempt to produce query plans for subqueries if the query is handled by a Select Handler. - JOIN::save_explain_data_intern should not add links to Explain_select for children selects if: 1. The whole query is handled by the Select Handler, or 2. this select (and so its children) is handled by Derived Handler.
* | | Test case cleanups.Jan Lindström2020-06-226-4/+18
| | |
* | | MDEV-22438 add a function similar to std::make_scope_exit()Eugene Kosov2020-06-222-4/+68
|/ / | | | | | | | | | | | | | | | | | | | | | | The idea was borrowed from http://wg21.link/p0052 scope_exit class is a helper, its name is hidden from user in the namespace detail. Alternative implementation of scope_exit with std::function looks slower on goldbolt.org as it may require allocation, etc. scope_exit doesn't need to own a callable, so beeing a pointer is enough. And std::decay produces such a pointer from callable.
* | MDEV-22665: Print ranges in the optimizer trace created for non-indexed ↵Varun Gupta2020-06-185-38/+240
| | | | | | | | | | | | columns when optimizer_use_condition_selectivity >2 Now the optimizer trace shows the ranges constructed while getting estimates from EITS
* | MDEV-22894: Mariabackup should not read [mariadb-client] option groupVlad Lesin2020-06-183-1/+13
| | | | | | | | from configuration files
* | MDEV-18215: mariabackup does not report unknown command line optionsVlad Lesin2020-06-181-1/+1
| | | | | | | | | | Post-push fix: add mysqd options in backup string in mariabackup sst script for the case of logging not in syslog.
* | Fix the test mariabackup.mdev-14447Marko Mäkelä2020-06-181-2/+2
| | | | | | | | | | | | | | | | The test mariabackup.mdev-14447 started failing due to the option --apply-log-only that became invalid since commit 9bdf35e90f36d9be8cc7591e2ed5e62feadc5515 and had been removed in commit 8c71c6aa8b9f4c78cfa164fad1d324ba0cf9b888.
* | MDEV-22902 Assertion `!page_has_siblings(block->frame)' failed in ↵Thirunarayanan Balathandayuthapani2020-06-171-1/+1
| | | | | | | | | | | | | | | | btr_pcur_store_position - There is a possiblity that metadata record is the only record in the leftmost leaf page. So change the assertion to check only previous page.
* | Remove redundant code in opt_range.cc: print_key_value()Sergei Petrunia2020-06-171-9/+0
| |
* | MDEV-22917 wolfssl might crash at startup when both SSL and encryption ↵Vladislav Vaintroub2020-06-173-2/+7
| | | | | | | | | | | | plugin are enabled Make sure to initialize SSL early enough, when encryption plugins is loaded
* | MDEV-22794: Avoid potential rollback segment contention withKrunal Bauskar2020-06-171-13/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | increased scalability through even distribution Rollback segments are allocated to transactions in round-robin fashion. This is controlled by incrementing a static-scope counter named rseg_slot. Said logic is not protected by any mutex or use of atomic for the counter. This potentially can cause the same rollback segment to get allocated to N different transactions (requesting allocation at the same time). While this is not an issue as a rollback segment can host multiple transactions from contention (performance) perspective it is better to allocate these rollback segments in round-robin fashion. Fix for the said issue ports use of atomic for the said counter that would ensure the original design semantic (even distribution through round-robin) is retained.
* | MDEV-22370 safe_mutex: Trying to lock uninitialized mutex at ↵Sachin2020-06-175-1/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | /data/src/10.4-bug/sql/rpl_parallel.cc, line 470 upon shutdown during FTWRL Problem:- When we issue FTWRL with shutdown in parallel, there is race between FTWRL and shutdown. Shutdown might destroy the mutex (pool->LOCK_rpl_thread_pool) before FTWRL can lock it. So we can get crash on FTWRL thread Solution:- mysql_mutex_destroy(pool->LOCK_rpl_thread_pool) should wait for FTWRL thread to complete its work , and then destroy. So slave_prepare_for_shutdown will just deactivate the pool, and mutex is destroyed later in end_slave()
* | MDEV-21759 galera.galera_parallel_autoinc_manytrx sporadic failures.MikkoJaakola2020-06-162-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The galera.galera_parallel_autoinc_manytrx mtr test opens and runs test scenario through 3 connections to node 1 and one connection to node 2. In the test initialization phase, the test creates two tables 't1' and 'ten' and then creates a stored procedure 'p1' to operate on these tables. These 3 create DDL statements are issued through same connection to node 1. In the next test phase, the mtr script uses send command to launch the call for the p1 stored procedure through all 3 connections to node 1 and through one connection to node 2. As the mtr send command is asynchronous, this test phase is non blocking and fast operation. Now, if the replication between nodes is slow, it may happen that the initialization phase DDL statements have not been received or have not been fully applied in node 2. Therefore there is no guarantee that the test tables and the stored procedure have been created in node 2. Yet, the test is trying to call p1 in node 2. In the failure case error logs, there is error message "MTR failed: query 'reap' failed: 1305: PROCEDURE test.p1 does not exist" The reap command through connection to node 2, is the first place where test execution may observe that test tables and/or stored procedure are not yet created in node 2. The fix in this commit adds a wait condition in connection to node 2, to wait until the stored procedure is created before calling the stored procedure. The wait is implemented by looking in information_schema.routines for the p1 stored procedure.
* | Fix include statements in galera_ipv6_mariabackup_section andAlexey Yurchenko2020-06-152-2/+2
| | | | | | | | galera_ipv6_mariabackup MTR tests
* | MDEV-18215: mariabackup does not report unknown command line optionsVlad Lesin2020-06-1415-135/+252
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-21298: mariabackup doesn't read from the [mariadbd] and [mariadbd-X.Y] server option groups from configuration files MDEV-21301: mariabackup doesn't read [mariadb-backup] option group in configuration file All three issues require to change the same code, that is why their fixes are joined in one commit. The fix is in invoking load_defaults_or_exit() and handle_options() for backup-specific groups separately from client-server groups to let the last handle_options() call fail on unknown backup-specific options. The order of options procesing is the following: 1) Load server groups and process server options, ignore unknown options 2) Load client groups and process client options, ignore unknown options 3) Load backup groups and process client-server options, exit on unknown option 4) Process --mysqld-args command line options, ignore unknown options New global flag my_handle_options_init_variables was added to have ability to invoke handle_options() for the same allowed options set several times without re-initialising previously set option values. --password value destroying is moved from option processing callback to mariabackup's handle_options() function to have ability to invoke server's handle_options() several times for the same possible allowed options set. Galera invokes wsrep_sst_mariabackup.sh with mysqld command line options to configure mariabackup as close to the server as possible. It is not known what server options are supported by mariabackup when the script is invoked. That is why new mariabackup option "--mysqld-args" is added, all unknown options that follow this option will be silently ignored. wsrep_sst_mariabackup.sh was also changed to: - use "--mysqld-args" mariabackup option to pass mysqld options, - remove deprecated innobackupex mode, - remove unsupported mariabackup options: --encrypt --encrypt-key --rebuild-indexes --rebuild-threads
* | Merge commit 10.3 into 10.4Marko Mäkelä2020-06-141-0/+1
|\ \
| * \ Merge 10.2 into 10.3Marko Mäkelä2020-06-141-0/+1
| |\ \
| | * | MDEV-22889: Disable innodb.innodb_force_recovery_rollbackMarko Mäkelä2020-06-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test case that was added for MDEV-21217 (commit b68f1d847f1fc00eed795e20162effc8fbc4119b) should have only two possible outcomes for the locking SELECT statement: (1) The statement is blocked, and the test will eventually fail with a lock wait timeout. This is what I observed when the code fix for MDEV-21217 was missing. (2) The lock conflict will ensure that the statement will execute after the rollback has completed, and an empty table will be observed. This is the expected outcome with the recovery fix. What occasionally happens (in some of our CI environments only, so far) is that the locking SELECT will return all 1,000 rows of the table that had been inserted by the transaction that was never supposed to be committed. One possibility is that the transaction was unexpectedly committed when the server was killed. Let us disable the test until the reason of the failure has been determined and addressed.
* | | | MDEV-21560 Assertion `grant_table || grant_table_role' failed in ↵Sergei Golubchik2020-06-133-1/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | check_grant_all_columns With RETURNING it can happen that the user has some privileges on the table (namely, DELETE), but later needs different privileges on individual columns (namely, SELECT). Do the same as in check_grant_column() - ER_COLUMNACCESS_DENIED_ERROR, not an assert.
* | | | Merge 10.3 into 10.4Marko Mäkelä2020-06-1342-183/+479
|\ \ \ \ | |/ / /
| * | | Merge 10.2 into 10.3Marko Mäkelä2020-06-1334-135/+350
| |\ \ \ | | |/ /
| | * | MDEV-21217 innodb_force_recovery=2 may wrongly abort rollbackMarko Mäkelä2020-06-133-1/+52
| | | | | | | | | | | | | | | | | | | | trx_roll_must_shutdown(): Correct the condition that detects the start of shutdown.
| | * | Fix wrong merge of commit d218d1aa49e848cef2bdbe83bbaf08e474d5209cVicențiu Ciorbaru2020-06-123-9/+4
| | | |
| | * | Merge branch '10.1' into 10.2Vicențiu Ciorbaru2020-06-1119-61/+207
| | |\ \
| | | * | MDEV-22755 CREATE USER leads to indirect SIGABRT in __stack_chk_fail () from ↵Alexander Barkov2020-06-113-16/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fill_schema_user_privileges + *** stack smashing detected *** (on optimized builds) The code erroneously used buff[100] in a fiew places to make a GRANTEE value in the form: 'user'@'host' Fix: - Fixing the code to use (USER_HOST_BUFF_SIZE + 6) instead of 100. - Adding a DBUG_ASSERT to make sure the buffer is enough - Wrapping the code into a class Grantee_str, to reuse it easier in 4 places.
| | | * | MDEV-22834: Disks plugin - change datatype to bigintVicențiu Ciorbaru2020-06-102-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On large hard disks (> 2TB), the plugin won't function correctly, always showing 2 TB of available space due to integer overflow. Upgrade table fields to bigint to resolve this problem.
| | | * | MDEV-5924: MariaDB could crash after changing the query_cache sizeOleksandr Byelkin2020-06-103-3/+42
| | | | | | | | | | | | | | | | | | | | | | | | | The real problem was that attempt to roll back cahnes after end of memory in QC was made incorrectly and lead to using uninitialized memory. (bug has nothing to do with resize operation, it is just lack of resources erro processed incorrectly)
| | | * | Revert "MDEV-22830: SQL_CALC_FOUND_ROWS not working properly for single ↵Oleksandr Byelkin2020-06-103-13/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SELECT for DUAL" This reverts commit 443391236d20cd0303fcc9957eb49a6aaf28316e.
| | | * | MDEV-22830: SQL_CALC_FOUND_ROWS not working properly for single SELECT for DUALrucha1742020-06-093-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case of SELECT without tables which returns either 0 or 1 rows, JOIN::exec_inner() did not check if the flag representing SQL_CALC_FOUND_ROWS is set or not and send_records was direclty assigned 0. So SELECT FOUND_ROWS() was giving 0 in the output. Now it checks if the flag is set, if it is set send_record=1 else 0. 1 is the number of rows that could have been sent to the client if the SELECT query had SQL_CALC_FOUND_ROWS. It is 0 when no rows were sent because the SELECT query did not have SQL_CALC_FOUND_ROWS.
| | | * | MDEV-22717: Conditional jump or move depends on uninitialised value(s) in ↵Sujatha2020-06-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | find_uniq_filename(char*, unsigned long) Fix: === Initialize 'number' variable to '0'.
| | | * | Client spelling mistakesIan Gilfillan2020-06-087-32/+32
| | | | |
| | | * | MDEV-22728: SIGFPE in Unique::get_cost_calc_buff_size from ↵Varun Gupta2020-06-074-1/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | prepare_search_best_index_intersect on optimized builds For low sort_buffer_size, in the cost calculation of using the Unique object the elements in the tree were evaluated to 0, make sure to have atleast 1 element in the Unique tree. Also for the function Unique::get allocate memory for atleast MERGEBUFF2+1 keys.
| | * | | MDEV-21619 Server crash or assertion failures in my_datetime_to_strAlexander Barkov2020-06-117-0/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Item_cache_datetime::decimals was always copied from example->decimals without limiting to 6 (maximum possible fractional digits), so val_str() later crashed on asserts inside my_time_to_str() and my_datetime_to_str().
| | * | | Remove a stale testMarko Mäkelä2020-06-102-58/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The last traces of the special InnoDB table names were removed in commit 0af52734a790b61690ada63492974b3670116e3f but we forgot to remove the test case.
| | * | | MDEV-22849 Reuse skip_trailing_space() in my_hash_sort_utf8mbXAlexander Barkov2020-06-101-15/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replacing the slow loop in my_hash_sort_utf8mbX() to the fast skip_trailing_spaces(), which consumes 8 bytes in one iteration, and is around 8 times faster on long data. Also, renaming: - my_hash_sort_utf8() to my_hash_sort_utf8mb3() - my_hash_sort_utf8_nopad() to my_hash_sort_utf8mb3_nopad() to merge to 10.5 easier (automatically?).
| | * | | innodb: dict_mem_table_add_col - compile warning fix argument 1 null where ↵Daniel Black2020-06-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | non-null expected (#1584) cd /build-mariadb-server-10.5-mysql_release/storage/innobase && /usr/bin/powerpc64le-linux-gnu-g++ -DBTR_CUR_ADAPT -DBTR_CUR_HASH_ADAPT -DCOMPILER_HINTS -DDBUG_TRACE -DEMBEDDED_LIBRARY -DHAVE_BZIP2=1 -DHAVE_C99_INITIALIZERS -DHAVE_CONFIG_H -DHAVE_FALLOC_PUNCH_HOLE_AND_KEEP_SIZE=1 -DHAVE_IB_LINUX_FUTEX=1 -DHAVE_LZ4=1 -DHAVE_LZ4_COMPRESS_DEFAULT=1 -DHAVE_LZMA=1 -DHAVE_NANOSLEEP=1 -DHAVE_OPENSSL -DHAVE_SCHED_GETCPU=1 -DLINUX_NATIVE_AIO=1 -DMUTEX_EVENT -DWITH_INNODB_DISALLOW_WRITES -D_FILE_OFFSET_BITS=64 -Iwsrep-lib/include -Iwsrep-lib/wsrep-API/v26 -I/home/dan/build-mariadb-server-10.5-mysql_release/include -Istorage/innobase/include -Istorage/innobase/handler -Ilibbinlogevents/include -Itpool -Iinclude -Isql -pie -fPIC -Wl,-z,relro,-z,now -fstack-protector --param=ssp-buffer-size=4 -Wconversion -Wno-sign-conversion -O3 -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -Wno-uninitialized -D_FORTIFY_SOURCE=2 -DDBUG_OFF -Wall -Wextra -Wformat-security -Wno-format-truncation -Wno-init-self -Wno-nonnull-compare -Wno-unused-parameter -Woverloaded-virtual -Wnon-virtual-dtor -Wvla -Wwrite-strings -DUNIV_LINUX -D_GNU_SOURCE=1 -fPIC -fvisibility=hidden -std=gnu++11 -o CMakeFiles/innobase_embedded.dir/dict/dict0load.cc.o -c storage/innobase/dict/dict0load.cc storage/innobase/dict/dict0load.cc: In function ‘const char* dict_process_sys_columns_rec(mem_heap_t*, const rec_t*, dict_col_t*, table_id_t*, const char**, ulint*)’: storage/innobase/dict/dict0load.cc:1653:26: warning: argument 1 null where non-null expected [-Wnonnull] dict_mem_table_add_col(table, heap, name, mtype, ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ prtype, col_len); ~~~~~~~~~~~~~~~~ In file included from storage/innobase/include/dict0dict.h:32:0, from storage/innobase/include/btr0pcur.h:30, from storage/innobase/dict/dict0load.cc:31: storage/innobase/include/dict0mem.h:323:1: note: in a call to function ‘void dict_mem_table_add_col(dict_table_t*, mem_heap_t*, const char*, ulint, ulint, ulint)’ declared here dict_mem_table_add_col( ^~~~~~~~~~~~~~~~~~~~~~