Skip to content

Commit

Permalink
5.6.31
Browse files Browse the repository at this point in the history
  • Loading branch information
vuvova committed Jun 21, 2016
1 parent f1aae86 commit 720e04f
Show file tree
Hide file tree
Showing 146 changed files with 1,536 additions and 1,481 deletions.
20 changes: 11 additions & 9 deletions storage/innobase/btr/btr0btr.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*****************************************************************************
Copyright (c) 1994, 2015, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2012, Facebook Inc.
This program is free software; you can redistribute it and/or modify it under
Expand Down Expand Up @@ -1102,7 +1102,7 @@ that the caller has made the reservation for free extents!
@retval block, rw_lock_x_lock_count(&block->lock) == 1 if allocation succeeded
(init_mtr == mtr, or the page was not previously freed in mtr)
@retval block (not allocated or initialized) otherwise */
static __attribute__((nonnull, warn_unused_result))
static MY_ATTRIBUTE((nonnull, warn_unused_result))
buf_block_t*
btr_page_alloc_low(
/*===============*/
Expand Down Expand Up @@ -1971,7 +1971,7 @@ IBUF_BITMAP_FREE is unaffected by reorganization.
@retval true if the operation was successful
@retval false if it is a compressed page, and recompression failed */
static __attribute__((nonnull))
static MY_ATTRIBUTE((nonnull))
bool
btr_page_reorganize_block(
/*======================*/
Expand Down Expand Up @@ -2033,7 +2033,8 @@ btr_parse_page_reorganize(
{
ulint level;

ut_ad(ptr && end_ptr);
ut_ad(ptr != NULL);
ut_ad(end_ptr != NULL);

/* If dealing with a compressed page the record has the
compression level used during original compression written in
Expand Down Expand Up @@ -2500,7 +2501,7 @@ btr_page_get_split_rec(
Returns TRUE if the insert fits on the appropriate half-page with the
chosen split_rec.
@return true if fits */
static __attribute__((nonnull(1,3,4,6), warn_unused_result))
static MY_ATTRIBUTE((nonnull(1,3,4,6), warn_unused_result))
bool
btr_page_insert_fits(
/*=================*/
Expand Down Expand Up @@ -2643,7 +2644,7 @@ btr_insert_on_non_leaf_level_func(
/**************************************************************//**
Attaches the halves of an index page on the appropriate level in an
index tree. */
static __attribute__((nonnull))
static MY_ATTRIBUTE((nonnull))
void
btr_attach_half_pages(
/*==================*/
Expand Down Expand Up @@ -2779,7 +2780,7 @@ btr_attach_half_pages(
/*************************************************************//**
Determine if a tuple is smaller than any record on the page.
@return TRUE if smaller */
static __attribute__((nonnull, warn_unused_result))
static MY_ATTRIBUTE((nonnull, warn_unused_result))
bool
btr_page_tuple_smaller(
/*===================*/
Expand Down Expand Up @@ -3355,7 +3356,7 @@ Removes a page from the level list of pages.

/*************************************************************//**
Removes a page from the level list of pages. */
static __attribute__((nonnull))
static MY_ATTRIBUTE((nonnull))
void
btr_level_list_remove_func(
/*=======================*/
Expand All @@ -3371,7 +3372,8 @@ btr_level_list_remove_func(
ulint prev_page_no;
ulint next_page_no;

ut_ad(page && mtr);
ut_ad(page != NULL);
ut_ad(mtr != NULL);
ut_ad(mtr_memo_contains_page(mtr, page, MTR_MEMO_PAGE_X_FIX));
ut_ad(space == page_get_space_id(page));
/* Get the previous and next page numbers of page */
Expand Down
16 changes: 8 additions & 8 deletions storage/innobase/btr/btr0cur.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*****************************************************************************
Copyright (c) 1994, 2015, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, Google Inc.
Copyright (c) 2012, Facebook Inc.
Expand Down Expand Up @@ -1084,7 +1084,7 @@ This has to be done either within the same mini-transaction,
or by invoking ibuf_reset_free_bits() before mtr_commit().
@return pointer to inserted record if succeed, else NULL */
static __attribute__((nonnull, warn_unused_result))
static MY_ATTRIBUTE((nonnull, warn_unused_result))
rec_t*
btr_cur_insert_if_possible(
/*=======================*/
Expand Down Expand Up @@ -1127,7 +1127,7 @@ btr_cur_insert_if_possible(
/*************************************************************//**
For an insert, checks the locks and does the undo logging if desired.
@return DB_SUCCESS, DB_WAIT_LOCK, DB_FAIL, or error number */
UNIV_INLINE __attribute__((warn_unused_result, nonnull(2,3,5,6)))
UNIV_INLINE MY_ATTRIBUTE((warn_unused_result, nonnull(2,3,5,6)))
dberr_t
btr_cur_ins_lock_and_undo(
/*======================*/
Expand Down Expand Up @@ -1653,7 +1653,7 @@ btr_cur_pessimistic_insert(
/*************************************************************//**
For an update, checks the locks and does the undo logging.
@return DB_SUCCESS, DB_WAIT_LOCK, or error number */
UNIV_INLINE __attribute__((warn_unused_result, nonnull(2,3,6,7)))
UNIV_INLINE MY_ATTRIBUTE((warn_unused_result, nonnull(2,3,6,7)))
dberr_t
btr_cur_upd_lock_and_undo(
/*======================*/
Expand All @@ -1672,7 +1672,7 @@ btr_cur_upd_lock_and_undo(
const rec_t* rec;
dberr_t err;

ut_ad(thr || (flags & BTR_NO_LOCKING_FLAG));
ut_ad((thr != NULL) || (flags & BTR_NO_LOCKING_FLAG));

rec = btr_cur_get_rec(cursor);
index = cursor->index;
Expand Down Expand Up @@ -2961,7 +2961,7 @@ btr_cur_del_mark_set_clust_rec(
ut_ad(page_is_leaf(page_align(rec)));

#ifdef UNIV_DEBUG
if (btr_cur_print_record_ops && thr) {
if (btr_cur_print_record_ops && (thr != NULL)) {
btr_cur_trx_report(thr_get_trx(thr)->id, index, "del mark ");
rec_print_new(stderr, rec, offsets);
}
Expand Down Expand Up @@ -3109,7 +3109,7 @@ btr_cur_del_mark_set_sec_rec(
rec = btr_cur_get_rec(cursor);

#ifdef UNIV_DEBUG
if (btr_cur_print_record_ops && thr) {
if (btr_cur_print_record_ops && (thr != NULL)) {
btr_cur_trx_report(thr_get_trx(thr)->id, cursor->index,
"del mark ");
rec_print(stderr, rec, cursor->index);
Expand Down Expand Up @@ -4992,7 +4992,7 @@ btr_free_externally_stored_field(
ulint i, /*!< in: field number of field_ref;
ignored if rec == NULL */
enum trx_rb_ctx rb_ctx, /*!< in: rollback context */
mtr_t* local_mtr __attribute__((unused))) /*!< in: mtr
mtr_t* local_mtr MY_ATTRIBUTE((unused))) /*!< in: mtr
containing the latch to data an an
X-latch to the index tree */
{
Expand Down
4 changes: 2 additions & 2 deletions storage/innobase/btr/btr0sea.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*****************************************************************************
Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, Google Inc.
Portions of this file contain modifications contributed and copyrighted by
Expand Down Expand Up @@ -473,7 +473,7 @@ btr_search_update_block_hash_info(
/*==============================*/
btr_search_t* info, /*!< in: search info */
buf_block_t* block, /*!< in: buffer block */
btr_cur_t* cursor __attribute__((unused)))
btr_cur_t* cursor MY_ATTRIBUTE((unused)))
/*!< in: cursor */
{
#ifdef UNIV_SYNC_DEBUG
Expand Down
6 changes: 3 additions & 3 deletions storage/innobase/buf/buf0buddy.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*****************************************************************************
Copyright (c) 2006, 2013, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2006, 2016, Oracle and/or its affiliates. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Expand Down Expand Up @@ -112,7 +112,7 @@ buf_buddy_mem_invalid(
/**********************************************************************//**
Check if a buddy is stamped free.
@return whether the buddy is free */
UNIV_INLINE __attribute__((warn_unused_result))
UNIV_INLINE MY_ATTRIBUTE((warn_unused_result))
bool
buf_buddy_stamp_is_free(
/*====================*/
Expand Down Expand Up @@ -225,7 +225,7 @@ Checks if a buf is free i.e.: in the zip_free[].
@retval BUF_BUDDY_STATE_FREE if fully free
@retval BUF_BUDDY_STATE_USED if currently in use
@retval BUF_BUDDY_STATE_PARTIALLY_USED if partially in use. */
static __attribute__((warn_unused_result))
static MY_ATTRIBUTE((warn_unused_result))
buf_buddy_state_t
buf_buddy_is_free(
/*==============*/
Expand Down
4 changes: 2 additions & 2 deletions storage/innobase/buf/buf0buf.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*****************************************************************************
Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, Google Inc.
Portions of this file contain modifications contributed and copyrighted by
Expand Down Expand Up @@ -3470,7 +3470,7 @@ buf_page_init_low(

/********************************************************************//**
Inits a page to the buffer buf_pool. */
static __attribute__((nonnull))
static MY_ATTRIBUTE((nonnull))
void
buf_page_init(
/*==========*/
Expand Down
8 changes: 4 additions & 4 deletions storage/innobase/buf/buf0dump.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*****************************************************************************
Copyright (c) 2011, 2015, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2011, 2016, Oracle and/or its affiliates. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Expand Down Expand Up @@ -105,7 +105,7 @@ SELECT variable_value FROM information_schema.global_status WHERE
variable_name = 'INNODB_BUFFER_POOL_DUMP_STATUS';
or by:
SHOW STATUS LIKE 'innodb_buffer_pool_dump_status'; */
static __attribute__((nonnull, format(printf, 2, 3)))
static MY_ATTRIBUTE((nonnull, format(printf, 2, 3)))
void
buf_dump_status(
/*============*/
Expand Down Expand Up @@ -141,7 +141,7 @@ SELECT variable_value FROM information_schema.global_status WHERE
variable_name = 'INNODB_BUFFER_POOL_LOAD_STATUS';
or by:
SHOW STATUS LIKE 'innodb_buffer_pool_load_status'; */
static __attribute__((nonnull, format(printf, 2, 3)))
static MY_ATTRIBUTE((nonnull, format(printf, 2, 3)))
void
buf_load_status(
/*============*/
Expand Down Expand Up @@ -594,7 +594,7 @@ extern "C" UNIV_INTERN
os_thread_ret_t
DECLARE_THREAD(buf_dump_thread)(
/*============================*/
void* arg __attribute__((unused))) /*!< in: a dummy parameter
void* arg MY_ATTRIBUTE((unused))) /*!< in: a dummy parameter
required by os_thread_create */
{
ut_ad(!srv_read_only_mode);
Expand Down
4 changes: 2 additions & 2 deletions storage/innobase/buf/buf0flu.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*****************************************************************************
Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Expand Down Expand Up @@ -2384,7 +2384,7 @@ extern "C" UNIV_INTERN
os_thread_ret_t
DECLARE_THREAD(buf_flush_page_cleaner_thread)(
/*==========================================*/
void* arg __attribute__((unused)))
void* arg MY_ATTRIBUTE((unused)))
/*!< in: a dummy parameter required by
os_thread_create */
{
Expand Down
18 changes: 9 additions & 9 deletions storage/innobase/buf/buf0lru.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*****************************************************************************
Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Expand Down Expand Up @@ -142,7 +142,7 @@ If a compressed page is freed other compressed pages may be relocated.
caller needs to free the page to the free list
@retval false if BUF_BLOCK_ZIP_PAGE was removed from page_hash. In
this case the block is already returned to the buddy allocator. */
static __attribute__((nonnull, warn_unused_result))
static MY_ATTRIBUTE((nonnull, warn_unused_result))
bool
buf_LRU_block_remove_hashed(
/*========================*/
Expand Down Expand Up @@ -366,7 +366,7 @@ want to hog the CPU and resources. Release the buffer pool and block
mutex and try to force a context switch. Then reacquire the same mutexes.
The current page is "fixed" before the release of the mutexes and then
"unfixed" again once we have reacquired the mutexes. */
static __attribute__((nonnull))
static MY_ATTRIBUTE((nonnull))
void
buf_flush_yield(
/*============*/
Expand Down Expand Up @@ -407,7 +407,7 @@ If we have hogged the resources for too long then release the buffer
pool and flush list mutex and do a thread yield. Set the current page
to "sticky" so that it is not relocated during the yield.
@return true if yielded */
static __attribute__((nonnull(1), warn_unused_result))
static MY_ATTRIBUTE((nonnull(1), warn_unused_result))
bool
buf_flush_try_yield(
/*================*/
Expand Down Expand Up @@ -450,7 +450,7 @@ buf_flush_try_yield(
Removes a single page from a given tablespace inside a specific
buffer pool instance.
@return true if page was removed. */
static __attribute__((nonnull, warn_unused_result))
static MY_ATTRIBUTE((nonnull, warn_unused_result))
bool
buf_flush_or_remove_page(
/*=====================*/
Expand Down Expand Up @@ -531,7 +531,7 @@ the list as they age towards the tail of the LRU.
@retval DB_SUCCESS if all freed
@retval DB_FAIL if not all freed
@retval DB_INTERRUPTED if the transaction was interrupted */
static __attribute__((nonnull(1), warn_unused_result))
static MY_ATTRIBUTE((nonnull(1), warn_unused_result))
dberr_t
buf_flush_or_remove_pages(
/*======================*/
Expand Down Expand Up @@ -637,7 +637,7 @@ Remove or flush all the dirty pages that belong to a given tablespace
inside a specific buffer pool instance. The pages will remain in the LRU
list and will be evicted from the LRU list as they age and move towards
the tail of the LRU list. */
static __attribute__((nonnull(1)))
static MY_ATTRIBUTE((nonnull(1)))
void
buf_flush_dirty_pages(
/*==================*/
Expand Down Expand Up @@ -677,7 +677,7 @@ buf_flush_dirty_pages(
/******************************************************************//**
Remove all pages that belong to a given tablespace inside a specific
buffer pool instance when we are DISCARDing the tablespace. */
static __attribute__((nonnull))
static MY_ATTRIBUTE((nonnull))
void
buf_LRU_remove_all_pages(
/*=====================*/
Expand Down Expand Up @@ -825,7 +825,7 @@ buffer pool instance when we are deleting the data file(s) of that
tablespace. The pages still remain a part of LRU and are evicted from
the list as they age towards the tail of the LRU only if buf_remove
is BUF_REMOVE_FLUSH_NO_WRITE. */
static __attribute__((nonnull(1)))
static MY_ATTRIBUTE((nonnull(1)))
void
buf_LRU_remove_pages(
/*=================*/
Expand Down
7 changes: 4 additions & 3 deletions storage/innobase/data/data0data.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*****************************************************************************
Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Expand Down Expand Up @@ -67,7 +67,8 @@ dtuple_coll_cmp(
ulint n_fields;
ulint i;

ut_ad(tuple1 && tuple2);
ut_ad(tuple1 != NULL);
ut_ad(tuple2 != NULL);
ut_ad(tuple1->magic_n == DATA_TUPLE_MAGIC_N);
ut_ad(tuple2->magic_n == DATA_TUPLE_MAGIC_N);
ut_ad(dtuple_check_typed(tuple1));
Expand Down Expand Up @@ -715,7 +716,7 @@ UNIV_INTERN
void
dtuple_convert_back_big_rec(
/*========================*/
dict_index_t* index __attribute__((unused)), /*!< in: index */
dict_index_t* index MY_ATTRIBUTE((unused)), /*!< in: index */
dtuple_t* entry, /*!< in: entry whose data was put to vector */
big_rec_t* vector) /*!< in, own: big rec vector; it is
freed in this function */
Expand Down
Loading

0 comments on commit 720e04f

Please sign in to comment.