diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-04-06 09:52:25 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2017-04-06 09:52:25 +0300 |
commit | 1494147cf6f810dfd2a87c93be53e3c9da3a0958 (patch) | |
tree | f62d714617394660d75f804aa7850449733cc564 /storage | |
parent | d528fd72f281541e95cec803e9db63d620cccf5e (diff) | |
parent | 25d69ea0124941cca54dbf0c2ebb2aa20ab2d6a8 (diff) | |
download | mariadb-git-1494147cf6f810dfd2a87c93be53e3c9da3a0958.tar.gz |
Merge 10.1 into 10.2
Diffstat (limited to 'storage')
-rw-r--r-- | storage/innobase/fil/fil0crypt.cc | 2 | ||||
-rw-r--r-- | storage/innobase/handler/ha_innodb.cc | 19 | ||||
-rw-r--r-- | storage/innobase/handler/handler0alter.cc | 1 | ||||
-rw-r--r-- | storage/xtradb/btr/btr0cur.cc | 10 | ||||
-rw-r--r-- | storage/xtradb/fil/fil0crypt.cc | 2 | ||||
-rw-r--r-- | storage/xtradb/handler/ha_innodb.cc | 11 | ||||
-rw-r--r-- | storage/xtradb/handler/handler0alter.cc | 1 |
7 files changed, 37 insertions, 9 deletions
diff --git a/storage/innobase/fil/fil0crypt.cc b/storage/innobase/fil/fil0crypt.cc index a61d7439e2c..db7efe89d37 100644 --- a/storage/innobase/fil/fil0crypt.cc +++ b/storage/innobase/fil/fil0crypt.cc @@ -1767,7 +1767,7 @@ fil_crypt_rotate_page( return; } - if (space == TRX_SYS_SPACE && offset == TRX_SYS_PAGE_NO) { + if (space_id == TRX_SYS_SPACE && offset == TRX_SYS_PAGE_NO) { /* don't encrypt this as it contains address to dblwr buffer */ return; } diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 6aacdd48ad8..6f219bb5d20 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -15267,6 +15267,25 @@ ha_innobase::defragment_table( for (index = dict_table_get_first_index(table); index; index = dict_table_get_next_index(index)) { + if (dict_index_is_corrupted(index)) { + continue; + } + + if (dict_index_is_spatial(index)) { + /* Do not try to defragment spatial indexes, + because doing it properly would require + appropriate logic around the SSN (split + sequence number). */ + continue; + } + + if (index->page == FIL_NULL) { + /* Do not defragment auxiliary tables related + to FULLTEXT INDEX. */ + ut_ad(index->type & DICT_FTS); + continue; + } + if (one_index && strcasecmp(index_name, index->name) != 0) { continue; } diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc index 27fa7e84aa3..a5b919b424d 100644 --- a/storage/innobase/handler/handler0alter.cc +++ b/storage/innobase/handler/handler0alter.cc @@ -300,7 +300,6 @@ my_error_innodb( break; case DB_OUT_OF_FILE_SPACE: my_error(ER_RECORD_FILE_FULL, MYF(0), table); - ut_error; break; case DB_TEMP_FILE_WRITE_FAIL: my_error(ER_TEMP_FILE_WRITE_FAILURE, MYF(0)); diff --git a/storage/xtradb/btr/btr0cur.cc b/storage/xtradb/btr/btr0cur.cc index 454b085862c..78683f35028 100644 --- a/storage/xtradb/btr/btr0cur.cc +++ b/storage/xtradb/btr/btr0cur.cc @@ -3948,7 +3948,7 @@ static const unsigned rows_in_range_max_retries = 4; /** We pretend that a range has that many records if the tree keeps changing for rows_in_range_max_retries retries while we try to estimate the records in a given range. */ -static const int64_t rows_in_range_arbitrary_ret_val = 10; +static const ib_int64_t rows_in_range_arbitrary_ret_val = 10; /** Estimates the number of rows in a given index range. @param[in] index index @@ -3966,7 +3966,7 @@ rows_in_range_arbitrary_ret_val as a result (if nth_attempt >= rows_in_range_max_retries and the tree is modified between the two dives). */ static -int64_t +ib_int64_t btr_estimate_n_rows_in_range_low( dict_index_t* index, const dtuple_t* tuple1, @@ -4102,7 +4102,7 @@ btr_estimate_n_rows_in_range_low( return(rows_in_range_arbitrary_ret_val); } - const int64_t ret = + const ib_int64_t ret = btr_estimate_n_rows_in_range_low( index, tuple1, mode1, tuple2, mode2, trx, @@ -4168,7 +4168,7 @@ btr_estimate_n_rows_in_range_low( @param[in] mode2 search mode for range end @param[in] trx trx @return estimated number of rows */ -int64_t +ib_int64_t btr_estimate_n_rows_in_range( dict_index_t* index, const dtuple_t* tuple1, @@ -4177,7 +4177,7 @@ btr_estimate_n_rows_in_range( ulint mode2, trx_t* trx) { - const int64_t ret = btr_estimate_n_rows_in_range_low( + const ib_int64_t ret = btr_estimate_n_rows_in_range_low( index, tuple1, mode1, tuple2, mode2, trx, 1 /* first attempt */); diff --git a/storage/xtradb/fil/fil0crypt.cc b/storage/xtradb/fil/fil0crypt.cc index 60ab067d105..aa95de7efea 100644 --- a/storage/xtradb/fil/fil0crypt.cc +++ b/storage/xtradb/fil/fil0crypt.cc @@ -1951,7 +1951,7 @@ fil_crypt_rotate_page( return; } - if (space == TRX_SYS_SPACE && offset == TRX_SYS_PAGE_NO) { + if (space_id == TRX_SYS_SPACE && offset == TRX_SYS_PAGE_NO) { /* don't encrypt this as it contains address to dblwr buffer */ return; } diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc index 742c03b5404..11779a66e7c 100644 --- a/storage/xtradb/handler/ha_innodb.cc +++ b/storage/xtradb/handler/ha_innodb.cc @@ -13277,6 +13277,17 @@ ha_innobase::defragment_table( for (index = dict_table_get_first_index(table); index; index = dict_table_get_next_index(index)) { + if (dict_index_is_corrupted(index)) { + continue; + } + + if (index->page == FIL_NULL) { + /* Do not defragment auxiliary tables related + to FULLTEXT INDEX. */ + ut_ad(index->type & DICT_FTS); + continue; + } + if (one_index && strcasecmp(index_name, index->name) != 0) { continue; } diff --git a/storage/xtradb/handler/handler0alter.cc b/storage/xtradb/handler/handler0alter.cc index 8aaf5cd83bc..a521db3ce25 100644 --- a/storage/xtradb/handler/handler0alter.cc +++ b/storage/xtradb/handler/handler0alter.cc @@ -134,7 +134,6 @@ my_error_innodb( break; case DB_OUT_OF_FILE_SPACE: my_error(ER_RECORD_FILE_FULL, MYF(0), table); - ut_error; break; case DB_TEMP_FILE_WRITE_FAILURE: my_error(ER_GET_ERRMSG, MYF(0), |