Skip to content

Commit

Permalink
5.5.55-38.8
Browse files Browse the repository at this point in the history
  • Loading branch information
vuvova committed Jul 18, 2017
1 parent cba2ac6 commit 46977e0
Show file tree
Hide file tree
Showing 35 changed files with 255 additions and 214 deletions.
2 changes: 1 addition & 1 deletion storage/xtradb/btr/btr0btr.c
Expand Up @@ -2958,7 +2958,7 @@ Removes a page from the level list of pages.

/*************************************************************//**
Removes a page from the level list of pages. */
static __attribute__((nonnull))
static
void
btr_level_list_remove_func(
/*=======================*/
Expand Down
10 changes: 5 additions & 5 deletions storage/xtradb/dict/dict0crea.c
Expand Up @@ -112,13 +112,13 @@ dict_create_sys_tables_tuple(
dfield = dtuple_get_nth_field(entry, 3/*TYPE*/);

ptr = mem_heap_alloc(heap, 4);
if (table->flags & (~DICT_TF_COMPACT & ~(~0 << DICT_TF_BITS))) {
if (table->flags & (~DICT_TF_COMPACT & ~(~0U << DICT_TF_BITS))) {
ut_a(table->flags & DICT_TF_COMPACT);
ut_a(dict_table_get_format(table) >= DICT_TF_FORMAT_ZIP);
ut_a((table->flags & DICT_TF_ZSSIZE_MASK)
<= (DICT_TF_ZSSIZE_MAX << DICT_TF_ZSSIZE_SHIFT));
ut_a(!(table->flags & (~0 << DICT_TF2_BITS)));
mach_write_to_4(ptr, table->flags & ~(~0 << DICT_TF_BITS));
ut_a(!(table->flags & (~0U << DICT_TF2_BITS)));
mach_write_to_4(ptr, table->flags & ~(~0U << DICT_TF_BITS));
} else {
mach_write_to_4(ptr, DICT_TABLE_ORDINARY);
}
Expand Down Expand Up @@ -306,7 +306,7 @@ dict_build_table_def_step(
ut_ad(!dict_table_zip_size(table)
|| dict_table_get_format(table) >= DICT_TF_FORMAT_ZIP);

flags = table->flags & ~(~0 << DICT_TF_BITS);
flags = table->flags & ~(~0U << DICT_TF_BITS);
error = fil_create_new_single_table_tablespace(
space, path_or_name, is_path,
flags == DICT_TF_COMPACT ? 0 : flags,
Expand All @@ -325,7 +325,7 @@ dict_build_table_def_step(
mtr_commit(&mtr);
} else {
/* Create in the system tablespace: disallow new features */
table->flags &= (~0 << DICT_TF_BITS) | DICT_TF_COMPACT;
table->flags &= (~0U << DICT_TF_BITS) | DICT_TF_COMPACT;
}

row = dict_create_sys_tables_tuple(table, node->heap);
Expand Down
10 changes: 5 additions & 5 deletions storage/xtradb/dict/dict0load.c
Expand Up @@ -717,7 +717,7 @@ dict_sys_tables_get_flags(
return(ULINT_UNDEFINED);
}

if (UNIV_UNLIKELY(flags & (~0 << DICT_TF_BITS))) {
if (UNIV_UNLIKELY(flags & (~0U << DICT_TF_BITS))) {
/* Some unused bits are set. */
return(ULINT_UNDEFINED);
}
Expand Down Expand Up @@ -1406,7 +1406,7 @@ dict_load_index_low(
goto err_len;
}
type = mach_read_from_4(field);
if (UNIV_UNLIKELY(type & (~0 << DICT_IT_BITS))) {
if (UNIV_UNLIKELY(type & (~0U << DICT_IT_BITS))) {
return("unknown SYS_INDEXES.TYPE bits");
}

Expand Down Expand Up @@ -1771,7 +1771,7 @@ dict_load_table_low(

flags2 = mach_read_from_4(field);

if (flags2 & (~0 << (DICT_TF2_BITS - DICT_TF2_SHIFT))) {
if (flags2 & (~0U << (DICT_TF2_BITS - DICT_TF2_SHIFT))) {
ut_print_timestamp(stderr);
fputs(" InnoDB: Warning: table ", stderr);
ut_print_filename(stderr, name);
Expand All @@ -1780,7 +1780,7 @@ dict_load_table_low(
" has unknown flags %lx.\n",
(ulong) flags2);

flags2 &= ~(~0 << (DICT_TF2_BITS - DICT_TF2_SHIFT));
flags2 &= ~(~0U << (DICT_TF2_BITS - DICT_TF2_SHIFT));
}

flags |= flags2 << DICT_TF2_SHIFT;
Expand Down Expand Up @@ -1913,7 +1913,7 @@ dict_load_table(
if (!fil_open_single_table_tablespace(
TRUE, table->space,
table->flags == DICT_TF_COMPACT ? 0 :
table->flags & ~(~0 << DICT_TF_BITS), name, NULL)) {
table->flags & ~(~0U << DICT_TF_BITS), name, NULL)) {
/* We failed to find a sensible
tablespace file */

Expand Down
2 changes: 1 addition & 1 deletion storage/xtradb/dict/dict0mem.c
Expand Up @@ -69,7 +69,7 @@ dict_mem_table_create(
DBUG_ENTER("dict_mem_table_create");

ut_ad(name);
ut_a(!(flags & (~0 << DICT_TF2_BITS)));
ut_a(!(flags & (~0U << DICT_TF2_BITS)));

heap = mem_heap_create(DICT_HEAP_SIZE);

Expand Down
2 changes: 1 addition & 1 deletion storage/xtradb/fil/fil0fil.c
Expand Up @@ -3868,7 +3868,7 @@ fil_open_single_table_tablespace(
}

if (space_id != id
|| space_flags != (flags & ~(~0 << DICT_TF_BITS))) {
|| space_flags != (flags & ~(~0U << DICT_TF_BITS))) {
ut_print_timestamp(stderr);

fputs(" InnoDB: Error: tablespace id and flags in file ",
Expand Down
7 changes: 3 additions & 4 deletions storage/xtradb/fsp/fsp0fsp.c
Expand Up @@ -249,8 +249,7 @@ fsp_fill_free_list(
then we do not allocate more extents */
ulint space, /*!< in: space */
fsp_header_t* header, /*!< in/out: space header */
mtr_t* mtr) /*!< in/out: mini-transaction */
__attribute__((nonnull));
mtr_t* mtr); /*!< in/out: mini-transaction */
/**********************************************************************//**
Allocates a single free page from a segment. This function implements
the intelligent allocation strategy which tries to minimize file space
Expand Down Expand Up @@ -279,7 +278,7 @@ fseg_alloc_free_page_low(
in which the page should be initialized.
If init_mtr!=mtr, but the page is already
latched in mtr, do not initialize the page. */
__attribute__((warn_unused_result, nonnull));
__attribute__((warn_unused_result));
#endif /* !UNIV_HOTBACKUP */

/**********************************************************************//**
Expand Down Expand Up @@ -1572,7 +1571,7 @@ Allocates a single free page from a space. The page is marked as used.
@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 __attribute__((warn_unused_result))
buf_block_t*
fsp_alloc_free_page(
/*================*/
Expand Down
24 changes: 1 addition & 23 deletions storage/xtradb/handler/i_s.cc
Expand Up @@ -7544,29 +7544,7 @@ i_s_innodb_changed_pages_fill(

while(log_online_bitmap_iterator_next(&i) &&
(!srv_max_changed_pages ||
output_rows_num < srv_max_changed_pages) &&
/*
There is no need to compare both start LSN and end LSN fields
with maximum value. It's enough to compare only start LSN.
Example:
max_lsn = 100
\\\\\\\\\\\\\\\\\\\\\\\\\|\\\\\\\\ - Query 1
I------I I-------I I-------------I I----I
////////////////// | - Query 2
1 2 3 4
Query 1:
SELECT * FROM INNODB_CHANGED_PAGES WHERE start_lsn < 100
will select 1,2,3 bitmaps
Query 2:
SELECT * FROM INNODB_CHANGED_PAGES WHERE end_lsn < 100
will select 1,2 bitmaps
The condition start_lsn <= 100 will be false after reading
1,2,3 bitmaps which suits for both cases.
*/
LOG_BITMAP_ITERATOR_START_LSN(i) <= max_lsn)
output_rows_num < srv_max_changed_pages))
{
if (!LOG_BITMAP_ITERATOR_PAGE_CHANGED(i))
continue;
Expand Down
13 changes: 5 additions & 8 deletions storage/xtradb/include/btr0cur.h
Expand Up @@ -261,7 +261,7 @@ btr_cur_update_alloc_zip(
FALSE=update-in-place */
mtr_t* mtr, /*!< in: mini-transaction */
trx_t* trx) /*!< in: NULL or transaction */
__attribute__((nonnull (1, 2, 3, 6), warn_unused_result));
__attribute__((warn_unused_result));
/*************************************************************//**
Updates a record when the update causes no size changes in its fields.
@return DB_SUCCESS or error number */
Expand Down Expand Up @@ -345,8 +345,7 @@ btr_cur_del_mark_set_clust_rec(
const ulint* offsets,/*!< in: rec_get_offsets(rec) */
ibool val, /*!< in: value to set */
que_thr_t* thr, /*!< in: query thread */
mtr_t* mtr) /*!< in: mtr */
__attribute__((nonnull));
mtr_t* mtr); /*!< in: mtr */
/***********************************************************//**
Sets a secondary index record delete mark to TRUE or FALSE.
@return DB_SUCCESS, DB_LOCK_WAIT, or error number */
Expand Down Expand Up @@ -499,8 +498,7 @@ btr_cur_disown_inherited_fields(
dict_index_t* index, /*!< in: index of the page */
const ulint* offsets,/*!< in: array returned by rec_get_offsets() */
const upd_t* update, /*!< in: update vector */
mtr_t* mtr) /*!< in/out: mini-transaction */
__attribute__((nonnull(2,3,4,5,6)));
mtr_t* mtr); /*!< in/out: mini-transaction */

/** Operation code for btr_store_big_rec_extern_fields(). */
enum blob_op {
Expand Down Expand Up @@ -545,7 +543,7 @@ btr_store_big_rec_extern_fields(
mtr_t* btr_mtr, /*!< in: mtr containing the
latches to the clustered index */
enum blob_op op) /*! in: operation code */
__attribute__((nonnull, warn_unused_result));
__attribute__((warn_unused_result));

/*******************************************************************//**
Frees the space in an externally stored field to the file space
Expand Down Expand Up @@ -621,8 +619,7 @@ btr_push_update_extern_fields(
/*==========================*/
dtuple_t* tuple, /*!< in/out: data tuple */
const upd_t* update, /*!< in: update vector */
mem_heap_t* heap) /*!< in: memory heap */
__attribute__((nonnull));
mem_heap_t* heap); /*!< in: memory heap */
/***********************************************************//**
Sets a secondary index record's delete mark to the given value. This
function is only used by the insert buffer merge mechanism. */
Expand Down
7 changes: 3 additions & 4 deletions storage/xtradb/include/btr0sea.h
Expand Up @@ -205,14 +205,14 @@ hash_table_t*
btr_search_get_hash_table(
/*======================*/
const dict_index_t* index) /*!< in: index */
__attribute__((nonnull,pure,warn_unused_result));
__attribute__((warn_unused_result));

UNIV_INLINE
rw_lock_t*
btr_search_get_latch(
/*=================*/
const dict_index_t* index) /*!< in: index */
__attribute__((nonnull,pure,warn_unused_result));
__attribute__((warn_unused_result));

/*********************************************************************//**
Returns the AHI partition number corresponding to a given index ID. */
Expand All @@ -229,8 +229,7 @@ UNIV_INLINE
void
btr_search_index_init(
/*===============*/
dict_index_t* index) /*!< in: index */
__attribute__((nonnull));
dict_index_t* index); /*!< in: index */

UNIV_INLINE
void
Expand Down
2 changes: 1 addition & 1 deletion storage/xtradb/include/buf0buddy.ic
Expand Up @@ -51,7 +51,7 @@ buf_buddy_alloc_low(
buf_pool->mutex was temporarily
released */
ibool have_page_hash_mutex)
__attribute__((malloc, nonnull));
__attribute__((malloc));

/**********************************************************************//**
Deallocate a block. */
Expand Down
3 changes: 1 addition & 2 deletions storage/xtradb/include/buf0buf.h
Expand Up @@ -274,8 +274,7 @@ buf_relocate(
buf_page_t* bpage, /*!< in/out: control block being relocated;
buf_page_get_state(bpage) must be
BUF_BLOCK_ZIP_DIRTY or BUF_BLOCK_ZIP_PAGE */
buf_page_t* dpage) /*!< in/out: destination control block */
__attribute__((nonnull));
buf_page_t* dpage); /*!< in/out: destination control block */
/*********************************************************************//**
Gets the current size of buffer buf_pool in bytes.
@return size in bytes */
Expand Down
16 changes: 8 additions & 8 deletions storage/xtradb/include/dict0dict.h
Expand Up @@ -605,7 +605,7 @@ ulint
dict_index_is_clust(
/*================*/
const dict_index_t* index) /*!< in: index */
__attribute__((nonnull, pure, warn_unused_result));
__attribute__((warn_unused_result));
/********************************************************************//**
Check whether the index is unique.
@return nonzero for unique index, zero for other indexes */
Expand All @@ -614,7 +614,7 @@ ulint
dict_index_is_unique(
/*=================*/
const dict_index_t* index) /*!< in: index */
__attribute__((nonnull, pure, warn_unused_result));
__attribute__((warn_unused_result));
/********************************************************************//**
Check whether the index is the insert buffer tree.
@return nonzero for insert buffer, zero for other indexes */
Expand All @@ -623,7 +623,7 @@ ulint
dict_index_is_ibuf(
/*===============*/
const dict_index_t* index) /*!< in: index */
__attribute__((nonnull, pure, warn_unused_result));
__attribute__((warn_unused_result));
/********************************************************************//**
Check whether the index is a secondary index or the insert buffer tree.
@return nonzero for insert buffer, zero for other indexes */
Expand All @@ -632,7 +632,7 @@ ulint
dict_index_is_sec_or_ibuf(
/*======================*/
const dict_index_t* index) /*!< in: index */
__attribute__((nonnull, pure, warn_unused_result));
__attribute__((warn_unused_result));

/********************************************************************//**
Gets the number of user-defined columns in a table in the dictionary
Expand All @@ -643,7 +643,7 @@ ulint
dict_table_get_n_user_cols(
/*=======================*/
const dict_table_t* table) /*!< in: table */
__attribute__((nonnull, pure, warn_unused_result));
__attribute__((warn_unused_result));
/********************************************************************//**
Gets the number of system columns in a table in the dictionary cache.
@return number of system (e.g., ROW_ID) columns of a table */
Expand All @@ -662,7 +662,7 @@ ulint
dict_table_get_n_cols(
/*==================*/
const dict_table_t* table) /*!< in: table */
__attribute__((nonnull, pure, warn_unused_result));
__attribute__((warn_unused_result));
#ifdef UNIV_DEBUG
/********************************************************************//**
Gets the nth column of a table.
Expand Down Expand Up @@ -1313,7 +1313,7 @@ ulint
dict_index_is_corrupted(
/*====================*/
const dict_index_t* index) /*!< in: index */
__attribute__((nonnull, pure, warn_unused_result));
__attribute__((warn_unused_result));

#endif /* !UNIV_HOTBACKUP */
/**********************************************************************//**
Expand All @@ -1324,7 +1324,7 @@ void
dict_set_corrupted(
/*===============*/
dict_index_t* index) /*!< in/out: index */
UNIV_COLD __attribute__((nonnull));
UNIV_COLD;

/**********************************************************************//**
Flags an index corrupted in the data dictionary cache only. This
Expand Down
2 changes: 1 addition & 1 deletion storage/xtradb/include/dict0mem.h
Expand Up @@ -87,7 +87,7 @@ combination of types */
/* @{ */
#define DICT_TF_FORMAT_SHIFT 5 /* file format */
#define DICT_TF_FORMAT_MASK \
((~(~0 << (DICT_TF_BITS - DICT_TF_FORMAT_SHIFT))) << DICT_TF_FORMAT_SHIFT)
((~(~0U << (DICT_TF_BITS - DICT_TF_FORMAT_SHIFT))) << DICT_TF_FORMAT_SHIFT)
#define DICT_TF_FORMAT_51 0 /*!< InnoDB/MySQL up to 5.1 */
#define DICT_TF_FORMAT_ZIP 1 /*!< InnoDB plugin for 5.1:
compressed tables,
Expand Down

0 comments on commit 46977e0

Please sign in to comment.