Commit b444b6b9 authored by Monty's avatar Monty Committed by Sergei Golubchik

Removed some warnings from InnoDB when compiled with clang

parent a38f47e9
......@@ -478,7 +478,7 @@ struct yy_buffer_state
*/
#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
: NULL)
: 0)
/* Same as previous macro, but useful when we know that the buffer stack is not
* NULL or when we need an lvalue. For internal use only.
*/
......
......@@ -1243,7 +1243,7 @@ rtr_page_split_and_insert(
For compressed pages, page_cur_tuple_insert() will have
attempted this already. */
if (rec == NULL) {
if (!page_cur_get_page_zip(page_cursor)
if (!is_page_cur_get_page_zip(page_cursor)
&& btr_page_reorganize(page_cursor, cursor->index, mtr)) {
rec = page_cur_tuple_insert(page_cursor, tuple,
cursor->index, offsets,
......
......@@ -1694,7 +1694,7 @@ rtr_cur_search_with_match(
and the table is a compressed table, try to avoid
first page as much as possible, as there will be problem
when update MIN_REC rec in compress table */
if (buf_block_get_page_zip(block)
if (is_buf_block_get_page_zip(block)
&& !page_has_prev(page)
&& page_get_n_recs(page) >= 2) {
......
......@@ -892,7 +892,7 @@ ibuf_update_free_bits_low(
ulint before;
ulint after;
ut_a(!buf_block_get_page_zip(block));
ut_a(!is_buf_block_get_page_zip(block));
ut_ad(mtr->is_named_space(block->page.id.space()));
before = ibuf_index_page_calc_free_bits(srv_page_size,
......@@ -3731,7 +3731,7 @@ ibuf_insert_to_index_page_low(
been attempted by page_cur_tuple_insert(). Besides, per
ibuf_index_page_calc_free_zip() the page should not have been
recompressed or reorganized. */
ut_ad(!buf_block_get_page_zip(block));
ut_ad(!is_buf_block_get_page_zip(block));
/* If the record did not fit, reorganize */
......
......@@ -1107,6 +1107,8 @@ Gets the compressed page descriptor corresponding to an uncompressed page
if applicable. */
#define buf_block_get_page_zip(block) \
((block)->page.zip.data ? &(block)->page.zip : NULL)
#define is_buf_block_get_page_zip(block) \
((block)->page.zip.data != 0)
#ifdef BTR_CUR_HASH_ADAPT
/** Get a buffer block from an adaptive hash index pointer.
......
......@@ -73,6 +73,7 @@ page_cur_get_rec(
# define page_cur_get_page_zip(cur) buf_block_get_page_zip((cur)->block)
# define page_cur_get_rec(cur) (cur)->rec
#endif /* UNIV_DEBUG */
# define is_page_cur_get_page_zip(cur) is_buf_block_get_page_zip((cur)->block)
/*********************************************************//**
Sets the cursor object to point before the first user record
on the page. */
......
......@@ -277,7 +277,7 @@ page_cur_tuple_insert(
ULINT_UNDEFINED, heap);
ut_ad(size == rec_offs_size(*offsets));
if (buf_block_get_page_zip(cursor->block)) {
if (is_buf_block_get_page_zip(cursor->block)) {
rec = page_cur_insert_rec_zip(
cursor, index, rec, *offsets, mtr);
} else {
......@@ -311,7 +311,7 @@ page_cur_rec_insert(
ulint* offsets,/*!< in/out: rec_get_offsets(rec, index) */
mtr_t* mtr) /*!< in: mini-transaction handle, or NULL */
{
if (buf_block_get_page_zip(cursor->block)) {
if (is_buf_block_get_page_zip(cursor->block)) {
return(page_cur_insert_rec_zip(
cursor, index, rec, offsets, mtr));
} else {
......
......@@ -260,7 +260,7 @@ static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
*/
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
? (yy_buffer_stack)[(yy_buffer_stack_top)] \
: NULL)
: 0)
/* Same as previous macro, but useful when we know that the buffer stack is not
* NULL or when we need an lvalue. For internal use only.
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment