From: Stewart Smith Date: March 30 2011 7:06am Subject: Re: storage engine access to serialized version of a TABLE or TABLE_SHARE? List-Archive: http://lists.mysql.com/internals/38274 Message-Id: <877hbhozof.fsf@flamingspork.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Tue, 29 Mar 2011 08:53:03 +0200, Sergei Golubchik wrote: > 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. ARCHIVE also grabs the FRM, engine code is a bit simpler. Grabbing the FRM is how you implement discovery too, so that's why you can just pass around the ARZ file (as well as what NDB stores as a BLOB in its data dictionary). > 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 :( We do have this in Drizzle with the table protobuf message (the protobuf library rather nicely even has a serialize-to-human-readable-string part, which is extra nice in debugging). -- Stewart Smith