summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-25543: Building failure on MacOS in case MariadDB server is compiled ↵bb-10.6-MDEV-25543Dmitry Shulga2021-04-282-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | with XCode 12.5 Attempt to build MariaDB server on MacOS could result in compilation errors like the following one: In file included from server-10.2/storage/perfschema/cursor_by_account.cc:28: In file included from server-10.2/include/my_global.h:287: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/math.h:309: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/type_traits:418: server-10.2/version:1:1: error: expected unqualified-id MYSQL_VERSION_MAJOR=10 ^ server-10.2/build.dir/include/my_config.h:529:29: note: expanded from macro 'MYSQL_VERSION_MAJOR' This kind of compiler errors occur by the reson that compiler's system headers contain the directive '#include <version>' and a compiler is invoked with -I${CMAKE_SOURCE_DIR}. The MariaDB source code root directory contains the file VERSION that is handled by the compiler during processing the directive #include <version> since file names on MacOS are case insensetive, so version and VERSION is treated as the same file name. To fix the issue the source code root directory should be removed from a list of directories used by the compiler for include search path.
* Merge 10.5 into 10.6Marko Mäkelä2021-04-2213-29/+332
|\
| * Merge 10.4 into 10.5Marko Mäkelä2021-04-2210-22/+327
| |\
| | * Merge 10.3 into 10.4st-10.4Marko Mäkelä2021-04-229-19/+324
| | |\
| | | * Merge 10.2 into 10.3Marko Mäkelä2021-04-229-19/+325
| | | |\
| | | | * MDEV-25474 Background thread returns uninitialized statisticsbb-10.2-MDEV-25474Thirunarayanan Balathandayuthapani2021-04-211-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to mysql interpreter InnoDB returns uninitialized statistics to mysql interpreter when background thread is opening the table. So it leads to assertion failure. In that case, InnoDB avoid sending innodb statistics information to mysql interpreter.
| | | | * MDEV-25457 Server crashes in row_undo_mod_clust_low upon rollback of ↵Eugene Kosov2021-04-213-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | read-only transaction node->index was NULL. But it's possible to get dict_table_t* from another source.
| | | | * MDEV-24526 binlog rotate via FLUSH LOGS may obsolate binlog file for ↵Andrei Elkin2021-04-213-0/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | recovery too eary There was race between a committing transaction and the following in binlog order FLUSH LOGS that could create a 2nd Binlog checkpoint (BCP) event in the new file *before* the first logged-in-old-binlog transaction gets committed in Innodb. That would cause the transaction loss at recovery, should the server stop right after the BCP. The race is tackled by enforcing the necessary set of mutexes to be acquired by FLUSH-LOGS handler in the correct order (of the group commit leader pattern). Note, there remain two cases where a similar race is still possible: - the above race as it is when the server is run with ("unlikely") non-default `--binlog-optimize-thread-scheduling=0` (MDEV-24530), and - at unlikely event of bin-logging of Incident event (MDEV-24531) that also triggers binlog rotation, in both cases though with lesser chances after the current fixes.
| | | | * Fixup: Event_queue_element_for_exec initializer list not supported on gcc-4.1Vicențiu Ciorbaru2021-04-211-1/+5
| | | | |
| | | | * fixed some korean error messagesbb-10.2-danielblack-pr1811-korean-translationLee Keun Won2021-04-211-14/+17
| | | | | | | | | | | | | | | | | | | | Closes #1811
| | | | * Smoke test collection should not be executableElena Stepanova2021-04-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since it ended up being a plain text file rather than a script (post-fix for MDEV-25288) Also removed main-test_sql_discovery.create from the list, as a workaround for MDEV-25384. The bug only affects 10.3+, but it will be simpler if 10.2 part of the tests is the same in all branches
| | | | * MDEV-25288 Create a list of tests for distributionsElena Stepanova2021-04-211-0/+139
| | | | | | | | | | | | | | | | | | | | ... to run upon building/packaging of MariaDB server
| | | | * MDEV-24807:A possibility for double free in dtor of ↵Vicențiu Ciorbaru2021-04-203-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Event_queue_element_for_exec in the case of OOM Eliminate a memory leak when init can fail by forgetting to delete the Event_queue_element_for_exec object.
| | * | | MDEV-25362 after-merge fix: Remove unnecessary codeMarko Mäkelä2021-04-221-3/+1
| | | | |
| * | | | MDEV-25483: Shutdown crash during innodb.innodb_buffer_pool_resize_temporaryMarko Mäkelä2021-04-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | buf_resize_callback(): Correct an invalid assertion, and enable the assertion in debug builds only. Between buf_resize_start() and buf_resize_shutdown(), srv_shutdown_state must be less than SRV_SHUTDOWN_CLEANUP. The incorrect assertion had been introduced in commit 5e62b6a5e06eb02cbde1e34e95e26f42d87fce02 (MDEV-16264). As a result, the server could crash if shutdown was initiated concurrently with initiating a change of innodb_buffer_pool_size.
| * | | | Cleanup: constexpr PFS_table_context::m_word_sizeMarko Mäkelä2021-04-212-5/+3
| | | | |
| * | | | WITH_UBSAN: shift is too large for 32-bit intMarko Mäkelä2021-04-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | As suggested by Vladislav Vaintroub, we must shift a constant of unsigned long, not int.
* | | | | fixup dd6ad3806856221f1af302e61ebd985905a00060: remove dead codeMarko Mäkelä2021-04-221-28/+0
| | | | |
* | | | | Follow-up post JSON_TABLE merge, table_join_options is not usedVicențiu Ciorbaru2021-04-211-4/+2
| | | | |
* | | | | Update columnstore to following cleanup of SELECT_LEXVicențiu Ciorbaru2021-04-211-0/+0
| | | | |
* | | | | MDEV-25441 WITH TIES is not respected with SQL_BUFFER_RESULT and constant in ↵Vicențiu Ciorbaru2021-04-213-1/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ORDER BY Pushing LIMIT to temp aggregation table is possible, but not when WITH TIES is used. In a degenerate case with constant ORDER BY, the constant gets removed and the code assumed the limit is push-able. Ensure that if WITH TIES is present, that this does not happen.
* | | | | MDEV-25430: ROW | ROWS should be a required keyword after OFFSET startVicențiu Ciorbaru2021-04-214-113/+164
| | | | | | | | | | | | | | | | | | | | | | | | | Implemented according to standard OFFSET start { ROW | ROWS}, ROW and ROWS is mandatory after OFFSET.
* | | | | MDEV-23908: Implement SELECT ... OFFSET ... FETCH ...Vicențiu Ciorbaru2021-04-2119-81/+2621
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit implements the standard SQL extension OFFSET start { ROW | ROWS } [FETCH { FIRST | NEXT } [ count ] { ROW | ROWS } { ONLY | WITH TIES }] To achieve this a reserved keyword OFFSET is introduced. The general logic for WITH TIES implies: 1. The number of rows a query returns is no longer known during optimize phase. Adjust optimizations to no longer consider this. 2. During end_send make use of an "order Cached_item"to compare if the ORDER BY columns changed. Keep returning rows until there is a change. This happens only after we reached the row limit. 3. Within end_send_group, the order by clause was eliminated. It is still possible to keep the optimization of using end_send_group for producing the final result set.
* | | | | cleanup: Select_limit_counters rename set_unlimited to clearVicențiu Ciorbaru2021-04-214-6/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function was originally introduced by eb0804ef5e7eeb059bb193c3c6787e8a4188d34d MDEV-18553: MDEV-16327 pre-requisits part 1: isolation of LIMIT/OFFSET handling set_unlimited had an overloaded notion of both clearing the offset value and the limit value. The code is used for SQL_CALC_ROWS option to disable the limit clause after the limit is reached, while at the same time the calling code suppreses sending of rows. Proposed solution: Dedicated clear method for query initialization (to ensure no garbage remains between executions). Dedicated set_unlimited that only alters the limit value.
* | | | | cleanup: make_aggr_tables_info pass parameters from existing local variablesVicențiu Ciorbaru2021-04-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Local variables such as keep_row_order are semantically clearer on the intent, rather than using an or condition twice.
* | | | | cleanup: test_if_subpart documented to highlight side effectVicențiu Ciorbaru2021-04-211-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | Also document (through function parameters names) which ORDER must be passed to the function: first GROUP BY, then ORDER BY.
* | | | | cleanup: reduce indentation of end_sendVicențiu Ciorbaru2021-04-211-89/+86
| | | | | | | | | | | | | | | | | | | | Reorder end_send to exit via return instead of large if-else block.
* | | | | cleanup: remove table_options and corresponding accessor functionVicențiu Ciorbaru2021-04-213-14/+2
| | | | | | | | | | | | | | | | | | | | The variable is never used and only takes up SELECT_LEX space.
* | | | | cleanup: Delete unused function Select_limit_counters::is_unrestrictedVicențiu Ciorbaru2021-04-211-2/+0
| | | | |
* | | | | cleanup: Refactor select_limit in select lexVicențiu Ciorbaru2021-04-2119-161/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace * select_lex::offset_limit * select_lex::select_limit * select_lex::explicit_limit with select_lex::Lex_select_limit The Lex_select_limit already existed with the same elements and was used in by the yacc parser. This commit is in preparation for FETCH FIRST implementation, as it simplifies a lot of the code. Additionally, the parser is simplified by making use of the stack to return Lex_select_limit objects. Cleanup of init_query() too. Removes explicit_limit= 0 as it's done a bit later in init_select() with limit_params.empty()
* | | | | Code cleanup: merge walk_items_for_table_list with walk_table_functions_for_listSergei Petrunia2021-04-211-4/+14
| | | | |
* | | | | Merge 10.5 into 10.6Marko Mäkelä2021-04-21187-690/+2115
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.4 into 10.5st-10.5Marko Mäkelä2021-04-211-2/+1
| |\ \ \ \ | | |/ / /
| | * | | MDEV-25362 after-merge fix: GCC -Og -Wmaybe-uninitializedMarko Mäkelä2021-04-211-2/+1
| | | | |
| * | | | Merge 10.4 into 10.5Marko Mäkelä2021-04-21163-3346/+8185
| |\ \ \ \ | | |/ / /
| | * | | Merge 10.3 into 10.4Marko Mäkelä2021-04-2133-126/+674
| | |\ \ \ | | | |/ /
| | | * | Merge 10.2 into 10.3Marko Mäkelä2021-04-2130-123/+621
| | | |\ \ | | | | |/
| | | | * MDEV-25466 Merge new release of InnoDB 5.7.34 to 10.2Marko Mäkelä2021-04-202-6/+2
| | | | |\
| | | | | * Bug #32032897 DEADLOCKING WAIT GRAPH ON BUSY SERVERAditya A2021-04-201-5/+1
| | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PROBLEM ------- 1. The customer had presented a stack which had many threads waiting on multiple mutexes like LOCK_Status, srv_innodb_monitor_mutex, ibuf_mutex etc. 2. The root cause was that the AHI latch was held in S (shared) mode by the a thread which was doing a truncate of a large table . 3. There was another thread which was trying to acquire the AHI latch in X (exclusive) mode 4. With our lock implementation any thread requesting a X lock ,blocks rest of the threads requesting S(shared) locks,this caused many threads to wait for this shared lock. 5. The main reason why we hold the latches in truncate is to avoid disabling of AHI during truncate FIX
| | | | * MDEV-25362 Incorrect name resolution for subqueries in ON expressionsprot-10.2Igor Babaev2021-04-175-1/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch sets the proper name resolution context for outer references used in a subquery from an ON clause. Usually this context is more narrow than the name resolution context of the parent select that were used before this fix. This fix revealed another problem that concerned ON expressions used in from clauses of specifications of derived tables / views / CTEs. The name resolution outer context for such ON expression must be set to NULL to prevent name resolution beyond the derived table where it is used. The solution to resolve this problem applied in sql_derived.cc was provided by Sergei Petrunia <sergey@mariadb.com>. The change in sql_parse.cc is not good for 10.4+. A corresponding diff for 10.4+ will be provided in JIRA entry for this bug. Approved by Oleksandr Byelkin <sanja@mariadb.com>
| | | | * MDEV-15064: IO_CACHE mysys read_pos, not libmaria rc_posbb-10.2-danielblack-MDEV-15064-IO_CACHE-read_posRainer Orth2021-04-172-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems some overly tolerant compilers (gcc) allow the structure of IO_CACHE that is defined differently in libmaria to have members equalivance to the iocache in mysys. More strict Solaris compilers recognise that rc_pos really isn't a structure member and won't compile.
| | | | * MDEV-25407: EXISTS subquery with correlation in ON expression crashesbb-10.2-mdev25407Sergei Petrunia2021-04-163-1/+70
| | | | | | | | | | | | | | | | | | | | Make Item_subselect::walk() walk the ON expressions, too.
| | | | * MDEV-22255 SIGABRT: Assertion `id' failed in trx_write_trx_id on INSERT | ↵Eugene Kosov2021-04-1510-12/+212
| | | | | | | | | | | | | | | | | | | | Assertion `id > 0' failed in trx_write_trx_id | Assertion `val > 0' failed in row_upd_index_entry_sys_field | Assertion `thr_get_trx(thr)->id || index->table->no_rollback()' failed.
| | | | * MDEV-23026 purge fails with assert !rw_lock_own_flagged(lock, ↵st-10.2-MDEV-23026Thirunarayanan Balathandayuthapani2021-04-151-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RW_LOCK_FLAG_X | RW_LOCK_FLAG_S) InnoDB purge thread locks the root page of clustered index while accessing the undo log records and later same thread tries to open the table, initialize statistics and tries to lock the clustered index root page while doing virtual column computation. Solution: ========= InnoDB should prevent statistics initialization when the table is being opened by purge thread
| | | | * update C/CSergei Golubchik2021-04-151-0/+0
| | | | |
| | | | * MDEV-25403 ALTER TABLE wrongly checks for field's default value if AFTER is usedSergei Golubchik2021-04-153-1/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a column is added to an non-empty table, existing rows will have a column's default value for existing rows. Or a "zero value" if the column has no default. But this check should be skipped when an existing column is altered.
| | | | * signal handler, display coredump file pattern similarly to MDEV-25294 but ↵David Carlier2021-04-151-3/+3
| | | | | | | | | | | | | | | | | | | | for FreeBSD, thankfully the sysctl OID is the same.
| | | | * Update mysqlbinlog man page with --table optionIan Gilfillan2021-04-141-2/+19
| | | | |
| | | | * MDEV-25363 binlog_stm_datetime_ranges_mdev15289 failed in bbAlice Sherepa2021-04-142-0/+2
| | | | |
| | | | * MDEV-25354: Fix my_print_defaults wordingIan Gilfillan2021-04-141-1/+1
| | | | |