diff options
author | Michael Widenius <monty@askmonty.org> | 2011-01-14 16:45:14 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2011-01-14 16:45:14 +0200 |
commit | 3c0a37fd1873532a19a8f57bbd7e81792aa8142f (patch) | |
tree | 2848b5bed81974fec2510512985e323d388ff85b | |
parent | d0e8dbc4a359d3fe354fff95e293bd1783ae009e (diff) | |
download | mariadb-git-3c0a37fd1873532a19a8f57bbd7e81792aa8142f.tar.gz |
Call always ha_index_init(), not index_init(), to ensure that active_index is set correctly.
Fixes failures in merge.test
-rw-r--r-- | sql/handler.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/handler.cc b/sql/handler.cc index 2190ab1776c..249699fae6d 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -2542,7 +2542,7 @@ void handler::get_auto_increment(ulonglong offset, ulonglong increment, table->mark_columns_used_by_index_no_reset(table->s->next_number_index, table->read_set); column_bitmaps_signal(); - index_init(table->s->next_number_index, 1); + ha_index_init(table->s->next_number_index, 1); if (table->s->next_number_keypart == 0) { // Autoincrement at key-start error=index_last(table->record[1]); @@ -2576,7 +2576,7 @@ void handler::get_auto_increment(ulonglong offset, ulonglong increment, else nr= ((ulonglong) table->next_number_field-> val_int_offset(table->s->rec_buff_length)+1); - index_end(); + ha_index_end(); (void) extra(HA_EXTRA_NO_KEYREAD); *first_value= nr; } @@ -4361,11 +4361,11 @@ int handler::index_read_idx_map(uchar * buf, uint index, const uchar * key, int error, error1; LINT_INIT(error1); - error= index_init(index, 0); + error= ha_index_init(index, 0); if (!error) { error= index_read_map(buf, key, keypart_map, find_flag); - error1= index_end(); + error1= ha_index_end(); } return error ? error : error1; } |