List:Internals« Previous MessageNext Message »
From:Padraig O'Sullivan Date:October 13 2010 9:25pm
Subject:Re: Query Rewriting Plugin
View as plain text  
Hi Sergei!

Thanks for the quick reply.

On Wed, Oct 13, 2010 at 4:52 PM, Sergei Golubchik <serg@stripped> wrote:
> Hi, Padraig!
>
> On Oct 13, Padraig O'Sullivan wrote:
>> Hi!
>>
>> I have a patch with a new plugin point for query rewriting that I'd
>> like to have considered. It allows someone to develop a plugin which
>> can modify the text of a query before it is parsed.
>
> What are the use cases?
> Do you have any practical examples?
>
> Just to make it clear - I'm not referring to the query rewriting in
> general, but precisely to your rewriting API, as you've implemented it.
> What are the use cases for it? Can you show any practical rewriting
> plugins that are built on this your API?

A very simple explanation of my use-case is to transform a query with
joins into a query on virtual tables that contains no joins. I need
this transformation to be transparent to the user who can submit their
original queries as before. I picked this point for the plugin as its
much easier for me to parse the query myself than to work with the
parse tree produced by MySQL.

One other possible use-case which I had thought of is to implement a
scheme for preventing SQL injection as a query rewriting plugin. This
occured to me when reading this paper -
http://www.springerlink.com/content/j2efhxbrf83xmd5g/ The proxy
described in the paper could be implemented as a rewriting plugin. Not
sure if its a real use-case but its just me thinking out loud.

>
>> I have my work in a branch on launchpad
>> (lp:~posulliv/mysql-server/query-rewrite) but I'm not familiar with
>> the procedure to get code considered for MySQL. I'm wondering what is
>> the preferred method to have this patch considered? Should I propose
>> the branch for merging on launchpad or should I send a patch to this
>> mailing list?
>>
>> Any pointers to the procedure I should follow would be awesome.
>
> Here: http://forge.mysql.com/wiki/Contributing_Code

Cool, thanks. I sent a copy of the SCA to the email address listed on
that page today. After I hear back from them, should I just send a
patch to the list?

Thanks,
-Padraig

>
> Regards,
> Sergei
>
Thread
Query Rewriting PluginPadraig O'Sullivan13 Oct
  • Re: Query Rewriting PluginSergei Golubchik13 Oct
    • Re: Query Rewriting PluginPadraig O'Sullivan13 Oct
      • Re: Query Rewriting PluginPeter Benjamin Volk13 Oct
      • Re: Query Rewriting PluginSergei Golubchik14 Oct
      • Re: Query Rewriting PluginLenz Grimmer14 Oct
        • Re: Query Rewriting PluginPadraig O'Sullivan15 Oct