<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="ibd2sdi">
      </a>
      6.6.1 ibd2sdi — InnoDB Tablespace SDI Extraction Utility
     </h3>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045308545520">
  </a>
  <a class="indexterm" name="idm46045308544640">
  </a>
  <p>
   <a class="link" href="ibd2sdi.html" title="6.6.1 ibd2sdi — InnoDB Tablespace SDI Extraction Utility">
    <span class="command">
     <strong>
      ibd2sdi
     </strong>
    </span>
   </a>
   is a utility for extracting
   <a class="link" href="glossary.html#glos_serialized_dictionary_information" title="serialized dictionary information (SDI)">
    serialized
        dictionary information
   </a>
   (SDI) from
   <code class="literal">
    InnoDB
   </code>
   tablespace files. SDI data is present
        in all persistent
   <code class="literal">
    InnoDB
   </code>
   tablespace files.
  </p>
  <p>
   <a class="link" href="ibd2sdi.html" title="6.6.1 ibd2sdi — InnoDB Tablespace SDI Extraction Utility">
    <span class="command">
     <strong>
      ibd2sdi
     </strong>
    </span>
   </a>
   can be run on
   <a class="link" href="glossary.html#glos_file_per_table" title="file-per-table">
    file-per-table
   </a>
   tablespace files (
   <code class="filename">
    *.ibd
   </code>
   files),
   <a class="link" href="glossary.html#glos_general_tablespace" title="general tablespace">
    general
        tablespace
   </a>
   files (
   <code class="filename">
    *.ibd
   </code>
   files),
   <a class="link" href="glossary.html#glos_system_tablespace" title="system tablespace">
    system tablespace
   </a>
   files (
   <code class="filename">
    ibdata*
   </code>
   files), and the data
        dictionary tablespace (
   <code class="filename">
    mysql.ibd
   </code>
   ). It is
        not supported for use with temporary tablespaces or undo
        tablespaces.
  </p>
  <p>
   <a class="link" href="ibd2sdi.html" title="6.6.1 ibd2sdi — InnoDB Tablespace SDI Extraction Utility">
    <span class="command">
     <strong>
      ibd2sdi
     </strong>
    </span>
   </a>
   can be used at runtime or while the
        server is offline. During
   <a class="link" href="glossary.html#glos_ddl" title="DDL">
    DDL
   </a>
   operations,
   <a class="link" href="commit.html" title="15.3.1 START TRANSACTION, COMMIT, and ROLLBACK Statements">
    <code class="literal">
     ROLLBACK
    </code>
   </a>
   operations, and undo log purge operations related to SDI, there
        may be a short interval of time when
   <a class="link" href="ibd2sdi.html" title="6.6.1 ibd2sdi — InnoDB Tablespace SDI Extraction Utility">
    <span class="command">
     <strong>
      ibd2sdi
     </strong>
    </span>
   </a>
   fails to read SDI data stored in the tablespace.
  </p>
  <p>
   <a class="link" href="ibd2sdi.html" title="6.6.1 ibd2sdi — InnoDB Tablespace SDI Extraction Utility">
    <span class="command">
     <strong>
      ibd2sdi
     </strong>
    </span>
   </a>
   performs an uncommitted read of SDI
        from the specified tablespace. Redo logs and undo logs are not
        accessed.
  </p>
  <p>
   Invoke the
   <a class="link" href="ibd2sdi.html" title="6.6.1 ibd2sdi — InnoDB Tablespace SDI Extraction Utility">
    <span class="command">
     <strong>
      ibd2sdi
     </strong>
    </span>
   </a>
   utility like this:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa93534203"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">ibd2sdi <span class="token punctuation">[</span><em class="replaceable">options</em><span class="token punctuation">]</span> <em class="replaceable">file_name1</em> <span class="token punctuation">[</span><em class="replaceable">file_name2 file_name3 <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span></em><span class="token punctuation"></span><span class="token punctuation">]</span></code></pre>
  </div>
  <p>
   <a class="link" href="ibd2sdi.html" title="6.6.1 ibd2sdi — InnoDB Tablespace SDI Extraction Utility">
    <span class="command">
     <strong>
      ibd2sdi
     </strong>
    </span>
   </a>
   supports multi-file tablespaces like
        the
   <code class="literal">
    InnoDB
   </code>
   system tablespace, but it cannot
        be run on more than one tablespace at a time. For multi-file
        tablespaces, specify each file:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa83907022"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">ibd2sdi ibdata1 ibdata2</code></pre>
  </div>
  <p>
   The files of a multi-file tablespace must be specified in order
        of the ascending page number. If two successive files have the
        same space ID, the later file must start with the last page
        number of the previous file + 1.
  </p>
  <p>
   <a class="link" href="ibd2sdi.html" title="6.6.1 ibd2sdi — InnoDB Tablespace SDI Extraction Utility">
    <span class="command">
     <strong>
      ibd2sdi
     </strong>
    </span>
   </a>
   outputs SDI (containing id, type, and
        data fields) in
   <a class="link" href="json.html" title="13.5 The JSON Data Type">
    <code class="literal">
     JSON
    </code>
   </a>
   format.
  </p>
  <h4>
   <a name="idm46045308519136">
   </a>
   ibd2sdi Options
  </h4>
  <p>
   <a class="link" href="ibd2sdi.html" title="6.6.1 ibd2sdi — InnoDB Tablespace SDI Extraction Utility">
    <span class="command">
     <strong>
      ibd2sdi
     </strong>
    </span>
   </a>
   supports the following options:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <a name="option_ibd2sdi_help">
      </a>
      <a class="link" href="ibd2sdi.html#option_ibd2sdi_help">
       <code class="option">
        --help
       </code>
      </a>
      ,
      <code class="option">
       -h
      </code>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for help">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --help
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          Boolean
         </td>
        </tr>
        <tr>
         <th>
          Default Value
         </th>
         <td>
          <code class="literal">
           false
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045308505216">
     </a>
     <a class="indexterm" name="idm46045308503824">
     </a>
     <p>
      Display a help message and exit. For example:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa11473682"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">Usage<span class="token punctuation">:</span> <span class="token punctuation">.</span>/ibd2sdi <span class="token punctuation">[</span><span class="token property">-v</span><span class="token punctuation">]</span> <span class="token punctuation">[</span><span class="token property">-c</span> &lt;strict-check&gt;<span class="token punctuation">]</span> <span class="token punctuation">[</span><span class="token property">-d</span> &lt;dump file name&gt;<span class="token punctuation">]</span> <span class="token punctuation">[</span><span class="token property">-n</span><span class="token punctuation">]</span> filename1 <span class="token punctuation">[</span>filenames<span class="token punctuation">]</span>
