From a1ac083fc324d729d3347d7e7c418a08f11cae9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Tue, 22 Jun 2010 14:52:15 +0300 Subject: Bug#54686 "field->col->mtype == type" assertion error at row/row0sel.c ha_innobase::index_read(), ha_innobase::records_in_range(): Check that the index is useable before invoking row_sel_convert_mysql_key_to_innobase(). This fix is based on a suggestion by Yasufumi Kinoshita. --- storage/innodb_plugin/handler/ha_innodb.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'storage') diff --git a/storage/innodb_plugin/handler/ha_innodb.cc b/storage/innodb_plugin/handler/ha_innodb.cc index 34249b7718a..3f8dc97e4b5 100644 --- a/storage/innodb_plugin/handler/ha_innodb.cc +++ b/storage/innodb_plugin/handler/ha_innodb.cc @@ -5379,6 +5379,9 @@ ha_innobase::index_read( prebuilt->index_usable = FALSE; DBUG_RETURN(HA_ERR_CRASHED); } + if (UNIV_UNLIKELY(!prebuilt->index_usable)) { + DBUG_RETURN(HA_ERR_TABLE_DEF_CHANGED); + } /* Note that if the index for which the search template is built is not necessarily prebuilt->index, but can also be the clustered index */ @@ -7221,6 +7224,10 @@ ha_innobase::records_in_range( n_rows = HA_POS_ERROR; goto func_exit; } + if (UNIV_UNLIKELY(!row_merge_is_index_usable(prebuilt->trx, index))) { + n_rows = HA_ERR_TABLE_DEF_CHANGED; + goto func_exit; + } heap = mem_heap_create(2 * (key->key_parts * sizeof(dfield_t) + sizeof(dtuple_t))); -- cgit v1.2.1 From 31939e0d14efb4d0c2aa02cb4805aab398c1db73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Tue, 22 Jun 2010 14:59:49 +0300 Subject: ChangeLog for Bug#54686 "field->col->mtype == type" assertion error at row/row0sel.c --- storage/innodb_plugin/ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'storage') diff --git a/storage/innodb_plugin/ChangeLog b/storage/innodb_plugin/ChangeLog index 3be5373f3af..085edd8ad83 100644 --- a/storage/innodb_plugin/ChangeLog +++ b/storage/innodb_plugin/ChangeLog @@ -1,3 +1,9 @@ +2010-06-22 The InnoDB Team + + * handler/ha_innodb.cc: + Fix Bug#54686: "field->col->mtype == type" assertion error at + row/row0sel.c + 2010-06-21 The InnoDB Team * dict/dict0load.c, fil/fil0fil.c: -- cgit v1.2.1