Percona Server 5.5/5.6 cannot be built with '-DMYSQL_MAINTAINER_MODE=ON'

Bug #1590454 reported by Yura Sorokin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.5
Fix Released
Medium
Laurynas Biveinis
5.6
Fix Released
Medium
Laurynas Biveinis
5.7
Invalid
Undecided
Unassigned

Bug Description

cmake \
 ../ercona-server \
 -DMYSQL_MAINTAINER_MODE=ON \
 -DBUILD_CONFIG=mysql_release \
 -DFEATURE_SET=community \
 -DWITH_EMBEDDED_SERVER=OFF \
 -DENABLE_DTRACE=OFF \
 -DWITH_EXAMPLE_STORAGE_ENGINE=1 \
 -DWITH_SSL=system

5.5 output
*********************************************************************************
[ 31%] Building C object storage/innobase/CMakeFiles/innobase.dir/btr/btr0btr.c.o
/home/yura/ws/tmp/ps-5.5/storage/innobase/btr/btr0btr.c: In function ‘btr_corruption_report’:
/home/yura/ws/tmp/ps-5.5/storage/innobase/btr/btr0btr.c:79:2: error: null argument where non-null required (argument 1) [-Werror=nonnull]
  buf_page_print(buf_block_get_frame(block), 0, 0);
  ^
cc1: all warnings being treated as errors
make[2]: *** [storage/innobase/CMakeFiles/innobase.dir/btr/btr0btr.c.o] Error 1
make[1]: *** [storage/innobase/CMakeFiles/innobase.dir/all] Error 2
make: *** [all] Error 2
*********************************************************************************

5.6 output
*********************************************************************************
[ 26%] Building CXX object storage/innobase/CMakeFiles/innobase.dir/btr/btr0btr.cc.o
In file included from /home/yura/ws/tmp/ps-5.6/storage/innobase/btr/btr0btr.cc:27:0:
/home/yura/ws/tmp/ps-5.6/storage/innobase/btr/btr0btr.cc: In function ‘ulint btr_height_get(dict_index_t*, mtr_t*)’:
/home/yura/ws/tmp/ps-5.6/storage/innobase/include/btr0btr.h:323:66: error: null argument where non-null required (argument 1) [-Werror=nonnull]
 #define btr_page_get_level(page, mtr) btr_page_get_level_low(page)
                                                                  ^
/home/yura/ws/tmp/ps-5.6/storage/innobase/btr/btr0btr.cc:808:18: note: in expansion of macro ‘btr_page_get_level’
         height = btr_page_get_level(buf_block_get_frame(root_block), mtr);
                  ^
/home/yura/ws/tmp/ps-5.6/storage/innobase/btr/btr0btr.cc: In function ‘void btr_attach_half_pages(ulint, dict_index_t*, buf_block_t*, const rec_t*, buf_block_t*, ulint, mtr_t*)’:
/home/yura/ws/tmp/ps-5.6/storage/innobase/include/btr0btr.h:323:66: error: null argument where non-null required (argument 1) [-Werror=nonnull]
 #define btr_page_get_level(page, mtr) btr_page_get_level_low(page)
                                                                  ^
/home/yura/ws/tmp/ps-5.6/storage/innobase/btr/btr0btr.cc:2758:10: note: in expansion of macro ‘btr_page_get_level’
  level = btr_page_get_level(buf_block_get_frame(block), mtr);
          ^
/home/yura/ws/tmp/ps-5.6/storage/innobase/btr/btr0btr.cc: In function ‘void btr_discard_page(btr_cur_t*, mtr_t*)’:
/home/yura/ws/tmp/ps-5.6/storage/innobase/btr/btr0btr.cc:4134:66: error: null argument where non-null required (argument 1) [-Werror=nonnull]
  left_page_no = btr_page_get_prev(buf_block_get_frame(block), mtr);
                                                                  ^
/home/yura/ws/tmp/ps-5.6/storage/innobase/btr/btr0btr.cc:4135:67: error: null argument where non-null required (argument 1) [-Werror=nonnull]
  right_page_no = btr_page_get_next(buf_block_get_frame(block), mtr);
                                                                   ^
cc1plus: all warnings being treated as errors
make[2]: *** [storage/innobase/CMakeFiles/innobase.dir/btr/btr0btr.cc.o] Error 1
make[1]: *** [storage/innobase/CMakeFiles/innobase.dir/all] Error 2
make: *** [all] Error 2
*********************************************************************************

Tags: xtradb
Revision history for this message
Yura Sorokin (yura-sorokin) wrote :

The root cause of this problem seems to be introduced after commit 776bd6f "Import innodb_pass_corrupt_table.patch"
(https://github.com/percona/percona-server/commit/776bd6f318e4044be26472f7f4c5f548fec7b6e7)

This commit modified "buf_block_get_frame()" function/macro in both debug and release mode so that it is now possible for it to return 0. This breaks a number of 'nonnull' contracts in other functions.

tags: added: xtradb
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-3464

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.