The Example storage engine is meant to serve mainly as a code example of the stub of a storage engine for example purposes only (or so the code comment at the start of ha_example.cc reads). In reality however, it’s not very useful. It likely was back in 2004 when it could be used as a starting point for starting some simple new engines (my guess would be that more than a few of the simpler engines started from ha_example.cc).
The sad reality is the complexity of the non-obviousness of the bits o the storage engine API you actually care about are documented in ha_ndbcluster.cc, ha_myisam.cc and ha_innodb.cc. If you’re doing something that isn’t already done by one of those three engines: good luck.
Whenever I looked at ha_example.cc I always wished there was something more behind it… basically hoping that InnoDB would get a better and cleaner API with the server and would use that rather than the layering violations it has to do the interesting stuff.
That all being said, as a starting point, it probably helped spawn at least a dozen storage engines.
Unfortunately, ha_example is not useful for anyone wanting to implement a transactional store. Even FederatedX is better for that.
csv (tina engine) shows a bit more in practical terms, although it’s pretty hacky.
But I do agree, for serious stuff you need to look at the code of some of the “bigger” engines.
New #mysql planet post : The EXAMPLE storage engine http://t.co/8xHZpheIsB
The EXAMPLE storage engine: The Example storage engine is meant to serve mainly as a code example of the stub … http://t.co/fa16jGu4dA
Perhaps ha_tokudb.cc will join ha_ndbcluster.cc, ha_myisam.cc, and ha_innodb.cc now as a useful source of information on SE API.
I’m going to look at archive since it is a good example of an append-only store. I want to experiment with creating a fastbit storage engine.
http://crd-legacy.lbl.gov/~kewu/fastbit/index.html
Valerii Kravchuk liked this on Facebook.
Laurynas Biveinis liked this on Facebook.
http://bugs.mysql.com/bug.php?id=49329