List:Internals« Previous MessageNext Message »
From:Stewart Smith Date:March 30 2011 7:06am
Subject:Re: storage engine access to serialized version of a TABLE or TABLE_SHARE?
View as plain text  
On Tue, 29 Mar 2011 08:53:03 +0200, Sergei Golubchik <serg@stripped> 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
Thread
storage engine access to serialized version of a TABLE or TABLE_SHARE?Zardosht Kasheff29 Mar
  • Re: storage engine access to serialized version of a TABLE or TABLE_SHARE?Stewart Smith29 Mar
  • Re: storage engine access to serialized version of a TABLE orTABLE_SHARE?Sergei Golubchik29 Mar
    • Re: storage engine access to serialized version of a TABLE orTABLE_SHARE?Dmitry Lenev29 Mar
    • Re: storage engine access to serialized version of a TABLE or TABLE_SHARE?Stewart Smith30 Mar
Re: storage engine access to serialized version of a TABLE or TABLE_SHARE?Zardosht Kasheff29 Mar
  • Re: storage engine access to serialized version of a TABLE or TABLE_SHARE?Zardosht Kasheff30 Mar
    • Re: storage engine access to serialized version of a TABLE orTABLE_SHARE?Sergei Golubchik30 Mar
    • Re: storage engine access to serialized version of a TABLE or TABLE_SHARE?Stewart Smith30 Mar
      • Re: storage engine access to serialized version of a TABLE or TABLE_SHARE?Zardosht Kasheff30 Mar
        • Re: storage engine access to serialized version of a TABLE or TABLE_SHARE?Zardosht Kasheff30 Mar
          • Re: storage engine access to serialized version of a TABLE orTABLE_SHARE?Dmitry Lenev30 Mar
            • Re: storage engine access to serialized version of a TABLE or TABLE_SHARE?Zardosht Kasheff6 Apr
              • Re: storage engine access to serialized version of a TABLE or TABLE_SHARE?Jonas Oreland6 Apr
                • Re: storage engine access to serialized version of a TABLE or TABLE_SHARE?Stewart Smith7 Apr
                  • Re: storage engine access to serialized version of a TABLE or TABLE_SHARE?Zardosht Kasheff7 Apr
                    • Re: storage engine access to serialized version of a TABLE or TABLE_SHARE?Stewart Smith8 Apr
  • Re: storage engine access to serialized version of a TABLE or TABLE_SHARE?Stewart Smith30 Mar