← Back to team overview

drizzle-discuss team mailing list archive

Re: File Deletion issues for Storage Engines


Hi Ann,

Agreed! I think your solution fits (3) in my previous email.

I think it's a good solution but one catchy thing is that if the
Drizzle kernel already has this information on memory, it makes sense
to reuse it rather than allocating more memory inside the engine for
the same information. Also, the engine will have to take care of
making this information persistently available (so it still remembers
the table names when drizzled is restarted).

This is why I'm towards (1), meaning I'm lazy heh. But to be honest I
don't mind either solutions:

/* Storage Engine does housekeeping. Alternatively, the argument could
be a reference to std::string */
int StorageEngine::doDropDatabase(const char *database_name);

/* Storage Engine can be lazy and not do any housekeeping */
int StorageEngine::doDropDatabase(vector<string> &list_of_tables);

Jay, Stewart, do you guys have any tips for this?


On Sat, Dec 12, 2009 at 12:46 AM, Ann W. Harrison <ann@xxxxxxxxx> wrote:
> Toru Maesaka wrote:
>> (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).
> Why wouldn't the storage engine itself know which databases are in
> which files - or vice versa?  In MySQL that's a problem because the
> server creates the .frm, but for Drizzle, let the storage engines
> handle all issues of files and get the server away from assumptions
> about file == table.   There are potential storage engines that
> don't follow that model.
> Best regards,
> Ann

Toru Maesaka <dev@xxxxxxxxx>

Follow ups