See http<span class="token punctuation">:</span>//dev<span class="token punctuation">.</span>mysql<span class="token punctuation">.</span>com/doc/refman/8<span class="token punctuation">.</span>4/en/ibd2sdi<span class="token punctuation">.</span>html for usage hints<span class="token punctuation">.</span>
  <span class="token property">-h,</span> <span class="token property">--help</span>          Display this help and exit<span class="token punctuation">.</span>
  <span class="token property">-v,</span> <span class="token property">--version</span>       Display version information and exit<span class="token punctuation">.</span>
  -<span class="token comment" spellcheck="true">#, --debug[=name]  Output debug log. See</span>
                      http<span class="token punctuation">:</span>//dev<span class="token punctuation">.</span>mysql<span class="token punctuation">.</span>com/doc/refman/8<span class="token punctuation">.</span>4/en/dbug-package<span class="token punctuation">.</span>html
  <span class="token property">-d,</span> <span class="token constant">--dump-file</span><span class="token attr-value"><span class="token punctuation">=</span>name</span>
                      Dump the tablespace SDI into the file passed by user<span class="token punctuation">.</span>
                      Without the filename<span class="token punctuation">,</span> it will default to stdout
  <span class="token property">-s,</span> <span class="token property">--skip-data</span>     Skip retrieving data from SDI records<span class="token punctuation">.</span> Retrieve only id
                      and type<span class="token punctuation">.</span>
  <span class="token property">-i,</span> <span class="token constant">--id</span><span class="token attr-value"><span class="token punctuation">=</span>#</span>          Retrieve the SDI record matching the id passed by user<span class="token punctuation">.</span>
  <span class="token property">-t,</span> <span class="token constant">--type</span><span class="token attr-value"><span class="token punctuation">=</span>#</span>        Retrieve the SDI records matching the type passed by
                      user<span class="token punctuation">.</span>
  <span class="token property">-c,</span> <span class="token constant">--strict-check</span><span class="token attr-value"><span class="token punctuation">=</span>name</span>
                      Specify the strict checksum algorithm by the user<span class="token punctuation">.</span>
                      Allowed values are innodb<span class="token punctuation">,</span> crc32<span class="token punctuation">,</span> none<span class="token punctuation">.</span>
  <span class="token property">-n,</span> <span class="token property">--no-check</span>      Ignore the checksum verification<span class="token punctuation">.</span>
  <span class="token property">-p,</span> <span class="token property">--pretty</span>        Pretty format the SDI output<span class="token punctuation">.</span>If false<span class="token punctuation">,</span> SDI would be not
                      human readable but it will be of less size
                      <span class="token punctuation">(</span>Defaults to on<span class="token punctuation">;</span> use <span class="token property">--skip-pretty</span> to disable<span class="token punctuation">.</span><span class="token punctuation">)</span>

