MariaDB server is a community developed fork of MySQL server. Started by core members of the original MySQL team, MariaDB actively works with outside developers to deliver the most featureful, stable, and sanely licensed open SQL server in the industry.
Find a file
Marko Mäkelä 5f7b2a3ced MDEV-35049: Improve btr_search_drop_page_hash_index()
btr_search_drop_page_hash_index(): Replace the Boolean parameter
with const dict_index_t *not_garbage. If buf_block_t::index points
to that, there is no need to acquire btr_sea::partition::latch.

The old parameter bool garbage_collect=false is equivalent to the
parameter not_garbage=nullptr. The parameter garbage_collect=true
will be replaced either with the actual index that is associated
with the buffer page, or with a bogus pointer not_garbage=-1 to
indicate that any lazily entries for a freed index need to be removed.

buf_page_get_low(), buf_page_get_gen(), mtr_t::page_lock(),
mtr_t::upgrade_buffer_fix(): Do not invoke
btr_search_drop_page_hash_index(). Our caller will have to do it
when appropriate.

buf_page_create_low(): Keep invoking btr_search_drop_page_hash_index().
This is the normal way of lazily dropping the adaptive hash index
after a DDL operation such as DROP INDEX operation.

btr_block_get(), btr_root_block_get(), btr_root_adjust_on_import(),
btr_read_autoinc_with_fallback(), btr_cur_instant_init_low(),
btr_cur_t::search_leaf(), btr_cur_t::pessimistic_search_leaf(),
btr_pcur_optimistic_latch_leaves(), dict_stats_analyze_index_below_cur():
Invoke btr_search_drop_page_hash_index(block, index) for pages that
may be leaf pages. No adaptive hash index may have been created on
anything else than a B-tree leaf page.

btr_cur_search_to_nth_level(): Do not invoke
btr_search_drop_page_hash_index(), because we are only accessing
non-leaf pages and the adaptive hash index may only have been created
on leaf pages.

btr_page_alloc_for_ibuf() and many other callers of buf_page_get_gen()
or similar functions do not invoke btr_search_drop_page_hash_index(),
because the adaptive hash index is never created on such pages.
If a page in the tablespace was freed as part of a DDL operation and
reused for something else, then buf_page_create_low() will take care
of dropping the adaptive hash index before the freed page will be
modified.

It is notable that while the flst_ functions may access pages that are
related to allocating B-tree index pages (the BTR_SEG_TOP and BTR_SEG_LEAF
linked from the index root page), those pages themselves can never be
stored in the adaptive hash index. Therefore, it is not necessary to
invoke btr_search_drop_page_hash_index() on them.

