summaryrefslogtreecommitdiff
path: root/sql/ha_innobase.cc
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2001-11-05 01:04:08 +0200
committerunknown <monty@hundin.mysql.fi>2001-11-05 01:04:08 +0200
commitd18a6cc33a220e056dfa1633b928ac0b1415789d (patch)
tree1750cfa3cfd660f20d5055a78caff42a53363247 /sql/ha_innobase.cc
parentcec36f0f14b6c885aabe4eb989fb9ff4a4ae6a7c (diff)
downloadmariadb-git-d18a6cc33a220e056dfa1633b928ac0b1415789d.tar.gz
Fixes up things after merge from 3.23.44
Portability fixes. Don't delete temporary tables on FLUSH tables. client/client_priv.h: Fix after merge client/mysqldump.c: Fix after merge include/my_global.h: Change CMP -> CMP_NUM because CMP was used in other places include/violite.h: Added missing prototype myisam/ft_boolean_search.c: Removed warnings myisam/ft_nlq_search.c: Removed warnings myisam/mi_search.c: CMP -> CMP_NUM mysql-test/mysql-test-run.sh: Write all logs to log directory mysql-test/r/func_time.result: Fix test results after merge mysql-test/r/having.result: Fix test results after merge mysql-test/r/join.result: Fix test results after merge mysql-test/r/rpl000012.result: Fix test results after merge mysys/mf_iocache.c: Allow multiple call to end_iocache. sql/ha_innobase.cc: Removed possible problem with using uninitialized variable sql/log_event.cc: Don't delete temporary tables on FLUSH tables. (Needs to be fixed properly)
Diffstat (limited to 'sql/ha_innobase.cc')
-rw-r--r--sql/ha_innobase.cc60
1 files changed, 29 insertions, 31 deletions
diff --git a/sql/ha_innobase.cc b/sql/ha_innobase.cc
index dd72bb15473..4f3560290cf 100644
--- a/sql/ha_innobase.cc
+++ b/sql/ha_innobase.cc
@@ -2002,47 +2002,45 @@ ha_innobase::change_active_index(
index, even if it was internally generated by
InnoDB */
{
- row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt;
- KEY* key;
-
- statistic_increment(ha_read_key_count, &LOCK_status);
-
- DBUG_ENTER("index_read_idx");
+ row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt;
+ KEY* key;
- active_index = keynr;
+ statistic_increment(ha_read_key_count, &LOCK_status);
+ DBUG_ENTER("index_read_idx");
- if (keynr != MAX_KEY && table->keys > 0) {
- key = table->key_info + active_index;
+ active_index = keynr;
- prebuilt->index = dict_table_get_index_noninline(
- prebuilt->table, key->name);
- } else {
- prebuilt->index = dict_table_get_first_index_noninline(
- prebuilt->table);
- }
+ if (keynr != MAX_KEY && table->keys > 0)
+ {
+ key = table->key_info + active_index;
- if (!prebuilt->index) {
- fprintf(stderr,
- "InnoDB: Could not find key n:o %u with name %s from dict cache\n"
- "InnoDB: for table %s\n", keynr, key->name, prebuilt->table->name);
+ prebuilt->index=dict_table_get_index_noninline(prebuilt->table, key->name);
+ if (!prebuilt->index)
+ {
+ fprintf(stderr,
+ "InnoDB: Could not find key n:o %u with name %s from dict cache\n"
+ "InnoDB: for table %s\n", keynr, key->name,
+ prebuilt->table->name);
+ return(1);
+ }
+ }
+ else
+ prebuilt->index = dict_table_get_first_index_noninline(prebuilt->table);
- return(1);
- }
-
- assert(prebuilt->search_tuple);
+ assert(prebuilt->search_tuple);
- dtuple_set_n_fields(prebuilt->search_tuple, prebuilt->index->n_fields);
+ dtuple_set_n_fields(prebuilt->search_tuple, prebuilt->index->n_fields);
- dict_index_copy_types(prebuilt->search_tuple, prebuilt->index,
- prebuilt->index->n_fields);
+ dict_index_copy_types(prebuilt->search_tuple, prebuilt->index,
+ prebuilt->index->n_fields);
- /* Maybe MySQL changes the active index for a handle also
- during some queries, we do not know: then it is safest to build
- the template such that all columns will be fetched */
+ /* Maybe MySQL changes the active index for a handle also
+ during some queries, we do not know: then it is safest to build
+ the template such that all columns will be fetched */
- build_template(prebuilt, user_thd, table, ROW_MYSQL_WHOLE_ROW);
+ build_template(prebuilt, user_thd, table, ROW_MYSQL_WHOLE_ROW);
- DBUG_RETURN(0);
+ DBUG_RETURN(0);
}
/**************************************************************************