List:Internals« Previous MessageNext Message »
From:Michael Widenius Date:June 7 2001 1:51pm
Subject:query engine and parser
View as plain text  
Hi!

>>>>> "Manish" == Manish Chakrabarti <manish@stripped>
> writes:

Manish> I have a mysql question. I am looking for a pretty robust SQL
Manish> parser/query engine
Manish> which is also "transparent" in the sense that one can go into it and
Manish> modify the query
Manish> processing parts (i.e. "actions")?

Manish> Does MySQL source distribution include the lex/yacc files specifying the
Manish> SQL grammar, and also are there some "hooks" into the parser/query
Manish> processing engine
Manish> of MySQL?

The lex and yacc files are the following:

sql/sql_yacc.yy
sql/sql_lex.cc
sql/sql_lex.h
sql/lex.h
sql/gen_lex_hash.cc

The last one is used to generate a perfect hash for the lexical
analyzer to quickly find out keywords.

It shouldn't be hard to add hooks to the sql_yacc.yy file to what you need.

Manish> So that I can have handles into the parse tree (which I plan to use for
Manish> my purpose)
Manish> and replace the query plan execution modules by my own code.

Manish> I could not find this talked about in the mysql maling lists. I am
Manish> basically interested in extracting the query parsing engine out of
Manish> mysql. 
Manish> Is it possible to do that?

Yes.

Regards,
Monty

Thread
query engine and parserManish Chakrabarti6 Jun
  • query engine and parserMichael Widenius7 Jun
  • Re: query engine and parserSasha Pachev7 Jun
  • SELECT ... INTO grammar enhancementAntony T Curtis8 Jun
    • SELECT ... INTO grammar enhancementMichael Widenius10 Jun
  • Re: SELECT ... INTO grammar enhancementAntony T Curtis8 Jun
  • Re: SELECT ... INTO grammar enhancementAntony T Curtis8 Jun
  • Re: SELECT ... INTO grammar enhancementPaul Cadach11 Jun
    • Re: SELECT ... INTO grammar enhancementMichael Widenius11 Jun
  • Re: SELECT ... INTO grammar enhancementCharlie Root11 Jun
    • Re: SELECT ... INTO grammar enhancementMichael Widenius11 Jun
      • MySQL Model: Re: SELECT ... INTO grammar enhancementRussell E Glaue11 Jun
        • Re: MySQL Model: Re: SELECT ... INTO grammar enhancementAntony T Curtis12 Jun
        • MySQL Model: Re: SELECT ... INTO grammar enhancementMichael Widenius12 Jun