[Commits] Rev 3015: Call always ha_index_init(), not index_init(), to ensure that active_index is set correctly. in lp:maria/5.1

Michael Widenius monty at askmonty.org
Fri Jan 14 16:45:15 EET 2011


At lp:maria/5.1

------------------------------------------------------------
revno: 3015
revision-id: monty at askmonty.org-20110114144514-qb0opxk80c576j3k
parent: monty at askmonty.org-20110112143252-054j7pvmvhs73cfj
committer: Michael Widenius <monty at askmonty.org>
branch nick: maria-5.1
timestamp: Fri 2011-01-14 16:45:14 +0200
message:
  Call always ha_index_init(), not index_init(), to ensure that active_index is set correctly.
  Fixes failures in merge.test
-------------- next part --------------
=== modified file 'sql/handler.cc'
--- a/sql/handler.cc	2011-01-10 21:22:40 +0000
+++ b/sql/handler.cc	2011-01-14 14:45:14 +0000
@@ -2542,7 +2542,7 @@ void handler::get_auto_increment(ulonglo
   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(ulonglo
   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 *
   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;
 }



More information about the commits mailing list