summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix compiler warnings in connect enginebb-10.6-monty2Monty2021-03-209-34/+38
| | | | | | | - Removed not used variables - Added /* fall through */ to switches - Removed not used static variable 'slash' from header file - Removed test of fp->field_length >= 0 as it is always true
* Fixed crash with listen_sockets when shutdown and kill was run simultaneouslyMonty2021-03-201-7/+6
| | | | | | | | | Problem was that listen_sockets where not properly protected. Fixed by adding LOCK_start_thread around closing socket loop. Other things: - Removed not necessary test in close_socket(). With the current code 'sock' can never be INVALID_SOCKET.
* Changed std::vector<MYSQL_SOCKET> listen_sockets to Dynamic_arrayMonty2021-03-203-35/+39
| | | | | | | | | | | Main reason for this was there was a crash in shutdown of the server in binlog_encryption.encryption_combo-mix and some other tests because something in listen_sockets where not initialized. Changing to Dynamic_array caused things to work. Other reason for removing std::vector was that it is harder to debug, and not integrated with DBUG, safemalloc, valgrind or memory calculation and cause code explosions (extra code generated for each std::vector type used).
* Fixed wrong initializations of Dynamic_arrayMonty2021-03-207-10/+14
| | | | | Other things: - Added size() function to Dynamic_array()
* Aria: Add transaction id to log of create tableMonty2021-03-209-10/+45
| | | | | | | | | | | | | | | | | | | | | | | In the case of a crash directly after a creation of an Aria table, Aria recovery would think that the table was from another system and require a repair of the table and inform that the table is 'zerofilled". This would cause no harm, but was confusing to see when testing atomic alter table. Fixed by logging the create transaction id to the log. Other things: - Added "show table status from sys" to maria_empy_logs. This ensures one does not get any zerofill warnings when sys/sys_config is used by other tests. - aria_chk --describe now prints a warning if the table was moved from another system. - Logging of truncate (maria_delete_all_rows) is changed to use the current trid for the create table. This is to ensure that we do not run into the same problem with truncate. - Changed back sys_config table to Aria as this patch should fix the "zerofill" problem in buildbot. - Added scripts/mysql_sys_schema.sql to .gitignore
* MDEV-25207 mysql_install_db doesn't create sys schema (fix)Daniel Black2021-03-201-1/+1
| | | | | | | Fix for out-of-tree builds. mysql_sys_schema.sql is a CMAKE_CURRENT_BINARY_DIR file so use the buildpkgdatadir.
* MDEV-25207 mysql_install_db doesn't create sys schemaVladislav Vaintroub2021-03-201-1/+1
| | | | Fix by adding sys schema to cat_sql()
* MDEV-23646: Optimizer trace: optimize_cond() should show ON expression ↵Sergei Petrunia2021-03-193-0/+80
| | | | | | processing Print the build_equal_items() step for ON expression processing
* MDEV-23645: Optimizer trace: print conditions after ↵Sergei Petrunia2021-03-198-35/+301
| | | | | | substitute_for_best_equal_field Print the conditions for WHERE, HAVING, and ON.
* Merge 10.5 into 10.6Marko Mäkelä2021-03-19246-6855/+5089
|\
| * 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.
* | | | | cleanup: os_thread_create -> std::threadEugene Kosov2021-03-1910-182/+37
| | | | |
* | | | | cleanup: os_thread_yield() -> std::this_thread::yield()Eugene Kosov2021-03-1910-12/+11
| | | | |
* | | | | cleanup: os_thread_sleep() -> std::this_thread::sleep_for()Eugene Kosov2021-03-1932-122/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | std version has an advantage of a more convenient units implementation from std::chrono. Now it's no need to multipy/divide to bring anything to micro seconds.
* | | | | MDEV-25193 - remove attempt to tame Aria.Vladislav Vaintroub2021-03-181-3/+0
| | | | |
* | | | | MDEV-25193 - temporarily switch storage engine to MyISAM for sys.sys_configVladislav Vaintroub2021-03-181-1/+1
| | | | |
* | | | | MDEV-23677: Optimizer trace: remove "no predicate for first keypart" (not)Sergei Petrunia2021-03-183-7/+73
| | | | | | | | | | | | | | | | | | | | | | | | | Don't remove (reasons given in Jira), instead add test coverage. Improve other printout in best_access_path.
* | | | | MDEV-23497 fixup: Do not warn for ALTER TABLE conversionMarko Mäkelä2021-03-184-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our intention is to make users aware that the ROW_FORMAT=COMPRESSED format is on its way to deprecation. It is an unnecessary annoyance to users if we issue a warning when the user is converting a ROW_FORMAT=COMPRESSED table to a supported format (such as ROW_FORMAT=DYNAMIC). ha_innobase::is_read_only(): Add a parameter to specify that an ALTER TABLE to a supported format has been requested. ha_innobase::check_if_supported_inplace_alter(): Set the parameter when ALTER_OPTIONS to something else than ROW_FORMAT=COMPRESSED (and without KEY_BLOCK_SIZE) is being requested. Thanks to Elena Stepanova for suggesting this.
* | | | | MDEV-24883 fixup: Avoid io_uring in ./mtr --rrMarko Mäkelä2021-03-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until https://github.com/rr-debugger/rr/issues/2613 has been addressed, ./mtr --rr will fail to start up the server if it has been configured with liburing. To make the ./mtr --rr option work out of the box, we will disable native asynchronous I/O. Note: libaio never worked under rr, but it failed more gracefully: the emulated io_setup() call would always return an error.
* | | | | fixup 7627bfa0a1fd7d44b8564c10cfbcefb4efb7fe07Marko Mäkelä2021-03-181-17/+17
| | | | |
* | | | | MDEV-9077 - rerecord test resultVladislav Vaintroub2021-03-182-28/+29
| | | | | | | | | | | | | | | | | | | | | | | | | so that sys.schema_auto_increment_columns returns correct auto_increment_value
* | | | | Merge 10.5 into 10.6Marko Mäkelä2021-03-1843-1993/+933
|\ \ \ \ \ | |/ / / /