- 10 Oct, 2022 1 commit
-
-
Marko Mäkelä authored
A previous fix in commit efd8af53 failed to cover ALTER TABLE. PageBulk::isSpaceAvailable(): Check for record heap number overflow.
-
- 09 Oct, 2022 1 commit
-
-
Anel Husakovic authored
Reviewer: <wlad@mariadb.com>
-
- 06 Oct, 2022 2 commits
-
-
Jan Lindström authored
-
Jan Lindström authored
Do not allow setting wsrep_on=ON if no provider is set.
-
- 05 Oct, 2022 9 commits
-
-
Aleksey Midenkov authored
upon CREATE OR REPLACE causing ER_UPDATE_TABLE_USED Missed set return status to 1.
-
Aleksey Midenkov authored
When f.ex. table is partitioned by HASH(a) and we rename column `a' to `b' partitioning filter stays unchanged: HASH(a). That's the wrong behavior. The patch updates partitioning filter in accordance to the new columns names. That includes partition/subpartition expression and partition/subpartition field list.
-
Aleksey Midenkov authored
For "const char *" replace() and after() accepted const as "T *" and passed forward "void *". This cannot be cast implicitly, so we better use "const void *" instead of "void *" in the input interface. This way we avoid problems with using List for any const type.
-
Vlad Lesin authored
MDEV-27927 row_sel_try_search_shortcut_for_mysql() does not latch a page, violating read view isolation btr_search_guess_on_hash() would only acquire an index page latch if it is invoked with ahi_latch=NULL. If it's invoked from row_sel_try_search_shortcut_for_mysql() with ahi_latch!=NULL, a page will not be latched, and row_search_mvcc() will get a pointer to the record, which can be changed by some other transaction before the record was stored in result buffer with row_sel_store_mysql_rec() call. ahi_latch argument of btr_cur_search_to_nth_level_func() and btr_pcur_open_with_no_init_func() is used only for row_sel_try_search_shortcut_for_mysql(). btr_cur_search_to_nth_level_func(..., ahi_latch !=0, ...) is invoked only from btr_pcur_open_with_no_init_func(..., ahi_latch !=0, ...), which, in turns, is invoked only from row_sel_try_search_shortcut_for_mysql(). I suppose that separate case with ahi_latch!=0 was intentionally implemented to protect row_sel_store_mysql_rec() call in row_search_mvcc() just after row_sel_try_search_shortcut_for_mysql() call. After the ahi_latch was moved from row_seach_mvcc() to row_sel_try_search_shortcut_for_mysql(), there is no need in it at all if btr_search_guess_on_hash() latches a page unconditionally. And if btr_search_guess_on_hash() latched the page, any access to the record in row_sel_try_search_shortcut_for_mysql() after btr_pcur_open_with_no_init() call will be protected with the page latch. The fix is to remove ahi_latch argument from btr_pcur_open_with_no_init_func(), btr_cur_search_to_nth_level_func() and btr_search_guess_on_hash(). There will not be test, as to test it we need to freeze some SELECT execution in the point between row_sel_try_search_shortcut_for_mysql() and row_sel_store_mysql_rec() calls in row_search_mvcc(), and to change the record in some other transaction to let row_sel_store_mysql_rec() to store changed record in result buffer. Buf we can't do this with the fix, as the page will be latched in btr_search_guess_on_hash() call.
-
Marko Mäkelä authored
Let us disable Valgrind on tests that would fail because a server shutdown or a STOP SLAVE command would take longer, causing the test harness to forcibly and silently kill the server due to an exceeded timeout.
-
Marko Mäkelä authored
Under Valgrind, this test may occasionally fail because the sleep-based timeouts of less than 1 second could be exceeded.
-
Marko Mäkelä authored
The test could emit some I/O error when run under Valgrind.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
row_purge_get_partial(): Replaces trx_undo_rec_get_partial_row(). Also copy the purge_node_t::ref to the purge_node_t::row. In this way, the clustered index key fields will always be available, even if thanks to commit d384ead0 (MDEV-14799) they would no longer be repeated in the remaining part of the undo log record.
-
- 04 Oct, 2022 1 commit
-
-
Julius Goryavsky authored
This commit adds automation that will reduce the possibility of user errors when customizing wsrep_notify.sh (in particular caused by user-specified parameters). Now all leading and trailing spaces are removed from the user-specified parameters and automatic port and host address substitution has been added to scripts, as well as automatic password substitution to the client command line, only if it is specified in the wsrep_notify.sh and not as empty strings. Also added support for automatic substitution of the all SSL-related parameters and improved parsing for ipv6 addresses (to allow "[...]" notation for ipv6 addresses). Also added a test to check if the wsrep notify script will works with SSL.
-
- 03 Oct, 2022 1 commit
-
-
Vlad Lesin authored
MDEV-29575 Access to innodb_trx, innodb_locks and innodb_lock_waits along with detached XA's can cause SIGSEGV trx->mysql_thd can be zeroed-out between thd_get_thread_id() and thd_query_safe() calls in fill_trx_row(). trx_disconnect_prepared() zeroes out trx->mysql_thd. And this can cause null pointer dereferencing in fill_trx_row(). fill_trx_row() is invoked from fetch_data_into_cache() under trx_sys.mutex. Bug fix is in reseting trx_t::mysql_thd in trx_disconnect_prepared() under trx_sys.mutex lock too. MTR test case can't be created for the fix, as we need to wait for trx_t::mysql_thd reseting in fill_trx_row() after trx_t::mysql_thd was checked for null while trx_sys.mutex is held. But trx_t::mysql_thd must be reset in trx_disconnect_prepared() under trx_sys.mutex. There will be deadlock.
-
- 01 Oct, 2022 2 commits
-
-
Sergei Golubchik authored
-
Sergei Golubchik authored
extended initializers are only allowed since c++11
-
- 30 Sep, 2022 3 commits
-
-
Oleksandr Byelkin authored
MDEV-17124: mariadb 10.1.34, views and prepared statements: ERROR 1615 (HY000): Prepared statement needs to be re-prepared The problem is that if table definition cache (TDC) is full of real tables which are in tables cache, view definition can not stay there so will be removed by its own underlying tables. In situation above old mechanism of detection matching definition in PS and current version always require reprepare and so prevent executing the PS. One work around is to increase TDC, other - improve version check for views/triggers (which is done here). Now in suspicious cases we check: - timestamp (microseconds) of the view to be sure that version really have changed; - time (microseconds) of creation of a trigger related to time (microseconds) of statement preparation.
-
Oleksandr Byelkin authored
-
Anel Husakovic authored
- Added missing information about database of corresponding table for various types of commands - Update some typos - Reviewed by: <vicentiu@mariadb.org>
-
- 29 Sep, 2022 2 commits
-
-
Sergei Golubchik authored
KILL QUERY ID 0 was sometimes finding con3 that was still in the process of disconnecting and had query_id==0 (as it didn't run any queries)
-
Igor Babaev authored
This patch resolves the problem of improper name resolution of table references to embedded CTEs for some queries. This improper binding could lead to - infinite sequence of calls of recursive functions - crashes due to resolution of null pointers - wrong result sets returned by queries - bogus error messages If the definition of a CTE contains with clauses then such CTE is called embedding CTE while CTEs from the with clauses are called embedded CTEs. If a table reference used in the definition of an embedded CTE cannot be resolved within the unit that contains this reference it still may be resolved against a CTE definition from the with clause with one of the embedding CTEs. A table reference can be resolved against a CTE definition if it used in the the scope of this definition and it refers to the name of the CTE. Table reference t is in the scope of the CTE definition of CTE cte if - the definition of cte is an element of a with clause declared as RECURSIVE and the reference t belongs either to the unit to which this with clause is attached or to one of the elements of this clause - the definition of cte is an element of a with clause without RECURSIVE specifier and the reference t belongs either to the unit to which this with clause is attached or to one of the elements from this clause that are placed before the definition of cte. If a table reference can be resolved against several CTE definitions then it is bound to the most embedded. The code before this patch not always resolved table references used in embedded CTE according to the above rules. Approved by Oleksandr Byelkin <sanja@mariadb.com>
-
- 28 Sep, 2022 1 commit
-
-
Mikhail Chalov authored
Continue with similar changes as done in 19af1890 to replace sprintf(buf, ...) with snprintf(buf, sizeof(buf), ...), specifically in the "easy" cases where buf is allocated with a size known at compile time. All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.
-
- 27 Sep, 2022 2 commits
-
-
Alexey Botchkov authored
When the partition table is cloned, the handlers for the partitions that were not opened should anyway be created (but not opened).
-
Oleksandr Byelkin authored
Nowdays subquery in a UNION's ORDER BY placed correctly in fake select, the only problem was incorrect Name_resolution_contect is fixed by this patch in parsing, so we do not need scanning/reseting of ORDER BY of a union.
-
- 26 Sep, 2022 6 commits
-
-
Nayuta Yanagisawa authored
The warning "maybe-uninitialized" raises on spd_sys_table.cc and ha_spider.cc when the sever is compiled with CMAKE_CXX_FLAGS=-Og.
-
Sergei Golubchik authored
show error messages from mysqldump/mysqlimport
-
Sergei Golubchik authored
-
Sergei Golubchik authored
give every bootstrap server its own tmpdir, by default it's var/tmp, which is shared in --parallel
-
Andrew Hutchings authored
There are currently two things causing ASAN hits on CONNECT engine when the plugin is used as a dynamic module. These are libxml2 and libodbc. libxml2 has some quirks when not the first and last thing called in the main thread of an application, some of the global memory isn't cleaned up correctly. The same is assumed of libodbc but this does not have explicit API for this. This is being fixed in two ways. First we are removing the libxml2 cleanup call. This is because the current one is messy and whatever it fixed has gone away. But also because if this is called and libxml2 is used again this can cause issues. For example if two different plugins to MariaDB both happen to use libxml2. The second fix is a hack that exploits `STB_GNU_UNIQUE` so that when compiled with ASAN the plugin will remain in memory after dlclose(). This allows libodbc to cleanup and has the added advatage that we will get clean stacks from ASAN for CONNECT when the leak is detected at the end of execution. Details of the `STB_GNU_UNIQUE` method can be found here: https://web.archive.org/web/20100730094324/http://www.redhat.com/archives/posix-c++-wg/2009-August/msg00002.html
-
Anel authored
-
- 23 Sep, 2022 1 commit
-
-
Andrew Hutchings authored
When an UPDATE or DELETE was executed with a WHERE condition it would crash the MariaDB server. This is because the code expects the WHERE condition to have generated a query string but it hasn't. Also updates the ODBC test results for current MariaDB version.
-
- 22 Sep, 2022 2 commits
-
-
Marko Mäkelä authored
row_log_table_apply_update(): Free the pcur.old_rec_buf before returning. It may be allocated by btr_pcur_store_position() inside btr_blob_log_check_t::check() and btr_store_big_rec_extern_fields(). This memory leak was introduced in commit 2e814d47 (MariaDB Server 10.2.2) via mysql/mysql-server@ce0a1e85e24e48b8171f767b44330da635a6ea0a (MySQL 5.7.5).
-
Marko Mäkelä authored
-
- 21 Sep, 2022 2 commits
-
-
Alexey Botchkov authored
The fix for MDEV-29352 was pushed to 10.6+ but the code causing the bug is old and the bug is unlikely to be a recent regression in 10.6. So, we apply the fix also to older versions, 10.3-10.5. The original commit message: MDEV-29352 SIGSEGV's in strlen and unknown location on optimized builds at SHUTDOWN When the UDF creation frails to write the newly created UDF into the related system table, the UDF is still created in memory. However, as it is now, the related DLL is unloaded in this case right in the mysql_create_function. And failure happens when the UDF handle is freed and tries to unload the respective DLL which is still unloaded.
-
Ian Gilfillan authored
-
- 20 Sep, 2022 3 commits
-
-
Brandon Nesterenko authored
The rpl_row_img_sequence test can fail on resource constrained buildbot machines due to its high space consumption. To reduce this footprint, the test is split into three parts, one for each value of the binlog_row_img variable.
-
Sergei Golubchik authored
when generating a query to send to a remote server, spider generates new aliases for all tables in the query (at least in the group_by handler). First it walks all the expressions and create a list of new table aliases to use for each field. Then - in init_scan() - it actually generates the query, taking for each field the next alias from the list. It dives recursively into functions, for example, for func(f1) it'll go in, will see the field f1 and append to the list the new name for the table of f1. This works fine for non-aggregate functions and for aggregate functions in the SELECT list. But aggregate functions in the ORDER BY are always references to the select list, they never need to be qualified with a table name. That is, even if there is a field name as an argument of an aggregate function in the ORDER BY it must not append a table alias to the list. Let's just skip aggregate functions when analyzing ORDER BY for table aliases. This fixes spider/bugfix.mdev_29008 (was observed on aarch64, x86, ppc64le, and amd64 --rr)
-
Alexander Barkov authored
-
- 19 Sep, 2022 1 commit
-
-
Andrew Hutchings authored
* MDEV-29426 Fix memory leak in CONNECT JSON/BSON If information is being gathered on JSON/BSON tables we leak the heap allocated to the table class. With this fix we close and cleanup instead, just as we do for XML tables.
-