Skip to content

Commit 720e04f

Browse files
committed
5.6.31
1 parent f1aae86 commit 720e04f

File tree

146 files changed

+1536
-1481
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+1536
-1481
lines changed

storage/innobase/btr/btr0btr.cc

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*****************************************************************************
22
3-
Copyright (c) 1994, 2015, Oracle and/or its affiliates. All Rights Reserved.
3+
Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
44
Copyright (c) 2012, Facebook Inc.
55
66
This program is free software; you can redistribute it and/or modify it under
@@ -1102,7 +1102,7 @@ that the caller has made the reservation for free extents!
11021102
@retval block, rw_lock_x_lock_count(&block->lock) == 1 if allocation succeeded
11031103
(init_mtr == mtr, or the page was not previously freed in mtr)
11041104
@retval block (not allocated or initialized) otherwise */
1105-
static __attribute__((nonnull, warn_unused_result))
1105+
static MY_ATTRIBUTE((nonnull, warn_unused_result))
11061106
buf_block_t*
11071107
btr_page_alloc_low(
11081108
/*===============*/
@@ -1971,7 +1971,7 @@ IBUF_BITMAP_FREE is unaffected by reorganization.
19711971
19721972
@retval true if the operation was successful
19731973
@retval false if it is a compressed page, and recompression failed */
1974-
static __attribute__((nonnull))
1974+
static MY_ATTRIBUTE((nonnull))
19751975
bool
19761976
btr_page_reorganize_block(
19771977
/*======================*/
@@ -2033,7 +2033,8 @@ btr_parse_page_reorganize(
20332033
{
20342034
ulint level;
20352035

2036-
ut_ad(ptr && end_ptr);
2036+
ut_ad(ptr != NULL);
2037+
ut_ad(end_ptr != NULL);
20372038

20382039
/* If dealing with a compressed page the record has the
20392040
compression level used during original compression written in
@@ -2500,7 +2501,7 @@ btr_page_get_split_rec(
25002501
Returns TRUE if the insert fits on the appropriate half-page with the
25012502
chosen split_rec.
25022503
@return true if fits */
2503-
static __attribute__((nonnull(1,3,4,6), warn_unused_result))
2504+
static MY_ATTRIBUTE((nonnull(1,3,4,6), warn_unused_result))
25042505
bool
25052506
btr_page_insert_fits(
25062507
/*=================*/
@@ -2643,7 +2644,7 @@ btr_insert_on_non_leaf_level_func(
26432644
/**************************************************************//**
26442645
Attaches the halves of an index page on the appropriate level in an
26452646
index tree. */
2646-
static __attribute__((nonnull))
2647+
static MY_ATTRIBUTE((nonnull))
26472648
void
26482649
btr_attach_half_pages(
26492650
/*==================*/
@@ -2779,7 +2780,7 @@ btr_attach_half_pages(
27792780
/*************************************************************//**
27802781
Determine if a tuple is smaller than any record on the page.
27812782
@return TRUE if smaller */
2782-
static __attribute__((nonnull, warn_unused_result))
2783+
static MY_ATTRIBUTE((nonnull, warn_unused_result))
27832784
bool
27842785
btr_page_tuple_smaller(
27852786
/*===================*/
@@ -3355,7 +3356,7 @@ Removes a page from the level list of pages.
33553356

33563357
/*************************************************************//**
33573358
Removes a page from the level list of pages. */
3358-
static __attribute__((nonnull))
3359+
static MY_ATTRIBUTE((nonnull))
33593360
void
33603361
btr_level_list_remove_func(
33613362
/*=======================*/
@@ -3371,7 +3372,8 @@ btr_level_list_remove_func(
33713372
ulint prev_page_no;
33723373
ulint next_page_no;
33733374

3374-
ut_ad(page && mtr);
3375+
ut_ad(page != NULL);
3376+
ut_ad(mtr != NULL);
33753377
ut_ad(mtr_memo_contains_page(mtr, page, MTR_MEMO_PAGE_X_FIX));
33763378
ut_ad(space == page_get_space_id(page));
33773379
/* Get the previous and next page numbers of page */

storage/innobase/btr/btr0cur.cc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*****************************************************************************
22
3-
Copyright (c) 1994, 2015, Oracle and/or its affiliates. All Rights Reserved.
3+
Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
44
Copyright (c) 2008, Google Inc.
55
Copyright (c) 2012, Facebook Inc.
66
@@ -1084,7 +1084,7 @@ This has to be done either within the same mini-transaction,
10841084
or by invoking ibuf_reset_free_bits() before mtr_commit().
10851085
10861086
@return pointer to inserted record if succeed, else NULL */
1087-
static __attribute__((nonnull, warn_unused_result))
1087+
static MY_ATTRIBUTE((nonnull, warn_unused_result))
10881088
rec_t*
10891089
btr_cur_insert_if_possible(
10901090
/*=======================*/
@@ -1127,7 +1127,7 @@ btr_cur_insert_if_possible(
11271127
/*************************************************************//**
11281128
For an insert, checks the locks and does the undo logging if desired.
11291129
@return DB_SUCCESS, DB_WAIT_LOCK, DB_FAIL, or error number */
1130-
UNIV_INLINE __attribute__((warn_unused_result, nonnull(2,3,5,6)))
1130+
UNIV_INLINE MY_ATTRIBUTE((warn_unused_result, nonnull(2,3,5,6)))
11311131
dberr_t
11321132
btr_cur_ins_lock_and_undo(
11331133
/*======================*/
@@ -1653,7 +1653,7 @@ btr_cur_pessimistic_insert(
16531653
/*************************************************************//**
16541654
For an update, checks the locks and does the undo logging.
16551655
@return DB_SUCCESS, DB_WAIT_LOCK, or error number */
1656-
UNIV_INLINE __attribute__((warn_unused_result, nonnull(2,3,6,7)))
1656+
UNIV_INLINE MY_ATTRIBUTE((warn_unused_result, nonnull(2,3,6,7)))
16571657
dberr_t
16581658
btr_cur_upd_lock_and_undo(
16591659
/*======================*/
@@ -1672,7 +1672,7 @@ btr_cur_upd_lock_and_undo(
16721672
const rec_t* rec;
16731673
dberr_t err;
16741674

1675-
ut_ad(thr || (flags & BTR_NO_LOCKING_FLAG));
1675+
ut_ad((thr != NULL) || (flags & BTR_NO_LOCKING_FLAG));
16761676

16771677
rec = btr_cur_get_rec(cursor);
16781678
index = cursor->index;
@@ -2961,7 +2961,7 @@ btr_cur_del_mark_set_clust_rec(
29612961
ut_ad(page_is_leaf(page_align(rec)));
29622962

29632963
#ifdef UNIV_DEBUG
2964-
if (btr_cur_print_record_ops && thr) {
2964+
if (btr_cur_print_record_ops && (thr != NULL)) {
29652965
btr_cur_trx_report(thr_get_trx(thr)->id, index, "del mark ");
29662966
rec_print_new(stderr, rec, offsets);
29672967
}
@@ -3109,7 +3109,7 @@ btr_cur_del_mark_set_sec_rec(
31093109
rec = btr_cur_get_rec(cursor);
31103110

31113111
#ifdef UNIV_DEBUG
3112-
if (btr_cur_print_record_ops && thr) {
3112+
if (btr_cur_print_record_ops && (thr != NULL)) {
31133113
btr_cur_trx_report(thr_get_trx(thr)->id, cursor->index,
31143114
"del mark ");
31153115
rec_print(stderr, rec, cursor->index);
@@ -4992,7 +4992,7 @@ btr_free_externally_stored_field(
49924992
ulint i, /*!< in: field number of field_ref;
49934993
ignored if rec == NULL */
49944994
enum trx_rb_ctx rb_ctx, /*!< in: rollback context */
4995-
mtr_t* local_mtr __attribute__((unused))) /*!< in: mtr
4995+
mtr_t* local_mtr MY_ATTRIBUTE((unused))) /*!< in: mtr
49964996
containing the latch to data an an
49974997
X-latch to the index tree */
49984998
{

storage/innobase/btr/btr0sea.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*****************************************************************************
22
3-
Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
3+
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
44
Copyright (c) 2008, Google Inc.
55
66
Portions of this file contain modifications contributed and copyrighted by
@@ -473,7 +473,7 @@ btr_search_update_block_hash_info(
473473
/*==============================*/
474474
btr_search_t* info, /*!< in: search info */
475475
buf_block_t* block, /*!< in: buffer block */
476-
btr_cur_t* cursor __attribute__((unused)))
476+
btr_cur_t* cursor MY_ATTRIBUTE((unused)))
477477
/*!< in: cursor */
478478
{
479479
#ifdef UNIV_SYNC_DEBUG

storage/innobase/buf/buf0buddy.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*****************************************************************************
22
3-
Copyright (c) 2006, 2013, Oracle and/or its affiliates. All Rights Reserved.
3+
Copyright (c) 2006, 2016, Oracle and/or its affiliates. All Rights Reserved.
44
55
This program is free software; you can redistribute it and/or modify it under
66
the terms of the GNU General Public License as published by the Free Software
@@ -112,7 +112,7 @@ buf_buddy_mem_invalid(
112112
/**********************************************************************//**
113113
Check if a buddy is stamped free.
114114
@return whether the buddy is free */
115-
UNIV_INLINE __attribute__((warn_unused_result))
115+
UNIV_INLINE MY_ATTRIBUTE((warn_unused_result))
116116
bool
117117
buf_buddy_stamp_is_free(
118118
/*====================*/
@@ -225,7 +225,7 @@ Checks if a buf is free i.e.: in the zip_free[].
225225
@retval BUF_BUDDY_STATE_FREE if fully free
226226
@retval BUF_BUDDY_STATE_USED if currently in use
227227
@retval BUF_BUDDY_STATE_PARTIALLY_USED if partially in use. */
228-
static __attribute__((warn_unused_result))
228+
static MY_ATTRIBUTE((warn_unused_result))
229229
buf_buddy_state_t
230230
buf_buddy_is_free(
231231
/*==============*/

storage/innobase/buf/buf0buf.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*****************************************************************************
22
3-
Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
3+
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
44
Copyright (c) 2008, Google Inc.
55
66
Portions of this file contain modifications contributed and copyrighted by
@@ -3470,7 +3470,7 @@ buf_page_init_low(
34703470

34713471
/********************************************************************//**
34723472
Inits a page to the buffer buf_pool. */
3473-
static __attribute__((nonnull))
3473+
static MY_ATTRIBUTE((nonnull))
34743474
void
34753475
buf_page_init(
34763476
/*==========*/

storage/innobase/buf/buf0dump.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*****************************************************************************
22
3-
Copyright (c) 2011, 2015, Oracle and/or its affiliates. All Rights Reserved.
3+
Copyright (c) 2011, 2016, Oracle and/or its affiliates. All Rights Reserved.
44
55
This program is free software; you can redistribute it and/or modify it under
66
the terms of the GNU General Public License as published by the Free Software
@@ -105,7 +105,7 @@ SELECT variable_value FROM information_schema.global_status WHERE
105105
variable_name = 'INNODB_BUFFER_POOL_DUMP_STATUS';
106106
or by:
107107
SHOW STATUS LIKE 'innodb_buffer_pool_dump_status'; */
108-
static __attribute__((nonnull, format(printf, 2, 3)))
108+
static MY_ATTRIBUTE((nonnull, format(printf, 2, 3)))
109109
void
110110
buf_dump_status(
111111
/*============*/
@@ -141,7 +141,7 @@ SELECT variable_value FROM information_schema.global_status WHERE
141141
variable_name = 'INNODB_BUFFER_POOL_LOAD_STATUS';
142142
or by:
143143
SHOW STATUS LIKE 'innodb_buffer_pool_load_status'; */
144-
static __attribute__((nonnull, format(printf, 2, 3)))
144+
static MY_ATTRIBUTE((nonnull, format(printf, 2, 3)))
145145
void
146146
buf_load_status(
147147
/*============*/
@@ -594,7 +594,7 @@ extern "C" UNIV_INTERN
594594
os_thread_ret_t
595595
DECLARE_THREAD(buf_dump_thread)(
596596
/*============================*/
597-
void* arg __attribute__((unused))) /*!< in: a dummy parameter
597+
void* arg MY_ATTRIBUTE((unused))) /*!< in: a dummy parameter
598598
required by os_thread_create */
599599
{
600600
ut_ad(!srv_read_only_mode);

storage/innobase/buf/buf0flu.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*****************************************************************************
22
3-
Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
3+
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
44
55
This program is free software; you can redistribute it and/or modify it under
66
the terms of the GNU General Public License as published by the Free Software
@@ -2384,7 +2384,7 @@ extern "C" UNIV_INTERN
23842384
os_thread_ret_t
23852385
DECLARE_THREAD(buf_flush_page_cleaner_thread)(
23862386
/*==========================================*/
2387-
void* arg __attribute__((unused)))
2387+
void* arg MY_ATTRIBUTE((unused)))
23882388
/*!< in: a dummy parameter required by
23892389
os_thread_create */
23902390
{

storage/innobase/buf/buf0lru.cc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*****************************************************************************
22
3-
Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved.
3+
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
44
55
This program is free software; you can redistribute it and/or modify it under
66
the terms of the GNU General Public License as published by the Free Software
@@ -142,7 +142,7 @@ If a compressed page is freed other compressed pages may be relocated.
142142
caller needs to free the page to the free list
143143
@retval false if BUF_BLOCK_ZIP_PAGE was removed from page_hash. In
144144
this case the block is already returned to the buddy allocator. */
145-
static __attribute__((nonnull, warn_unused_result))
145+
static MY_ATTRIBUTE((nonnull, warn_unused_result))
146146
bool
147147
buf_LRU_block_remove_hashed(
148148
/*========================*/
@@ -366,7 +366,7 @@ want to hog the CPU and resources. Release the buffer pool and block
366366
mutex and try to force a context switch. Then reacquire the same mutexes.
367367
The current page is "fixed" before the release of the mutexes and then
368368
"unfixed" again once we have reacquired the mutexes. */
369-
static __attribute__((nonnull))
369+
static MY_ATTRIBUTE((nonnull))
370370
void
371371
buf_flush_yield(
372372
/*============*/
@@ -407,7 +407,7 @@ If we have hogged the resources for too long then release the buffer
407407
pool and flush list mutex and do a thread yield. Set the current page
408408
to "sticky" so that it is not relocated during the yield.
409409
@return true if yielded */
410-
static __attribute__((nonnull(1), warn_unused_result))
410+
static MY_ATTRIBUTE((nonnull(1), warn_unused_result))
411411
bool
412412
buf_flush_try_yield(
413413
/*================*/
@@ -450,7 +450,7 @@ buf_flush_try_yield(
450450
Removes a single page from a given tablespace inside a specific
451451
buffer pool instance.
452452
@return true if page was removed. */
453-
static __attribute__((nonnull, warn_unused_result))
453+
static MY_ATTRIBUTE((nonnull, warn_unused_result))
454454
bool
455455
buf_flush_or_remove_page(
456456
/*=====================*/
@@ -531,7 +531,7 @@ the list as they age towards the tail of the LRU.
531531
@retval DB_SUCCESS if all freed
532532
@retval DB_FAIL if not all freed
533533
@retval DB_INTERRUPTED if the transaction was interrupted */
534-
static __attribute__((nonnull(1), warn_unused_result))
534+
static MY_ATTRIBUTE((nonnull(1), warn_unused_result))
535535
dberr_t
536536
buf_flush_or_remove_pages(
537537
/*======================*/
@@ -637,7 +637,7 @@ Remove or flush all the dirty pages that belong to a given tablespace
637637
inside a specific buffer pool instance. The pages will remain in the LRU
638638
list and will be evicted from the LRU list as they age and move towards
639639
the tail of the LRU list. */
640-
static __attribute__((nonnull(1)))
640+
static MY_ATTRIBUTE((nonnull(1)))
641641
void
642642
buf_flush_dirty_pages(
643643
/*==================*/
@@ -677,7 +677,7 @@ buf_flush_dirty_pages(
677677
/******************************************************************//**
678678
Remove all pages that belong to a given tablespace inside a specific
679679
buffer pool instance when we are DISCARDing the tablespace. */
680-
static __attribute__((nonnull))
680+
static MY_ATTRIBUTE((nonnull))
681681
void
682682
buf_LRU_remove_all_pages(
683683
/*=====================*/
@@ -825,7 +825,7 @@ buffer pool instance when we are deleting the data file(s) of that
825825
tablespace. The pages still remain a part of LRU and are evicted from
826826
the list as they age towards the tail of the LRU only if buf_remove
827827
is BUF_REMOVE_FLUSH_NO_WRITE. */
828-
static __attribute__((nonnull(1)))
828+
static MY_ATTRIBUTE((nonnull(1)))
829829
void
830830
buf_LRU_remove_pages(
831831
/*=================*/

storage/innobase/data/data0data.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*****************************************************************************
22
3-
Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved.
3+
Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
44
55
This program is free software; you can redistribute it and/or modify it under
66
the terms of the GNU General Public License as published by the Free Software
@@ -67,7 +67,8 @@ dtuple_coll_cmp(
6767
ulint n_fields;
6868
ulint i;
6969

70-
ut_ad(tuple1 && tuple2);
70+
ut_ad(tuple1 != NULL);
71+
ut_ad(tuple2 != NULL);
7172
ut_ad(tuple1->magic_n == DATA_TUPLE_MAGIC_N);
7273
ut_ad(tuple2->magic_n == DATA_TUPLE_MAGIC_N);
7374
ut_ad(dtuple_check_typed(tuple1));
@@ -715,7 +716,7 @@ UNIV_INTERN
715716
void
716717
dtuple_convert_back_big_rec(
717718
/*========================*/
718-
dict_index_t* index __attribute__((unused)), /*!< in: index */
719+
dict_index_t* index MY_ATTRIBUTE((unused)), /*!< in: index */
719720
dtuple_t* entry, /*!< in: entry whose data was put to vector */
720721
big_rec_t* vector) /*!< in, own: big rec vector; it is
721722
freed in this function */

0 commit comments

Comments
 (0)