On Wednesday 06 June 2001 14:47, Manish Chakrabarti wrote:
> I have a mysql question. I am looking for a pretty robust SQL
> parser/query engine
> which is also "transparent" in the sense that one can go into it and
> modify the query
> processing parts (i.e. "actions")?
>
> Does MySQL source distribution include the lex/yacc files specifying the
> SQL grammar, and also are there some "hooks" into the parser/query
> processing engine
> of MySQL?
> So that I can have handles into the parse tree (which I plan to use for
> my purpose)
> and replace the query plan execution modules by my own code.
> I could not find this talked about in the mysql maling lists. I am
> basically interested in extracting the query parsing engine out of
> mysql.
> Is it possible to do that?
Yes - take a look at sql/sql_yacc.yy and handler.h/handler.cc. You can easily
plug in your our low-level database code by extending the handler class and
implementing all pure virtual methods.
--
MySQL Development Team
For technical support contracts, go to https://order.mysql.com/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Sasha Pachev <sasha@stripped>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, http://www.mysql.com/
/_/ /_/\_, /___/\___\_\___/ Provo, Utah, USA
<___/