On Sat, 31 Mar 2012 16:39:08 +0200, AugustQ <augustq@stripped> wrote:
> So what's wrong here?
You assumed the MySQL storage engine API was consistent and hard to
For the most part, the calls are "go set something up that's independent
of anything else that you can refer to later".
You can see this in the cond_push usage in NDB: see ha_ndbcluster.cc
It sets up a data structure that is later used to set up the operations
to send to the cluster. It does not rely on other things to be
i.e. don't do the work until you really, really, really have to.
This includes reporting errors and all sorts of things - go check out
all the ignored return values of rnd_init (this is fixed in Drizzle and
> Was I wrong with my assumption of the order in wich the functions are
> called? In the csv-engine the order of the function-calls is described
> as in my example above with the select-stmt.
CSV is a very, very simple engine and only really useful as an example
on how to do full table scans. For anything else, see ha_myisam.cc (for
simple things), ha_innodb.cc (for transactions) and ha_ndbcluster.cc for
just about every other feature.