summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* MEM_CHECK_DEFINED: replace HAVE_valgrindbb-10.5-danielblack-clang-valgrind-without-memcheck_hDaniel Black2021-03-265-10/+12
| | | | | | | | | | | | | | | | | | | | | HAVE_valgrind_or_MSAN to HAVE_valgrind was incorrect in af784385b4a2b286000fa2c658e34283fe7bba60. In my_valgrind.h when clang exists (hence no __has_feature(memory_sanitizer), and -DWITH_VALGRIND=1, but without memcheck.h, we end up with a MEM_CHECK_DEFINED being empty. If we are also doing a CMAKE_BUILD_TYPE=Debug this results a number of [-Werror,-Wunused-variable] errors because MEM_CHECK_DEFINED is empty. With MEM_CHECK_DEFINED empty, there becomes no uses of this of the fixed field and innodb variables in this patch. So we stop using HAVE_valgrind as catchall and use the name HAVE_CHECK_MEM to indicate that a CHECK_MEM_DEFINED function exists. Reviewer: Monty Corrects: af784385b4a2b286000fa2c658e34283fe7bba60
* MDEV-24589 DROP TABLE is not crash-safeMarko Mäkelä2021-03-234-34/+20
| | | | | | | | row_upd_clust_step(): Remove the "trigger" on DELETE SYS_INDEXES that would invoke dict_drop_index_tree(). Let us do it on purge. row_purge_remove_clust_if_poss_low(): Invoke dict_drop_index_tree() when purging a delete-marked SYS_INDEXES record.
* fixup cebf9ee2040195a61fbed32d06cc2e335e9f8dfdMarko Mäkelä2021-03-231-1/+1
|
* MDEV-15528 fixup: Remove dict_table_open_on_index_id()Marko Mäkelä2021-03-232-86/+2
| | | | | | dict_table_open_on_index_id(): Remove. This function was used by the background scrubbing, which was removed in commit a5584b13d1e04f38b843602413669591aa65c359.
* fixed typo in postinst scriptAlexey Bychko2021-03-231-3/+3
|
* Fixed wrong usage strlen(), should be sizeof()Monty2021-03-221-1/+1
| | | | Found by running valgrind on mtr tests
* Fix various spelling errors still found in codeOtto Kekäläinen2021-03-2260-92/+91
| | | | | | | | | | | | | | | Reseting -> Resetting Unknow -> Unknown capabilites -> capabilities choosen -> chosen direcory -> directory informations -> information openned -> opened refered -> referred to access -> one to access missmatch -> mismatch succesfully -> successfully dont -> don't
* MDEV-25211 Remove useless counter Innodb_buffered_aio_submittedMarko Mäkelä2021-03-203-8/+0
| | | | | | | | | | | | In commit 412533b4a755b36d5ac0fb04bcf54694bb0eafbc (MDEV-18582), one of the counters that was ported from XtraDB is useless. Innodb_buffered_aio_submitted would be 0 or 1, depending on whether is_linux_native_aio_supported() was executed to the point where it would be incremented. Let us remove this counter, because it has no practical value. Even if its value were 1, io_setup() can still fail and we may end up with innodb_use_native_aio=0.
* Merge 10.4 into 10.5Marko Mäkelä2021-03-205-3/+72
|\
| * Merge 10.3 into 10.4Marko Mäkelä2021-03-2012-317/+115
| |\
| | * fix for engines/funcs/rpl_sp.testAlice Sherepa2021-03-191-43/+46
| | |
| | * Merge 10.2 into 10.3Marko Mäkelä2021-03-195-3/+70
| | |\
| | | * update libmariadbSergei Golubchik2021-03-191-0/+0
| | | | | | | | | | | | | | | | This partially reverts 66106130a6c
| | | * myseek: AIX has no "tell"bb-10.2-danielblack-aix-notellDaniel Black2021-03-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | AIX detects tell in the configure however it really isn't there. Use the my_seek aka lseek implementation.
| | | * MDEV-25112 MIN/MAX aggregation over an indexed column may return wrong resultIgor Babaev2021-03-183-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a query with implicit grouping contains in MIN/MAX set function in the select list over a column that is a part of an index then the query might be subject to MIN/MAX optimization. With this optimization the server performs a look-up into an index, fetches a value of the column C used in the MIN/MAX function and substitute the MIN/MAX expression for this value. This allows to eliminate the table containing C from further join processing. In order the optimization to be applied the WHERE condition must be a conjunction of simple equality/inequality predicates or/and BETWEEN predicates. The bug fixed in the patch resulted in fetching a wrong value from the index used for MIN/MAX optimization. It may happened when a BETWEEN predicate containing the MIN/MAX value followed a strict inequality. Approved by dmitry.shulga@mariadb.com
| | * | fix for tests from engines/funcsAlice Sherepa2021-03-1910-370/+116
| | | |
* | | | mariabackup little FreeBSD update support.David Carlier2021-03-201-1/+10
| | | | | | | | | | | | | | | | | | | | In this platform, it s better not to rely on optional proc filesystem presence. Using native API to retrieve binary absolute path instead.
* | | | fix for tests from engines/funcsbb-10.5-aliceAlice Sherepa2021-03-196-314/+43
| | | |
* | | | Disable crashing Galera tests: MDEV-18534, MDEV-24485Marko Mäkelä2021-03-192-0/+2
| | | |
* | | | Merge 10.4 into 10.5Marko Mäkelä2021-03-19247-6856/+5088
|\ \ \ \ | |/ / /
| * | | Disable failing Galera testsMarko Mäkelä2021-03-192-2/+3
| | | |
| * | | Merge 10.3 into 10.4Marko Mäkelä2021-03-19244-6847/+5073
| |\ \ \ | | |/ /
| | * | MDEV-25125 Assertion failure in fetch_data_into_cache_low()Marko Mäkelä2021-03-181-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before MDEV-14638, there was no race condition between the execution of fetch_data_into_cache() and transaction commit. fetch_data_into_cache(): Acquire trx_t::mutex before checking trx_t::state, to prevent a concurrent transition from TRX_STATE_COMMITTED_IN_MEMORY to TRX_STATE_NOT_STARTED in trx_commit_in_memory().
| | * | Merge 10.2 into 10.3Marko Mäkelä2021-03-18244-6824/+5160
| | |\ \ | | | |/
| | | * MDEV-10682 Race condition between ANALYZE and STATS_AUTO_RECALCMarko Mäkelä2021-03-181-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ha_innobase::info_low(): While collecting statistics for ANALYZE TABLE, ensure that dict_stats_process_entry_from_recalc_pool() is not executing on the same table. We observed result differences for the test innodb.innodb_stats because dict_stats_empty_index() was being invoked by the background statistics calculation while ha_innobase::analyze() was executing dict_stats_analyze_index_level().
| | | * MDEV-25121: innodb_flush_method=O_DIRECT fails on compressed tablesMarko Mäkelä2021-03-181-13/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tests with 4096-byte sector size confirm that it is safe to use O_DIRECT with page_compressed tables. That had been disabled on Linux, in an attempt to fix MDEV-21584 which had been filed for the O_DIRECT problems earlier. The fil_node_t::block_size was being set mostly correctly until commit 10dd290b4b8b8b235c8cf42e100f0a4415629e79 (MDEV-17380) introduced a regression in MariaDB Server 10.4.4. fil_node_t::read_page0(): Initialize fil_node_t::block_size. This will probably make similar code in fil_space_extend_must_retry() redundant, but we play it safe and will not remove that code. Thanks to Vladislav Vaintroub for testing this on Microsoft Windows using an old-fashioned rotational hard disk with 4KiB sector size. Reviewed by: Vladislav Vaintroub
| | | * MDEV-21584 - portability fixVladislav Vaintroub2021-03-181-1/+3
| | | | | | | | | | | | | | | | This patch implements OS_DATA_FILE_NO_O_DIRECT on Windows.
| | | * Cleanup: Remove unused OS_DATA_TEMP_FILEMarko Mäkelä2021-03-182-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This had been originally added in mysql/mysql-server@192bb153b675fe09037a53e456a79eee7211e3a7 with the motivation to disable O_DIRECT for the dedicated tablespace for temporary tables. In MariaDB Server, commit 5eb539555b36a60944eefeb84d5d6d436ba61e63 (MDEV-12227) should be a better solution. The code became orphaned later in mysql/mysql-server@c61244c0e6c58727cffebfb312ac415a463fa0fe and it had been applied to MariaDB Server 10.2.2 in commit 2e814d4702d71a04388386a9f591d14a35980bfe and commit fec844aca88e1c6b9c36bb0b811e92d9d023ffb9. Thanks to Vladislav Vaintroub for spotting this.
| | | * MDEV-24916 : Assertion `current_stmt_binlog_format == BINLOG_FORMAT_STMT || ↵Jan Lindström2021-03-181-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | current_stmt_binlog_format == BINLOG_FORMAT_ROW' failed in THD::is_current_stmt_binlog_format_row Store old value of binlog format before wsrep code so that if we bail out because wsrep is not ready for connections we can restore binlog format correctly.
| | | * MDEV-18874 : Galera test MW-286 causes Mutex = ↵Jan Lindström2021-03-183-2/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TTASEventMutex<GenericPolicy>]: Assertion `!is_owned()' failed. assertion MDEV-24649 galera.galera_bf_lock_wait MTR failed with sigabrt: Assertion `!is_ow ned()' failed in sync0policy.ic on MutexDebug with Mutex = TTASEventMutex<GenericPolicy> Bug was fixed as part of MDEV-23328, this just adds test cases to regression set.
| | | * mariadb.pc: plugindir is usedDaniel Black2021-03-181-2/+3
| | | | | | | | | | | | | | | | | | | | As evidenced by converstation on Zulip, knowing where to install a plugin is important too.
| | | * switch off storage/innobase/.clang-format: InnoDB uses a common formatting ↵Eugene Kosov2021-03-172-0/+0
| | | | | | | | | | | | | | | | style for all new code
| | | * MDEV-21039: Server fails to start with unknown mysqld_safe optionsJulius Goryavsky2021-03-161-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding any unknown option to the "[mysqld_safe]" section makes mysqld impossible to start with mysqld_multi. For example, after adding the unknown option "numa_interleave" to the "[mysqld_safe]" section, mysqld_multi exits with the following diagnostics: [ERROR] /usr/local/mysql/bin/mysqld: unknown option '--numa_interleave' To get rid of this behavior, this patch adds the passing of the default group suffix from mysqld_multi to the mysqld_safe side.
| | | * MDEV-24554 Windows authenticode signing stopped workingVladislav Vaintroub2021-03-161-1/+1
| | | | | | | | | | | | | | | | | | | | Change the default timestamping URL, again http://timestamp.globalsign.com/?signature=sha2 seems to work fine atm
| | | * MDEV-23740 - X509_R_CERT_ALREADY_IN_HASH_TABLE when establishing SSL ↵Vladislav Vaintroub2021-03-151-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | connection connection. Ignore harmless X509_R_CERT_ALREADY_IN_HASH_TABLE, similar to how Curl or other projects treat it.
| | | * MDEV-24978 : SIGABRT in __libc_messageJan Lindström2021-03-153-21/+93
| | | | | | | | | | | | | | | | | | | | | | | | Keyvalue can be longer than REC_VERSION_56_MAX_INDEX_COL_LEN and this leads out-of-array reference. Use dynamic memory allocation using actual max length of key value.
| | | * update libmariadbVladislav Vaintroub2021-03-121-0/+0
| | | |
| | | * MDEV-24519: Server crashes in Charset::set_charset upon SELECTVarun Gupta2021-03-127-16/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The query causing the issue here has implicit grouping for we have to produce one row with special values for the aggregates (depending on each aggregate function), and NULL values for all non-aggregate fields. The subselect item where implicit grouping was being done, null_value for the subselect item was not being set for the case when the implicit grouping produces NULL values for the items in the select list of the subquery. This which was leading to the crash. The fix would be to set the null_value when all the values for the row column have NULL values. Further changes are 1) etting null_value for Item_singlerow_subselect only after val_* functions have been called. 2) Introduced a parameter null_value_inside to Item_cache that would store be set to TRUE if any of the arguments of the Item_cache are null. Reviewed And co-authored by Monty
| | | * Update sponsorsIan Gilfillan2021-03-123-27/+12
| | | |
| | | * MDEV-24597 Explicit column name error in CTE of UNIONIgor Babaev2021-03-103-2/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bug manifested itself when executing queries with multiple reference to a CTE specified by a query expression with union and having its column names explicitly declared. In this case the server returned a bogus error message about unknown column name. It happened because while for the first reference to the CTE the names of the columns returned by the CTE specification were properly changed to match the CTE definition for the other references it was not done. This was a consequence of not quite complete code of the function With_element::clone_parsed_spec() that forgot to set the reference to the CTE definition for unit structures representing non-first CTE references. Approved by dmitry.shulga@mariadb.com
| | | * MDEV-21104 Wrong result (extra rows and wrong values) with incremental BNLHIgor Babaev2021-03-104-11/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bug could affect multi-way join queries with embedded outer joins that contained a conjunctive IS NULL predicate over a non-nullable column from inner table of an outer join. The predicate could occur in WHERE condition or in ON condition. Due to this bug a wrong result set could be returned by the query. The bug manifested itself only when join buffers were employed for join operations. The problem appeared because - a bug in the function JOIN_CACHE::get_match_flag_by_pos that not always returned proper match flags for embedding outer joins stored together with table rows put a join buffer. - bug in the function JOIN_CACHE::join_matching_records that not always correctly determined that a row from the buffer could be skipped due to applied 'not_exists' optimization. Example: SELECT * FROM t1 LEFT JOIN ((t2 LEFT JOIN t3 ON c = d) JOIN t4) ON b = e WHERE e IS NULL; The patch introduces a new function that finds the match flag for a record from join buffer specifying the buffer where this flag has to be found. The function is called JOIN_CACHE::get_match_flag_by_pos_from_join_buffer(). Now this function rather than JOIN_CACHE::get_match_flag_by_pos() is used in JOIN_CACHE::skip_if_matched() to check whether a record from the join buffer must be ignored when extending the record by null complements. Also the code of the function JOIN_CACHE::skip_if_not_needed_match() has been changed. The function checks whether a record from the join buffer still may produce some useful extensions. Also some clarifying comments has been added. Approved by monty@mariadb.com.
| | | * MDEV-25101 Assertion !strcmp(field->name, "table_name") failedMarko Mäkelä2021-03-101-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | btr_node_ptr_max_size(): Let us remove the debug assertion that was added in MDEV-14637. The assertion assumed that no additional indexes exist in mysql.innodb_index_stats or mysql.innodb_table_stats. The code path is working around an incorrect definition of a table, interpreting VARCHAR(64) as the more correct VARCHAR(199). No test case will be added, because MDEV-24579 proves that executing DDL on the statistics tables involves a race condition. The test case included the following: ALTER TABLE mysql.innodb_index_stats ADD KEY (stat_name); CREATE TABLE t (a INT) ENGINE=InnoDB STATS_PERSISTENT=1;
| | | * reenable tests from engines/funcsAlice Sherepa2021-03-10192-6524/+3969
| | | |
| | | * MDEV-25002 ON expressions cannot contain outer referencesIgor Babaev2021-03-098-0/+265
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A bogus error message was issued for any outer references occurred in ON expressions used in subqueries. This prevented execution of queries containing subqueries as soon as they used outer references in their ON clauses. This happened because the Name_resolution_context structure created for any ON expression erroneously had the field outer_context set to NULL. The fields select_lex of this structure was not set correctly either. The idea of the fix was taken from mysql code of the function push_new_name_resolution_context(). Approved by dmitry.shulga@mariadb.com
| | | * Correct the value of global memory_usedSergei Golubchik2021-03-085-14/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | As a special hack global memory_used isn't SHOW_LONG_STATUS but still relies on calc_sum_of_all_status() being called. followup for 63f91927870
| | | * update wsrep service version after 7345d371418Sergei Golubchik2021-03-081-1/+1
| | | |
| | | * MDEV-24853: Duplicate key generated during cluster configuration changeJulius Goryavsky2021-03-086-165/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Incorrect processing of an auto-incrementing field in the WSREP-related code during applying transactions results in a duplicate key being created. This is due to the fact that at the beginning of the write_row() and update_row() functions, the values of the auto-increment parameters are used, which are read from the parameters of the current thread, but further along the code other values are used, which are read from global variables (when applying a transaction). This can happen when the cluster configuration has changed while applying a transaction (for example in the high_priority_service mode for Galera 4). Further during IST processing duplicating key is detected, and processing of the DB_DUPLICATE_KEY return code (inside innodb, in the write_row() handler) results in a call to the wsrep_thd_self_abort() function.
* | | | Merge 10.4 into 10.5Marko Mäkelä2021-03-1815-120/+379
|\ \ \ \ | |/ / /
| * | | MDEV-25121: innodb_flush_method=O_DIRECT fails on compressed tablesMarko Mäkelä2021-03-183-31/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tests with 4096-byte sector size confirm that it is safe to use O_DIRECT with page_compressed tables. That had been disabled on Linux, in an attempt to fix MDEV-21584 which had been filed for the O_DIRECT problems earlier. The fil_node_t::block_size was being set mostly correctly until commit 10dd290b4b8b8b235c8cf42e100f0a4415629e79 (MDEV-17380) introduced a regression in MariaDB Server 10.4.4. fil_node_open_file(): Only avoid setting O_DIRECT on ROW_FORMAT=COMPRESSED tables that use KEY_BLOCK_SIZE=1 or 2 (1024 or 2048 bytes). fil_ibd_create(): Avoid setting O_DIRECT on ROW_FORMAT=COMPRESSED tables that use KEY_BLOCK_SIZE=1 or 2 (1024 or 2048 bytes). fil_node_t::find_metadata(): Require fstat() to be always invoked outside Microsoft Windows, so that fil_node_t::block_size can be set. fil_node_t::read_page0(): Rely on find_metadata() to assign block_size. Thanks to Vladislav Vaintroub for testing this on Microsoft Windows using an old-fashioned rotational hard disk with 4KiB sector size. Reviewed by: Vladislav Vaintroub This is a port of commit 00f620b27e960c4b96a8392b27742fd5e41a69e3 and commit 6505662c23ba81331d91f65c18e06a759d6f148f from 10.2.
| * | | Merge 10.3 into 10.4Marko Mäkelä2021-03-188-48/+105
| |\ \ \ | | |/ /