diff options
Diffstat (limited to 'storage/innobase')
-rw-r--r-- | storage/innobase/btr/btr0cur.c | 10 | ||||
-rw-r--r-- | storage/innobase/handler/ha_innodb.cc | 5 | ||||
-rw-r--r-- | storage/innobase/include/data0type.ic | 2 | ||||
-rw-r--r-- | storage/innobase/include/page0zip.ic | 2 | ||||
-rw-r--r-- | storage/innobase/row/row0mysql.c | 5 | ||||
-rw-r--r-- | storage/innobase/row/row0purge.c | 4 | ||||
-rw-r--r-- | storage/innobase/row/row0sel.c | 1 |
7 files changed, 16 insertions, 13 deletions
diff --git a/storage/innobase/btr/btr0cur.c b/storage/innobase/btr/btr0cur.c index 2c1ab4bffae..e8c467409b2 100644 --- a/storage/innobase/btr/btr0cur.c +++ b/storage/innobase/btr/btr0cur.c @@ -2,6 +2,7 @@ Copyright (c) 1994, 2015, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. +Copyright (c) 2017, MariaDB Corporation. Portions of this file contain modifications contributed and copyrighted by Google, Inc. Those modifications are gratefully acknowledged and are described @@ -3193,7 +3194,6 @@ btr_cur_pessimistic_delete( ulint n_reserved; ibool success; ibool ret = FALSE; - ulint level; mem_heap_t* heap; ulint* offsets; @@ -3240,6 +3240,8 @@ btr_cur_pessimistic_delete( #endif /* UNIV_ZIP_DEBUG */ } + lock_update_delete(block, rec); + if (UNIV_UNLIKELY(page_get_n_recs(page) < 2) && UNIV_UNLIKELY(dict_index_get_page(index) != buf_block_get_page_no(block))) { @@ -3255,10 +3257,7 @@ btr_cur_pessimistic_delete( goto return_after_reservations; } - lock_update_delete(block, rec); - level = btr_page_get_level(page, mtr); - - if (level > 0 + if (!page_is_leaf(page) && UNIV_UNLIKELY(rec == page_rec_get_next( page_get_infimum_rec(page)))) { @@ -3281,6 +3280,7 @@ btr_cur_pessimistic_delete( on a page, we have to change the father node pointer so that it is equal to the new leftmost node pointer on the page */ + ulint level = btr_page_get_level(page, mtr); btr_node_ptr_delete(index, block, mtr); diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 1991850e6cd..3a96763d6c2 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -5593,7 +5593,7 @@ ha_innobase::innobase_lock_autoinc(void) break; } } - /* Fall through to old style locking. */ + /* fall through */ case AUTOINC_OLD_STYLE_LOCKING: error = row_lock_table_autoinc_for_mysql(prebuilt); @@ -8150,7 +8150,7 @@ create_options_are_valid( case ROW_TYPE_DYNAMIC: CHECK_ERROR_ROW_TYPE_NEEDS_FILE_PER_TABLE; CHECK_ERROR_ROW_TYPE_NEEDS_GT_ANTELOPE; - /* fall through since dynamic also shuns KBS */ + /* fall through */ /* since dynamic also shuns KBS */ case ROW_TYPE_COMPACT: case ROW_TYPE_REDUNDANT: if (kbs_specified) { @@ -8396,6 +8396,7 @@ ha_innobase::create( thd, MYSQL_ERROR::WARN_LEVEL_WARN, ER_ILLEGAL_HA_CREATE_OPTION, "InnoDB: assuming ROW_FORMAT=COMPACT."); + /* fall through */ case ROW_TYPE_DEFAULT: case ROW_TYPE_COMPACT: flags = DICT_TF_COMPACT; diff --git a/storage/innobase/include/data0type.ic b/storage/innobase/include/data0type.ic index 410970ac50e..515b6b249ef 100644 --- a/storage/innobase/include/data0type.ic +++ b/storage/innobase/include/data0type.ic @@ -477,7 +477,7 @@ dtype_get_fixed_size_low( #else /* !UNIV_HOTBACKUP */ return(len); #endif /* !UNIV_HOTBACKUP */ - /* fall through for variable-length charsets */ + /* fall through */ /* for variable-length charsets */ case DATA_VARCHAR: case DATA_BINARY: case DATA_DECIMAL: diff --git a/storage/innobase/include/page0zip.ic b/storage/innobase/include/page0zip.ic index e26fa3e3d94..a2fa13c94df 100644 --- a/storage/innobase/include/page0zip.ic +++ b/storage/innobase/include/page0zip.ic @@ -170,7 +170,7 @@ page_zip_rec_needs_ext( ignored if zip_size == 0 */ ulint zip_size) /*!< in: compressed page size in bytes, or 0 */ { - ut_ad(rec_size > comp ? REC_N_NEW_EXTRA_BYTES : REC_N_OLD_EXTRA_BYTES); + ut_ad(rec_size > (comp ? REC_N_NEW_EXTRA_BYTES : REC_N_OLD_EXTRA_BYTES)); ut_ad(ut_is_2pow(zip_size)); ut_ad(comp || !zip_size); diff --git a/storage/innobase/row/row0mysql.c b/storage/innobase/row/row0mysql.c index 6206bef6b56..8804e2c4e03 100644 --- a/storage/innobase/row/row0mysql.c +++ b/storage/innobase/row/row0mysql.c @@ -3495,7 +3495,7 @@ check_next_foreign: row_mysql_handle_errors(&err, trx, NULL, NULL); - /* Fall through to raise error */ + /* fall through */ default: /* No other possible error returns */ @@ -4315,7 +4315,8 @@ loop: fputs(" InnoDB: Warning: CHECK TABLE on ", stderr); dict_index_name_print(stderr, prebuilt->trx, index); fprintf(stderr, " returned %lu\n", ret); - /* fall through (this error is ignored by CHECK TABLE) */ + /* this error is ignored by CHECK TABLE */ + /* fall through */ case DB_END_OF_INDEX: func_exit: mem_free(buf); diff --git a/storage/innobase/row/row0purge.c b/storage/innobase/row/row0purge.c index 5f3e4175544..7b25612ba4b 100644 --- a/storage/innobase/row/row0purge.c +++ b/storage/innobase/row/row0purge.c @@ -407,8 +407,8 @@ row_purge_remove_sec_if_poss_leaf( goto func_exit; } } - /* fall through (the index entry is still needed, - or the deletion succeeded) */ + /* the index entry is still needed, or the deletion succeeded */ + /* fall through */ case ROW_NOT_DELETED_REF: /* The index entry is still needed. */ case ROW_BUFFERED: diff --git a/storage/innobase/row/row0sel.c b/storage/innobase/row/row0sel.c index e027a382cee..f5f8153e116 100644 --- a/storage/innobase/row/row0sel.c +++ b/storage/innobase/row/row0sel.c @@ -2675,6 +2675,7 @@ row_sel_field_store_in_mysql_format( case DATA_SYS: /* These column types should never be shipped to MySQL. */ ut_ad(0); + /* fall through */ case DATA_CHAR: case DATA_FIXBINARY: |