Variables <span class="token punctuation">(</span><span class="token constant">--variable-name</span><span class="token attr-value"><span class="token punctuation">=</span>value)</span>
and boolean options <span class="token punctuation">{</span>FALSE|TRUE<span class="token punctuation">}</span>  Value <span class="token punctuation">(</span>after reading options<span class="token punctuation">)</span>
<span class="token property">---------------------------------</span> <span class="token property">----------------------------------------</span>
debug                             <span class="token punctuation">(</span>No default value<span class="token punctuation">)</span>
dump-file                         <span class="token punctuation">(</span>No default value<span class="token punctuation">)</span>
skip-data                         FALSE
id                                0
type                              0
strict-check                      crc32
no-check                          FALSE
pretty                            TRUE</code></pre>
     </div>
    </li>
    <li class="listitem">
     <p>
      <a name="option_ibd2sdi_version">
      </a>
      <a class="link" href="ibd2sdi.html#option_ibd2sdi_version">
       <code class="option">
        --version
       </code>
      </a>
      ,
      <code class="option">
       -v
      </code>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for version">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --version
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          Boolean
         </td>
        </tr>
        <tr>
         <th>
          Default Value
         </th>
         <td>
          <code class="literal">
           false
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045308487040">
     </a>
     <a class="indexterm" name="idm46045308485648">
     </a>
     <p>
      Display version information and exit. For example:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa93832341"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">ibd2sdi  Ver 8<span class="token punctuation">.</span>4<span class="token punctuation">.</span>3 for Linux on x86_64 <span class="token punctuation">(</span>Source distribution<span class="token punctuation">)</span></code></pre>
     </div>
    </li>
    <li class="listitem">
     <p>
      <a name="option_ibd2sdi_debug">
      </a>
      <a class="link" href="ibd2sdi.html#option_ibd2sdi_debug">
       <code class="option">
        --debug[=
        <em class="replaceable">
         <code>
          debug_options
         </code>
        </em>
        ]
       </code>
      </a>
      ,
      <code class="option">
       -#
            [
       <em class="replaceable">
        <code>
         debug_options
        </code>
       </em>
       ]
      </code>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for debug">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --debug=options
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          String
         </td>
        </tr>
        <tr>
         <th>
          Default Value
         </th>
         <td>
          <code class="literal">
           [none]
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045308470272">
     </a>
     <a class="indexterm" name="idm46045308468880">
     </a>
     <p>
      Prints a debug log. For debug options, refer to
      <a class="xref" href="dbug-package.html" title="7.9.4 The DBUG Package">
       Section 7.9.4, “The DBUG Package”
      </a>
      .
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa11001849"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">ibd2sdi <span class="token constant">--debug</span><span class="token attr-value"><span class="token punctuation">=</span>d:t</span> /tmp/ibd2sdi<span class="token punctuation">.</span>trace</code></pre>
     </div>
     <p>
      This option is available only if MySQL was built using
      <a class="link" href="source-configuration-options.html#option_cmake_with_debug">
       <code class="option">
        WITH_DEBUG
       </code>
      </a>
      . MySQL release
            binaries provided by Oracle are
      <span class="emphasis">
       <em>
        not
       </em>
      </span>
      built using this option.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_ibd2sdi_dump-file">
      </a>
      <a class="link" href="ibd2sdi.html#option_ibd2sdi_dump-file">
       <code class="option">
        --dump-file=
       </code>
      </a>
      ,
      <code class="option">
       -d
      </code>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for dump-file">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --dump-file=file
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          File name
         </td>
        </tr>
        <tr>
         <th>
          Default Value
         </th>
         <td>
          <code class="literal">
           [none]
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045308452160">
     </a>
     <a class="indexterm" name="idm46045308450768">
     </a>
     <p>
      Dumps serialized dictionary information (SDI) into the
            specified dump file. If a dump file is not specified, the
            tablespace SDI is dumped to
      <code class="literal">
       stdout
      </code>
      .
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa28823849"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">ibd2sdi <span class="token constant">--dump-file</span><span class="token attr-value"><span class="token punctuation">=</span><em class="replaceable">file_name</em></span> <span class="token punctuation">.</span><span class="token punctuation">.</span>/data/test/t1<span class="token punctuation">.</span>ibd</code></pre>
     </div>
    </li>
    <li class="listitem">
     <p>
      <a name="option_ibd2sdi_skip-data">
      </a>
      <a class="link" href="ibd2sdi.html#option_ibd2sdi_skip-data">
       <code class="option">
        --skip-data
       </code>
      </a>
      ,
      <code class="option">
       -s
      </code>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for skip-data">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --skip-data
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          Boolean
         </td>
        </tr>
        <tr>
         <th>
          Default Value
         </th>
         <td>
          <code class="literal">
           false
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045308435136">
     </a>
     <a class="indexterm" name="idm46045308433744">
     </a>
     <p>
      Skips retrieval of
      <code class="literal">
       data
      </code>
      field values from
            the serialized dictionary information (SDI) and only
            retrieves the
      <code class="literal">
       id
      </code>
      and
      <code class="literal">
       type
      </code>
      field values, which are primary keys
            for SDI records.
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa6985906"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal"><span class="token prompt">$&gt; </span><span class="token command">ibd2sdi</span> <span class="token property">--skip-data</span> <span class="token punctuation">.</span><span class="token punctuation">.</span>/data/test/t1<span class="token punctuation">.</span>ibd
<span class="token inlinejson"><span class="token punctuation">[</span><span class="token string">"ibd2sdi"</span>
<span class="token punctuation">,</span>
<span class="token punctuation">{</span>
	<span class="token property">"type"</span><span class="token operator">:</span> <span class="token number">1</span><span class="token punctuation">,</span>
	<span class="token property">"id"</span><span class="token operator">:</span> <span class="token number">330</span>
<span class="token punctuation">}</span>
<span class="token punctuation">,</span>
<span class="token punctuation">{</span>
	<span class="token property">"type"</span><span class="token operator">:</span> <span class="token number">2</span><span class="token punctuation">,</span>
	<span class="token property">"id"</span><span class="token operator">:</span> <span class="token number">7</span>
<span class="token punctuation">}</span>
<span class="token punctuation">]</span></span></code></pre>
     </div>
    </li>
    <li class="listitem">
     <p>
      <a name="option_ibd2sdi_id">
      </a>
      <a class="link" href="ibd2sdi.html#option_ibd2sdi_id">
       <code class="option">
        --id=
        <em class="replaceable">
         <code>
          #
         </code>
        </em>
       </code>
      </a>
      ,
      <code class="option">
       -i
       <em class="replaceable">
        <code>
         #
        </code>
       </em>
      </code>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for id">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --id=#
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          Integer
         </td>
        </tr>
        <tr>
         <th>
          Default Value
         </th>
         <td>
          <code class="literal">
           0
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045308415040">
     </a>
     <a class="indexterm" name="idm46045308413552">
     </a>
     <p>
      Retrieves serialized dictionary information (SDI) matching
            the specified table or tablespace object id. An object id is
            unique to the object type. Table and tablespace object IDs
            are also found in the
      <code class="literal">
       id
      </code>
      column of the
      <code class="literal">
       mysql.tables
      </code>
      and
      <code class="literal">
       mysql.tablespace
      </code>
      data dictionary tables.
            For information about data dictionary tables, see
      <a class="xref" href="data-dictionary-schema.html" title="16.1 Data Dictionary Schema">
       Section 16.1, “Data Dictionary Schema”
      </a>
      .
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa44137599"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal"><span class="token prompt">$&gt; </span><span class="token command">ibd2sdi</span> <span class="token constant">--id</span><span class="token attr-value"><span class="token punctuation">=</span>7</span> <span class="token punctuation">.</span><span class="token punctuation">.</span>/data/test/t1<span class="token punctuation">.</span>ibd
<span class="token inlinejson"><span class="token punctuation">[</span><span class="token string">"ibd2sdi"</span>
<span class="token punctuation">,</span>
<span class="token punctuation">{</span>
	<span class="token property">"type"</span><span class="token operator">:</span> <span class="token number">2</span><span class="token punctuation">,</span>
	<span class="token property">"id"</span><span class="token operator">:</span> <span class="token number">7</span><span class="token punctuation">,</span>
	<span class="token property">"object"</span><span class="token operator">:</span>
		<span class="token punctuation">{</span>
    <span class="token property">"mysqld_version_id"</span><span class="token operator">:</span> <span class="token number">80003</span><span class="token punctuation">,</span>
    <span class="token property">"dd_version"</span><span class="token operator">:</span> <span class="token number">80003</span><span class="token punctuation">,</span>
    <span class="token property">"sdi_version"</span><span class="token operator">:</span> <span class="token number">1</span><span class="token punctuation">,</span>
    <span class="token property">"dd_object_type"</span><span class="token operator">:</span> <span class="token string">"Tablespace"</span><span class="token punctuation">,</span>
    <span class="token property">"dd_object"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
        <span class="token property">"name"</span><span class="token operator">:</span> <span class="token string">"test/t1"</span><span class="token punctuation">,</span>
        <span class="token property">"comment"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
        <span class="token property">"options"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
        <span class="token property">"se_private_data"</span><span class="token operator">:</span> <span class="token string">"flags=16417;id=2;server_version=80003;space_version=1;"</span><span class="token punctuation">,</span>
        <span class="token property">"engine"</span><span class="token operator">:</span> <span class="token string">"InnoDB"</span><span class="token punctuation">,</span>
        <span class="token property">"files"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
            <span class="token punctuation">{</span>
                <span class="token property">"ordinal_position"</span><span class="token operator">:</span> <span class="token number">1</span><span class="token punctuation">,</span>
                <span class="token property">"filename"</span><span class="token operator">:</span> <span class="token string">"./test/t1.ibd"</span><span class="token punctuation">,</span>
                <span class="token property">"se_private_data"</span><span class="token operator">:</span> <span class="token string">"id=2;"</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">]</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<span class="token punctuation">]</span></span></code></pre>
     </div>
    </li>
    <li class="listitem">
     <p>
      <a name="option_ibd2sdi_type">
      </a>
      <a class="link" href="ibd2sdi.html#option_ibd2sdi_type">
       <code class="option">
        --type=
        <em class="replaceable">
         <code>
          #
         </code>
        </em>
       </code>
      </a>
      ,
      <code class="option">
       -t
       <em class="replaceable">
        <code>
         #
        </code>
       </em>
      </code>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for type">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --type=#
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          Enumeration
         </td>
        </tr>
        <tr>
         <th>
          Default Value
         </th>
         <td>
          <code class="literal">
           0
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Valid Values
         </th>
         <td>
          <p class="valid-value">
           <code class="literal">
            1
           </code>
          </p>
          <p class="valid-value">
           <code class="literal">
            2
           </code>
          </p>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045308389248">
     </a>
     <a class="indexterm" name="idm46045308387760">
     </a>
     <p>
      Retrieves serialized dictionary information (SDI) matching
            the specified object type. SDI is provided for table
            (type=1) and tablespace (type=2) objects.
     </p>
     <p>
      This example shows output for a tablespace
      <code class="literal">
       ts1
      </code>
      in the
      <code class="literal">
       test
      </code>
      database:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa82967421"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal"><span class="token prompt">$&gt; </span><span class="token command">ibd2sdi</span> <span class="token constant">--type</span><span class="token attr-value"><span class="token punctuation">=</span>2</span> <span class="token punctuation">.</span><span class="token punctuation">.</span>/data/test/ts1<span class="token punctuation">.</span>ibd
<span class="token inlinejson"><span class="token punctuation">[</span><span class="token string">"ibd2sdi"</span>
<span class="token punctuation">,</span>
<span class="token punctuation">{</span>
	<span class="token property">"type"</span><span class="token operator">:</span> <span class="token number">2</span><span class="token punctuation">,</span>
	<span class="token property">"id"</span><span class="token operator">:</span> <span class="token number">7</span><span class="token punctuation">,</span>
	<span class="token property">"object"</span><span class="token operator">:</span>
		<span class="token punctuation">{</span>
    <span class="token property">"mysqld_version_id"</span><span class="token operator">:</span> <span class="token number">80003</span><span class="token punctuation">,</span>
    <span class="token property">"dd_version"</span><span class="token operator">:</span> <span class="token number">80003</span><span class="token punctuation">,</span>
    <span class="token property">"sdi_version"</span><span class="token operator">:</span> <span class="token number">1</span><span class="token punctuation">,</span>
    <span class="token property">"dd_object_type"</span><span class="token operator">:</span> <span class="token string">"Tablespace"</span><span class="token punctuation">,</span>
    <span class="token property">"dd_object"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
        <span class="token property">"name"</span><span class="token operator">:</span> <span class="token string">"test/ts1"</span><span class="token punctuation">,</span>
        <span class="token property">"comment"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
        <span class="token property">"options"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
        <span class="token property">"se_private_data"</span><span class="token operator">:</span> <span class="token string">"flags=16417;id=2;server_version=80003;space_version=1;"</span><span class="token punctuation">,</span>
        <span class="token property">"engine"</span><span class="token operator">:</span> <span class="token string">"InnoDB"</span><span class="token punctuation">,</span>
        <span class="token property">"files"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
            <span class="token punctuation">{</span>
                <span class="token property">"ordinal_position"</span><span class="token operator">:</span> <span class="token number">1</span><span class="token punctuation">,</span>
                <span class="token property">"filename"</span><span class="token operator">:</span> <span class="token string">"./test/ts1.ibd"</span><span class="token punctuation">,</span>
                <span class="token property">"se_private_data"</span><span class="token operator">:</span> <span class="token string">"id=2;"</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">]</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<span class="token punctuation">]</span></span></code></pre>
     </div>
     <p>
      Due to the way in which
      <a class="link" href="innodb-storage-engine.html" title="Chapter 17 The InnoDB Storage Engine">
       <code class="literal">
        InnoDB
       </code>
      </a>
      handles default value metadata, a default value may be
            present and non-empty in
      <a class="link" href="ibd2sdi.html" title="6.6.1 ibd2sdi — InnoDB Tablespace SDI Extraction Utility">
       <span class="command">
        <strong>
         ibd2sdi
        </strong>
       </span>
      </a>
      output
            for a given table column even if it is not defined using
      <code class="literal">
       DEFAULT
      </code>
      . Consider the two tables created
            using the following statements, in the database named
      <code class="literal">
       i
      </code>
      :
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa34259927"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">CREATE</span> <span class="token keyword">TABLE</span> t1 <span class="token punctuation">(</span>c <span class="token datatype">VARCHAR</span><span class="token punctuation">(</span><span class="token number">16</span><span class="token punctuation">)</span> <span class="token operator">NOT</span> <span class="token boolean">NULL</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token keyword">CREATE</span> <span class="token keyword">TABLE</span> t2 <span class="token punctuation">(</span>c <span class="token datatype">VARCHAR</span><span class="token punctuation">(</span><span class="token number">16</span><span class="token punctuation">)</span> <span class="token operator">NOT</span> <span class="token boolean">NULL</span> <span class="token keyword">DEFAULT</span> <span class="token string">"Sakila"</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
     </div>
     <p>
      Using
      <a class="link" href="ibd2sdi.html" title="6.6.1 ibd2sdi — InnoDB Tablespace SDI Extraction Utility">
       <span class="command">
        <strong>
         ibd2sdi
        </strong>
       </span>
      </a>
      , we can see that the
      <code class="literal">
       default_value
      </code>
      for column
      <code class="literal">
       c
      </code>
      is nonempty and is in fact padded to
            length in both tables, like this:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa60221686"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal"><span class="token prompt">$&gt; </span><span class="token command">ibd2sdi</span> <span class="token punctuation">.</span><span class="token punctuation">.</span>/data/i/t1<span class="token punctuation">.</span>ibd  | grep <span class="token property">-m1</span> <span class="token atrule">'\"default_value\"'</span> | cut <span class="token property">-b34-</span> | sed <span class="token property">-e</span> s/<span class="token punctuation">,</span>//
<span class="token atrule">"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\nAAAAAAAAAAA="</span>

<span class="token prompt">$&gt; </span><span class="token command">ibd2sdi</span> <span class="token punctuation">.</span><span class="token punctuation">.</span>/data/i/t2<span class="token punctuation">.</span>ibd  | grep <span class="token property">-m1</span> <span class="token atrule">'\"default_value\"'</span> | cut <span class="token property">-b34-</span> | sed <span class="token property">-e</span> s/<span class="token punctuation">,</span>//
<span class="token atrule">"BlNha2lsYQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\nAAAAAAAAAAA="</span></code></pre>
     </div>
     <p>
      Examination of
      <a class="link" href="ibd2sdi.html" title="6.6.1 ibd2sdi — InnoDB Tablespace SDI Extraction Utility">
       <span class="command">
        <strong>
         ibd2sdi
        </strong>
       </span>
      </a>
      output may be
            easier using a JSON-aware utility like
      <span class="command">
       <strong>
        <a class="ulink" href="https://stedolan.github.io/jq/" target="_blank">
         jq
        </a>
       </strong>
      </span>
      ,
            as shown here:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa2431820"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal"><span class="token prompt">$&gt; </span><span class="token command">ibd2sdi</span> <span class="token punctuation">.</span><span class="token punctuation">.</span>/data/i/t1<span class="token punctuation">.</span>ibd  | jq <span class="token atrule">'.[1]["object"]["dd_object"]["columns"][0]["default_value"]'</span>
<span class="token atrule">"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\nAAAAAAAAAAA="</span>

<span class="token prompt">$&gt; </span><span class="token command">ibd2sdi</span> <span class="token punctuation">.</span><span class="token punctuation">.</span>/data/i/t2<span class="token punctuation">.</span>ibd  | jq <span class="token atrule">'.[1]["object"]["dd_object"]["columns"][0]["default_value"]'</span>
<span class="token atrule">"BlNha2lsYQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\nAAAAAAAAAAA="</span></code></pre>
     </div>
     <p>
      For more information, see the
      <a class="ulink" href="/doc/dev/mysql-server/latest/" target="_top">
       MySQL
            Internals documentation
      </a>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_ibd2sdi_strict-check">
      </a>
      <a class="link" href="ibd2sdi.html#option_ibd2sdi_strict-check">
       <code class="option">
        --strict-check
       </code>
      </a>
      ,
      <code class="option">
       -c
      </code>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for strict-check">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --strict-check=algorithm
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          Enumeration
         </td>
        </tr>
        <tr>
         <th>
          Default Value
         </th>
         <td>
          <code class="literal">
           crc32
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Valid Values
         </th>
         <td>
          <p class="valid-value">
           <code class="literal">
            crc32
           </code>
          </p>
          <p class="valid-value">
           <code class="literal">
            innodb
           </code>
          </p>
          <p class="valid-value">
           <code class="literal">
            none
           </code>
          </p>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045308345184">
     </a>
     <a class="indexterm" name="idm46045308343696">
     </a>
     <p>
      Specifies a strict checksum algorithm for validating the
            checksum of pages that are read. Options include
      <code class="literal">
       innodb
      </code>
      ,
      <code class="literal">
       crc32
      </code>
      , and
      <code class="literal">
       none
      </code>
      .
     </p>
     <p>
      In this example, the strict version of the
      <code class="literal">
       innodb
      </code>
      checksum algorithm is specified:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa31624709"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">ibd2sdi <span class="token constant">--strict-check</span><span class="token attr-value"><span class="token punctuation">=</span>innodb</span> <span class="token punctuation">.</span><span class="token punctuation">.</span>/data/test/t1<span class="token punctuation">.</span>ibd</code></pre>
     </div>
     <p>
      In this example, the strict version of
      <code class="literal">
       crc32
      </code>
      checksum algorithm is specified:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa16096956"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">ibd2sdi <span class="token property">-c</span> crc32 <span class="token punctuation">.</span><span class="token punctuation">.</span>/data/test/t1<span class="token punctuation">.</span>ibd</code></pre>
     </div>
     <p>
      If you do not specify the
      <a class="link" href="ibd2sdi.html#option_ibd2sdi_strict-check">
       <code class="option">
        --strict-check
       </code>
      </a>
      option,
            validation is performed against non-strict
      <code class="literal">
       innodb
      </code>
      ,
      <code class="literal">
       crc32
      </code>
      and
      <code class="literal">
       none
      </code>
      checksums.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_ibd2sdi_no-check">
      </a>
      <a class="link" href="ibd2sdi.html#option_ibd2sdi_no-check">
       <code class="option">
        --no-check
       </code>
      </a>
      ,
      <code class="option">
       -n
      </code>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for no-check">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --no-check
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          Boolean
         </td>
        </tr>
        <tr>
         <th>
          Default Value
         </th>
         <td>
          <code class="literal">
           false
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045308318832">
     </a>
     <a class="indexterm" name="idm46045308317344">
     </a>
     <p>
      Skips checksum validation for pages that are read.
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa16943936"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">ibd2sdi <span class="token property">--no-check</span> <span class="token punctuation">.</span><span class="token punctuation">.</span>/data/test/t1<span class="token punctuation">.</span>ibd</code></pre>
     </div>
    </li>
    <li class="listitem">
     <p>
      <a name="option_ibd2sdi_pretty">
      </a>
      <a class="link" href="ibd2sdi.html#option_ibd2sdi_pretty">
       <code class="option">
        --pretty
       </code>
      </a>
      ,
      <code class="option">
       -p
      </code>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for pretty">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --pretty
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          Boolean
         </td>
        </tr>
        <tr>
         <th>
          Default Value
         </th>
         <td>
          <code class="literal">
           false
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045308301744">
     </a>
     <a class="indexterm" name="idm46045308300256">
     </a>
     <p>
      Outputs SDI data in JSON pretty print format. Enabled by
            default. If disabled, SDI is not human readable but is
            smaller in size. Use
      <code class="literal">
       --skip-pretty
      </code>
      to
            disable.
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa74950025"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">ibd2sdi <span class="token property">--skip-pretty</span> <span class="token punctuation">.</span><span class="token punctuation">.</span>/data/test/t1<span class="token punctuation">.</span>ibd</code></pre>
     </div>
    </li>
   </ul>
  </div>
 </div>
 <br/>
</div>
