summaryrefslogtreecommitdiff
path: root/sql/handler.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-02-01 19:59:24 +0100
committerSergei Golubchik <serg@mariadb.org>2017-02-13 18:12:05 +0100
commit4dd7e11332cab9eb07551062f3ba0f696d9602e3 (patch)
treef2594272ca663e744d96be05c5aea9ed62060e76 /sql/handler.cc
parentbf8f70a47c0fb606b52ecea94dd450b22cd02098 (diff)
downloadmariadb-git-4dd7e11332cab9eb07551062f3ba0f696d9602e3.tar.gz
cleanup: mark_columns_used_by_index_no_reset in handler::get_auto_increment
use table->mark_columns_used_by_index, don't copy it
Diffstat (limited to 'sql/handler.cc')
-rw-r--r--sql/handler.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/sql/handler.cc b/sql/handler.cc
index 2aa905f70f6..d32b13ef5fb 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -3222,11 +3222,9 @@ void handler::get_auto_increment(ulonglong offset, ulonglong increment,
{
ulonglong nr;
int error;
+ MY_BITMAP *old_read_set;
- (void) extra(HA_EXTRA_KEYREAD);
- table->mark_columns_used_by_index_no_reset(table->s->next_number_index,
- table->read_set);
- column_bitmaps_signal();
+ old_read_set= table->mark_columns_used_by_index(table->s->next_number_index);
if (ha_index_init(table->s->next_number_index, 1))
{
@@ -3278,7 +3276,7 @@ void handler::get_auto_increment(ulonglong offset, ulonglong increment,
nr= ((ulonglong) table->next_number_field->
val_int_offset(table->s->rec_buff_length)+1);
ha_index_end();
- (void) extra(HA_EXTRA_NO_KEYREAD);
+ table->restore_column_maps_after_mark_index(old_read_set);
*first_value= nr;
return;
}