← Back to team overview

maria-developers team mailing list archive

Feature Request - Working auto_increment on BlackHole Engine

 

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

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

Even with InnoDB log files and tablespace on tmpfs
this makes the performance nosedive by a factor of 4
if the trigger doesn't bother cleaning up the
auto-increment table, and a factor of 13 if it
deletes the record immediately after inserting it.
The actual times I tested with 24 inserter threads
on a 24-thread server are 8m vs. 30m vs. 105m, i.e.
a massive drop.

Is there an better place than this list for a
feature request?

Gordan


Follow ups