diff --git a/configure.cmake b/configure.cmake index 1fb5fc920f6..05fa80e852f 100644 --- a/configure.cmake +++ b/configure.cmake @@ -56,10 +56,10 @@ ENDIF() # Always enable -Wall for gnu C/C++ IF(CMAKE_COMPILER_IS_GNUCXX) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-unused-parameter") + SET(CMAKE_CXX_FLAGS "-Wall ${CMAKE_CXX_FLAGS} -Wno-unused-parameter") ENDIF() IF(CMAKE_COMPILER_IS_GNUCC) - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") + SET(CMAKE_C_FLAGS "-Wall ${CMAKE_C_FLAGS}") ENDIF() diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index 8b9904ea260..cedc4ccb834 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -5169,13 +5169,17 @@ Ordered_key::cmp_keys_by_row_data(ha_rows a, ha_rows b) /* Fetch the rows for comparison. */ if ((error= tbl->file->ha_rnd_pos(tbl->record[0], rowid_a))) { + /* purecov: begin inspected */ tbl->file->print_error(error, MYF(ME_FATALERROR)); // Sets fatal_error return 0; + /* purecov: end */ } if ((error= tbl->file->ha_rnd_pos(tbl->record[1], rowid_b))) { + /* purecov: begin inspected */ tbl->file->print_error(error, MYF(ME_FATALERROR)); // Sets fatal_error return 0; + /* purecov: end */ } /* Compare the two rows by the corresponding values of the indexed @@ -5253,8 +5257,10 @@ int Ordered_key::cmp_key_with_search_key(rownum_t row_num) if ((error= tbl->file->ha_rnd_pos(tbl->record[0], cur_rowid))) { + /* purecov: begin inspected */ tbl->file->print_error(error, MYF(ME_FATALERROR)); // Sets fatal_error return 0; + /* purecov: end */ } for (uint i= 0; i < key_column_count; i++) diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 165e257d42d..720b4e418d7 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -6657,7 +6657,7 @@ double JOIN::get_examined_rows() while ((tab= next_breadth_first_tab(this, tab))) { prev_fanout *= prev_tab->records_read; - examined_rows+= tab->get_examined_rows() * prev_fanout; + examined_rows+= (ha_rows) (tab->get_examined_rows() * prev_fanout); prev_tab= tab; } return examined_rows; diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index a39aef0794a..474c157fbc7 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -8418,9 +8418,10 @@ ha_innobase::info_low( } else if (rec_per_key > 1) { rec_per_key = - k_rec_per_key * - (double)rec_per_key / - n_rows; + (ha_rows) + (k_rec_per_key * + (double)rec_per_key / + n_rows); } key_info->rec_per_key[k++]= diff --git a/storage/xtradb/btr/btr0btr.c b/storage/xtradb/btr/btr0btr.c index 1fa6df44f7c..d4a0ef5ec60 100644 --- a/storage/xtradb/btr/btr0btr.c +++ b/storage/xtradb/btr/btr0btr.c @@ -61,7 +61,7 @@ btr_corruption_report( buf_block_get_zip_size(block), BUF_PAGE_PRINT_NO_CRASH); } - buf_page_print(buf_block_get_frame(block), 0, 0); + buf_page_print(buf_block_get_frame_fast(block), 0, 0); } #ifdef UNIV_BLOB_DEBUG diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc index f9068772b0c..8aed19aad3e 100644 --- a/storage/xtradb/handler/ha_innodb.cc +++ b/storage/xtradb/handler/ha_innodb.cc @@ -9281,9 +9281,10 @@ ha_innobase::info_low( } else if (rec_per_key > 1) { rec_per_key = - k_rec_per_key * - (double)rec_per_key / - n_rows; + (ha_rows) + (k_rec_per_key * + (double)rec_per_key / + n_rows); } key_info->rec_per_key[k++]= diff --git a/storage/xtradb/include/buf0buf.h b/storage/xtradb/include/buf0buf.h index 7502942d681..5f8220de18d 100644 --- a/storage/xtradb/include/buf0buf.h +++ b/storage/xtradb/include/buf0buf.h @@ -1063,8 +1063,10 @@ buf_block_get_frame( /*================*/ const buf_block_t* block) /*!< in: pointer to the control block */ __attribute__((pure)); +# define buf_block_get_frame_fast(block) buf_block_get_frame(block) #else /* UNIV_DEBUG */ # define buf_block_get_frame(block) (block ? (block)->frame : 0) +# define buf_block_get_frame_fast(block) (block)->frame #endif /* UNIV_DEBUG */ /*********************************************************************//** Gets the space id of a block.