- 27 Apr, 2024 1 commit
-
-
mkaruza authored
Replicated events have time associated with them from originating node which will be used for commit timestamp. Associated time can be set in past before event is even applied. For WSREP replication we don't need to use time information from event. Addressed review comments: Jan Lindström <jan.lindstrom@galeracluster.com> Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
-
- 26 Apr, 2024 5 commits
-
-
Jan Lindström authored
Tests using MW-369.inc sometimes hanged after signaling two debug sync points inside a Galera library. Replaced Galera library sync point with server code sync point when possible and added more wait_conditions to make sure we are in correct state. Tests effected: MW-369, MW-402, MDEV-27276, and mysql-wsrep#332. Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
-
Julius Goryavsky authored
This commit contains a fix for the code that extracts and parses the CN (common name, domain name) record from certificates using the openssl utility. This code is also made common to the rsync and mariabackup scripts. There is also some systematization of the use of 'printf' and 'echo' builtins/utilities.
-
Oleksandr Byelkin authored
-
Oleksandr Byelkin authored
-
Oleksandr Byelkin authored
-
- 25 Apr, 2024 2 commits
-
-
Oleksandr Byelkin authored
The problem was that Item_default_value::associate_with_target_field assigned passed as argument field as an argument which changed argument in case of default() call with certain field (i.e. deault(field)). There is no way to get wrong field in constructor so we will not reassign parameter.
-
Marko Mäkelä authored
At least starting with ca83115b the source code cannot be compiled with anything older than GCC 4.8.5. Furthermore, 64-bit atomic read-modify-write operations on IA-32 would depend on the LOCK CMPXCHG8B instruction, which was introduced in the Intel Pentium. Our IA-32 builds ought to be -march=i686 starting with commit 9cabc9fd. Approved by Sergei Golubchik
-
- 24 Apr, 2024 1 commit
-
-
Thirunarayanan Balathandayuthapani authored
Problem: ======== mariabackup --prepare fails to write the pages in encrypted format. This issue happens only for default encrypted table when innodb_encrypt_tables variable is enabled. Fix: ==== backup process should write the value of innodb_encrypt_tables variable in configuration file. prepare should enable the variable based on configuration file.
-
- 22 Apr, 2024 1 commit
-
-
Jan Lindström authored
Problem was assertion assuming we always hold THD::LOCK_thd_data mutex that is not true. In most cases this is true but function is also used from InnoDB lock manager and there we can't take THD::LOCK_thd_data to obey mutex ordering. Removed assertion as wsrep transaction state can't change even that case. Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
-
- 17 Apr, 2024 1 commit
-
-
Jan Lindström authored
Test was waiting INSERT-clause to make rollback but wait_condition was too tight. State could be Freeing items or Rollback. Fixed wait_condition to expect one of them.
-
- 16 Apr, 2024 1 commit
-
-
Oleksandr Byelkin authored
Synopsis: If SELECT returned answer from Query Cache it is not really executed. The reason for firing of assertion DBUG_ASSERT((mem_root->flags & ROOT_FLAG_READ_ONLY) == 0); is that in case the query_cache is on and the same query run by different stored routines the following use case can take place: First, lets say that bodies of routines used by the test case are the same and contains the only query 'SELECT * FROM t1'; call p1() -- a result set is stored in query cache for further use. call p2() -- the same query is run against the table t1, that result in not running the actual query but using its cached result. On finishing execution of this routine, its memory root is marked for read only since every SP instruction that this routine contains has been executed. INSERT INT t1 VALUE (1); -- force following invalidation of query cache call p2() -- query the table t1 will result in assertion failure since its execution would require allocation on the memory root that has been already marked as read only memory root The root cause of firing the assertion is that memory root of the stored routine 'p2' was marked as read only although actual execution of the query contained inside hadn't been performed. To fix the issue, mark a SP instruction as not yet run in case its execution doesn't result in real query processing and a result set got from query cache instead. Note that, this issue relates server built in debug mode AND with the protect statement memory root feature turned on. It doesn't affect server built in release mode.
-
- 14 Apr, 2024 3 commits
-
-
Yuchen Pei authored
It was updated for 10.6+ in MDEV-7317. Because a lower version spider node may connect to a higher version data node, we need to change this for 10.4 and 10.5 as well.
-
Yuchen Pei authored
-
Yuchen Pei authored
It was done in MDEV-29447.
-
- 12 Apr, 2024 1 commit
-
-
Vlad Lesin authored
In the case if some unique key fields are nullable, there can be several records with the same key fields in unique index with at least one key field equal to NULL, as NULL != NULL. When transaction is resumed after waiting on the record with at least one key field equal to NULL, and stored in persistent cursor record is deleted, persistent cursor can be restored to the record with all key fields equal to the stored ones, but with at least one field equal to NULL. And such record is wrongly treated as a record with the same unique key as stored in persistent cursor record one, what is wrong as NULL != NULL. The fix is to check if at least one unique field is NULL in restored persistent cursor position, and, if so, then don't treat the record as one with the same unique key as in the stored record key. dict_index_t::nulls_equal was removed, as it was initially developed for never existed in MariaDB "intrinsic tables", and there is no code, which would set it to "true". Reviewed by Marko Mäkelä.
-
- 10 Apr, 2024 2 commits
-
-
Marko Mäkelä authored
In commit d74d9596 (MDEV-18543) there was an error that would cause the hidden metadata record to be deleted, and therefore cause the table to appear corrupted when it is reloaded into the data dictionary cache. PageConverter::update_records(): Do not delete the metadata record, but do validate it. RecIterator::open(): Make the API more similar to 10.6, to simplify merges.
-
Yuchen Pei authored
Same as MDEV-29579. For some reason, libodbc does not clean up properly if unloaded too early with the dlclose() of spider. So we add UNIQUE symbols to spider so the spider does not reload in dlclose(). This change, however, uncovers some hidden problems in the spider codebase, for which we move the initialisation of some spider global variables into the initialisation of spider itself. Spider has some global variables. Their initialisation should be done in the initialisation of spider itself, otherwise, if spider were re-initialised without these symbol being unloaded, the values could be inconsistent and causing issues. One such issue is caused by the variables spider_mon_table_cache_version and spider_mon_table_cache_version_req. They are used for resetting the spider monitoring table cache and have initial values of 0 and 1 respectively. We have that always spider_mon_table_cache_version_req >= spider_mon_table_cache_version, and when the relation is strict, the cache is reset, spider_mon_table_cache_version is brought to be equal to spider_mon_table_cache_version_req, and the cache is searched for matching table_name, db_name and link_idx. If the relation is equal, no reset would happen and the cache would be searched directly. When spider is re-inited without resetting the values of spider_mon_table_cache_version and spider_mon_table_cache_version_req that were set to be equal in the previous cache reset action, the cache was emptied in the previous spider deinit, which would result in HA_ERR_KEY_NOT_FOUND unexpectedly. An alternative way to fix this issue would be to call the spider udf spider_flush_mon_cache_table(), which increments spider_mon_table_cache_version_req thus making sure the inequality is strict. However, there's no reason for spider to initialise these global variables on dlopen(), rather than on spider init, which is cleaner and "purer". To reproduce this issue, simply revert the changes involving the two variables and then run: mtr --no-reorder spider.ha{,_part}
-
- 08 Apr, 2024 8 commits
-
-
Yuchen Pei authored
Commit 6dce6aec breaks out of a loop in ha_partition::info when some partitions aren't opened, in which case auto_increment_value assertion will fail. This commit patches that hole.
-
Yuchen Pei authored
-
Yuchen Pei authored
Similar to MDEV-27658. Also fixing the positioning of #ifdef WITH_PARTITION_STORAGE_ENGINE blocks and add missing ones.
-
Yuchen Pei authored
The spider group by handler is created in JOIN::make_aggr_tables_info(), by which time calls to substitute_for_best_equal_field() should have already removed all the multiple equalities (i.e. Item_equal, with MULT_EQUAL_FUNC func_type). Therefore, if there is still such items, it is deemed as an optimizer bug and should be skipped.
-
Yuchen Pei authored
change created by: unifdef -DMYSQL_VERSION_ID=100400 -DMARIADB_BASE_VERSION -m storage/spider/spd_* storage/spider/ha_spider.* storage/spider/hs_client/* basically MDEV-27637, MDEV-27641, MDEV-27655
-
Yuchen Pei authored
Also removed ITEM_FUNC_TIMESTAMPDIFF_ARE_PUBLIC. Similar to pr#2225, with the testcase adapted from that patch: --8<---------------cut here---------------start------------->8--- From 884f7c6df16236748ca975339e0b1c267e195309 Mon Sep 17 00:00:00 2001 From: "Norio Akagi (norakagi)" <norakagi@amazon.com> Date: Wed, 3 Aug 2022 23:30:34 -0700 Subject: [PATCH] [MDEV-28992] Push down TIMESTAMP_DIFF in spider This changes so that TIMESTAMP_DIFF function in a query is pushed down and works natively in Spider. Instead of directly accessing item's member, now we can rely on a public accessor method to make it work. Unit tests are added under spider.pushdown_timestamp_diff. 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. --8<---------------cut here---------------end--------------->8---
-
Yuchen Pei authored
-
Yuchen Pei authored
similar to MDEV-30981
-
- 05 Apr, 2024 1 commit
-
-
Thirunarayanan Balathandayuthapani authored
- InnoDB reserves the free extents unnecessarily during blob page allocation even though btr_page_alloc() can handle reserving the extent when the existing ran out of pages to be used.
-
- 04 Apr, 2024 1 commit
-
-
Sergei Petrunia authored
JOIN_CACHE has a light-weight initialization mode that's targeted at EXPLAINs. In that mode, JOIN_CACHE objects are not able to execute. Light-weight mode was used whenever the statement was an EXPLAIN. However the EXPLAIN can execute subqueries, provided they enumerate less than @@expensive_subquery_limit rows. Make sure we use light-weight initialization mode only when the select is more expensive @@expensive_subquery_limit. Also add an assert into JOIN_CACHE::put_record() which prevents its use if it was initialized for EXPLAIN only.
-
- 28 Mar, 2024 2 commits
-
-
Daniele Sciascia authored
Fix a case of stack-use-after-return reported by ASAN in Wsrep_schema_impl::open_table(). This function has a stack allocated TABLE_LIST object and return TABLE_LIST::table to the caller. Changed the function to take a TABLE_LIST pointer as argument. Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
-
Dmitry Shulga authored
-
- 27 Mar, 2024 6 commits
-
-
Yuchen Pei authored
The failure should be table not found, rather than no spider same server link
-
Yuchen Pei authored
Partial documentation due to time constraints. Will improve over time. Also removed a redundant parameter link_idx from spider_get_sys_tables_connect_info(). And deleted some commented out code.
-
Julius Goryavsky authored
-
Daniele Sciascia authored
- Fix to avoid mysqltest client getting killed abruptly during mysql_shutdown(). When Galera replication is shutdown, wait for THDs with `thd->stmt_da()->is_eof()` to disconnect (these are about to disconnect anyway). - Extract duplicate code from `wsrep_stop_replication()` and `wsrep_shutdown_replication()` in a new function. - No need to use a custom `shutdown_mysqld.inc` in galera suite. Delete it, so that the one in `mysql-test/include/` is used. Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
-
Yuchen Pei authored
This should fix all future problems caused by a non-default global sql_mode from the server where spider is to be installed.
-
Yuchen Pei authored
Like the fix for MDEV-32753 and MDEV-33242, spider init queries creates new connections that use the global sql_mode of the existing connection.
-
- 26 Mar, 2024 4 commits
-
-
Thirunarayanan Balathandayuthapani authored
- Background encryption threads wait for stop flag to exit early from the tablespace. Alter operation fails to set the stop flag before waiting for the encryption thread to stop using the tablespace.
-
Vladislav Vaintroub authored
Add "real ip:<ip_or_localhost>" part to the aborted message Only for proxy-protocoled connection, so it does not not to cause confusion to normal users.
-
Sergei Petrunia authored
Make IN->EXISTS rewrite not to compute constant left expression if it has a subquery in it.
-
Marko Mäkelä authored
-