Roy Lyseng wrote:
Toru Maesaka wrote:
Hi,
So, all of the above functions would need to be altered to not need the
Session object (all of them can be.) and we'd want to pass in the
mem_root
pointer to the parse function instead of the Session object.
Thanks for pointing out the bits and pieces! I guess I can start
looking into this but it might take some time since I haven't quite
mastered this area of the codebase yet. After that, I'll try and
design a structure and API for the Parse Tree that the parser will
work with... though I suspect its not going to be easy.
You'd better get a copy of a fairly recent SQL standard document before
you create this API...
There's no need. We have you. ;P
The idea here is that a plugin should not be passed any more information
<snip>
Keep in mind that you need to propagate error information back from
parsing. I guess you do not want to do that through a thread-specific
THD object, so passing a status object (diagnostics object?) to the
parser may be a good idea.
Actually, I was thinking we could just have the parse tree object have a
vector of error codes/objects. That way, no need for a separate
parameter to sql_parse().
The caller could just do:
if (! sql_parse(&node, query, query_len))
{
session->appendErrors(node->getErrors());
...
}
or something like that... :)
-j
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help : https://help.launchpad.net/ListHelp