List:Internals« Previous MessageNext Message »
From:Paul McCullagh Date:August 5 2008 9:48am
Subject:Re: How a storage engine write its own binlog
View as plain text  
Hi Yuan,

On Jul 30, 2008, at 3:55 PM, Yuan Wang wrote:

> We are developing a simple storage engine. This storage engine will
> implement a so called "fast update" feature. That is, when a record is
> updated, we only update the content in memory, no logging will be
> done. There is a backgrould thread which will check the modified
> records periodly and write logs. So, the storage engine itself will
> write binlog, but I don't know how to do this now. Basically, I have
> the following 4 questions:
>
> 1. There is a flag HA_HAS_OWN_BINLOGGING in the source, so I think if
> we declare this flag in ha_xxx::table_flags, MySQL will not write
> binlog?

NDB seems to be the only engine that uses this flag, and it looks like  
it means that the engine will call the binary logging functions itself.

So in the case, MySQL will not write the binlog.

> 2. How can I write binlog in my storage engine?

You will probably have to have a look how NDB is doing it.

> 3. Can I return HA_HAS_OWN_BINLOGGING in some cases but don't reture
> HA_HAS_OWN_BINLOGGING in other cases?

No, this won't work. AFAIK, the result of the call to table_flags() is  
cached by MySQL.

> 4. Can a transactional storage engine set the flag  
> HA_HAS_OWN_BINLOGGING

Yes.

> Help needed pls.
>
> -- 
> MySQL Internals Mailing List
> For list archives: http://lists.mysql.com/internals
> To unsubscribe:    http://lists.mysql.com/internals?unsub=1
>

Thread
How a storage engine write its own binlogYuan Wang30 Jul
  • Re: How a storage engine write its own binlogPaul McCullagh5 Aug
    • Re: How a storage engine write its own binlogBrian Aker5 Aug