diff options
author | unknown <heikki@hundin.mysql.fi> | 2003-01-13 23:25:55 +0200 |
---|---|---|
committer | unknown <heikki@hundin.mysql.fi> | 2003-01-13 23:25:55 +0200 |
commit | aef4ae161aaa2d59a2cf0d037e5fabe59da8a5a1 (patch) | |
tree | 452ebd1f4c17e79958574b258b5f6d6127567b26 /sql/ha_innodb.cc | |
parent | 2b174c6da1dfab048d67a6788c5446d72dcd1572 (diff) | |
download | mariadb-git-aef4ae161aaa2d59a2cf0d037e5fabe59da8a5a1.tar.gz |
ha_innodb.cc:
Added some assertions to make sure index_init is only called with a properly prepared InnoDB table handle
sql/ha_innodb.cc:
Added some assertions to make sure index_init is only called with a properly prepared InnoDB table handle
Diffstat (limited to 'sql/ha_innodb.cc')
-rw-r--r-- | sql/ha_innodb.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index cfec8282e42..cb012d33572 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -1600,6 +1600,8 @@ build_template( ibool fetch_all_in_key = FALSE; ulint i; + ut_a(templ_type != ROW_MYSQL_REC_FIELDS || thd == current_thd); + clust_index = dict_table_get_first_index_noninline(prebuilt->table); if (!prebuilt->hint_no_need_to_fetch_extra_cols) { @@ -2466,7 +2468,9 @@ ha_innobase::index_read_last( } /************************************************************************ -Changes the active index of a handle. */ +Changes the active index of a handle. Note that since we build also the +template for a search, update_thd() must already have been called, in +::external_lock, for example. */ int ha_innobase::change_active_index( @@ -2481,6 +2485,10 @@ ha_innobase::change_active_index( statistic_increment(ha_read_key_count, &LOCK_status); DBUG_ENTER("change_active_index"); + ut_a(prebuilt->trx == + (trx_t*) current_thd->transaction.all.innobase_tid); + ut_a(user_thd == current_thd); + active_index = keynr; if (keynr != MAX_KEY && table->keys > 0) { |