List:Commits« Previous MessageNext Message »
From:marko.makela Date:June 22 2010 11:52am
Subject:bzr commit into mysql-5.1-innodb branch (marko.makela:3517) Bug#54686
View as plain text  
#At file:///home/marko/innobase/dev/mysql2a/5.1-innodb/ based on revid:marko.makela@strippedk8k68dpj080u

 3517 Marko Mäkelä	2010-06-22
      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.

    modified:
      storage/innodb_plugin/handler/ha_innodb.cc
=== modified file 'storage/innodb_plugin/handler/ha_innodb.cc'
--- a/storage/innodb_plugin/handler/ha_innodb.cc	revid:marko.makela@stripped5148-8g73k8k68dpj080u
+++ b/storage/innodb_plugin/handler/ha_innodb.cc	revid:marko.makela@stripped5-kxtzx7xuugcxd375
@@ -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)));

Attachment: [text/bzr-bundle] bzr/marko.makela@oracle.com-20100622115215-kxtzx7xuugcxd375.bundle
Thread
bzr commit into mysql-5.1-innodb branch (marko.makela:3517) Bug#54686marko.makela22 Jun