List:Internals« Previous MessageNext Message »
From:Konstantin Osipov Date:August 16 2005 12:43pm
Subject:Re: Question about using the MySQL SQL parser
View as plain text  
* Philip Stoev <philip@stripped> [05/08/04 10:51]:

> I would like to ask if you think it is possible to give the SQL parser in
> sql_yacc.yy a Perl interface so that it can be used to produce parse trees
> for statements fed directly into it. The rationale of this is that such a
> parser would be almost self-maintaining since it will always use the SQL
> schema and parsing code from the most recent MySQL version.
> 
> The way I see it, one can set up a fake TID object (mabe even fake the IO)
> and call mysql_stmt_prepare directly and then reap the results without any
> changes to the actual MySQL code.
> 
> However this soon turns into a linkage nightmare. In my humble opinion
> mysql_stmt_prepare ultimately depends on variables declared in mysqld.cc,
> which in turn has a main() function that I do not really want to bring in.
> 
> Any pointers would be much appreciated, including links to other projects
> that attempt to reuse portions of MySQL's code base. Please accept my
> apologies if all this is complete nonsense.

Could you elaborate more on the goal the project?
What do you need the parse trees for?

-- 
Konstantin Osipov, Software Developer
MySQL AB, www.mysql.com
Thread
Question about using the MySQL SQL parserPhilip Stoev26 Jul
  • Re: Question about using the MySQL SQL parserKonstantin Osipov16 Aug
  • Re: Question about using the MySQL SQL parserPhilip Stoev16 Aug
    • Re: Question about using the MySQL SQL parserBrian Aker16 Aug