Hi, Vyacheslav!
On May 16, Vyacheslav Akhmechet wrote:
> I am implementing delete_table, and I need to get access to key names
> for the table I'm deleting (I'm storing an index for each key in a
> separate file, e.g. testtable_somekey.index). When I try to access
> handler's table_share or table structures, they appear not to be
> populated (I'm not sure if the data was freed already, or if it was
> never populated in the first place given the use case).
Never populated. MySQL doesn't open the table it wants to drop.
> What's the easiest way to do this?
You have to store this piece of metadata elsewhere. For example, in the
table file, in the header. Or in a separate file, testtable.index_list.
Or on the filesystem (if all index files are called
testtable_somekey.index you can simply delete all testtable_*.index
files). Or something.
Regards / Mit vielen Grüßen,
Sergei
--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Sergei Golubchik <serg@stripped>
/ /|_/ / // /\ \/ /_/ / /__ Principal Software Engineer/Server Architect
/_/ /_/\_, /___/\___\_\___/ Sun Microsystems GmbH, HRB München 161028
<___/ Sonnenallee 1, 85551 Kirchheim-Heimstetten
Geschäftsführer: Thomas Schroeder, Wolfgang Engels, Wolf Frenkel
Vorsitzender des Aufsichtsrates: Martin Häring