← Back to team overview

drizzle-discuss team mailing list archive

Re: Learning Storage Engine API

 

As a newcomer to drizzle, I would say that a skeleton engine is useful. It
will be even better if there are detailed comment in skeleton to show when
and how a storage interface is called by up layer.

For example, following documentaion in CSV engine

/*
  All table scans call this first.
  The order of a table scan is:
  ha_tina::info
  ha_tina::rnd_init
  ha_tina::extra
  ENUM HA_EXTRA_CACHE   Cash record in HA_rrnd()
  ha_tina::rnd_next
  ha_tina::rnd_next
  ha_tina::rnd_next
  ha_tina::rnd_next
  ha_tina::rnd_next
  ha_tina::rnd_next
  ha_tina::rnd_next
  ha_tina::rnd_next
  ha_tina::rnd_next
  ha_tina::extra
  ENUM HA_EXTRA_NO_CACHE   End cacheing of records (def)
  ha_tina::extra
  ENUM HA_EXTRA_RESET   Reset database to after open
  Each call to ::rnd_next() represents a row returned in the can. When no
more
  rows can be returned, rnd_next() returns a value of HA_ERR_END_OF_FILE.
  The ::info() call is just for the optimizer.
*/
is very useful for a newcomer. Without this piece of comment, maybe I figure
it out by tracing code, but it will cost me much more time.

Cheers,

Wei

2010/4/20 Brian Aker brian@xxxxxxxxxxx
>
>
> The skeleton was useful because it was a standalone engine that compiled
> outside of the MySQL tree. It acted as a starter framework for engine
> development.
>
>

References