← Back to team overview

drizzle-discuss team mailing list archive

Re: BLOB streaming is looking for a home in drizzle

 



On 4/13/10 5:47 AM, "Diego Medina" <diego@xxxxxxxxxxxxx> wrote:

> On Mon, Apr 12, 2010 at 2:54 PM, Jay Pipes <jaypipes@xxxxxxxxx> wrote:
>> Hi Barry!
> 
>> 
>> As for the "post" hooks, have you checked out the replication API
>> hooks?  They have all the information you would need from the
>> post-execution perspective.  We would need to discuss whether the
>> existing plugin::Logging::pre() API contains enough information for
>> your needs.
> 
> Or maybe the query rewrite API could help in the "pre" hooks
>

The rewrite and Logging  APIs don't work because they are called before the
query is processed or even parsed which may be OK for 'drop' or 'rename'
table but not for anything else.


I think there are 2 separate plugin points needed:

1) The first plugin point is one that just notifies me when a table was
dropped or renamed, or when a records is deleted. These notification events
can take place before or after the event. For the 'delete' event I will need
the before image and in all cases it would be better if the statement had
already been parsed. So for these events the replication API should be OK.

2) The second  plugin point is one some where after the 'Insert' or 'Update'
statement has been processed but before the storage engine gets called. The
plugin call must allow for the possible modification of the data being
passed to the storage engine. I do not see any plugin that offers something
like this.


The ideal solution would be to just use existing plugin APIs or expand an
already existing API but I do not see how this could be done. I do not see
anyway of doing this with out introducing a new plugin type such as a
'data-filter' plugin that would would have 'pre' and 'post' calls and be
called from within the relevant cursor methods: drop_table(),
ha_write_row(), ha_update_row(), and ha_delete_row(). The only thing that
would be missing would be the rename table which would go into the
mysql_rename_table() function.


I am willing to take on this project if it is agreed that this is what is
needed. 

Barry

> 
> 
> 
>> 
>> Cheers!
>> 
>> jay
>> 
>> On Fri, Apr 9, 2010 at 5:06 PM, Barry Leslie <Barry.Leslie@xxxxxxxxxxxxx>
>> wrote:
>>> Hi,
>>> 
>>> I am once again porting the PBMD daemon to drizzle. I have done this several
>>> times only to have it die because there was never an acceptable way of
>>> plugging it in.
>>> 
>>> So this time I would like to do it the other way round and get a plug-in
>>> interface into drizzle that I can use for PBMS before trying to get PBMS
>>> into it itself.
>>> 
>>> If there was a trigger plug-in type then the PBMS daemon would just be a
>>> type of trigger plug-in. So the first question would be if anybody is
>>> working on a trigger plug-in? A full trigger plug-in would be much more than
>>> PBMS would need so if one doesn't exist then it would be best to create a
>>> base plug-in class that would work for PBMS and then be used as the base
>>> class for a trigger plug-in. If there is something out there that would
>>> fulfill this task then let me know.
>>> 
>>> The minimum requirements for the plug-in class that I need would be one that
>>> provides  "pre" and " post" actions for "insert", "update", and "delete"
>>> commands as well as "drop table" and "rename table" commands. The plug-in
>>> would need to allow for data modification to be performed in the 'pre'
>>> actions for "insert" and "update" commands.
>>> 
>>> I would be willing to take on this task if nobody else is working on a
>>> similar plug-in
>>> 
>>> Barry
>>> 
>>> -------------------------------------------------------------------------
>>> Barry Leslie
>>> 
>>> SNAP Innovation Softwareentwicklung GmbH
>>> Senior Software Engineer
>>> 
>>> Tel: (001) 250 884 1820
>>> Fax: (001) 250 595 4460
>>> Email: Barry.Leslie@xxxxxxxxxxxxx
>>> Web: www.PrimeBase.com
>>> 
>>> SNAP Innovation Softwareentwicklung GmbH, D-22765 Hamburg,
>>> Max-Brauer-Allee 50, Germany
>>> Amtsgericht Hamburg HRB 61066, Geschäftsführer: Ulrich Zimmer, Paul
>>> McCullagh
>>> -------------------------------------------------------------------------
>>> 
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~drizzle-discuss
>>> Post to     : drizzle-discuss@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~drizzle-discuss
>>> More help   : https://help.launchpad.net/ListHelp
>>> 
>> 
>> _______________________________________________
>> Mailing list: https://launchpad.net/~drizzle-discuss
>> Post to     : drizzle-discuss@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~drizzle-discuss
>> More help   : https://help.launchpad.net/ListHelp
>> 
> 
> 

-------------------------------------------------------------------------
Barry Leslie

SNAP Innovation Softwareentwicklung GmbH
Senior Software Engineer

Tel: (001) 250 884 1820
Fax: (001) 250 595 4460
Email: Barry.Leslie@xxxxxxxxxxxxx
Web: www.PrimeBase.com

SNAP Innovation Softwareentwicklung GmbH, D-22765 Hamburg,
Max-Brauer-Allee 50, Germany
Amtsgericht Hamburg HRB 61066, Geschäftsführer: Ulrich Zimmer, Paul
McCullagh
-------------------------------------------------------------------------






Follow ups

References