← Back to team overview

drizzle-discuss team mailing list archive

Re: File Deletion issues for Storage Engines


Hi Toru,

I agree that (1) would make the job very simple for engine developers. And there is probably no reason why this should not work.

But it makes me wonder about something else: where is the list of tables coming from?

In MySQL it is simple:

The list of databases is the list of directories in the data directory, and
the list of tables is the list of .FRM files in the directories.

In Drizzle, how is the list of table built?

On Dec 11, 2009, at 3:45 AM, Toru Maesaka wrote:

Hi Paul, Jobin,

Awesome! We should discuss how StorageEngine::doDropDatabase() should
be done. I think there are several approaches so lemmie jot down my

(1) doDropDatabase() will provide a reference to a vector that
contains table names (full path) as a parameter. The storage engine
would then use each string to remove the file(s).

(2) Engine calls StorageEngine::doGetTableNames() inside
doDropDatabase() and deletes files based on that information. This
means we need easy access to CachedDirectory.

(3) Engine maintains/housekeeps paths to files that it had generated.
doDropDatabase() will provide a path to the directory.

Personally, I'm towards (1) since this would make the implementation
easy and short :)


On Fri, Dec 11, 2009 at 11:27 AM, Jobin Augustine <jobinau@xxxxxxxxx> wrote:
I think the option :

Let storage engine manage the files of it.
(including the deletion)

is the right approach.

Thank you,

Toru Maesaka <dev@xxxxxxxxx>

Paul McCullagh
PrimeBase Technologies

Follow ups