Console View
|
Categories: connectors experimental galera main |
|
| connectors | experimental | galera | main | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Yuchen Pei
ycp@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MDEV-15621 [wip] Auto add partitions by interval | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Alexey Botchkov
holyfoot@askmonty.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-15479 Empty string is erroneously allowed as a GEOMETRY column value. Empty string disallowed. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Aquila Macedo
aquilamacedo@riseup.net |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39479 Mroonga: avoid hang on invalid index flags Stop parsing index flags after reporting an invalid flag in mrn_parse_grn_index_column_flags(). Otherwise, an invalid index comment such as flags "COMPRESS_ZSTD" can make CREATE TABLE loop forever while emitting warnings. Add a regression test for this case and check that the invalid flag is reported once and the default index flags are used. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Oleksandr Byelkin
sanja@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fix long name on view protocol | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39481 ASAN error on malformed WKB polygon let's make is difficult for wkb and len to desync |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thirunarayanan Balathandayuthapani
thiru@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-34358 Detect config changes during encryption iteration Problem: ======= When innodb_encrypt_tables or innodb_encryption_rotate_key_age is changed during encryption thread iteration, threads continue with stale configuration values, potentially missing tablespaces that should be encrypted or rotated under the new settings. Solution: ======== Added atomic version counter fil_crypt_settings_version that is incremented whenever innodb_encrypt_tables or innodb_encryption_rotate_key_age changes. Encryption threads capture the version at iteration start and check for changes during iteration. If config changed, threads immediately restart iteration from the beginning to ensure complete coverage with new settings. fil_crypt_settings_version: Atomic counter to track the innodb_encrypt_tables or innodb_encryption_rotate_key_age changes rotate_thread_t::settings_version: To compare the existing fil_crypt_settings_version to restart the encryption from the beginning |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39292 set architecture before it's used followup for 29453945ba22 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Jan Lindström
jan.lindstrom@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39662 : Wrong results sent to client after BF abort This issue is regression caused by MDEV-38019 Send ok packet to client earlier. BF aborts may be detected very late in command exectution, somewhere near the end of do_command(). If the ok packet has already been sent and BF abort is detected very late, this could cause the protocol packets becoming out of sync. This is a result of reverting order of releasing MDL and sending ok packet to the client. If it happens in the opposite order than before, there will remain some time window where the select is complete and MDL locks still held. DROP hits that time window, causing a BF abort, and extra error packet gets injected into client-server communication stream. Fixed by not sending ok packet to client earlier in wsrep case. There is a repeatable test case that shows failure if ok packet is sent client earlier by using debug sync point. However, this fix skips sending ok packet earlier causing also skipping the sync point. Therefore, test case is not usable. Test case galera_sr.mysql-wsrep-features#8 was failing because of this regression but it is sporadic. Co-Authored by : Teemu Ollakka <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Vladislav Vaintroub
vvaintroub@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39421 post-fix - query_cache_executable_comments needs query_cache_info Do not run the test if query_cache_info is missing Fixes test on appveyor (which does not build any loadable plugins) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39493 FILE privilege isn't checked for derived check global privileges separately, before checking for per-table SELECT_ACL |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Oleksandr Byelkin
sanja@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| new CC 3.3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Marko Mäkelä
marko.makela@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Use directory handles also on Windows my_mkdir_open(): Create and open a directory handle on Windows by invoking NtCreateFile(). InnoDB_backup::targetPath(): Determine the target directory path from a HANDLE. Yes, this is somewhat awkward, but the basic operations such as CopyFileEx() work on file names, not file handles. We may implement lower-level file copying / block cloning primitives later as well as openat(2) like functionality, as part of implementing streaming backup. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Marko Mäkelä
marko.makela@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Merge mariadb-10.11.17 into 10.11 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thirunarayanan Balathandayuthapani
thiru@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-34358: Add debug status variables to verify encryption thread wait behavior Added debug-only status variables Innodb_encryption_indefinite_waits to track encryption indefinite thread wait instead of busy-waiting when idle. The counters are incremented in rotate_thread_t::wait_for_work() and exposed via SHOW STATUS in debug builds only. Also added a debug sync point 'rotate_only_2_timed_waits' to reduce the timed wait threshold from 5 to 2 for faster testing of the indefinite wait transition. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Marko Mäkelä
marko.makela@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39344: trx_disconnect_prepared() uses wrong mutex trx_t::disconnect_prepared(): Replaces trx_disconnect_prepared(). Protect the data members with trx_t::mutex. trx_sys.trx_list: Use a plain ilist<trx_t> that is protected by lock_sys.latch, which was already protecting some traversal of trx_sys.trx_list. All traversal will now use range for, instead of callback functions. fetch_data_into_cache_low(): Return whether we ran out of memory. fetch_data_into_cache(): Reduce the hold time of lock_sys.latch and do not wrongly reset the cache->is_truncated flag at the end. trx_sys_t::clone_oldest_view(): Protect the list traversal with shared lock_sys.latch. trx_sys_t::register_trx(), trx_sys_t::deregister_trx(): Protect trx_sys.trx_list with an exclusive lock_sys.latch. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Andrei Elkin
andrei.elkin@pp.inet.fi |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-36025 Parallel slave concurrent BACKUP MDL locking with ongoing backup.. The problem the patch tackles is that the binlogging parallel slave can expose prepared state of transactions to the backup process. That is the latter can enroll such transactions, typically waiting for prior commits - in other words *undecided* (of whether they are going to commit at all - sic!), into backup image. The technical possibility of that owes to earlier deadlocks fixes in this area that made the parallel slave worker to re-acquire its BACKUP MDL within the wait-for-prior commit phase (which is post- engine prepare) one. Note the --skip-log-bin or --log-slave-update=OFF parallel slave is not vulnerable to the exposure of its prepared transactions. The fixes this patch provides make sure the backup image contains only transactions that are (binlog-order) committed, while parallel slave does not deadlock (MDEV-23586). The principal part of the fixes implements leapfrogging of a waiting "high-priority" BACKUP MDL by a slave parallel worker which is exemplified in the following. First mind about notations: here (as elsewhere in the patch) `Fn` group commit followers indexed by the gtid seq-no `n`; `F|xyz` indicates the execution status (timing) of the MDL request. `B` - stands for backup thread; `Si,Xk` are BACKUP share and exclusive MDL sequenced by `i,k` that are logical times of the MDL acquisition; The semi-column separates the granted head of the lock queue from the waiters. The queue below is the BACKUP MDL queue The decision to allow S3 leapfrog X2 is based on the fact that the current lock holder F2 has a greater gtid_sub_id (2 > 1). To implement this scheduling policy requires the following modifications. P1 sql/mdl.h The new method determines whether a BACKUP lock requester is a teammate of a group that can share the MDL lock and that there exists at least on granted member of the group. +MDL_request::bool (*is_teammate_callback)(const THD*, const THD*); P2. sql/log.cc dismantling of mdl_context.{release,acquire}_lock() in the parallel worker wait-for-prior commit P3. sql/handler.cc setting the P1 MDL_request::is_teammate_callback to the slave parallel worker as hint to try acquiring the MDL lock by team membership. P4. sql/rpl_rli.cc defines the teammate callback for the parallel slave. +rpl_group_info::ignore_mdl_priority P5. sql/handler.cc Logics of "careful" release of the MDL lock could not be streamlined. The failed parallel slave worker still has to abide with the former policy of ``` as there is extra replication book-keeping to be done before rolling back and allowing a conflicting transaction to continue (MDEV-7458).``` [ha_commit_trans]. For that reason of MDEV-7458 the BACKUP MDL request's memory is now allocated for the worker in THD::st_transaction::mem_root. Also guards are deployed to not let the mem-root be be cleaned too early, before the lock gets released. It can be released fast to follow with transaction->cleanup() for not failing trx:s. Failing to commit parallel workers defer that to Relay_log_info::cleanup_context() from where now ha_rollback_trans() will make it. Aslo necessary changes are caused by to the gtid implicit statement's design. 1. sql/sql_class.cc Removed earlier backup-on-parallel-slave bugfixes of MDEV-23586. The parallel worker does not release anymore BACKUP MDL at its wait-for-prior commit stage. 2. sql/sql_lex.h, sql/sql_base.cc, sql/rpl_gtid.cc Has to be introduced +#define TL_OPTION_GTID_TABLE_SLAVE 64 as a part of a method to find out (see open_table() hunk) at executing record_gtid() by implicit GTID statement that its BACKUP MDL lock (however it is necessary - it is not challenged here) needs the ignore-priority hint. Note this hint applies for granting a "special" S' share locked not yet the commit time ha_commit_trans()'s MDL_BACKUP_COMMIT (denoted as S) lock, which is going to be requested later. Let's exemplify it on the following diagrams, calling S' a sort of shared lock, compatible with *Without* the teammate hint the request for S'3(F2) at record_gtid() time S1(F3|wait_for_prior_commit); X2(B) <- S'3(F2|record_gtid) would end up to wait behind X2 S1; /* waiting */ X2, S'3 and we'd be regress back to hang/deadlock of earlier bugs: F3 would not be awaken by F2 who is blocked by B. Tested with extended set of parallel slave with backup scenarios. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Alexey Botchkov
holyfoot@askmonty.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39573 AddressSanitizer: heap-use-after-free in my_mb_wc_latin1/../Field_xmltype::store after invalid xml. The Field_blob::store can affect the 'from' argument so it can't be used after it. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39673 group_concat ignores max_allowed_packet GROUP_CONCAT is limited by group_concat_max_len, but also, as a string function it must respect max_allowed_packet. Let's introduce THD::gconcat_max_len() helper to simplify checks. Also: * make max group_concat_max_len value the same as max max_allowed_packet * use the same MY_MIN((ulonglong) ..., UINT_MAX32) in Item_func_json_objectagg as in Item_func_group_concat * use overflow-safe type for lengths in Item_func_quote (MAX_MAX_ALLOWED_PACKET is 1G so uint cannot overflow yet, but it's a fragile assumption) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39478 COM_STMT_EXECUTE incorrectly checks for parameter value length * remove redundant checks for `len` in `get_param_length()` * validate return value `length` in `get_param_length()` * fix all `Item_param::set_param_XXX()` methods to never read past `len` note that all `Item_param::set_param_XXX()` methods correctly handle zero-length values. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Rucha Deodhar
rucha.deodhar@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39213: json range syntax crash Analysis: When json is being parsed, the step decreases without a out-of-bound check resulting in failure. Fix: Before decreasing the step, check if it will result into out of bound. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
bsrikanth-mariadb
srikanth.bondalapati@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39405: store the necessary plugin-engines optimizer costs store the necessary plugin-engines optimizer costs that are used by the query into the context, so that the replay server uses the same while computing query cost |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thirunarayanan Balathandayuthapani
thiru@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-34358 Encryption threads consume CPU when no work available Problem: ======== 1. Encryption threads busy-wait when no work is available. When reaching fil_system.space_list.end(), fil_crypt_return_iops() is called with wake=true, causing pthread_cond_broadcast() to wake all threads unnecessarily, leading to CPU waste. 2. Tablespaces with CLOSING/STOPPING flags (set during DDL operations) are skipped during iteration. Since DDL completion doesn't wake encryption threads, these spaces may never be encrypted if threads sleep indefinitely. 3. For default_encrypt_list iteration, when spaces exist but none are acquirable, threads need to wake others for cooperative retry, but this case was not distinguished from fil_system.space_list.end(). 4. IOPS are allocated before searching for tablespaces, wasting resources during iteration when no I/O occurs. 5. Encryption threads use fil_crypt_threads_cond for two different purposes: waiting for encryption work and waiting for IOPS allocation. When fil_crypt_return_iops() or fil_crypt_realloc_iops() broadcasts after releasing IOPS, it wakes ALL threads including those correctly waiting for work, causing spurious wakeups and CPU waste. Solution: ========= 1. Implement timed wait with exponential backoff when space == fil_system.space_list.end() (applies to both default_encrypt_list and space_list iteration when no acquirable spaces are found): - First timeout: 5 seconds - Subsequent timeouts: (timed_wait_count + 1) * 5 seconds (10s, 20s, 40s, 60s) - After 5 consecutive timeouts (~135 seconds total), switch to indefinite wait to avoid CPU waste - Timeout counter resets to 0 when woken by signal (config change, new tablespace) or when work is found 2. Add default_encrypt_list flag to fil_space_t::next() to distinguish between the two iteration modes. Wake other threads only when this flag is true (spaces exist but unacquirable). 3. Move IOPS allocation from before tablespace search to after finding a space that needs rotation. Retry IOPS allocation up to 3 times with 20ms delays to handle temporary heavy allocation. If allocation still fails, set recheck=true to skip waiting and immediately try next space. 4. Handle wake logic explicitly at call site based on default_encrypt_list flag instead of in fil_crypt_return_iops(). 5. Introduce separate condition variable fil_crypt_iops_cond specifically for IOPS allocation synchronization to prevent spurious wakeups: - fil_crypt_threads_cond: Used in wait_for_work() for waiting when no tablespaces need encryption. Signaled when settings change, new tablespaces are created, or thread count changes. - fil_crypt_iops_cond (NEW): Used in fil_crypt_alloc_iops() for waiting when IOPS limit is reached. Signaled when IOPS are returned via fil_crypt_return_iops(), released via fil_crypt_realloc_iops(), or when srv_n_fil_crypt_iops is increased. rotate_thread_t changes: - default_encrypt_list (bool): Indicates if iterating default_encrypt_list - timed_wait_count (uint8_t): Counts consecutive timeouts for exponential backoff - wait_for_work(): Implements timed/indefinite wait strategy |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Alexander Barkov
bar@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39587 Package-wide TYPE for variable declarations SET sql_mode=ORACLE; DELIMITER $$ CREATE OR REPLACE PACKAGE pkg AS -- Declare a package public data type TYPE varchar_array IS TABLE OF VARCHAR(2000) INDEX BY INTEGER; END; $$ DELIMITER ; DELIMITER $$ CREATE OR REPLACE PROCEDURE p1 AS v pkg.varchar_array; -- Use the package public data type BEGIN v(0):='test'; SELECT v(0); END; $$ DELIMITER ; Note, the change is done only for sql_mode=ORACLE, because the TYPE declaration is not available for the default mode. Where package-wide types are available -------------------------------------- - Variabe list type: DECLARE var pkg1.type1; - RETURN type for a package routine: CREATE FUNCTION .. RETURN pkg1.type1 ... - Parameter type for a package routine: PROCEDURE p1(param1 pkg1.type1); - Assoc array element type: TYPE assoc1_t IS TABLE OF pkg1.type1 ... - REF CURSOR RETURN type: TYPE cur1_t IS REF CURSOR RETURN pkg1.type1; Change details -------------- - Adding a member Lex_length_and_dec_st::m_foreign_module_type It's set to true when the data type was initialized from a TYPE in foreign routine (e.g. in PACKAGE spec). It's needed to prevent use of qualified identifiers in public contexts, i.e. in schema public routine parameter types and schema publuc function RETURN types. Adding a helper method sp_head::check_applicability() which prevents use of qualified types in public context. - Adding a helper method sp_head::raise_unknown_data_type(). - Adding methods LEX::set_field_type_typedef_package_spec() for 2-step and 3-step qualified indentifiers. It's used in field_type_all_with_typedefs which covers cases: - Variabe list type : DECLARE var pkg1.type1; - RETURN type : CREATE FUNCTION .. RETURN pkg1.type1 ... - Parameter type : PROCEDURE p1(param1 pkg1.type1); - Assoc array element type : TYPE assoc1_t IS TABLE OF pkg1.type1 ... - Adding a method LEX::declare_type_ref_cursor_return_typedef(). It handles cases when a new TYPE REF CURSOR RETURN is declared, for both for qualified RETURN types and non-qualified RETURN types: - TYPE cur0_t IS REF CURSOR RETURN rec1_t; - TYPE cur0_t IS REF CURSOR RETURN pkg1.rec1_t; - TYPE cur0_t IS REF CURSOR RETURN db1.pkg1.rec1_t; The code was moved from LEX::declare_type_ref_cursor() into LEX::declare_type_ref_cursor_return_typedef() and extended to cover qualified RETURN types. - Adding a method Sql_path::find_package_spec_type(). It iterates through all schemas specified in @@path and searches for the given type in the given package. - Adding a helper method sp_pcontext::type_defs_add_ref_cursor() to reuse the code. - Adding a new method sp_package::get_typedef() to search for TYPE definitions in PACKAGE specifications. - Adding a new method sp_head::get_typedef_package_spec() to search for TYPE definitions used by a PROCEDURE or FUNCTION. - Adding a helper method Sp_handler::sp_cache_routine_reentrant_suppress_errors Adding a method Sp_handler::find_package_spec(). |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MDEV-39481 ASAN error on malformed WKB polygon | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Arcadiy Ivanov
arcadiy@ivanov.biz |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
fixup! 6e9ae08b7ad79885425652bc648f8fc56f7b1177 Fix 32-bit compile: use `sizeof(void*)` for blob pointer memcpy `portable_sizeof_char_ptr` is always 8 (the record slot width), but actual pointer size is 4 on 32-bit. The production code (`hp_hash.c`) uses `HP_PTR_SIZE = sizeof(void*)` for memcpy of pointer values. The test must do the same to avoid `-Werror=stringop-overflow`. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Oleksandr Byelkin
sanja@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Merge branch '10.6' into 10.11 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MDEV-39498 mroonga_command() incorrect result length metadata | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39498 more fixes * use max_length=640 * also fix mroonga_highlight_html, mroonga_normalize, mroonga_snippet_html * remove disable_cursor_protocol from all mroonga tests |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Varun Deep Saini
deepsainivarun@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-35548: Fix out-of-bounds array access in json_get_path_start json_get_path_start() set p->last_step to p->steps - 1, creating a pointer before the beginning of the steps[] array. This is undefined behavior flagged by UBSAN as "index -1 out of bounds for type json_path_step_t[32]". Use NULL as the sentinel value instead, and check for NULL in json_get_path_next() rather than comparing against p->steps. Backport to 10.6 of commit 4f546897b87144f4219094c5a852d766d5a46b74. Additional test case from Rucha Deodhar Signed-off-by: Varun Deep Saini <[email protected]> Signed-off-by: Varun Deep Saini <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thirunarayanan Balathandayuthapani
thiru@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
- Add mysql_thd object for trx_t object in i_s file - Started the transaction for i_s queries. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Oleksandr Byelkin
sanja@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| new CC 3.3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Arcadiy Ivanov
arcadiy@ivanov.biz |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
fixup! 07846d3ef329caca03d26e58e200f3f2d1e4f04b Replace exact `Created_tmp_%` counts with ON/OFF checks in blob_big tests Exact temp table counts vary between 32-bit and 64-bit platforms because view protocol creates additional temp tables whose overflow behavior depends on pointer size and internal structure sizes. Replace `SHOW STATUS LIKE 'Created_tmp%'` with a query that reports ON/OFF for `CREATED_TMP_TABLES` and `CREATED_TMP_DISK_TABLES`. This preserves the key assertions (disk tables created vs not created) while being platform-independent. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MDEV-39540 crash due to narrowing cast in update_ref_and_keys() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39516 s3 curl_easy_setopt requires long values otherwise compile failure update submodule to compile on fc44 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
bsrikanth-mariadb
srikanth.bondalapati@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39438: Empty optimizer context is noticed after an explain query When the variable "use_stat_tables" is set to 'preferably', the explain plan query containing a stored procedure generated no context, even when the optimizer_record_context flag was set. The reason being context recorder (for the entire query) was getting cleared after the stored procedure evaluation was done. The solution is to not clear the context recorder as soon as the stored procedure evaluation is finished. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hemant Dangi
hemant.dangi@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-39648: wsrep_sst_rsync.sh: apply safe() to joiner-supplied parameters Issue: wsrep_sst_rsync.sh interpolated WSREP_SST_OPT_REMOTE_USER and WSREP_SST_OPT_REMOTE_PSWD verbatim. Because both values originate from the joiner side of the SST request, a newline in either could splice an extra directive into the donor-written stunnel.conf (silently downgrading peer-cert verification) or an extra line into the rsync magic file. MDEV-39413 had introduced safe() for the same threat class in wsrep_sst_mariabackup but did not extend it to the rsync script. Solution: Routing the rsync interpolations through safe() closes the gap, and extending safe() to also reject tab and newline ensures multi-line values cannot survive into a config-file heredoc. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Mohammad Tafzeel Shams
tafzeel.shams@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-38305: Expose adaptive hash index statistics in ANALYZE FORMAT=JSON Expose InnoDB's Adaptive Hash Index (AHI) statistics through ANALYZE FORMAT=JSON output to provide query-level visibility into AHI usage and effectiveness. This allows DBAs and developers to monitor how well the adaptive hash index is serving their workloads on a per-query basis. The r_ahi_stats object (nested inside r_engine_stats) now reports four key metrics: ahi_searches (successful AHI lookups), ahi_searches_btree (AHI misses requiring B-tree fallback), ahi_rows_added (rows inserted into AHI), and ahi_pages_added (pages indexed by AHI). - btr_ahi_inc_searches(): Increment counter when AHI lookup succeeds. - btr_ahi_inc_searches_btree(): Increment counter when AHI lookup fails and falls back to B-tree search. - btr_ahi_inc_rows_added(): Increment counter when rows are added to the adaptive hash index structure. - btr_ahi_inc_pages_added(): Increment counter when new pages are indexed by AHI. - btr_cur_t::search_leaf(): Call btr_ahi_inc_searches() on successful AHI hit and btr_ahi_inc_searches_btree() on AHI miss to track search outcomes at the point where AHI is utilized. - trace_engine_stats(): Output r_ahi_stats object with all four AHI counters in JSON format when any AHI activity is detected during query execution. - ha_handler_stats: Added ahi_searches, ahi_searches_btree, ahi_rows_added, and ahi_pages_added fields to track per-query AHI statistics. - ahi_stats.test: Comprehensive verification of AHI statistics reporting across different scenarios: insufficient accesses (no AHI build), threshold triggering (AHI construction), heavy warmup (full AHI utilization), and disabled AHI (verify zero statistics). - check_ahi_status.inc: Reusable include file for executing queries with configurable warmup repetitions and extracting AHI statistics from ANALYZE FORMAT=JSON output using JSON path expressions. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Arcadiy Ivanov
arcadiy@ivanov.biz |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Use SHA256 integrity checks in blob_fallback test Store SHA2(blob, 256) on insert and compare on retrieval instead of direct string comparison. Use non-repeat blob patterns to make corruption detection more meaningful. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MDEV-39266 Stack Overflow via alloca() in Privilege Table JSON Parser | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||