Bug#17431533 : FAILING ASSERTION: INDEX->PAGE != 0XFFFFFFFF AFTER DISCARDING TABLESPACE

ha_innobase::records_in_range() should return HA_POS_ERROR for the table during discarded without requesting pages.
The later other handler method should treat the error correctly.

Approved by Sunny in rb#3433
This commit is contained in:
Yasufumi Kinoshita 2013-10-07 15:16:31 +09:00
parent 797a49f848
commit 4db0c831a5
2 changed files with 11 additions and 0 deletions

View File

@ -6454,6 +6454,11 @@ ha_innobase::records_in_range(
index = dict_table_get_index_noninline(prebuilt->table, key->name); index = dict_table_get_index_noninline(prebuilt->table, key->name);
if (prebuilt->table->ibd_file_missing) {
n_rows = HA_POS_ERROR;
goto func_exit;
}
range_start = dtuple_create_for_mysql(&heap1, key->key_parts); range_start = dtuple_create_for_mysql(&heap1, key->key_parts);
dict_index_copy_types(range_start, index, key->key_parts); dict_index_copy_types(range_start, index, key->key_parts);
@ -6503,6 +6508,8 @@ ha_innobase::records_in_range(
my_free(key_val_buff2, MYF(0)); my_free(key_val_buff2, MYF(0));
func_exit:
prebuilt->trx->op_info = (char*)""; prebuilt->trx->op_info = (char*)"";
/* The MySQL optimizer seems to believe an estimate of 0 rows is /* The MySQL optimizer seems to believe an estimate of 0 rows is

View File

@ -7523,6 +7523,10 @@ ha_innobase::records_in_range(
/* There exists possibility of not being able to find requested /* There exists possibility of not being able to find requested
index due to inconsistency between MySQL and InoDB dictionary info. index due to inconsistency between MySQL and InoDB dictionary info.
Necessary message should have been printed in innobase_get_index() */ Necessary message should have been printed in innobase_get_index() */
if (prebuilt->table->ibd_file_missing) {
n_rows = HA_POS_ERROR;
goto func_exit;
}
if (UNIV_UNLIKELY(!index)) { if (UNIV_UNLIKELY(!index)) {
n_rows = HA_POS_ERROR; n_rows = HA_POS_ERROR;
goto func_exit; goto func_exit;