summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.3 into 10.4Marko Mäkelä2019-04-024-13/+44
|\
| * Merge 10.2 into 10.3Marko Mäkelä2019-04-024-13/+44
| |\
| | * Fix integer type mismatchMarko Mäkelä2019-04-023-8/+8
| | |
| | * MDEV-19128 fil_name_parse() for MLOG_FILE_ is not portableMarko Mäkelä2019-04-021-6/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | On Microsoft Windows, InnoDB writes the path separator \ to the redo log file, while on all other platforms, / is being used. fil_name_parse(): Normalize the parsed path separators to the native format. This allows backups or data sets to be portable between Windows and other systems.
* | | MDEV-17320 add Feature_application_time_periods status variableNikita Malyavin2019-04-026-0/+10
| | | | | | | | | | | | Closes #1225
* | | MDEV-18921 Server crashes in bitmap_bits_set or bitmap_is_set upon UPDATE ↵Nikita Malyavin2019-04-023-0/+17
| | | | | | | | | | | | | | | | | | | | | IGNORE .. FOR PORTION with binary logging The fix is same as for MDEV-18859: initialize table->rpl_write_set in FOR PORTION OF case.
* | | MDEV-18859 Server crashes in bitmap_bits_set / pack_row / ↵Nikita Malyavin2019-04-022-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | THD::binlog_write_row upon DELETE .. FOR PORTION with binary logging rpl_write_set is initialized in TABLE::mark_columns_per_binlog_row_image. Since we just call use_all_columns for PORTION OF case, no need in column marking logic here. Instead, initialize table->rpl_write_set in place.
* | | MDEV-18852 MDEV-18853 fix `period.delete`, `period.update` tests crashes ↵Nikita Malyavin2019-04-026-25/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with ``--ps-protocol` The main problem was lack of proper QueryArena handling in `period_setup_conds`. Since mysql_prepare_update/mysql_prepare_delete are called during `PREPARE` statement, period conditions, should be allocated on statement query arena. Another problem is incorrect statement state handling in period_setup_conds, which led to unexpected mysql_update termination. * mysql_update: move period_setup_conds() to mysql_prepare_update to store conditions in statement's mem_root * mtr: add period suite to default list, since --ps-protocol is now fixed Fixes bugs: MDEV-18853 Assertion `0' failed in Protocol::end_statement upon DELETE .. FOR PORTION via prepared statement MDEV-18852 Server crashes in reinit_stmt_before_use upon UPDATE .. FOR PORTION via prepared statement
* | | MDEV-10797 RPM includes init script and a systemd unitDaniel Black2019-04-021-3/+5
| | | | | | | | | | | | Closes #593
* | | don't run SysV scripts in scriptlets if systemd is usedSergei Golubchik2019-04-023-14/+15
| | |
* | | update test resultsSergei Golubchik2019-04-021-5/+5
| | |
* | | gcc 8 warningsSergei Golubchik2019-04-022-4/+3
| | |
* | | After-merge fix: Initialize all fieldsMarko Mäkelä2019-04-021-1/+1
| | |
* | | Merge 10.3 into 10.4Marko Mäkelä2019-04-02143-2680/+4024
|\ \ \ | |/ /
| * | Merge 10.2 into 10.3Marko Mäkelä2019-04-0213-1294/+2401
| |\ \ | | |/
| | * Merge 10.1 into 10.2Marko Mäkelä2019-04-0221-2390/+4630
| | |\
| | | * Omit the definition of unused function yyset_extra()Marko Mäkelä2019-04-024-6/+6
| | | | | | | | | | | | | | | | | | | | This is follow-up for commit 619d22dde54ffe483ef8a57e49ec802b0e30c6bf to fix the cmake -DWITH_EMBEDDED_SERVER build.
| | | * Rebuild the InnoDB lexical analyzers with flex 2.6.4Marko Mäkelä2019-04-0118-2234/+4502
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | InnoDB includes 3 parsers, which use 3 lexical analyzers that are generated with flex. Flex versions before 2.6 emitted the keyword "register", which is deprecated in C++17. The lexical analyzers were regenerated as follows: for s in storage/innobase storage/xtradb do (cd "$s"/pars; ./make_flex.sh) touch "$s"/fts/*.l make -C "$s"/fts -f Makefile.query done
| | | * MDEV-19111 Unused field ↵Marko Mäkelä2019-04-011-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | INFORMATION_SCHEMA.INNODB_TABLESPACES_SCRUBBING.ROTATING_OR_FLUSHING The MDEV-11738/MDEV-11581 fix was supposed to add the column ROTATING_OR_FLUSHING to the INFORMATION_SCHEMA table INNODB_TABLESPACES_ENCRYPTION, but it also added that column to INNODB_TABLESPACES_SCRUBBING in InnoDB (not XtraDB). The extra column was never initialized. We will remove it, because key rotation has nothing to do with the scrubbing of tablespace data.
| | * | MDEV-19085: Fix a typo that was caught by GCC 5.4Marko Mäkelä2019-04-011-2/+1
| | | |
| * | | Merge 10.2 into 10.3Marko Mäkelä2019-04-012-5/+19
| |\ \ \ | | |/ /
| | * | MDEV-19085 Assertion failures due to virtual columns after upgrading from 10.1Marko Mäkelä2019-04-011-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MariaDB before MDEV-5800 in version 10.2.2 did not support indexed virtual columns. Non-persistent virtual columns were hidden from storage engines. Only starting with MDEV-5800, InnoDB would create internal metadata on virtual columns. Similar to what was done in MDEV-18084, MDEV-18090, MDEV-18960, we adjust one more code path for the old tables. innobase_build_col_map(): Allocate space for virtual columns in col_map[] but leave the entries at ULINT_UNDEFINED, noting that the virtual columns were missing before the table was being rebuilt.
| | * | Disable tests in rocksdb_stress suite (which was enabled a few commits ago)Sergei Petrunia2019-04-011-0/+2
| | | |
| * | | Merge 10.2 into 10.3Marko Mäkelä2019-04-0116-527/+63
| |\ \ \ | | |/ /
| | * | MDEV-19089, part #2: mark rocksdb.deadlock as "big test"Sergei Petrunia2019-03-301-0/+1
| | | | | | | | | | | | | | | | It turns out, moving it to rocksdb_stress test suite is not that easy.
| | * | MDEV-19089 part #1: adapt rocksdb_stress suite for MariaDBSergei Petrunia2019-03-308-8/+61
| | | |
| | * | remove unneeded codeEugene Kosov2019-03-291-4/+1
| | | | | | | | | | | | | | | | rec_get_offsets() was previously called in a btr_cur_optimistic_update()
| | * | remove dead codeEugene Kosov2019-03-296-514/+0
| | | |
| | * | Update 10.2 man pagesIan Gilfillan2019-03-296-6/+6
| | | |
| * | | post-merge: -Werror fixes in 10.3Sergei Golubchik2019-03-293-4/+4
| | | |
| * | | Merge branch '10.2' into 10.3Sergei Golubchik2019-03-2949-252/+640
| |\ \ \ | | |/ /
| | * | post-merge: -Werror fixes in 10.2Sergei Golubchik2019-03-294-9/+14
| | | |
| | * | Merge branch '10.1' into 10.2Sergei Golubchik2019-03-2936-157/+278
| | |\ \ | | | |/
| | | * Revert MDEV-18464 and MDEV-12009Marko Mäkelä2019-03-2822-194/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 21b2fada7ab7f35c898c02d2f918461409cc9c8e and commit 81d71ee6b21870772c336bff15b71904914f146a. The MDEV-18464 change introduces a few data race issues. Contrary to the documentation, the field trx_t::victim is not always being protected by lock_sys_t::mutex and trx_t::mutex. Most importantly, it seems that KILL QUERY could wrongly avoid acquiring both mutexes when invoking lock_trx_handle_wait_low(), in case another thread had already set trx->victim=true. We also revert MDEV-12009, because it should depend on the MDEV-18464 fix being present.
| | | * MDEV-12009: Allow to force kill user threads/query which are flagged as high ↵Jan Lindström2019-03-2810-8/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | priority by Galera As noted on kill_one_thread SUPER should be able to kill even system threads i.e. threads/query flagged as high priority or wsrep applier thread. Normal user, should not able to kill threads/query flagged as high priority (BF) or wsrep applier thread.
| | | * MDEV-18464: Port kill_one_trx fixes from 10.4 to 10.1Jan Lindström2019-03-2812-170/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pushed the decision for innodb transaction and system locking down to lock0lock.cc level. With this, we can avoid releasing these mutexes for executions where these mutexes were acquired upfront. This patch will also fix BF aborting of native threads, e.g. threads which have declared wsrep_on=OFF. Earlier, we have used, for innodb trx locks, was_chosen_as_deadlock_victim flag, for marking inodb transactions, which are victims for wsrep BF abort. With native threads (wsrep_on==OFF), re-using was_chosen_as_deadlock_victim flag may lead to inteference with real deadlock, and to deal with this, the patch has added new flag for marking wsrep BF aborts only: victim=true Similar way if replication decides to abort one of the threads we mark victim by: victim=true innobase_kill_query Remove lock sys and trx mutex handling. wsrep_innobase_kill_one_trx Mark victim trx with victim=true trx0trx.h Remove trx_abort_t type and abort type variable from trx struct. Add victim variable to trx. wsrep_kill_victim Remove abort_type lock_report_waiters_to_mysql Take also trx mutex and mark trx as a victim for replication abort. lock_trx_handle_wait_low New low level function to check whether the transaction has already been rolled back because it was selected as a deadlock victim, or if it has to wait then cancel the wait lock. lock_trx_handle_wait If transaction is not marked as victim take lock sys and trx mutex before calling lock_trx_handle_wait_low and release them after that. row_search_for_mysql Remove lock sys and trx mutex taking and releasing. trx_rollback_to_savepoint_for_mysql_low trx_commit_in_memory Clean up victim variable.
| | | * MDEV-18466 Unsafe to log updates on tables referenced by foreign keys with ↵Sergei Golubchik2019-03-273-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | triggers in statement format ignore FK-prelocked tables when looking for write-prelocked tables with auto-increment to complain about "Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column"
| | | * MDEV-7066 No Source RPMs ... (and so no "yum-builddep MariaDB-server" either)Sergei Golubchik2019-03-273-15/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | special cases: * change systemd detection to use CHECK_LIBRARY_EXISTS at least once, to have it detected by build_depends.cmake * similarly, use find_library for pam * unixODBC is weird, libodbc.so is in the unixODBC package, not in the unixODBC-devel, where normally all .so files belong. Packaging bug? As a workaround, use find_file(sql.h) instead of find_path(sql.h) to make sure that /usr/include/sql.h (not /usr/include) is cached by cmake, and later build_depends.cmake will select unixODBC-devel, as a package owning /usr/include/sql.h file.
| | | * MDEV-7066 No Source RPMs ... (and so no "yum-builddep MariaDB-server" either)Sergei Golubchik2019-03-273-2/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | automatic BuildRequires for source RPM: for every FILEPATH and "Have library XXX" cached variable, detect what rpm package it comes from and add it to the list of dependencies. That is, the source RPM will BuildRequire all those packages that were found by cmake when the source RPM was built. Presumably, our CMakeLists.txt won't check for libraries that aren't needed for a build. It supports libraries/executables/files found with FIND_LIBRARY FIND_FILE FIND_PROGRAM CHECK_LIBRARY_EXISTS
| | | * MDEV-7066 No Source RPMs ... (and so no "yum-builddep MariaDB-server" either)Sergei Golubchik2019-03-271-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | create source RPM cpack-way when building binary packages, this source rpm will use same BUILD_CONFIG and WITH_SSL values that were used when creating the source RPM. Only do it for a reasonably new cmake, where source rpms are known to work (3.10.2 is ok, 3.5.2 is not). And force a shorter CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX so that a source rpm could be built from a standard location in /usr/src
| | | * cmake: don't do fake rpm ProvidesSergei Golubchik2019-03-271-30/+6
| | | | | | | | | | | | | | | | instead remove internal modules from Requires/Provides
| | | * cmake: fix cpack_source_ignore_filesSergei Golubchik2019-03-271-9/+11
| | | | | | | | | | | | | | | | | | | | add defensive $ for filenames, don't include .gitattributes and *.rpm, correct rules for *.gz and *.zip
| | | * cmake: remove workarounds for cmake bugs #13248 and #12864Sergei Golubchik2019-03-271-3/+0
| | | | | | | | | | | | | | | | since long we use a different workaround, our own CPackRPM wrapper
| | | * cmake: re-enable -Werror in the maintainer modeSergei Golubchik2019-03-2725-69/+76
| | | | | | | | | | | | | | | | | | | | | | | | now we can afford it. Fix -Werror errors. Note: * old gcc is bad at detecting uninit variables, disable it. * time_t is int or long, cast it for printf's
| | | * Merge branch '5.5' into 10.1Sergei Golubchik2019-03-273-0/+58
| | | |\
| | | | * MDEV-14784: Slave crashes in show_status_array upon running a trigger withSujatha Sivakumar2019-03-273-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | select from I_S Problem: ======== When applier thread tries to access 'variable_name' of INFORMATION_SCHEMA.SESSION_VARIABLES table through triggers, it results in an abnormal exit of slave server. Analysis: ======== At the time of replication of stored routines and triggers, their associated security context will be sent by the master. The applier thread on the slave server will use this information to set the required security context for the execution of stored routines and triggers. This is achieved as follows. ->The stored routine object has a member named 'm_security_ctx' which holds the security context received from master. ->The applier thread's security_ctx is stored into a 'backup' object. ->Set the applier thread's security_ctx to 'm_security_ctx'. ->Upon the completion of stored routine execution restore the original security context of applier thread from the backup. During the above process the 'm_security_ctx' object is not initialized properly. Hence the 'external_user' of 'm_security_ctx' has invalid value for this variable and accessing this variable results in abnormal exit of server. Fix: === Invoke the Security_context::init() call from the constructor of stored routine so that 'm_security_ctx' gets initialized properly.
| | | * | MDEV-19060 : mariabackup continues, despite failing to open a tablespaceVladislav Vaintroub2019-03-271-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Fix mariabackup to crash if opening tablespace fails, insitead of continuing after an error.
| | * | | MDEV-15587 AES test fails, segfaults in EVP_CipherInit_exMarko Mäkelä2019-03-291-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When HAVE_YASSL is defined (due to cmake -DWITH_SSL=bundled or otherwise), mysys_ssl/my_crypt.cc will #include "yassl.cc" from the same directory. When MariaDB 10.2 or later is compiled with GCC 8 and optimizations are enabled, then the check if (iv) in EVP_CipherInit_ex() can be wrongly optimized away. The reason appears to be that __attribute__((nonnull)) is attached to the variable iv, because there is a (no-op) call memcpy(oiv, iv, ivlen=0) earlier in the code path. It is possible that this started failing after the code was refactored in MDEV-10332 (MariaDB 10.2.6). In MariaDB 10.1, there is a similar memcpy() call in MyCTX_nopad::init(), but the code appears to work fine.
| | * | | MDEV-18080, part#1: MyRocks is slow with log-bin=offSergei Petrunia2019-03-281-11/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cause for this was fix MDEV-15372, which was trying to speed up the parallel slave. Part#1: Do not attempt the "optimization" for transactions that are not replication slave workers.
| | * | | MDEV-13895: GTID and Master_Delay causes excessive initial delaySujatha Sivakumar2019-03-283-6/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: ======== When attempting to delay a Slave attached with GTID, there appears to be an extra delay applied initially. For example, this output reflects a Slave that is already delayed by 43200 seconds. When switching to GTID replication, replication is paused until SQL_Remaining_Delay counts down to 0: CHANGE MASTER TO master_use_gtid=current_pos; CHANGE MASTER TO MASTER_DELAY=43200; Seconds_Behind_Master: 44847 Using_Gtid: Current_Pos SQL_Delay: 43200 SQL_Remaining_Delay: 43089 Slave_SQL_Running_State: Waiting until MASTER_DELAY seconds after master executed event Analysis: ========= When slave initiates a GTID based connection request to master, the master sends two GTID_LIST events. The first one is actual GTID_LIST event and the second one is a fake GTID_LIST event. This is sent by master to provide its current binlary log file position. The fake GTID_LIST events will have their ev->when=0. 'when' (the timestamp) is set to 0 so that slave could distinguish between real and fake Rotate events. On slave side when MASTER_DELAY is configured to "X" the applier will ensure that there is a time delay of "X" seconds before the event is applied. General behaviour of MASTER_DELAY example:- Master timestamp of event e1=10 timestamp of event e2=11 On slave MASTER_DELAY=5 Event e1 will be applied at = 15 e2 will be applied at =16 In bug scenario:- On Master: With GTIDs timestamp of event e1=10 timestamp of event e2=0 On Slave: e1 will be applied at = 10 + 5 =15 For e2, since "e2->when=0" e2->when is set to current timestamp. i.e since the e2->when and current timestamp on slave is the same applier waits for additional master_delay=5 seconds. the ev->when contributes to "rli->last_master_timestamp". rli->last_master_timestamp= ev->when + (time_t) ev->exec_time; Fake events should not update the "ev->when" to "current timestamp" on slave. Fix: === Remove the assignment of current timestamp to "ev->when" when "ev->when=0".