~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/mi_extra.cc

  • Committer: Padraig O'Sullivan
  • Date: 2009-03-28 06:09:15 UTC
  • mto: (968.2.5 mordred)
  • mto: This revision was merged to the branch mainline in revision 971.
  • Revision ID: osullivan.padraig@gmail.com-20090328060915-46xg06g2lavjmbhn
Refactoring MyISAM storage engine again based on LIST replacement with
std::list.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
#include <string.h>
22
22
 
 
23
using namespace std;
 
24
 
23
25
static void mi_extra_keyflag(MI_INFO *info, enum ha_extra_function function);
24
26
 
25
27
 
272
274
    if (share->kfile >= 0 && my_close(share->kfile,MYF(0)))
273
275
      error=my_errno;
274
276
    {
275
 
      LIST *list_element ;
276
 
      for (list_element=myisam_open_list ;
277
 
           list_element ;
278
 
           list_element=list_element->next)
 
277
      list<MI_INFO *>::iterator it= myisam_open_list.begin();
 
278
      while (it != myisam_open_list.end())
279
279
      {
280
 
        MI_INFO *tmpinfo=(MI_INFO*) list_element->data;
 
280
        MI_INFO *tmpinfo= *it;
281
281
        if (tmpinfo->s == info->s)
282
282
        {
283
283
          if (tmpinfo->dfile >= 0 && my_close(tmpinfo->dfile,MYF(0)))
284
284
            error = my_errno;
285
285
          tmpinfo->dfile= -1;
286
286
        }
 
287
        ++it;
287
288
      }
288
289
    }
289
290
    share->kfile= -1;                           /* Files aren't open anymore */