← Back to team overview

maria-developers team mailing list archive

Re: Feature Request - Working auto_inc rement on BlackHole Engine

 

On 05/15/2013 11:27 PM, Jocelyn Fournier wrote:
Hi Gordan,


Le 15/05/13 22:18, Gordan Bobic a écrit :
On 05/15/2013 09:06 PM, Michael Widenius wrote:

Hi!

"Gordan" == Gordan Bobic <gordan@xxxxxxxxxx> writes:

Gordan>  How difficult would be be to implement working
Gordan>  auto-increment functionality on the BlackHole engine?

Gordan>  This would be really useful for what I'm trying to do at
Gordan>  the moment. Since it is not available and there are no
Gordan>  sequences in MariaDB and MySQL, I have to resort to a
Gordan>  hack such as a single-int-field table doing the
Gordan>  auto-increment, and an insert trigger on the blackhole
Gordan>  table to insert a null into the auto-increment
Gordan>  tracking table, get LAST_INSERT_ID() to set the
Gordan>  value in the auto-increment table, and then delete
Gordan>  the record.

What problem is that you wanted to solve?
Normally blackhole is used just for creating a slave of a slave that
doesn't have to hold any data (only the logs).

The problem is a huge volume logging application that needs to have
uniquely enumerated records for auditing purposes.

Have you tried TokuDB engine ?

It isn't suitable for what I am doing in this case - note that the blackhole engine in this case suits all of my requirements except for the working auto_increment functionality. I don't need to store the data on these nodes, merely binlog it up for further processing downstream.

Gordan


References