summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-24962 addendum: mariabackup does not understand --log-bin-index and ↵10.5-MDEV-24962Julius Goryavsky2021-05-051-3/+13
| | | | --log-basename options
* MDEV-24962: Galera SST innobackupex-move ignores Environment settingsJulius Goryavsky2021-05-057-735/+1244
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After switching to the new mariabackup interface (instead of the outdated innobackupex interface, which is supported for compatibility), we need to explicitly pass a path to the datadir directory as a parameter, since in the new interface the value of this option is not automatically set in such a way that it always matches the SST/IST logic. This commit adds passing this option as an explicit parameter to mariabackup. This commit also removed unnecessary options that are not used and not supported by mariabackup. Also, numerous flaws in the common wsrep_sst_common script have been fixed: 1) There are many bash-specific constructs in the script that may not be supported by other interpreters, which can lead to the most unexpected errors during SST, because failures in the interpretation of bash-specific constructs lead to incorrect parsing of arguments; 2) There is parse_cnf() function which is often called by other scripts for the "mysqld" or "--mysqld" group, but it does not take into account the default group suffix, which leads to reading values only from the default group, which then leads to errors due to reading the default values instead of the values for a specific group; 3) Some options such as --user, --innodb-data-home-dir or --datadir are not removed from the --mysqld-args list, although they are processed inside scripts (and passing of these options funther may cause problems for mariabackup); 4) If an argument that the script understands is present in the --mysqld-args list twice, then this causes SST to fail, instead of reading the most recent value; 5) The "--host" parameter is technically still supported among the arguments of the SST scripts, but in reality scripts do not work with it as expected, especially if it has an IPv6 address; 6) If the port number is absent in the --address parameter value, but the port number is explicitly passed through the --port argument, then the scripts for mariabackup and xtrabackup-v2 fail; 7) If a new address interface is used (with the --address parameter), then automatic default port substitution is not performed, although it is supported for the legacy --host/--port interface. 8) If there are spaces in the parameter values after --mysqld_args, then their further transfer does not occur correctly, which causes mariabackup to fail during SST - the space splits the argument in such a way that it breaks the parsing of the following parameters; 9) If most of the parameters that are names or paths to the files or directories contain spaces, then SST scripts fail in an unpredictable way due to incorrect variable substitutions; 10) If the --log-bin option is passed among the arguments of myqlds (--mysqld-args) without a parameter, and the --binlog option is not specified, then the script cannot substitute the default name for binlog and cannot construct binlog name using the --log-basename argument (which is against server specifications); 11) Tail slashes are not removed from the directory names, which, upon further substitution, leads to the appearance of a double slash in the file paths; 12) The explicit --binlog parameter (which is now always transmitted from the server side) and the "hidden" --log-bin parameter in the list of arguments after --mysqld-args are perceived as two different parameters in different parts of the scripts, and if they are do not match for some reason, this will lead to failures during SST; Also, all new changes from the 10.6 branch have been migrated here, including the latest pull requests for authentication (only the part that concerns SST scripts). It also fixes dozens of other bugs in all SST scripts.
* MCOL-4535: Clean up libreadline as ColumnStore no longer needs itOtto Kekäläinen2021-05-042-16/+0
| | | | | | | Keep the readline installation step in Salsa-CI stages that install MariaDB.org packages in Debian Sid (or releases after is, such as Debian 11 "Bullseye" or Ubuntu 21.04 "Hirsute") as those old packages still depend on readline for the MariaDB Server itself.
* Merge remote-tracking branch 10.4 into 10.5Jan Lindström2021-05-0410-309/+57
|\
| * MDEV-25591 : Test case cleanupsJan Lindström2021-05-0410-308/+55
| | | | | | | | | | | | | | | | | | | | galera_var_wsrep_on_off : Add wait conditions to make sure DDL is replicated before continuing. wsrep.[variables|variables_debug] : Remove unnecessary parts and add check to correct number of variables or skip galera_ssl_reload: Add version check and SSL checks.
* | Merge 10.4 into 10.5Marko Mäkelä2021-05-0323-186/+294
|\ \ | |/
| * Update wsrep-libbb-10.4-wsrepJan Lindström2021-04-301-0/+0
| |
| * MDEV-22265 Connect string character limit too small for full 64 character ↵Kentoku SHIBA2021-04-295-0/+67
| | | | | | | | | | | | InnoDB table-name limit when using ad-hoc Spider server definitions. Fix length for getting default table name.
| * MDEV-25553 : Avoid unnecessary rollbacks with SRbb-10.4-MDEV-25553Daniele Sciascia2021-04-2812-56/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes statement rollback for streaming replication. Previously, a statement rollback was turned into full transaction rollback in the case where the transaction had already replicated a fragment. This was introduced in the initial implementation of streaming replication due to the fact that we do not have a mechanism to perform a statement rollback on the applying side. This policy is however overly pessimistic, causing full rollbacks even in cases where a local statement rollback, would not require a statement rollback on the applying side. This happens to be case when the statement itself has not replicated any fragments. So the patch changes the condition that determines if a statement rollback should be turned into a full rollback accordingly. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
| * MDEV-22227 Assertion `state_ == s_exec' failed in ↵bb-10.4-MDEV-22227mkaruza2021-04-285-130/+53
| | | | | | | | | | | | | | | | | | | | | | wsrep::client_state::start_transaction Removed redundant code for BF abort transaction in `thr_lock.cc`. TOI operations will ignore provided lock_wait_timeout and use `LONG_TIMEOUT` until operation is finished. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
| * MDEV-25630 Rollback of instant operation adds wrong column to secondary indexbb-10.4-MDEV-25630Thirunarayanan Balathandayuthapani2021-04-283-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: ======= InnoDB alter fails before applying instant operation. So rollback assigns wrong column to the secondary index field. It leads to the assert failure in the consecutive alter. Fix: === InnoDB shouldn't do rollback of instant operation when it fails before applying instant operation.
| * MDEV-22265 Connect string character limit too small for full 64 character ↵Alexey Botchkov2021-04-273-1/+12
| | | | | | | | | | | | | | | | InnoDB table-name limit when using ad-hoc Spider server definitions. The name of the table sent as an argument to the handler::init() has the database name in front of it. So we should use table_share->table_name.length.
* | new column store 5.5.2-2Oleksandr Byelkin2021-05-021-0/+0
| |
* | Updated wsrep.variables after wsrep lib updateMonty2021-05-011-2/+5
| |
* | MDEV-25507 CHECK on encrypted Aria table complains about "Wrong LSN"Monty2021-04-304-15/+44
| | | | | | | | | | | | | | | | This happens during repair when a temporary table is opened with HA_OPEN_COPY, which resets 'share->born_transactional', which the encryption code did not like. Fixed by resetting just share->now_transactional.
* | MDEV-22265 Connect string character limit too small for full 64 character ↵Kentoku SHIBA2021-04-306-1/+69
| | | | | | | | | | | | InnoDB table-name limit when using ad-hoc Spider server definitions. Fix length for getting default table name.
* | MDEV-25530 Error 1451 on slave: Cannot delete or update a parent row: a ↵Sergei Golubchik2021-04-293-14/+36
| | | | | | | | | | | | | | | | | | | | | | | | foreign key constraint fails after dfb41fddf6 tables that failed to drop are excluded from the binlogged DROP TABLE statement. It means that the slave should not expect any errors when executing DROP TABLE, and the binlog should report that no error has happened, even if it was. Do not write error code into the binlogged DROP TABLE, and remove all code that was needed to compute it.
* | MDEV-24382 Assertion in tdc_remove_tableVladislav Vaintroub2021-04-282-0/+33
| | | | | | | | | | | | The assert is no more reproducible in the lastest 10.5-10.6 The patch only adds testcase from MDEV-24382.
* | MDEV-25093: Adaptive flushing fails to kick in even ifKrunal Bauskar2021-04-281-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | innodb_adaptive_flushing_lwm is hit. (possible regression) adaptive flushing should kick in if a. dirty_pct (dirty pages in buffer pool) > innodb_max_dirty_pages_pct_lwm OR b. innodb_adaptive_flushing_lwm limit is reached (default to 10%) both conditions are mutually exclusive and whichever is first to evaluate true should kick-start the adaptive flushing. After recent changes to simplify the flushing algorithm logic, (b) got ignored that introduced the said regression.
* | Merge 10.4 into 10.5Marko Mäkelä2021-04-2719-512/+664
|\ \ | |/
| * Merge 10.3 into 10.4Marko Mäkelä2021-04-2714-4/+257
| |\
| | * MDEV-24545 Sequence created by one connection remains invisible to anotherst-10.3Marko Mäkelä2021-04-273-1/+33
| | | | | | | | | | | | | | | | | | row_merge_is_index_usable(): Allow access to any SEQUENCE, even if it was created after the read view. SQL sequences are no-rollback tables with no history at all.
| | * Merge 10.2 into 10.3Marko Mäkelä2021-04-272-2/+2
| | |\
| | | * MDEV-25513: raise systemd LimitNOFILE limits to match server defaultsDaniel Black2021-04-272-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Quoting MDEV reporter Daniel Lewart: Starting MariaDB with default configuration causes the following problems: "[Warning] Could not increase number of max_open_files to more than 16384 (request: 32186)" silently reduces table_open_cache_instances from 8 (default) to 4 Default Server System Variables: extra_max_connections = 1 max_connections = 151 table_open_cache = 2000 table_open_cache_instances = 8 thread_pool_size = 4 LimitNOFILE=16834 is in the following files: support-files/mariadb.service.in support-files/mariadb@.service.in Looking at sql/mysqld.cc lines 3837-3917: wanted_files= (extra_files + max_connections + extra_max_connections + tc_size * 2 * tc_instances); wanted_files+= threadpool_size; Plugging in the default values: wanted_files = (30 + 151 + 1 + 2000 * 2 * 8 + 4) = 32186 However, systemd configuration has LimitNOFILE = 16384, which is far smaller. I suggest increasing LimitNOFILE to 32768.
| | | * MDEV-24898: Server crashes in st_select_lex::next_selectbb-10.2-tmp1Sergei Petrunia2021-04-252-0/+24
| | | | | | | | | | | | | | | | | | | | (trivial backport to 10.2) Add a testcase
| | | * MDEV-24925: Server crashes in Item_subselect::init_expr_cache_trackerSergei Petrunia2021-04-253-1/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (trivial backport to 10.2) The optimizer removes redundant GROUP BY operations. If GROUP BY element is a subselect, it is "eliminated". However one must not eliminate the item if it is used both in the select list and in the GROUP BY, like so: select (select ... ) as SUBQ from ... group by SUBQ Do not eliminate such items.
| | * | MDEV-24758 heap-use-after-poison in innobase_add_instant_try/rec_copyMarko Mäkelä2021-04-267-19/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a backport of commit fd9ca2a742abe2e91b2b77e70915dec7bd3cd7e1 (MDEV-23295) and commit 9a156e1a23046ba3e37bdb1e4e1ad887d3f5829b (MDEV-23345) to 10.3. An instant ADD/DROP/reorder column could create a dummy table object with the wrong ROW_FORMAT when innodb_default_row_format was changed between CREATE TABLE and ALTER TABLE. prepare_inplace_alter_table_dict(): If we had promised that ALGORITHM=INPLACE is supported, we must preserve the ROW_FORMAT. The rest of the changes are related to adding Alter_inplace_info::inplace_supported to cache the return value of handler::check_if_supported_inplace_alter().
| | * | MDEV-24773: slave_compressed_protocol doesn't work properly with semi-sync ↵Sujatha2021-04-264-0/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | replication Back port upstream fix commit 1800b015a1d487330f7b15f2020b887be348a66b Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com> Date: Fri Sep 8 20:29:22 2017 +0530 Bug#26027024 SLAVE_COMPRESSED_PROTOCOL DOESN'T WORK WITH SEMI-SYNC REPLICATION IN MYSQL-5.7 Analysis: In mysql-5.6, dump thread (the thread that is created on Master after Slave requested for a binlog dump) is also used to receive acknowledgements from the Slave and act on them accordingly. For performance reasons, a special thread called Ack Receiver thread is added in mysql-5.7 Semi synchronous replication plugin. This thread does not have special handling to receive acknowledgements if Slave has enabled compression in the protocol. Hence Master is unable to handle any slave if Slave_compressed_protocol is enabled on it. Fix: Enable compress flag on the communication channels if the Slave has Slave_compressed_protocol ON.
| | * | MDEV-24898: Server crashes in st_select_lex::next_selectbb-10.3-mdev24925Sergei Petrunia2021-04-252-0/+24
| | | | | | | | | | | | | | | | Add a testcase
| | * | MDEV-24925: Server crashes in Item_subselect::init_expr_cache_trackerSergei Petrunia2021-04-253-1/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The optimizer removes redundant GROUP BY operations. If GROUP BY element is a subselect, it is "eliminated". However one must not eliminate the item if it is used both in the select list and in the GROUP BY, like so: select (select ... ) as SUBQ from ... group by SUBQ Do not eliminate such items.
| * | | Fix MTR test wsrep.variables_debugDaniele Sciascia2021-04-265-508/+407
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The test was changing variable wsrep_provider dynamically, but wsrep_provider was recently made read-only. followup for ce3a2a688db556d8
* | | | MDEV-15756: Remove some garbage outputMarko Mäkelä2021-04-261-4/+0
| | | | | | | | | | | | | | | | | | | | os_aio_print(): Remove output that should have been removed in commit 5e62b6a5e06eb02cbde1e34e95e26f42d87fce02 (MDEV-16264).
* | | | Merge 10.4 into 10.5Marko Mäkelä2021-04-2524-228/+543
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4bb-10.4-mergeMarko Mäkelä2021-04-2524-227/+542
| |\ \ \ | | |/ /
| | * | This commit adds the same call of st_select_lex::set_unique_exclude() thatIgor Babaev2021-04-243-1/+24
| | | | | | | | | | | | | | | | | | | | complemented the fix for MDEV-24823 in 10.2. As it is the only call of this function in 10.3 the commit also has added the code of the function.
| | * | Merge 10.2 into 10.3Marko Mäkelä2021-04-2416-199/+362
| | |\ \ | | | |/ | | | | | | | | except commit 1288dfffe77a99d6c5906d12010a1677ee149308
| | | * MDEV-23026/MDEV-25474 fixup: Assertion ib_table->stat_initializedMarko Mäkelä2021-04-241-11/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is possible that an object that was originally created by open_purge_table() will remain cached and reused for SQL execution. Our previous fix wrongly assumed that ha_innobase::open() would always be called before SQL execution starts. Therefore, we must invoke dict_stats_init() in ha_innobase::info_low() instead of only doing it in ha_innobase::open(). Note: Concurrent execution of dict_stats_init() on the same table is possible, but it also was possible between two calls to ha_innobase::open(), with no ill effects observed. This should fix the assertion failure on stat_initialized. A possibly easy way to reproduce it would have been to run the server with innodb_force_recovery=2 (disable the purge of history), update a table so that an indexed virtual column will be affected, and finally restart the server normally (purge enabled), to observe a crash when the table is accessed from SQL. The problem was first observed and this fix verified by Elena Stepanova. Also Thirunarayanan Balathandayuthapani repeated the problem.
| | | * MDEV-25459 MVCC read from index on CHAR or VARCHAR wrongly omits rowsMarko Mäkelä2021-04-243-35/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | row_sel_sec_rec_is_for_clust_rec(): If the field in the clustered index record stored off page, always fetch it, also when the secondary index field has been built on the entire column. This was broken ever since the InnoDB Plugin for MySQL Server 5.1 introduced ROW_FORMAT=DYNAMIC and ROW_FORMAT=COMPRESSED for InnoDB tables. That code was first introduced in this tree in commit 3945d5e5549187a18c64a112899f90a7f6a320d6. For the original ROW_FORMAT=REDUNDANT and the MySQL 5.0.3 ROW_FORMAT=COMPRESSED, there was no problem, because for those tables we always stored at least a 768-byte prefix of each column in the clustered index record. row_sel_sec_rec_is_for_blob(): Allow prefix_len==0 for matching the full column.
| | | * This patch complements the patch for MDEV-24823.Igor Babaev2021-04-231-1/+1
| | | |
| | | * MDEV-25091 CREATE TABLE: field references qualified by a wrong table name ↵Aleksey Midenkov2021-04-235-5/+188
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | succeed Before FRM is written walk vcol expressions through check_table_name_processor() and check if field items match (db, table_name) qualifier. We cannot do this in check_vcol_func_processor() as there is already no table name qualifiers in expressions of written and loaded FRM.
| | | * MDEV-23455 Hangs + Sig11 in unknown location(s) due to single complex FK queryAleksey Midenkov2021-04-233-3/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Buffer overflow in ib_push_warning() fixed by using vsnprintf(). InnoDB parser was obsoleted by MDEV-16417. Thanks to Nikita Malyavin for review and suggestion.
| | | * remove EXCEPTIONS-CLIENTSergei Golubchik2021-04-232-138/+1
| | | | | | | | | | | | | | | | | | | | It's Oracle libmysqlclient license exception, we no longer include, build or ship libmysqlclient
| | | * MDEV-24823 Crash with invalid multi-table update of view in 2nd execution of SPIgor Babaev2021-04-229-26/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this patch mergeable derived tables / view used in a multi-table update / delete were merged before the preparation stage. When the merge of a derived table / view is performed the on expression attached to it is fixed and ANDed with the where condition of the select S containing this derived table / view. It happens after the specification of the derived table / view has been merged into S. If the ON expression refers to a non existing field an error is reported and some other mergeable derived tables / views remain unmerged. It's not a problem if the multi-table update / delete statement is standalone. Yet if it is used in a stored procedure the select with incompletely merged derived tables / views may cause a problem for the second call of the procedure. This does not happen for select queries using derived tables / views, because in this case their specifications are merged after the preparation stage at which all ON expressions are fixed. This patch makes sure that merging of the derived tables / views used in a multi-table update / delete statement is performed after the preparation stage. Approved by Oleksandr Byelkin <sanja@mariadb.com>
| | | * MDEV-25456 - fix predicate in ib::error_or_warnVladislav Vaintroub2021-04-221-1/+1
| | | |
| | | * MDEV-25456 MariaBackup logs "[ERROR]" on Invalid log block checksumVladislav Vaintroub2021-04-221-1/+2
| | | | | | | | | | | | | | | | Fix is to changed message to be [WARNING] for backup
| | | * Update timezone data on WindowsVladislav Vaintroub2021-04-222-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is new Yukon Standard time Windows timezone. Also fix the powershell script that generates the Windows locale mapping, tell powershell to use TLSv1.2 to access the github (on some reason it is TLS1.1 that powershell is using by default, and it does no work)
| | * | MDEV-24823 Crash with invalid multi-table update of view in 2nd execution of SPIgor Babaev2021-04-227-25/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this patch mergeable derived tables / view used in a multi-table update / delete were merged before the preparation stage. When the merge of a derived table / view is performed the on expression attached to it is fixed and ANDed with the where condition of the select S containing this derived table / view. It happens after the specification of the derived table / view has been merged into S. If the ON expression refers to a non existing field an error is reported and some other mergeable derived tables / views remain unmerged. It's not a problem if the multi-table update / delete statement is standalone. Yet if it is used in a stored procedure the select with incompletely merged derived tables / views may cause a problem for the second call of the procedure. This does not happen for select queries using derived tables / views, because in this case their specifications are merged after the preparation stage at which all ON expressions are fixed. This patch makes sure that merging of the derived tables / views used in a multi-table update / delete statement is performed after the preparation stage. Approved by Oleksandr Byelkin <sanja@mariadb.com>
* | | | MDEV-25030 Upgrade to 10.5.9 breaks root's ability to grantSergei Golubchik2021-04-224-4/+48
| | | |
* | | | MYSQL_MAINTAINER_MODE fixesSergei Golubchik2021-04-222-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * MSVC check was lost in a bad merge * add a comment * move AIX check where it belongs and where it would still allow -Werror, if desired
* | | | Revert "MDEV-24589 DROP TABLE is not crash-safe"Marko Mäkelä2021-04-224-20/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e731a283942c3ec2386d79b639317131645caa1e. A crash occurred during the test stress.ddl_innodb when fil_delete_tablespace() for DROP TABLE was waiting in fil_check_pending_operations() and a purge thread for handling an earlier DROP INDEX was attempting to load the index root page in btr_free_if_exists() and btr_free_root_check(). The function buf_page_get_gen() would write out several times "trying to read...being-dropped tablespace" before giving up and committing suicide. It turns out that during any page access in btr_free_if_exists(), fil_space_t::set_stopping() could have been invoked by fil_check_pending_operations(), as part of dropping the tablespace. Preventing this race condition would require extensive changes to the allocation code or some locking mechanism that would ensure that we only set the flag if btr_free_if_exists() is not in progress. Either way, that could be a too risky change in a GA release. Because MDEV-24589 is not strictly necessary in the 10.5 release series and it only is a requirement for MDEV-25180 in a later major release, we will revert the change from 10.5.