summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * 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.
* | | | S3 compilation error on x86Sergei Golubchik2020-06-181-1/+1
| | | |
* | | | update libmarias3Sergei Golubchik2020-06-182-36/+0
| | | |
* | | | more "removed" mysqld command-line optionsSergei Golubchik2020-06-182-79/+65
| | | | | | | | | | | | | | | | and put them all together in mysqld.cc
* | | | Fix error in cmake, when trying gcc on Windows.Vladislav Vaintroub2020-06-181-1/+1
| | | |
* | | | When compiling with RelWithDebInfo, always use -fno-omit-frame-pointerVladislav Vaintroub2020-06-181-0/+3
| | | | | | | | | | | | | | | | | | | | (if this option is present). perf, and other tools that do stack walking works much better with it.
* | | | MDEV-22904 Compressed row format table tries to access freed blobThirunarayanan Balathandayuthapani2020-06-171-1/+1
| | | | | | | | | | | | | | | | | | | | - This is a regression of MDEV-21174(56f6dab1d0e5a464ea49c1e5efb0032a0f5cea3e). InnoDB resets the BTR_EXTERN_LEN value at wrong offset.
* | | | Fix include statements in galera_ipv6_mariabackup_section andbb-10.5-MDEV-22125Alexey Yurchenko2020-06-172-2/+2
| | | | | | | | | | | | | | | | galera_ipv6_mariabackup MTR tests
* | | | MDEV-21759 galera.galera_parallel_autoinc_manytrx sporadic failures.MikkoJaakola2020-06-172-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.
* | | | Add global ignore for Sending JOIN failed warning.Jan Lindström2020-06-171-1/+1
| | | |
* | | | MDEV-22125 : galera.galera_drop_multi MTR failed: InnoDB: MySQL is trying to ↵Jan Lindström2020-06-172-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | drop database `fts`.`` though there are still open handles MDEV-22140 galera.galera_drop_database MTR failed: InnoDB: MySQL is trying to drop database `fts`.`` though there are still open handles Add wait conditions to wait that all operations are done in both nodes.
* | | | fix a compiler warning on GCC 9.3.0Kentoku SHIBA2020-06-141-1/+1
| | | |
* | | | MDEV-22911: Fix the valgrind & MSAN instrumentation of MDEV-8139Thirunarayanan Balathandayuthapani2020-06-162-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | MEM_GET_VBITS(): Save information about uninitialized data. MEM_SET_VBITS(): Restore information about uninitialized data.
* | | | MDEV-22841 ut_new_get_key_by_file is unnecessarily expensive, followupVladislav Vaintroub2020-06-162-262/+144
| | | | | | | | | | | | | | | | | | | | Make ut_new_get_key_by_file event less expensive remove binary search, compute auto_event_keys offset at compile time.
* | | | MDEV-22569: Run bin/mariadbd instead of bin/mysqldOtto Kekäläinen2020-06-1622-170/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace all references to /usr/sbin/mysqld (and bin and libexec) with mariadbd, so that the binary server will always be 'mariadbd'. Also update all places that reference the server binary in other ways, such as AppArmor profiles and scripts that previously expected to find a 'mysqld' in process lists.
* | | | MDEV-22837 JSON_ARRAYAGG and JSON_OBJECTAGG treat JSON arguments as text.Alexey Botchkov2020-06-156-1/+27
| | | | | | | | | | | | | | | | Item_field::is_json_value() implemented.
* | | | MDEV-22844 JSON_ARRAYAGG is limited by group_concat_max_len.Alexey Botchkov2020-06-157-21/+77
| | | | | | | | | | | | | | | | Warning message and function result fixed
* | | | MDEV-22881 Unexpected errors, corrupt output, Valgrind / ASAN errors in ↵Aleksey Midenkov2020-06-153-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Item_ident::print or append_identifier After this code end_inplace: if (thd->locked_tables_list.reopen_tables(thd, false)) goto err_with_mdl_after_alter; table is not reopened (need_reopen is false) but some_table_marked_for_reopen is reset to false. Item_field is allocated on table lock and assigned new name on first ALTER which is then freed at the end of the command. Second ALTER accessess this Item_field and gets garbage value.
* | | | Fix drop_combinations for embeddedVicențiu Ciorbaru2020-06-151-0/+52
| | | | | | | | | | | | | | | | Make sure to replace the datadir absolute path.
* | | | MDEV-22887 unresolved symbol crc32c_vpmsum on Ubuntu XenialMarko Mäkelä2020-06-152-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is one more follow-up fix to MDEV-22641. Explicitly specify the dependency of the innobase library on mysys. Also, remove stale references to CRC32_LIBRARY, which should have been removed in commit dec3f8ca69e5eb19a4be7a175d3834874c4d880b.
* | | | fixup of "Make error messages from DROP TABLE and DROP TABLE IF EXISTS ↵Oleksandr Byelkin2020-06-152-14/+1
| | | | | | | | | | | | | | | | consistent" results
* | | | MDEV-22891: Optimizer trace: const tables are not clearly visibleSergei Petrunia2020-06-153-0/+60
| | | | | | | | | | | | | | | | Make mark_join_nest_as_const() print its action into the trace.
* | | | Added checks for uninitalized memory when writing to IO_CACHEMonty2020-06-142-2/+4
| | | | | | | | | | | | | | | | | | | | This was done to be able to track some cases of unallocated memory in replication tests reported by MSAN.
* | | | Created a workaround for a bug in MSAN for va_arg(,double)Monty2020-06-142-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-22691 MSAN use-of-uninitialized-value in test maria.maria-recovery2 This caused all my_vsnprintf() using doubles to fail. Thanks to the workaround, I was able to remove the disabling of MSAN in dtoa().
* | | | Fixed hang in Aria page cache with concurrent SELECTOleksandr Byelkin2020-06-143-34/+150
| | | | | | | | | | | | | | | | MDEV-20302 Server hangs upon concurrent SELECT from partitioned S3
* | | | Cleaned up compile failure if DEBUG_SYNC is disabled in DEBUG buildsMonty2020-06-142-2/+4
| | | |
* | | | Fixed bug in trans_check() where on error we gave wrong return valueMonty2020-06-141-2/+12
| | | |
* | | | Fix for crash in Aria LOCK TABLES + CREATE TRIGGERMonty2020-06-143-1/+29
| | | | | | | | | | | | | | | | MDEV-22829 SIGSEGV in _ma_reset_history on LOCK
* | | | Fixed typos in aria_read_logMonty2020-06-142-2/+2
| | | |
* | | | BINLOG with LOCK TABLES and SAVEPOINT could cause a crash in debug binMonty2020-06-143-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | MDEV-22048 Assertion `binlog_table_maps == 0 || locked_tables_mode == LTM_LOCK_TABLES' failed in THD::reset_for_next_command
* | | | MDEV-19745 BACKUP STAGE BLOCK_DDL hangs on flush sequence tableMonty2020-06-145-11/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem was that FLUSH TABLES where trying to read latest sequence state which conflicted with a running ALTER SEQUENCE. Removed the reading of the state, when opening a table for FLUSH, as it's not needed in this case. Other thing: - Fixed a potential issue with concurrently running ALTER SEQUENCE where the later ALTER could potentially read old data
* | | | Fixed core dump in "echo shutdown | mysqld --bootstrap"Monty2020-06-141-0/+1
| | | |
* | | | Updated code commentsMonty2020-06-142-2/+2
| | | |
* | | | Fixed crash in failing instant alter table with partitioned tableMonty2020-06-143-1/+55
| | | | | | | | | | | | | | | | | | | | MDEV-22649 SIGSEGV in ha_partition::create_partitioning_metadata on ALTER MDEV-22804 SIGSEGV in ha_partition::create_partitioning_metadata
* | | | Changes needed for ColumnStore and insert cacheMonty2020-06-1412-33/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MCOL-3875 Columnstore write cache The main change is to change thr_lock function get_status to return a value that indicates we have to abort the lock. Other thing: - Made start_bulk_insert() and end_bulk_insert() protected so that the insert cache can use these
* | | | Changed some DBUG_PRINT that used error:Monty2020-06-141-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | The reson for the change was to make it easier to find true errors when searching in trace logs. "error:" should mainly be used when we have a real error
* | | | Fixed access of undefined memory for compressed MyISAM and Aria tablesMonty2020-06-148-30/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-22689 MSAN use-of-uninitialized-value in decode_bytes() This was not a user visible issue as the huffman code lookup tables would automatically ignore any of the unitialized bits Fixed by adding a end-zero byte to the bit-stream buffer. Other things: - Fixed a (for this case) wrong assert in strmov() for myisamchk and aria_chk by removing the strmov()
* | | | Make error messages from DROP TABLE and DROP TABLE IF EXISTS consistentMonty2020-06-1425-216/+432
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - IF EXISTS ends with a list of all not existing object, instead of a separate note for every not existing object - Produce a "Note" for all wrongly dropped objects (like trying to do DROP SEQUENCE for a normal table) - Do not write existing tables that could not be dropped to binlog Other things: MDEV-22820 Bogus "Unknown table" warnings produced upon attempt to drop parent table referenced by FK This was caused by an older version of this commit patch and later fixed
* | | | Fixed error messages from DROP VIEW to align with DROP TABLEMonty2020-06-148-37/+1150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Produce a "Note" for all wrongly dropped objects (Like doing DROP VIEW on a table). - IF EXISTS ends with a list of all not existing objects, instead of a separate note for every not existing object. Other things: - Fixed bug where one could do CREATE TEMPORARY SEQUENCE multiple times and create multiple temporary sequences with the same name.
* | | | MDEV-11412 Ensure that table is truly dropped when using DROP TABLEMonty2020-06-1432-199/+870
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The used code is largely based on code from Tencent The problem is that in some rare cases there may be a conflict between .frm files and the files in the storage engine. In this case the DROP TABLE was not able to properly drop the table. Some MariaDB/MySQL forks has solved this by adding a FORCE option to DROP TABLE. After some discussion among MariaDB developers, we concluded that users expects that DROP TABLE should always work, even if the table would not be consistent. There should not be a need to use a separate keyword to ensure that the table is really deleted. The used solution is: - If a .frm table doesn't exists, try dropping the table from all storage engines. - If the .frm table exists but the table does not exist in the engine try dropping the table from all storage engines. - Update storage engines using many table files (.CVS, MyISAM, Aria) to succeed with the drop even if some of the files are missing. - Add HTON_AUTOMATIC_DELETE_TABLE to handlerton's where delete_table() is not needed and always succeed. This is used by ha_delete_table_force() to know which handlers to ignore when trying to drop a table without a .frm file. The disadvantage of this solution is that a DROP TABLE on a non existing table will be a bit slower as we have to ask all active storage engines if they know anything about the table. Other things: - Added a new flag MY_IGNORE_ENOENT to my_delete() to not give an error if the file doesn't exist. This simplifies some of the code. - Don't clear thd->error in ha_delete_table() if there was an active error. This is a bug fix. - handler::delete_table() will not abort if first file doesn't exists. This is bug fix to handle the case when a drop table was aborted in the middle. - Cleaned up mysql_rm_table_no_locks() to ensure that if_exists uses same code path as when it's not used. - Use non_existing_Table_error() to detect if table didn't exists. Old code used different errors tests in different position. - Table_triggers_list::drop_all_triggers() now drops trigger file if it can't be parsed instead of leaving it hanging around (bug fix) - InnoDB doesn't anymore print error about .frm file out of sync with InnoDB directory if .frm file does not exists. This change was required to be able to try to drop an InnoDB file when .frm doesn't exists. - Fixed bug in mi_delete_table() where the .MYD file would not be dropped if the .MYI file didn't exists. - Fixed memory leak in Mroonga when deleting non existing table - Fixed memory leak in Connect when deleting non existing table Bugs fixed introduced by the original version of this commit: MDEV-22826 Presence of Spider prevents tables from being force-deleted from other engines
* | | | MDEV-22884: Adjust the test for PLUGIN_PERFSCHEMA=NOMarko Mäkelä2020-06-141-0/+1
| | | |