Console View
|
Categories: connectors experimental galera main |
|
| connectors | experimental | galera | main | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cleanup: remove obsolete code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Vladislav Vaintroub
vvaintroub@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
CI: ARM64 - run MTR in RUNNER_TEMP instead of TEMP RUNNER_TEMP is the per-job scratch directory GitHub provides, on the same drive as the workspace, with a shorter path. Assisted-by: Claude:claude-sonnet-5-5 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Andrzej Jarzabek
andrzej.jarzabek@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-31956: Validate innodb_extended_buffer_pool_size, disable on errors innodb_extended_buffer_pool_size stays dynamic, but it is now validated: - If the server was started without the extended buffer pool (EBP), the value cannot be changed. - Otherwise, it can only be set to 0, which stops using the EBP, or to its startup size, which resumes using it. As at startup, a value is rounded down to a multiple of innodb_page_size, so any value that rounds down to the startup size is accepted, with a truncation warning if it was rounded. - buf_pool.extended_pages, the size of the EBP page array, no longer changes; setting 0 used to set it to 0 and break the bounds assertions on the EBP pages that were still in use. - ext_bp_size is now only the storage of the system variable. fil_system_t::ext_buf_pool_enabled() reads the new atomic flag ext_bp_active instead, because it is also called without holding buf_pool.mutex. An I/O error, a page that fails validation (checksum, page id, decryption) or a read past the end of the EBP file now disables the EBP for good with buf_pool_t::ext_disable(). It discards every EBP page from buf_pool.page_hash, so that nothing more is read from the file, and SET GLOBAL innodb_extended_buffer_pool_size can no longer enable it. This also happens if the size was set to 0 when the error occurs. Reads that fail fall back to reading the page from the data file, instead of flagging the data file as corrupted. If that read fails too, the page is reported to recovery with recv_sys_t::free_corrupted_page(), as for other failed page reads. A failed EBP write is completed by buf_page_ext_write_discard(), which now also evicts the page. This includes a write that cannot be submitted, which buf_page_t::flush() used to ignore, leaving the page write-fixed and latched for good. An asynchronous EBP read that returns fewer bytes than requested, as at the end of the file, is now treated as an I/O error instead of a successful read. os_file_io() and its callers named the data file of an EBP request with IORequest::node(), which is invalid for EBP requests; they now use os_io_file_name(). The messages of buf_page_decrypt_after_read() and buf_page_check_corrupt() name the EBP file for pages read from it. buf_page_write_complete() is split into helper functions, and the error paths of EBP reads and writes are marked as unlikely. The EBP path itself is not, because it is the common one while the EBP is in use. The debug flag ib_ext_bp_count_io_only_for_t is now evaluated by buf_page_ext_count_io() for both the EBP admission in buf_flush_LRU_list_batch() and the EBP read and write counters, so that they always agree. It matches the tablespace name test/t exactly. The EBP status variables are moved to their alphabetical place in innodb_status_variables[]. MTR test innodb.ext_buf_pool no longer hides its queries from the result file. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-25848 use xxh3 hash of string values, not actual values That is, keep 8-byte prefix of the original string value and xxh3 hash of the tail. Prefix keeps strings generally sorted, otherwise the performance pathologically decreases (compared to btree or non-hashed variant) when keys are accessed in a predictable order. Keys that are shorter than 17 bytes are stored as is. Benchmark: single threaded. 1,000,000 random 256-byte strings. stored then retrieved. As '["string"]' json and directly as varchar(256) in a normal btree index. MyISAM: * btree 02:07 * json 02:04 * xxh3 01:54 Note that MyISAM prefix compresses keys, which helps to put a lot more long strings on one page, reducing benefits of short keys. InnoDB: * btree 04:51 * json 04:53 * xxh3 03:25 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Vladislav Vaintroub
vvaintroub@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-37996 CMake: MariaDB:: targets for bundled-or-system libraries Stop overwriting the standard find_package() result variables (ZLIB_FOUND, ZLIB_LIBRARIES, ZLIB_INCLUDE_DIR(S), ...), this breaks vcpkg. Provide namespaced INTERFACE targets that point at either the bundled or the system library and carry their include directories (and, for SSL, the compile definitions) MariaDB::zlib, MariaDB::OpenSSL, MariaDB::pcre2-8, MariaDB::pcre2-posix, MariaDB::fmt, MariaDB::readline Link these consistently instead of the scattered ${*_LIBRARIES} and ${*_INCLUDE_DIR(S)} variables sprinkled across the tree. Bundled pcre2-posix depends on pcre2-8 so the static link order is correct for consumers that link only posix. wolfssl carries its own usage requirements (HAVE_WOLFSSL, WOLFSSL_USER_SETTINGS); MariaDB::OpenSSL keeps only HAVE_OPENSSL. Update libmariadb to 3.3 (47a31a98): handles MariaDB::zlib as a submodule. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fix fulltext.test to break ties (rows with the same relevance) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Vladislav Vaintroub
vvaintroub@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-37996 CMake: MariaDB:: targets for bundled-or-system libraries Stop overwriting the standard find_package() result variables (ZLIB_FOUND, ZLIB_LIBRARIES, ZLIB_INCLUDE_DIR(S), ...), this breaks vcpkg. Provide namespaced INTERFACE targets that point at either the bundled or the system library and carry their include directories (and, for SSL, the compile definitions) MariaDB::zlib, MariaDB::OpenSSL, MariaDB::pcre2-8, MariaDB::pcre2-posix, MariaDB::fmt, MariaDB::readline Link these consistently instead of the scattered ${*_LIBRARIES} and ${*_INCLUDE_DIR(S)} variables sprinkled across the tree. Bundled pcre2-posix depends on pcre2-8 so the static link order is correct for consumers that link only posix. wolfssl carries its own usage requirements (HAVE_WOLFSSL, WOLFSSL_USER_SETTINGS); MariaDB::OpenSSL keeps only HAVE_OPENSSL. Update libmariadb to 3.3 (47a31a98): handles MariaDB::zlib as a submodule. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Petrunia
sergey@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-25848: record/replay hlindex records_in_range() in optimizer context check_quick_select_array() now goes through hook_hl_records_in_range(), which records or replaces both the row estimate and the cost (record_hl_records_in_range / infuse_hl_records_in_range). The calls are stored in a new per-table "hl_records_in_range_calls" array. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Andrzej Jarzabek
andrzej.jarzabek@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-31956: Validate innodb_extended_buffer_pool_size, disable on errors innodb_extended_buffer_pool_size stays dynamic, but it is now validated: - If the server was started without the extended buffer pool (EBP), the value cannot be changed. - Otherwise, it can only be set to 0, which stops using the EBP, or to its startup size, which resumes using it. As at startup, a value is rounded down to a multiple of innodb_page_size, so any value that rounds down to the startup size is accepted, with a truncation warning if it was rounded. - buf_pool.extended_pages, the size of the EBP page array, no longer changes; setting 0 used to set it to 0 and break the bounds assertions on the EBP pages that were still in use. - ext_bp_size is now only the storage of the system variable. fil_system_t::ext_buf_pool_enabled() reads the new atomic flag ext_bp_active instead, because it is also called without holding buf_pool.mutex. An I/O error, a page that fails validation (checksum, page id, decryption) or a read past the end of the EBP file now disables the EBP for good with buf_pool_t::ext_disable(). It discards every EBP page from buf_pool.page_hash, so that nothing more is read from the file, and SET GLOBAL innodb_extended_buffer_pool_size can no longer enable it. This also happens if the size was set to 0 when the error occurs. Reads that fail fall back to reading the page from the data file, instead of flagging the data file as corrupted. If that read fails too, the page is reported to recovery with recv_sys_t::free_corrupted_page(), as for other failed page reads. A failed EBP write is completed by buf_page_ext_write_discard(), which now also evicts the page. This includes a write that cannot be submitted, which buf_page_t::flush() used to ignore, leaving the page write-fixed and latched for good. An asynchronous EBP read that returns fewer bytes than requested, as at the end of the file, is now treated as an I/O error instead of a successful read. os_file_io() and its callers named the data file of an EBP request with IORequest::node(), which is invalid for EBP requests; they now use os_io_file_name(). The messages of buf_page_decrypt_after_read() and buf_page_check_corrupt() name the EBP file for pages read from it. buf_page_write_complete() is split into helper functions, and the error paths of EBP reads and writes are marked as unlikely. The EBP path itself is not, because it is the common one while the EBP is in use. The debug flag ib_ext_bp_count_io_only_for_t is now evaluated by buf_page_ext_count_io() for both the EBP admission in buf_flush_LRU_list_batch() and the EBP read and write counters, so that they always agree. It matches the tablespace name test/t exactly. The EBP status variables are moved to their alphabetical place in innodb_status_variables[]. MTR test innodb.ext_buf_pool no longer hides its queries from the result file. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Yuchen Pei
ycp@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Fix crash caused by incorrectly assigning MULTIPLE to an ARRAY key when adding an index to a table with an existing ARRAY INDEX Missing ARRAY key type causes hliton to not be assigned in mysql_prepare_create_table_finalize. This further causes the ARRAY key not to be placed at the end of the key list, which it should be. Later in TABLE_SHARE::init_from_binary_frm_image it still assumes the last key is an hlindex key. When it is not, this non-hlindex last key has NULL hliton, causing options() to access field of the NULL t argument passed to it by the caller thus crash. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Yuchen Pei
ycp@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-25848 Call set_optimizer_costs for the hlindex table This fixes msan uninitialised value failures for MVI |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Vladislav Vaintroub
vvaintroub@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
CI: ARM64 - print volumes, directories and memory Diagnostic step: filesystem of each drive, RUNNER_TEMP/TEMP/workspace paths, OS, CPU count and memory. Assisted-by: Claude:claude-sonnet-5-5 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
JSON data type pre-feature pretend better that JSON is a proper data type: * SHOW CREATE shows JSON for LONGTEXT CHARSET utf8mb4_bin CHECK(IS_JSON_VALID()) columns. * CAST(... AS JSON) is accepted (casts to TEXT CHARSET utf8mb4_bin, with no real JSON validation) These two placeholders will be fully correct when MDEV-38740 is pushed. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
bsrikanth-mariadb
srikanth.bondalapati@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-38303: Stop scan early when aggregate HAVING cannot become true For a query without GROUP BY, such as SELECT COUNT(*) FROM t1 HAVING COUNT(*) < 10 the whole table was read even after the count reached 10 and the condition could no longer be true. Add Item_sum::having_false_is_final(op, c), which tells whether a HAVING condition "aggregate op constant", once false, stays false as more rows are added. Item_sum_count implements it for COUNT(..) < c, COUNT(..) <= c and COUNT(..) = 0. Other aggregates return false, so they are read in full as before. JOIN::setup_having_stop_conds() collects such AND-parts of HAVING in a List at the end of JOIN::make_aggr_tables_info(), in the optimizer. An error there is returned to the caller. end_send_group() checks the conditions after each row and returns NESTED_LOOP_QUERY_LIMIT, the same way LIMIT stops a scan, once one is false. The end-of-records step still runs, so HAVING is checked on the final state. Only used when it is safe: - implicit grouping, with no temporary table, ROLLUP, window functions, PROCEDURE, optimized-away GROUP BY or correlated HAVING - COUNT(DISTINCT) is excluded, as its value is known only at the end - the comparison must be numeric. COUNT compared with a DATE is not monotonic, so it is not used - the constant must be a non-NULL literal. A <cache> item, such as an expression with a user variable (@v + 0) or a folded 5 + 5, is filled on its first read, which the shortcut would move to the first row. A user variable changed by a stored function during the scan would give a wrong result. - a NULL result does not stop the scan Like LIMIT, stopping early means the remaining rows are not read, so errors and side effects from them no longer happen. The code is in the new file sql/opt_having_shortcut.cc. Since the decision is made at optimization time, it is also reported: - EXPLAIN FORMAT=JSON shows "having_shortcut": true - the optimizer trace has a "having_shortcut" object with the stop_conditions The plan only says the scan may stop. The tests also cover queries where the plan shows the shortcut, but the scan is not stopped, or is stopped late. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Tree<> - a typesafe wrapper for TREE | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
cleanup: is_local_field() -> get_local_field() removes the need for a separate cast after the check, and guarantees that the correct item is used as Item_field (and not something else was mistakenly cast due to a typo) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
mariadb-PranavTiwari
pranav.tiwari@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41151 SF erroneously caches an anchored return data type Do not keep the result field of a stored function between statements; create it again on each fix. Reset max_length in cleanup() so a stale value is not passed on the next EXECUTE. Reverts the caching added by MDEV-26115, safe after MDEV-37563. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cleanup: extract duplicated no_part_keypart() check | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Samarth Deshpande
samarthpd21@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-21780 event_scheduler system variable's usage message doesn't mention the possible value "ORIGINAL" ORIGINAL resets the event scheduler to the state the server was started with, which is different from DEFAULT (always OFF). Add it to the usage message of event_scheduler and re-record the results that print it. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Andrzej Jarzabek
andrzej.jarzabek@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-31956: Fix extended buffer pool crashes, leaks and test flakiness Fix several problems in the extended buffer pool (EBP) that showed up on buildbot: - IORequest::write_complete() crashed with a sux_lock assertion when an EBP write completed after its tablespace was dropped: it called x_unlock() on a U-latched page and skipped the rest of the completion. The new buf_page_ext_write_discard() releases the write-fix and U-latch, returns the EBP page to the free list and tries to evict the page. - buf_page_write_complete() leaked the EBP page slot when the write failed, and when the page could not be evicted after a successful write (so the copy was never registered in buf_pool.page_hash). Both cases now return the slot to the free list. free_ext_page() resets the debug in_page_hash flag, because such slots are freed without having been inserted into page_hash. - On Windows the EBP file was opened through mysys create_temp_file(), without FILE_FLAG_OVERLAPPED and without being bound to srv_thread_pool, so the first asynchronous EBP write crashed in StartThreadpoolIo(). create_ext_file() now creates the file with CreateFile(FILE_FLAG_OVERLAPPED | FILE_FLAG_DELETE_ON_CLOSE) and binds it. The new close_ext_file() closes the file the right way on each platform and is also used when setting the file size fails. - buf_flush_LRU_list_batch() counted a page in n->evicted without having evicted it when the write to the EBP could not be started. It invoked buf_LRU_free_page() while the page was still U-latched, so can_relocate() was false and the call silently did nothing, leaving the page in the buffer pool. Release the U-latch before the call, like the path that handles a tablespace that is stopping writes. - The debug variable innodb_force_LRU_eviction returned before the forced eviction had finished: it waited for two done_flush_list signals, which other flushing can also send, and did not wait for the asynchronous writes. It now waits until two page cleaner LRU batches (counted by the new debug-only buf_pool.n_LRU_batches) have completed with the flag set, and then for all pending writes. This fixes the wrong counts seen in innodb.ext_buf_pool and innodb.ext_buf_pool_admission_pct. That wait could never end when no page cleaner is running, because only buf_flush_page_cleaner() increments n_LRU_batches and srv_start() only starts it when !srv_read_only_mode, which innodb_force_recovery=6 implies as well. The update function now does nothing in read only mode, and stops waiting if the page cleaner is no longer running; the page cleaner clears buf_page_cleaner_is_active and broadcasts done_flush_list while holding buf_pool.flush_list_mutex, so the transition cannot be missed. The wait also no longer holds LOCK_global_system_variables, like the other InnoDB update functions that wait, so that it cannot keep other connections from being established. - The debug flag ib_ext_bp_disable_LRU_eviction_for_t never skipped anything, because its continue statement applied to the do ... while (0) of DBUG_EXECUTE_IF() and not to the page loop. Set a variable inside the DBUG_EXECUTE_IF() and act on it after the macro, so that the pages of test/t are really left alone while innodb.ext_buf_pool and innodb.ext_buf_pool_admission_pct are still filling the table. Without this, those pages can be admitted to the EBP and evicted while the tests are inserting, and the exact counts that the tests expect after the forced eviction depend on how the page cleaner happened to be scheduled. - The debug flag ib_ext_bp_count_io_only_for_t offered more pages to the admission selector than it counted. It let a page through when fil_space_t::get() failed, and it did not look at the page type, while buf_page_write_complete() counts only the index pages of test/t. The pages of the test/t that an earlier part of the test dropped can still be resident after their fil_space_t is gone, and the FSP_HDR, IBUF_BITMAP and INODE pages are offered as well, so each run of innodb.ext_buf_pool_admission_pct put 13 or more pages before the selector instead of 10. Those extra pages consumed admissions without being counted, and because the selector's accumulator only returns to its previous value when the number of candidates times the percentage is a multiple of 100, the error also carried over into the following runs. The test failed on Debian with 6 instead of 5 pages admitted at 50 per cent. Offer exactly the pages that are counted. Run innodb.ext_buf_pool and innodb.ext_buf_pool_admission_pct with innodb_stats_persistent=0. The inserts make the background statistics thread recalculate the statistics of test/t asynchronously. When it samples the index after the forced eviction, it reads the pages back from the EBP, and when it does so while the forced batch is running, it changes how many pages that batch admits. This made the tests randomly fail on Windows with too many reads, and with 8 or 10 instead of 9 pages flushed. Add a case to innodb.ext_buf_pool for the n->evicted fix. The new debug flag ib_ext_bp_alloc_fail makes every EBP page allocation fail, so that buf_page_t::flush(space, true) returns false with the page still U-latched. Also name the buf_page_t::space_type enumerators in buf_page_write_complete() instead of casting (oldest_modification() == 2) to the enumeration. That only produces TEMPORARY and PERSISTENT while they are 1 and 0, so reordering them, or adding an enumerator before them, would keep compiling and would make write_complete() treat pages of the temporary tablespace as persistent. Also re-record sys_vars.sysvars_innodb,32bit for innodb_extended_buffer_pool_size and rocksdb.innodb_i_s_tables_disabled for the new INNODB_BUFFER_POOL_STATS columns. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
support AND/OR ranges over spatial indexes * remove the code that unconditionally disabled indexes when GEOM_FLAG was present on ranges * instead, treat two spatial ranges as two _separate index scans_, unlike normal indexes, two spatial ranges cannot be combined. Optimizer later picks one with the better selectivity. * this means there can be up to MAX_KEY ranges (SEL_TREE) even if the table has only one or two indexes - limit all arrays by MAX_KEY, not by param->keys. * the KEY_PART is cloned as needed to create separate spatial ranges |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Vladislav Vaintroub
vvaintroub@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-42338 Treat system library headers as SYSTEM includes Mark include directories for system OpenSSL and system pcre2 as SYSTEM so that warnings from their headers are not promoted to errors under -Werror. Bundled library headers are left as regular includes. System zlib already gets SYSTEM treatment because ZLIB::ZLIB is an IMPORTED target (CMake marks imported target includes as SYSTEM by default). Assisted-by: Claude:claude-opus-4-6 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cleanup: KEY::type() and KEY::is_hlindex() methods | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
generalize HA_ERR_NULL_IN_SPATIAL * make it mean "tthe index rejects this field value" * rename to HA_ERR_BAD_FIELD_VALUE (not user-visible) * change handler::print_error() to provide a more helpful error message -Warning 1416 Cannot get geometry object from data you send to the GEOMETRY field +Warning 1366 Incorrect geometry value: '' for column `test`.`t1`.`b` at row 2 at least for cases when get_dup_key() returns a valid affected key, otherwise fallback to the old error message. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cleanup: remove dead code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| skip hlindex update if its columns aren't in the write_set | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Andrzej Jarzabek
andrzej.jarzabek@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-31956: Validate innodb_extended_buffer_pool_size, disable on errors innodb_extended_buffer_pool_size stays dynamic, but it is now validated: - If the server was started without the extended buffer pool (EBP), the value cannot be changed. - Otherwise, it can only be set to 0, which stops using the EBP, or to its startup size, which resumes using it. As at startup, a value is rounded down to a multiple of innodb_page_size, so any value that rounds down to the startup size is accepted, with a truncation warning if it was rounded. - buf_pool.extended_pages, the size of the EBP page array, no longer changes; setting 0 used to set it to 0 and break the bounds assertions on the EBP pages that were still in use. - ext_bp_size is now only the storage of the system variable. fil_system_t::ext_buf_pool_enabled() reads the new atomic flag ext_bp_active instead, because it is also called without holding buf_pool.mutex. An I/O error, a page that fails validation (checksum, page id, decryption) or a read past the end of the EBP file now disables the EBP for good with buf_pool_t::ext_disable(). It discards every EBP page from buf_pool.page_hash, so that nothing more is read from the file, and SET GLOBAL innodb_extended_buffer_pool_size can no longer enable it. This also happens if the size was set to 0 when the error occurs. Reads that fail fall back to reading the page from the data file, instead of flagging the data file as corrupted. A failed EBP write is completed by buf_page_ext_write_discard(), which now also evicts the page. os_file_io() and its callers named the data file of an EBP request with IORequest::node(), which is invalid for EBP requests; they now use os_io_file_name(). The messages of buf_page_decrypt_after_read() and buf_page_check_corrupt() name the EBP file for pages read from it. buf_page_write_complete() is split into helper functions, and the error paths of EBP reads and writes are marked as unlikely. The EBP path itself is not, because it is the common one while the EBP is in use. The debug flag ib_ext_bp_count_io_only_for_t is now evaluated by buf_page_ext_count_io() for both the EBP admission in buf_flush_LRU_list_batch() and the EBP read and write counters, so that they always agree. It matches the tablespace name test/t exactly. The EBP status variables are moved to their alphabetical place in innodb_status_variables[]. MTR test innodb.ext_buf_pool no longer hides its queries from the result file. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
cleanup: move mhnsw behind the hlindex interface * new hlindex home: sql/index/ * API classes: * hlindexton - singleton, global methods. it creates * hlindex_share - a physical index (like TABLE_SHARE), it creates * hlindex - one index cursor (like handler or TABLE) * TABLE stores hlindex, TABLE_SHARE stores hlindex_share, no more void* * move vector_hnsw.h to its new home sql/index, added sql/index/hlindex.h * MHNSW_Share is stored in mhnsw_share, Search_context in mhnsw_index * KEY::options() method |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Vladislav Vaintroub
vvaintroub@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-42338 Treat system library headers as SYSTEM includes Mark include directories for system OpenSSL and system pcre2 as SYSTEM so that warnings from their headers are not promoted to errors under -Werror. Bundled library headers are left as regular includes. System zlib already gets SYSTEM treatment because ZLIB::ZLIB is an IMPORTED target (CMake marks imported target includes as SYSTEM by default). Assisted-by: Claude:claude-opus-4-6 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cleanup: const, spaces, comments | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-25848 Support for Multi-Valued Indexes * New type of high-level indexes - JSON ARRAY * sql/index/json.{h,cc} * table structure (value varbinary(255), tref varbinary(N), PK(value,tref)) * insert/update/delete/search works, search uses keyread * on insert json array is parsed, values are inserted * prefixed by the type tag, only simple types are supported * records_in_range works, but only for equalities (MEMBER OF) * MySQL-compatible syntax `INDEX ((CAST(col AS type ARRAY)))`, but * col is a bare name, not an expression, expressions are part of MDEV-35853 * type is ignored, not stored, also part of MDEV-35853 * thus `'[1, 0.2, true, "foo", null]'` works fine, type not enforced * thus SHOW CREATE TABLE prints `... AS JSON ARRAY` * `const MEMBER OF (col)` uses index, via * range optimizer, QUICK_RANGE_SELECT_ARRAY * Item_func_member_of::get_mm_tree()/etc |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Vladislav Vaintroub
vvaintroub@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-42338 Treat system library headers as SYSTEM includes Mark include directories for system OpenSSL and system pcre2 as SYSTEM so that warnings from their headers are not promoted to errors under -Werror. Bundled library headers are left as regular includes. System zlib already gets SYSTEM treatment because ZLIB::ZLIB is an IMPORTED target (CMake marks imported target includes as SYSTEM by default). Assisted-by: Claude:claude-opus-4-6 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cleanup: remove redundant function | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Yuchen Pei
ycp@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MDEV-25848 Fix a compiling failure | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
HA_ERR_NULL_IN_SPATIAL should be ignorable error index or column that accepts only certain values is like an implicit CHECK constraint and should behave similarly. It even can be shielded with, say, `CHECK (length(gis_col)>0)` which will make the error ignorable. So it should be ignorable without `CHECK` too. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Vladislav Vaintroub
vvaintroub@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
CI: Windows ARM64 - run MTR in RUNNER_TEMP and print system info
Run MTR in RUNNER_TEMP, the per-job scratch directory GitHub provides, on the same drive as the workspace, with a shorter path than TEMP. Add a System info step that prints the filesystem of each drive, the RUNNER_TEMP/TEMP/workspace paths, the OS, CPU count and memory. Assisted-by: Claude:claude-sonnet-5-5 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cleanup: change mhnsw_read_first() API to take the value not Item* | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Vladislav Vaintroub
vvaintroub@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
CI: Windows ARM64 - cache winflexbison3 and tolerate choco failures
Cache the choco-installed winflexbison3, refreshed weekly, and save it after a successful build. If choco fails after retries, fall back to an older cached copy. Assisted-by: Claude:claude-sonnet-5-5 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return vector extended metadata | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Yuchen Pei
ycp@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-25848 Initialise range->end_key fields for GEOM_FLAG in sel_arg_range_seq_next This fixes msan failures exposed in main.opt_trace_index_merge testcases introduced by MDEV-25848 commit 54ea632746068ea85019744f27fe8b0aaeb6e2f4 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||