Hi Kay! This is awesome to hear. So if I didn't misunderstand, does this mean that we can logically separate the lexical analyzer and the parse tree generator at the point you feed it out to the SQL warning? This would be exciting!
> Currently there's no support to dump the structure of that, although there's > support for getting the query text back (in a "normalized" form). > I suppose we can take a good, hard stare the various print methods and > abstract something out of that, then reimplement print in terms of that. Right, so I'm pretty naive on this... would you be able to explain the goodness we can achieve from this? Totally looking forward to your branch on Launchpad :) Cheers, Toru On Fri, May 15, 2009 at 2:05 AM, Kay Röpke <[email protected]> wrote: > Hi Toru (and drizzle-discuss folks :))! > > While sitting in sunny Spain, I've decided to play around with dumping the > token stream from a query into a SQL warning. > Surprisingly enough, it works :) > Since I didn't have a working drizzled environment on my laptop and just a > rather old 5.1.23 MySQL branch (and no network access), I used that, but > porting it to 5.1.3x should be trivial. > Next I'll try to get it working for drizzle (since doing the same for MySQL > is rather pointless) and will push a branch to Launchpad, just in case you > are interested. > I'll send a mail to you and drizzle-discuss once that's done. > > I also did some digging around the item tree stuff, and it does have one > Cond_traverser visitor function that's being used for the condition pushdown > for NDB (nothing else implements it for now). > So one step is already supported in the current MySQL (not sure if that code > still lives in drizzled, though). > The only complication is: this will just give us the parts that actually are > represented by the item trees (where-, having-, ON-, groupby-clauses etc). > Actual statements have more logic to them, e.g. joins and unions are > represented by different classes which contain each other (possibly with a > "fake" structure at the top representing the union). > > Currently there's no support to dump the structure of that, although there's > support for getting the query text back (in a "normalized" form). > I suppose we can take a good, hard stare the various print methods and > abstract something out of that, then reimplement print in terms of that. > > cheers, > -k > -- > Kay Roepke > Software Engineer, MySQL Enterprise Tools > > Sun Microsystems GmbH Sonnenallee 1, DE-85551 Kirchheim-Heimstetten > Geschaeftsfuehrer: Thomas Schroeder, Wolfang Engels, Wolf Frenkel > Vorsitz d. Aufs.rat.: Martin Haering HRB MUC 161028 > > -- Toru Maesaka <[email protected]> _______________________________________________ Mailing list: https://launchpad.net/~drizzle-discuss Post to : [email protected] Unsubscribe : https://launchpad.net/~drizzle-discuss More help : https://help.launchpad.net/ListHelp