Reviewed by: Vladislav Lesin
2025-01-10 16:40:34 +02:00
.github Create FUNDING.yml 2024-11-26 17:39:37 +02:00
BUILD
client Merge 11.7 into main 2025-01-09 13:46:06 +02:00
cmake Merge 11.4 into 11.7 2025-01-09 09:41:38 +02:00
dbug
debian 11.8 branch 2024-11-14 19:09:01 +01:00
Docs
extra MDEV-35049: Privatize ut_fold_ulint_pair() 2025-01-10 16:40:22 +02:00
include Merge 11.4 into 11.7 2025-01-09 09:41:38 +02:00
libmariadb@52d0a38ed1 MDEV-20912 Add support for utf8mb4_0900_* collations in MariaDB Server 2024-12-28 10:23:49 +02:00
libmysqld MDEV-34911 Sargable substr(col, 1, n) = str 2024-12-20 13:25:28 +11:00
libservices
man MariaDB 11.4.4 release 2024-11-08 07:17:00 +01:00
mysql-test Merge 11.7 into main 2025-01-09 13:46:06 +02:00
mysys Merge 11.4 into 11.7 2025-01-09 09:41:38 +02:00
mysys_ssl post-merge changes 2024-10-29 14:47:32 +01:00
plugin Merge 11.4 into 11.7 2025-01-09 09:41:38 +02:00
randgen/conf
scripts Merge 11.7 into main 2025-01-09 13:46:06 +02:00
sql Merge 11.7 into main 2025-01-09 13:46:06 +02:00
sql-bench
sql-common Merge 11.4 into 11.7 2024-12-02 17:51:17 +02:00
storage MDEV-35049: Improve btr_search_drop_page_hash_index() 2025-01-10 16:40:34 +02:00
strings Merge 11.4 into 11.7 2025-01-09 09:41:38 +02:00
support-files Merge 11.4 into 11.7 2024-12-02 17:51:17 +02:00
tests Merge 11.4 into 11.7 2025-01-09 09:41:38 +02:00
tpool Merge 11.4 into 11.7 2025-01-09 09:41:38 +02:00
unittest Merge 11.7 into main 2025-01-09 13:46:06 +02:00
vio Merge 11.2 into 11.4 2024-10-03 14:32:14 +03:00
win Merge 11.2 into 11.4 2024-10-03 14:32:14 +03:00
wsrep-lib@70cd967f5e galera: wsrep-lib submodule update 2024-12-17 09:53:19 +01:00
zlib
.clang-format
.gitattributes
.gitignore Merge 11.2 into 11.4 2024-10-03 14:32:14 +03:00
.gitlab-ci.yml
.gitmodules
appveyor.yml
BUILD-CMAKE
CMakeLists.txt Merge 10.11 into 11.4 2025-01-09 07:58:08 +02:00
CODING_STANDARDS.md Update markdown files for main branch 2024-08-28 11:49:07 +10:00
config.h.cmake Merge branch '11.6' into 11.7 2024-11-10 19:22:21 +01:00
configure.cmake Merge branch '11.6' into 11.7 2024-11-10 19:22:21 +01:00
CONTRIBUTING.md
COPYING
CREDITS Update sponsors 2024-08-12 09:32:30 +01:00
INSTALL-SOURCE
INSTALL-WIN-SOURCE
KNOWN_BUGS.txt
README.md
SECURITY.md
THIRDPARTY
VERSION 11.8 branch 2024-11-14 19:09:01 +01:00

Code status:

  • Appveyor CI status ci.appveyor.com

MariaDB: The innovative open source database

MariaDB was designed as a drop-in replacement of MySQL(R) with more features, new storage engines, fewer bugs, and better performance.

MariaDB is brought to you by the MariaDB Foundation and the MariaDB Corporation. Please read the CREDITS file for details about the MariaDB Foundation, and who is developing MariaDB.

MariaDB is developed by many of the original developers of MySQL who now work for the MariaDB Corporation, the MariaDB Foundation and by many people in the community.

MySQL, which is the base of MariaDB, is a product and trademark of Oracle Corporation, Inc. For a list of developers and other contributors, see the Credits appendix. You can also run 'SHOW authors' to get a list of active contributors.

A description of the MariaDB project and a manual can be found at:

https://mariadb.org

https://mariadb.com/kb/en/

https://mariadb.com/kb/en/mariadb-vs-mysql-features/

https://mariadb.com/kb/en/mariadb-versus-mysql-compatibility/

https://mariadb.com/kb/en/new-and-old-releases/

Getting the code, building it and testing it

Refer to the following guide: https://mariadb.org/get-involved/getting-started-for-developers/get-code-build-test/ which outlines how to build the source code correctly and run the MariaDB testing framework, as well as which branch to target for your contributions.

Help

More help is available from the Maria Discuss mailing list https://lists.mariadb.org/postorius/lists/discuss.lists.mariadb.org/ and MariaDB's Zulip instance, https://mariadb.zulipchat.com/

Licensing


MariaDB is specifically available only under version 2 of the GNU General Public License (GPLv2). (I.e. Without the "any later version" clause.) This is inherited from MySQL. Please see the README file in the MySQL distribution for more information.

License information can be found in the COPYING file. Third party license information can be found in the THIRDPARTY file.


Bug Reports

Bug and/or error reports regarding MariaDB should be submitted at: https://jira.mariadb.org

For reporting security vulnerabilities, see our security-policy.

The code for MariaDB, including all revision history, can be found at: https://github.com/MariaDB/server