List:Internals« Previous MessageNext Message »
From:Jay Pipes Date:June 13 2005 5:31pm
Subject:re: MyISAM and Pages
View as plain text  
In response to Dr. Hagen Höpfner, who asked:

"... MyISAM does not provide a page concept.
Studying the source code I now found some functions that seam to
handle pages, e.g. in myisam/mi_write.c ... As I understood correctly,
these functions regard the btree-index. Am I right?"

mi_write() performs the write of both the index pages, and 
the MyISAM record.  The index blocks are written first, in the
subroutines _mi_ck_write_btree() and _mi_ck_write_tree() (for 
bulk inserts).  Most of the functions in mi_write.c concern the
writing of these index blocks.  After the index blocks are
written (in mi_write()), you should see the code which looks 
something like:

  if (!(info->opt_flag & OPT_NO_ROWS))
  {
    if ((*share->write_record)(info,record))
      goto err;
    share->state.checksum+=info->checksum;
  }

I believe this is where the main record (non-paged isam) is written.
The write_record member variable is a function pointer to one of the 
read or write methods of the record cache, and is done this way to 
facilitate easy transition from memory writes to disk writes using 
the IO_CACHE struct.  Look at the _my_b_write macro(s) for more info-
rmation.  It's been a little while since I looked at the code for this,
so if I have gotten something incorrect, or missed something big, 
please let me (and Dr. Höpfner) know.

Cheers,

Jay Pipes

Thread
MyISAM and PagesHagen Höpfner13 Jun
re: MyISAM and PagesJay Pipes13 Jun
  • Re: re: MyISAM and PagesSergei Golubchik13 Jun