summaryrefslogtreecommitdiff
path: root/storage/innobase/page/page0page.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-06-04 10:24:10 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-06-04 10:24:10 +0300
commiteba2d10ac53d1d2f975027ba2b2ca39d9c9b98ad (patch)
tree7389791492884dd232c5ddc84e53e70a0a725770 /storage/innobase/page/page0page.cc
parentad2bf1129cfa85c00072b46e0355fe14bf69ee54 (diff)
downloadmariadb-git-eba2d10ac53d1d2f975027ba2b2ca39d9c9b98ad.tar.gz
MDEV-22721 Remove bloat caused by InnoDB logger class
Introduce a new ATTRIBUTE_NOINLINE to ib::logger member functions, and add UNIV_UNLIKELY hints to callers. Also, remove some crash reporting output. If needed, the information will be available using debugging tools. Furthermore, remove some fts_enable_diag_print output that included indexed words in raw form. The code seemed to assume that words are NUL-terminated byte strings. It is not clear whether a NUL terminator is always guaranteed to be present. Also, UCS2 or UTF-16 strings would typically contain many NUL bytes.
Diffstat (limited to 'storage/innobase/page/page0page.cc')
-rw-r--r--storage/innobase/page/page0page.cc19
1 files changed, 9 insertions, 10 deletions
diff --git a/storage/innobase/page/page0page.cc b/storage/innobase/page/page0page.cc
index fa0239b4259..d28d2f9a082 100644
--- a/storage/innobase/page/page0page.cc
+++ b/storage/innobase/page/page0page.cc
@@ -2438,7 +2438,10 @@ page_validate(
if (UNIV_UNLIKELY((ibool) !!page_is_comp(page)
!= dict_table_is_comp(index->table))) {
ib::error() << "'compact format' flag mismatch";
- goto func_exit2;
+func_exit2:
+ ib::error() << "Apparent corruption in space "
+ << page_get_space_id(page) << " page "
+ << page_get_page_no(page) << " index " << index->name;
}
if (page_is_comp(page)) {
if (UNIV_UNLIKELY(!page_simple_validate_new(page))) {
@@ -2480,15 +2483,14 @@ page_validate(
n_slots = page_dir_get_n_slots(page);
- if (UNIV_UNLIKELY(!(page_header_get_ptr(page, PAGE_HEAP_TOP)
- <= page_dir_get_nth_slot(page, n_slots - 1)))) {
+ const void* top = page_header_get_ptr(page, PAGE_HEAP_TOP);
+ const void* last_slot = page_dir_get_nth_slot(page, n_slots - 1);
+ if (UNIV_UNLIKELY(top > last_slot)) {
ib::warn() << "Record heap and dir overlap on space "
<< page_get_space_id(page) << " page "
<< page_get_page_no(page) << " index " << index->name
- << ", " << page_header_get_ptr(page, PAGE_HEAP_TOP)
- << ", " << page_dir_get_nth_slot(page, n_slots - 1);
-
+ << ", " << top << ", " << last_slot;
goto func_exit;
}
@@ -2747,10 +2749,7 @@ func_exit:
mem_heap_free(heap);
if (UNIV_UNLIKELY(ret == FALSE)) {
-func_exit2:
- ib::error() << "Apparent corruption in space "
- << page_get_space_id(page) << " page "
- << page_get_page_no(page) << " index " << index->name;
+ goto func_exit2;
}
return(ret);