| List: | Internals | « Previous MessageNext Message » | |
| From: | Sergei Golubchik | Date: | March 29 2011 6:53am |
| Subject: | Re: storage engine access to serialized version of a TABLE or TABLE_SHARE? | ||
| View as plain text | |||
Hi, Zardosht! On Mar 28, Zardosht Kasheff wrote: > Hello all, > > Is there a way for the storage engine to get some sort of byte stream > that represents a serialized version of a TABLE or TABLE_SHARE object? > The goal is to save it locally during handler::create and then check > its contents (as a sanity check) with the TABLE_SHARE passed in during > handler::open. > > Is this possible? And if it is, is there a way to take this serialized > data and print what the table looks like in user readable form? I'm afraid not. You can take the generated create table statement, like Stewart suggested, or grab the complete frm file, like NDB does. But I think it may be possible to construct an ALTER TABLE statement that modifies the table definition (frm) only, and your sanity check will fail on the next open. MySQL does not provide a way to serialize a table definition in a form that doesn't change by these ALTER's and change by all others. Unless the engine implements it internally :( Why do you need it - is the engine and frm going out of sync an issue for you? Like, does it happen often? Regards, Sergei
