<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="create-table-ndb-comment-options">
      </a>
      15.1.20.12 Setting NDB Comment Options
     </h4>
    </div>
   </div>
  </div>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <a class="xref" href="create-table-ndb-comment-options.html#create-table-ndb-comment-column-options" title="NDB_COLUMN Options">
       NDB_COLUMN Options
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="xref" href="create-table-ndb-comment-options.html#create-table-ndb-comment-table-options" title="NDB_TABLE Options">
       NDB_TABLE Options
      </a>
     </p>
    </li>
   </ul>
  </div>
  <p>
   <a class="indexterm" name="idm46045184382576">
   </a>
   <a class="indexterm" name="idm46045184381504">
   </a>
   <a class="indexterm" name="idm46045184380464">
   </a>
   It is possible to set a number of options specific to NDB
        Cluster in the table comment or column comments of an
   <a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
    <code class="literal">
     NDB
    </code>
   </a>
   table. Table-level options for
        controlling read from any replica and partition balance can be
        embedded in a table comment using
   <code class="literal">
    NDB_TABLE
   </code>
   .
  </p>
  <p>
   <code class="literal">
    NDB_COLUMN
   </code>
   can be used in a column comment to
        set the size of the blob parts table column used for storing
        parts of blob values by
   <code class="literal">
    NDB
   </code>
   to its maximum.
        This works for
   <a class="link" href="blob.html" title="13.3.4 The BLOB and TEXT Types">
    <code class="literal">
     BLOB
    </code>
   </a>
   ,
   <code class="literal">
    MEDIUMBLOB
   </code>
   ,
   <code class="literal">
    LONGBLOB
   </code>
   ,
   <a class="link" href="blob.html" title="13.3.4 The BLOB and TEXT Types">
    <code class="literal">
     TEXT
    </code>
   </a>
   ,
   <code class="literal">
    MEDIUMTEXT
   </code>
   ,
   <code class="literal">
    LONGTEXT
   </code>
   , and
   <a class="link" href="json.html" title="13.5 The JSON Data Type">
    <code class="literal">
     JSON
    </code>
   </a>
   columns. A column comment
        can also be used to control the inline size of a blob column.
   <code class="literal">
    NDB_COLUMN
   </code>
   comments do not support
   <code class="literal">
    TINYBLOB
   </code>
   or
   <code class="literal">
    TINYTEXT
   </code>
   columns, since these have an inline part (only) of fixed size,
        and no separate parts to store elsewhere.
  </p>
  <p>
   <code class="literal">
    NDB_TABLE
   </code>
   can be used in a table comment to
        set options relating to partition balance and whether the table
        is fully replicated, among others.
  </p>
  <p>
   The remainder of this section describes these options and their
        use.
  </p>
  <h5>
   <a name="create-table-ndb-comment-column-options">
   </a>
   NDB_COLUMN Options
  </h5>
  <p>
   <a class="indexterm" name="idm46045184362992">
   </a>
   <a class="indexterm" name="idm46045184361920">
   </a>
   <a class="indexterm" name="idm46045184360432">
   </a>
   <a class="indexterm" name="idm46045184359360">
   </a>
   In NDB Cluster, a column comment in a
   <code class="literal">
    CREATE
        TABLE
   </code>
   or
   <a class="link" href="alter-table.html" title="15.1.9 ALTER TABLE Statement">
    <code class="literal">
     ALTER TABLE
    </code>
   </a>
   statement can also be used to specify an
   <code class="literal">
    NDB_COLUMN
   </code>
   option.
   <code class="literal">
    NDB
   </code>
   supports two column comment options
   <code class="literal">
    BLOB_INLINE_SIZE
   </code>
   and
   <code class="literal">
    MAX_BLOB_PART_SIZE
   </code>
   . Syntax for these options
        is shown here:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa62101242"><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">COMMENT</span> <span class="token string">'NDB_COLUMN=<em class="replaceable">speclist</em>'</span>

<em class="replaceable">speclist</em> <span class="token operator">:=</span> <em class="replaceable">spec</em><span class="token punctuation">[</span><span class="token punctuation">,</span><em class="replaceable">spec</em><span class="token punctuation">]</span>

spec <span class="token operator">:=</span> 
    BLOB_INLINE_SIZE<span class="token operator">=</span><span class="token keyword"><em class="replaceable">value</em></span>
  <span class="token operator">|</span> MAX_BLOB_PART_SIZE<span class="token punctuation">[</span><span class="token operator">=</span>{<span class="token number">0</span><span class="token operator">|</span><span class="token number">1</span>}<span class="token punctuation">]</span></code></pre>
  </div>
  <p>
   <code class="literal">
    BLOB_INLINE_SIZE
   </code>
   specifies the number of
        bytes to be stored inline by the column; its expected value is
        an integer in the range 1 - 29980, inclusive. Setting a value
        greater than 29980 raises an error; setting a value less than 1
        is allowed, but causes the default inline size for the column
        type to be used.
  </p>
  <p>
   You should be aware that the maximum value for this option is
        actually the maximum number of bytes that can be stored in one
        row of an
   <code class="literal">
    NDB
   </code>
   table; every column in the row
        contributes to this total.
  </p>
  <p>
   You should also keep in mind, especially when working with
   <code class="literal">
    TEXT
   </code>
   columns, that the value set by
   <code class="literal">
    MAX_BLOB_PART_SIZE
   </code>
   or
   <code class="literal">
    BLOB_INLINE_SIZE
   </code>
   represents column size in
        bytes. It does not indicate the number of characters, which
        varies according to the character set and collation used by the
        column.
  </p>
  <p>
   To see the effects of this option, first create a table with two
   <code class="literal">
    BLOB
   </code>
   columns, one (
   <code class="literal">
    b1
   </code>
   )
        with no extra options, and another (
   <code class="literal">
    b2
   </code>
   ) with
        a setting for
   <code class="literal">
    BLOB_INLINE_SIZE
   </code>
   , as shown
        here:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa34522635"><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 prompt">mysql&gt;</span> <span class="token keyword">CREATE</span> <span class="token keyword">TABLE</span> t1 <span class="token punctuation">(</span>
<span class="token prompt">    -&gt;</span>    a <span class="token datatype">INT</span> <span class="token operator">NOT</span> <span class="token boolean">NULL</span> <span class="token keyword">PRIMARY</span> <span class="token keyword">KEY</span><span class="token punctuation">,</span>
<span class="token prompt">    -&gt;</span>    b1 <span class="token datatype">BLOB</span><span class="token punctuation">,</span>
<span class="token prompt">    -&gt;</span>    b2 <span class="token datatype">BLOB</span> <span class="token keyword">COMMENT</span> <span class="token string">'NDB_COLUMN=BLOB_INLINE_SIZE=8000'</span>
<span class="token prompt">    -&gt;</span>  <span class="token punctuation">)</span> <span class="token keyword">ENGINE</span> <span class="token keyword">NDB</span><span class="token punctuation">;</span>
<span class="token output">Query OK, 0 rows affected (0.32 sec)</span></code></pre>
  </div>
  <p>
   You can see the
   <code class="literal">
    BLOB_INLINE_SIZE
   </code>
   settings for
        the
   <code class="literal">
    BLOB
   </code>
   columns by querying the
   <a class="link" href="mysql-cluster-ndbinfo-blobs.html" title="25.6.17.4 The ndbinfo blobs Table">
    <code class="literal">
     ndbinfo.blobs
    </code>
   </a>
   table, like
        this:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa20661795"><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 prompt">mysql&gt;</span> <span class="token keyword">SELECT</span> 
<span class="token prompt">    -&gt;</span>   <span class="token keyword">column_name</span> <span class="token keyword">AS</span> <span class="token string">'Column Name'</span><span class="token punctuation">,</span> 
<span class="token prompt">    -&gt;</span>   inline_size <span class="token keyword">AS</span> <span class="token string">'Inline Size'</span><span class="token punctuation">,</span> 
<span class="token prompt">    -&gt;</span>   part_size <span class="token keyword">AS</span> <span class="token string">'Blob Part Size'</span> 
<span class="token prompt">    -&gt;</span> <span class="token keyword">FROM</span> ndbinfo<span class="token punctuation">.</span>blobs 
<span class="token prompt">    -&gt;</span> <span class="token keyword">WHERE</span> <span class="token keyword">table_name</span> <span class="token operator">=</span> <span class="token string">'t1'</span><span class="token punctuation">;</span>
<span class="token output"><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 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 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 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 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 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 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 class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Column Name <span class="token punctuation">|</span> Inline Size <span class="token punctuation">|</span> Blob Part Size <span class="token punctuation">|</span></span>
<span class="token output"><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 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 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 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 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 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 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 class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> b1          <span class="token punctuation">|</span>         256 <span class="token punctuation">|</span>           2000 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> b2          <span class="token punctuation">|</span>        8000 <span class="token punctuation">|</span>           2000 <span class="token punctuation">|</span></span>
<span class="token output"><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 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 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 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 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 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 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 class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output">2 rows in set (0.01 sec)</span></code></pre>
  </div>
  <p>
   You can also check the output from the
   <a class="link" href="mysql-cluster-programs-ndb-desc.html" title="25.5.9 ndb_desc — Describe NDB Tables">
    <span class="command">
     <strong>
      ndb_desc
     </strong>
    </span>
   </a>
   utility, as shown here, with the
        relevant lines displayed using emphasized text:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa43120492"><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">ndb_desc</span> <span class="token property">-d</span> test t1
<span class="token property">--</span> t <span class="token property">--</span>
Version<span class="token punctuation">:</span> 1
Fragment type<span class="token punctuation">:</span> HashMapPartition
K Value<span class="token punctuation">:</span> 6
Min load factor<span class="token punctuation">:</span> 78
Max load factor<span class="token punctuation">:</span> 80
Temporary table<span class="token punctuation">:</span> no
Number of attributes<span class="token punctuation">:</span> 3
Number of primary keys<span class="token punctuation">:</span> 1
Length of frm data<span class="token punctuation">:</span> 945
Max Rows<span class="token punctuation">:</span> 0
Row Checksum<span class="token punctuation">:</span> 1
Row GCI<span class="token punctuation">:</span> 1
SingleUserMode<span class="token punctuation">:</span> 0
ForceVarPart<span class="token punctuation">:</span> 1
PartitionCount<span class="token punctuation">:</span> 2
FragmentCount<span class="token punctuation">:</span> 2
PartitionBalance<span class="token punctuation">:</span> FOR_RP_BY_LDM
ExtraRowGciBits<span class="token punctuation">:</span> 0
ExtraRowAuthorBits<span class="token punctuation">:</span> 0
TableStatus<span class="token punctuation">:</span> Retrieved
Table options<span class="token punctuation">:</span> readbackup
HashMap<span class="token punctuation">:</span> DEFAULT-HASHMAP-3840-2
<span class="token property">--</span> Attributes <span class="token property">--</span>
a Int PRIMARY KEY DISTRIBUTION KEY AT<span class="token attr-value"><span class="token punctuation">=</span>FIXED</span> ST<span class="token attr-value"><span class="token punctuation">=</span>MEMORY</span>
<em>b1 Blob<span class="token punctuation">(</span>256<span class="token punctuation">,</span>2000<span class="token punctuation">,</span>0<span class="token punctuation">)</span> NULL AT<span class="token attr-value"><span class="token punctuation">=</span>MEDIUM_VAR</span> ST<span class="token attr-value"><span class="token punctuation">=</span>MEMORY</span> BV<span class="token attr-value"><span class="token punctuation">=</span>2</span> BT<span class="token attr-value"><span class="token punctuation">=</span>NDB$BLOB_64_1</span>
b2 Blob<span class="token punctuation">(</span>8000<span class="token punctuation">,</span>2000<span class="token punctuation">,</span>0<span class="token punctuation">)</span> NULL AT<span class="token attr-value"><span class="token punctuation">=</span>MEDIUM_VAR</span> ST<span class="token attr-value"><span class="token punctuation">=</span>MEMORY</span> BV<span class="token attr-value"><span class="token punctuation">=</span>2</span> BT<span class="token attr-value"><span class="token punctuation">=</span>NDB$BLOB_64_2</span></em><span class="token attr-value"></span>
<span class="token property">--</span> Indexes <span class="token property">--</span> 
PRIMARY KEY<span class="token punctuation">(</span>a<span class="token punctuation">)</span> - UniqueHashIndex
PRIMARY<span class="token punctuation">(</span>a<span class="token punctuation">)</span> - OrderedIndex</code></pre>
  </div>
  <p>
   For
   <code class="literal">
    MAX_BLOB_PART_SIZE
   </code>
   , the
   <code class="literal">
    =
   </code>
   sign and the value following it are
        optional. Using any value other than 0 or 1 results in a syntax
        error.
  </p>
  <p>
   The effect of using
   <code class="literal">
    MAX_BLOB_PART_SIZE
   </code>
   in a
        column comment is to set the blob part size of a
   <a class="link" href="blob.html" title="13.3.4 The BLOB and TEXT Types">
    <code class="literal">
     TEXT
    </code>
   </a>
   or
   <a class="link" href="blob.html" title="13.3.4 The BLOB and TEXT Types">
    <code class="literal">
     BLOB
    </code>
   </a>
   column to the maximum number
        of bytes supported for this by
   <code class="literal">
    NDB
   </code>
   (13948).
        This option can be applied to any blob column type supported by
        MySQL except
   <code class="literal">
    TINYBLOB
   </code>
   or
   <code class="literal">
    TINYTEXT
   </code>
   (
   <code class="literal">
    BLOB
   </code>
   ,
   <code class="literal">
    MEDIUMBLOB
   </code>
   ,
   <code class="literal">
    LONGBLOB
   </code>
   ,
   <code class="literal">
    TEXT
   </code>
   ,
   <code class="literal">
    MEDIUMTEXT
   </code>
   ,
   <code class="literal">
    LONGTEXT
   </code>
   ). Unlike
   <code class="literal">
    BLOB_INLINE_SIZE
   </code>
   ,
   <code class="literal">
    MAX_BLOB_PART_SIZE
   </code>
   has no effect on
   <code class="literal">
    JSON
   </code>
   columns.
  </p>
  <p>
   To see the effects of this option, we first run the following
        SQL statement in the
   <a class="link" href="mysql.html" title="6.5.1 mysql — The MySQL Command-Line Client">
    <span class="command">
     <strong>
      mysql
     </strong>
    </span>
   </a>
   client to create a
        table with two
   <code class="literal">
    BLOB
   </code>
   columns, one
        (
   <code class="literal">
    c1
   </code>
   ) with no extra options, and another
        (
   <code class="literal">
    c2
   </code>
   ) with
   <code class="literal">
    MAX_BLOB_PART_SIZE
   </code>
   :
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa18435639"><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 prompt">mysql&gt;</span> <span class="token keyword">CREATE</span> <span class="token keyword">TABLE</span> test<span class="token punctuation">.</span>t2 <span class="token punctuation">(</span>
<span class="token prompt">    -&gt;</span>   p <span class="token datatype">INT</span> <span class="token keyword">PRIMARY</span> <span class="token keyword">KEY</span><span class="token punctuation">,</span> 
<span class="token prompt">    -&gt;</span>   c1 <span class="token datatype">BLOB</span><span class="token punctuation">,</span> 
<span class="token prompt">    -&gt;</span>   c2 <span class="token datatype">BLOB</span> <span class="token keyword">COMMENT</span> <span class="token string">'NDB_COLUMN=MAX_BLOB_PART_SIZE'</span>
<span class="token prompt">    -&gt;</span> <span class="token punctuation">)</span> <span class="token keyword">ENGINE</span> <span class="token keyword">NDB</span><span class="token punctuation">;</span>
<span class="token output">Query OK, 0 rows affected (0.32 sec)</span></code></pre>
  </div>
  <p>
   From the system shell, run the
   <a class="link" href="mysql-cluster-programs-ndb-desc.html" title="25.5.9 ndb_desc — Describe NDB Tables">
    <span class="command">
     <strong>
      ndb_desc
     </strong>
    </span>
   </a>
   utility to obtain information about the table just created, as
        shown in this example:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa75493080"><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">ndb_desc</span> <span class="token property">-d</span> test t2
<span class="token property">--</span> t <span class="token property">--</span>
Version<span class="token punctuation">:</span> 1
Fragment type<span class="token punctuation">:</span> HashMapPartition
K Value<span class="token punctuation">:</span> 6
Min load factor<span class="token punctuation">:</span> 78
Max load factor<span class="token punctuation">:</span> 80
Temporary table<span class="token punctuation">:</span> no
Number of attributes<span class="token punctuation">:</span> 3
Number of primary keys<span class="token punctuation">:</span> 1
Length of frm data<span class="token punctuation">:</span> 324
Row Checksum<span class="token punctuation">:</span> 1
Row GCI<span class="token punctuation">:</span> 1
SingleUserMode<span class="token punctuation">:</span> 0
ForceVarPart<span class="token punctuation">:</span> 1
FragmentCount<span class="token punctuation">:</span> 2
ExtraRowGciBits<span class="token punctuation">:</span> 0
ExtraRowAuthorBits<span class="token punctuation">:</span> 0
TableStatus<span class="token punctuation">:</span> Retrieved
HashMap<span class="token punctuation">:</span> DEFAULT-HASHMAP-3840-2
<span class="token property">--</span> Attributes <span class="token property">--</span>
p Int PRIMARY KEY DISTRIBUTION KEY AT<span class="token attr-value"><span class="token punctuation">=</span>FIXED</span> ST<span class="token attr-value"><span class="token punctuation">=</span>MEMORY</span>
<em>c1 Blob<span class="token punctuation">(</span>256<span class="token punctuation">,</span>2000<span class="token punctuation">,</span>0<span class="token punctuation">)</span> NULL AT<span class="token attr-value"><span class="token punctuation">=</span>MEDIUM_VAR</span> ST<span class="token attr-value"><span class="token punctuation">=</span>MEMORY</span> BV<span class="token attr-value"><span class="token punctuation">=</span>2</span> BT<span class="token attr-value"><span class="token punctuation">=</span>NDB$BLOB_22_1</span>
c2 Blob<span class="token punctuation">(</span>256<span class="token punctuation">,</span>13948<span class="token punctuation">,</span>0<span class="token punctuation">)</span> NULL AT<span class="token attr-value"><span class="token punctuation">=</span>MEDIUM_VAR</span> ST<span class="token attr-value"><span class="token punctuation">=</span>MEMORY</span> BV<span class="token attr-value"><span class="token punctuation">=</span>2</span> BT<span class="token attr-value"><span class="token punctuation">=</span>NDB$BLOB_22_2</span></em><span class="token attr-value"></span>
<span class="token property">--</span> Indexes <span class="token property">--</span> 
PRIMARY KEY<span class="token punctuation">(</span>p<span class="token punctuation">)</span> - UniqueHashIndex
PRIMARY<span class="token punctuation">(</span>p<span class="token punctuation">)</span> - OrderedIndex</code></pre>
  </div>
  <p>
   Column information in the output is listed under
   <code class="literal">
    Attributes
   </code>
   ; for columns
   <code class="literal">
    c1
   </code>
   and
   <code class="literal">
    c2
   </code>
   it is displayed here in emphasized
        text. For
   <code class="literal">
    c1
   </code>
   , the blob part size is 2000, the
        default value; for
   <code class="literal">
    c2
   </code>
   , it is 13948, as set by
   <code class="literal">
    MAX_BLOB_PART_SIZE
   </code>
   .
  </p>
  <p>
   You can also query the
   <code class="literal">
    ndbinfo.blobs
   </code>
   table to
        see this, as shown here:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa3590333"><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 prompt">mysql&gt;</span> <span class="token keyword">SELECT</span> 
<span class="token prompt">    -&gt;</span>   <span class="token keyword">column_name</span> <span class="token keyword">AS</span> <span class="token string">'Column Name'</span><span class="token punctuation">,</span> 
<span class="token prompt">    -&gt;</span>   inline_size <span class="token keyword">AS</span> <span class="token string">'Inline Size'</span><span class="token punctuation">,</span> 
<span class="token prompt">    -&gt;</span>   part_size <span class="token keyword">AS</span> <span class="token string">'Blob Part Size'</span> 
<span class="token prompt">    -&gt;</span> <span class="token keyword">FROM</span> ndbinfo<span class="token punctuation">.</span>blobs 
<span class="token prompt">    -&gt;</span> <span class="token keyword">WHERE</span> <span class="token keyword">table_name</span> <span class="token operator">=</span> <span class="token string">'t2'</span><span class="token punctuation">;</span>
<span class="token output"><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 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 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 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 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 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 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 class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Column Name <span class="token punctuation">|</span> Inline Size <span class="token punctuation">|</span> Blob Part Size <span class="token punctuation">|</span></span>
<span class="token output"><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 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 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 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 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 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 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 class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> c1          <span class="token punctuation">|</span>         256 <span class="token punctuation">|</span>           2000 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> c2          <span class="token punctuation">|</span>         256 <span class="token punctuation">|</span>          13948 <span class="token punctuation">|</span></span>
<span class="token output"><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 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 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 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 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 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 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 class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output">2 rows in set (0.00 sec)</span></code></pre>
  </div>
  <p>
   You can change the blob part size for a given blob column of an
   <code class="literal">
    NDB
   </code>
   table using an
   <code class="literal">
    ALTER
        TABLE
   </code>
   statement such as this one, and verifying the
        changes afterwards using
   <a class="link" href="show-create-table.html" title="15.7.7.11 SHOW CREATE TABLE Statement">
    <code class="literal">
     SHOW CREATE
        TABLE
    </code>
   </a>
   :
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa47003981"><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 prompt">mysql&gt;</span> <span class="token keyword">ALTER</span> <span class="token keyword">TABLE</span> test<span class="token punctuation">.</span>t2 
<span class="token prompt">    -&gt;</span>    <span class="token keyword">DROP</span> <span class="token keyword">COLUMN</span> c1<span class="token punctuation">,</span> 
<span class="token prompt">    -&gt;</span>     <span class="token keyword">ADD</span> <span class="token keyword">COLUMN</span> c1 <span class="token datatype">BLOB</span> <span class="token keyword">COMMENT</span> <span class="token string">'NDB_COLUMN=MAX_BLOB_PART_SIZE'</span><span class="token punctuation">,</span>
<span class="token prompt">    -&gt;</span>     <span class="token keyword">CHANGE</span> <span class="token keyword">COLUMN</span> c2 c2 <span class="token datatype">BLOB</span> <span class="token keyword">AFTER</span> c1<span class="token punctuation">;</span>
<span class="token output">Query OK, 0 rows affected (0.47 sec)</span>
<span class="token output">Records: 0  Duplicates: 0  Warnings: 0</span>

<span class="token prompt">mysql&gt;</span> <span class="token keyword">SHOW</span> <span class="token keyword">CREATE</span> <span class="token keyword">TABLE</span> test<span class="token punctuation">.</span>t2\G
<span class="token output"><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 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 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 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 class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 1. row <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 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 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 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 class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
       Table<span class="token punctuation">:</span> t
Create Table<span class="token punctuation">:</span> CREATE TABLE `t2` (
  `p` int(11) NOT NULL,
  `c1` blob COMMENT 'NDB_COLUMN=MAX_BLOB_PART_SIZE',
  `c2` blob,
  PRIMARY KEY (`p`)
) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
</span><span class="token output">1 row in set (0.00 sec)</span>

<span class="token prompt">mysql&gt;</span> <span class="token keyword">EXIT</span>
Bye</code></pre>
  </div>
  <p>
   The output of
   <a class="link" href="mysql-cluster-programs-ndb-desc.html" title="25.5.9 ndb_desc — Describe NDB Tables">
    <span class="command">
     <strong>
      ndb_desc
     </strong>
    </span>
   </a>
   shows that the blob
        part sizes of the columns have been changed as expected:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa2188808"><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">ndb_desc</span> <span class="token property">-d</span> test t2
<span class="token property">--</span> t <span class="token property">--</span>
Version<span class="token punctuation">:</span> 16777220
Fragment type<span class="token punctuation">:</span> HashMapPartition
K Value<span class="token punctuation">:</span> 6
Min load factor<span class="token punctuation">:</span> 78
Max load factor<span class="token punctuation">:</span> 80
Temporary table<span class="token punctuation">:</span> no
Number of attributes<span class="token punctuation">:</span> 3
Number of primary keys<span class="token punctuation">:</span> 1
Length of frm data<span class="token punctuation">:</span> 324
Row Checksum<span class="token punctuation">:</span> 1
Row GCI<span class="token punctuation">:</span> 1
SingleUserMode<span class="token punctuation">:</span> 0
ForceVarPart<span class="token punctuation">:</span> 1
FragmentCount<span class="token punctuation">:</span> 2
ExtraRowGciBits<span class="token punctuation">:</span> 0
ExtraRowAuthorBits<span class="token punctuation">:</span> 0
TableStatus<span class="token punctuation">:</span> Retrieved
HashMap<span class="token punctuation">:</span> DEFAULT-HASHMAP-3840-2
<span class="token property">--</span> Attributes <span class="token property">--</span>
p Int PRIMARY KEY DISTRIBUTION KEY AT<span class="token attr-value"><span class="token punctuation">=</span>FIXED</span> ST<span class="token attr-value"><span class="token punctuation">=</span>MEMORY</span>
<em>c1 Blob<span class="token punctuation">(</span>256<span class="token punctuation">,</span>13948<span class="token punctuation">,</span>0<span class="token punctuation">)</span> NULL AT<span class="token attr-value"><span class="token punctuation">=</span>MEDIUM_VAR</span> ST<span class="token attr-value"><span class="token punctuation">=</span>MEMORY</span> BV<span class="token attr-value"><span class="token punctuation">=</span>2</span> BT<span class="token attr-value"><span class="token punctuation">=</span>NDB$BLOB_26_1</span>
c2 Blob<span class="token punctuation">(</span>256<span class="token punctuation">,</span>2000<span class="token punctuation">,</span>0<span class="token punctuation">)</span> NULL AT<span class="token attr-value"><span class="token punctuation">=</span>MEDIUM_VAR</span> ST<span class="token attr-value"><span class="token punctuation">=</span>MEMORY</span> BV<span class="token attr-value"><span class="token punctuation">=</span>2</span> BT<span class="token attr-value"><span class="token punctuation">=</span>NDB$BLOB_26_2</span></em><span class="token attr-value"></span>
<span class="token property">--</span> Indexes <span class="token property">--</span> 
PRIMARY KEY<span class="token punctuation">(</span>p<span class="token punctuation">)</span> - UniqueHashIndex
PRIMARY<span class="token punctuation">(</span>p<span class="token punctuation">)</span> - OrderedIndex</code></pre>
  </div>
  <p>
   You can also see the change by running the query against
   <a class="link" href="mysql-cluster-ndbinfo-blobs.html" title="25.6.17.4 The ndbinfo blobs Table">
    <code class="literal">
     ndbinfo.blobs
    </code>
   </a>
   again:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa80448279"><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 prompt">mysql&gt;</span> <span class="token keyword">SELECT</span> 
<span class="token prompt">    -&gt;</span>   <span class="token keyword">column_name</span> <span class="token keyword">AS</span> <span class="token string">'Column Name'</span><span class="token punctuation">,</span> 
<span class="token prompt">    -&gt;</span>   inline_size <span class="token keyword">AS</span> <span class="token string">'Inline Size'</span><span class="token punctuation">,</span> 
<span class="token prompt">    -&gt;</span>   part_size <span class="token keyword">AS</span> <span class="token string">'Blob Part Size'</span> 
<span class="token prompt">    -&gt;</span> <span class="token keyword">FROM</span> ndbinfo<span class="token punctuation">.</span>blobs 
<span class="token prompt">    -&gt;</span> <span class="token keyword">WHERE</span> <span class="token keyword">table_name</span> <span class="token operator">=</span> <span class="token string">'t2'</span><span class="token punctuation">;</span>
<span class="token output"><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 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 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 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 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 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 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 class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Column Name <span class="token punctuation">|</span> Inline Size <span class="token punctuation">|</span> Blob Part Size <span class="token punctuation">|</span></span>
<span class="token output"><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 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 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 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 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 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 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 class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> c1          <span class="token punctuation">|</span>         256 <span class="token punctuation">|</span>          13948 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> c2          <span class="token punctuation">|</span>         256 <span class="token punctuation">|</span>           2000 <span class="token punctuation">|</span></span>
<span class="token output"><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 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 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 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 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 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 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 class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output">2 rows in set (0.00 sec)</span></code></pre>
  </div>
  <p>
   It is possible to set both
   <code class="literal">
    BLOB_INLINE_SIZE
   </code>
   and
   <code class="literal">
    MAX_BLOB_PART_SIZE
   </code>
   for a blob column, as
        shown in this
   <code class="literal">
    CREATE TABLE
   </code>
   statement:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa98439899"><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 prompt">mysql&gt;</span> <span class="token keyword">CREATE</span> <span class="token keyword">TABLE</span> test<span class="token punctuation">.</span>t3 <span class="token punctuation">(</span>
<span class="token prompt">    -&gt;</span>   p <span class="token datatype">INT</span> <span class="token operator">NOT</span> <span class="token boolean">NULL</span> <span class="token keyword">PRIMARY</span> <span class="token keyword">KEY</span><span class="token punctuation">,</span>
<span class="token prompt">    -&gt;</span>   c1 <span class="token datatype">JSON</span><span class="token punctuation">,</span>
<span class="token prompt">    -&gt;</span>   c2 <span class="token datatype">JSON</span> <span class="token keyword">COMMENT</span> <span class="token string">'NDB_COLUMN=BLOB_INLINE_SIZE=5000,MAX_BLOB_PART_SIZE'</span>
<span class="token prompt">    -&gt;</span> <span class="token punctuation">)</span> <span class="token keyword">ENGINE</span> <span class="token keyword">NDB</span><span class="token punctuation">;</span>
<span class="token output">Query OK, 0 rows affected (0.28 sec)</span></code></pre>
  </div>
  <p>
   Querying the
   <a class="link" href="mysql-cluster-ndbinfo-blobs.html" title="25.6.17.4 The ndbinfo blobs Table">
    <code class="literal">
     blobs
    </code>
   </a>
   table shows
        us that the statement worked as expected:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa75045884"><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 prompt">mysql&gt;</span> <span class="token keyword">SELECT</span> 
<span class="token prompt">    -&gt;</span>   <span class="token keyword">column_name</span> <span class="token keyword">AS</span> <span class="token string">'Column Name'</span><span class="token punctuation">,</span> 
<span class="token prompt">    -&gt;</span>   inline_size <span class="token keyword">AS</span> <span class="token string">'Inline Size'</span><span class="token punctuation">,</span> 
<span class="token prompt">    -&gt;</span>   part_size <span class="token keyword">AS</span> <span class="token string">'Blob Part Size'</span> 
<span class="token prompt">    -&gt;</span> <span class="token keyword">FROM</span> ndbinfo<span class="token punctuation">.</span>blobs 
<span class="token prompt">    -&gt;</span> <span class="token keyword">WHERE</span> <span class="token keyword">table_name</span> <span class="token operator">=</span> <span class="token string">'t3'</span><span class="token punctuation">;</span>
<span class="token output"><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 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 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 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 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 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 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 class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Column Name <span class="token punctuation">|</span> Inline Size <span class="token punctuation">|</span> Blob Part Size <span class="token punctuation">|</span></span>
<span class="token output"><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 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 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 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 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 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 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 class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> c1          <span class="token punctuation">|</span>        4000 <span class="token punctuation">|</span>           8100 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> c2          <span class="token punctuation">|</span>        5000 <span class="token punctuation">|</span>           8100 <span class="token punctuation">|</span></span>
<span class="token output"><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 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 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 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 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 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 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 class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output">2 rows in set (0.00 sec)</span></code></pre>
  </div>
  <p>
   You can also verify that the statement worked by checking the
        output of
   <a class="link" href="mysql-cluster-programs-ndb-desc.html" title="25.5.9 ndb_desc — Describe NDB Tables">
    <span class="command">
     <strong>
      ndb_desc
     </strong>
    </span>
   </a>
   .
  </p>
  <p>
   Changing a column's blob part size must be done using a
        copying
   <code class="literal">
    ALTER TABLE
   </code>
   ; this operation cannot be
        performed online (see
   <a class="xref" href="mysql-cluster-online-operations.html" title="25.6.12 Online Operations with ALTER TABLE in NDB Cluster">
    Section 25.6.12, “Online Operations with ALTER TABLE in NDB Cluster”
   </a>
   ).
  </p>
  <p>
   For more information about how
   <a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
    <code class="literal">
     NDB
    </code>
   </a>
   stores columns of blob types, see
   <a class="xref" href="storage-requirements.html#data-types-storage-reqs-strings" title="String Type Storage Requirements">
    String Type Storage Requirements
   </a>
   .
  </p>
  <h5>
   <a name="create-table-ndb-comment-table-options">
   </a>
   NDB_TABLE Options
  </h5>
  <p>
   <a class="indexterm" name="idm46045184242880">
   </a>
   <a class="indexterm" name="idm46045184241808">
   </a>
   <a class="indexterm" name="idm46045184240320">
   </a>
   <a class="indexterm" name="idm46045184239248">
   </a>
   <a class="indexterm" name="idm46045184238176">
   </a>
   For an NDB Cluster table, the table comment in a
   <code class="literal">
    CREATE
        TABLE
   </code>
   or
   <a class="link" href="alter-table.html" title="15.1.9 ALTER TABLE Statement">
    <code class="literal">
     ALTER TABLE
    </code>
   </a>
   statement can also be used to specify an
   <code class="literal">
    NDB_TABLE
   </code>
   option, which consists of one or
        more name-value pairs, separated by commas if need be, following
        the string
   <code class="literal">
    NDB_TABLE=
   </code>
   . Complete syntax for
        names and values syntax is shown here:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa52204773"><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">COMMENT</span><span class="token operator">=</span><span class="token string">"NDB_TABLE=<em class="replaceable">ndb_table_option</em>[,<em class="replaceable">ndb_table_option</em>[,...]]"</span>

<em class="replaceable">ndb_table_option</em>: {
    NOLOGGING<span class="token operator">=</span>{<span class="token number">1</span> <span class="token operator">|</span> <span class="token number">0</span>}
  <span class="token operator">|</span> READ_BACKUP<span class="token operator">=</span>{<span class="token number">1</span> <span class="token operator">|</span> <span class="token number">0</span>}
  <span class="token operator">|</span> PARTITION_BALANCE<span class="token operator">=</span>{FOR_RP_BY_NODE <span class="token operator">|</span> FOR_RA_BY_NODE <span class="token operator">|</span> FOR_RP_BY_LDM
                      <span class="token operator">|</span> FOR_RA_BY_LDM <span class="token operator">|</span> FOR_RA_BY_LDM_X_2
                      <span class="token operator">|</span> FOR_RA_BY_LDM_X_3 <span class="token operator">|</span> FOR_RA_BY_LDM_X_4}
  <span class="token operator">|</span> FULLY_REPLICATED<span class="token operator">=</span>{<span class="token number">1</span> <span class="token operator">|</span> <span class="token number">0</span>}
}</code></pre>
  </div>
  <p>
   Spaces are not permitted within the quoted string. The string is
        case-insensitive.
  </p>
  <p>
   The four
   <code class="literal">
    NDB
   </code>
   table options that can be set as
        part of a comment in this way are described in more detail in
        the next few paragraphs.
  </p>
  <p>
   <a class="indexterm" name="idm46045184228832">
   </a>
   <a class="indexterm" name="idm46045184227344">
   </a>
   <a class="indexterm" name="idm46045184225856">
   </a>
   <code class="literal">
    NOLOGGING
   </code>
   : By default,
   <code class="literal">
    NDB
   </code>
   tables are logged, and checkpointed. This makes them durable to
        whole cluster failures. Using
   <code class="literal">
    NOLOGGING
   </code>
   when
        creating or altering a table means that this table is not redo
        logged or included in local checkpoints. In this case, the table
        is still replicated across the data nodes for high availability,
        and updated using transactions, but changes made to it are not
        recorded in the data node's redo logs, and its content is
        not checkpointed to disk; when recovering from a cluster
        failure, the cluster retains the table definition, but none of
        its rows—that is, the table is empty.
  </p>
  <p>
   Using such nonlogging tables reduces the data node's
        demands on disk I/O and storage, as well as CPU for
        checkpointing CPU. This may be suitable for short-lived data
        which is frequently updated, and where the loss of all data in
        the unlikely event of a total cluster failure is acceptable.
  </p>
  <p>
   It is also possible to use the
   <a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_table_no_logging">
    <code class="literal">
     ndb_table_no_logging
    </code>
   </a>
   system
        variable to cause any NDB tables created or altered while this
        variable is in effect to behave as though it had been created
        with the
   <code class="literal">
    NOLOGGING
   </code>
   comment. Unlike when using
        the comment directly, there is nothing in this case in the
        output of
   <a class="link" href="show-create-table.html" title="15.7.7.11 SHOW CREATE TABLE Statement">
    <code class="literal">
     SHOW CREATE TABLE
    </code>
   </a>
   to
        indicate that it is a nonlogging table. Using the table comment
        approach is recommended since it offers per-table control of the
        feature, and this aspect of the table schema is embedded in the
        table creation statement where it can be found easily by
        SQL-based tools.
  </p>
  <p>
   <a class="indexterm" name="idm46045184215728">
   </a>
   <a class="indexterm" name="idm46045184214240">
   </a>
   <a class="indexterm" name="idm46045184212752">
   </a>
   <code class="literal">
    READ_BACKUP
   </code>
   : Setting this option to 1 has the
        same effect as though
   <a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_read_backup">
    <code class="literal">
     ndb_read_backup
    </code>
   </a>
   were enabled;
        enables reading from any replica. Doing so greatly improves the
        performance of reads from the table at a relatively small cost
        to write performance. 1 is the default for
   <code class="literal">
    READ_BACKUP
   </code>
   , and the default for
   <a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_read_backup">
    <code class="literal">
     ndb_read_backup
    </code>
   </a>
   is
   <code class="literal">
    ON
   </code>
   (previously, read from any replica was
        disabled by default).
  </p>
  <p>
   You can set
   <code class="literal">
    READ_BACKUP
   </code>
   for an existing table
        online, using an
   <code class="literal">
    ALTER TABLE
   </code>
   statement
        similar to one of those shown here:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa14359515"><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">ALTER</span> <span class="token keyword">TABLE</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span> <span class="token keyword">ALGORITHM</span><span class="token operator">=</span><span class="token keyword">INPLACE</span><span class="token punctuation">,</span> <span class="token keyword">COMMENT</span><span class="token operator">=</span><span class="token string">"NDB_TABLE=READ_BACKUP=1"</span><span class="token punctuation">;</span>

<span class="token keyword">ALTER</span> <span class="token keyword">TABLE</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span> <span class="token keyword">ALGORITHM</span><span class="token operator">=</span><span class="token keyword">INPLACE</span><span class="token punctuation">,</span> <span class="token keyword">COMMENT</span><span class="token operator">=</span><span class="token string">"NDB_TABLE=READ_BACKUP=0"</span><span class="token punctuation">;</span></code></pre>
  </div>
  <p>
   For more information about the
   <code class="literal">
    ALGORITHM
   </code>
   option for
   <code class="literal">
    ALTER TABLE
   </code>
   , see
   <a class="xref" href="mysql-cluster-online-operations.html" title="25.6.12 Online Operations with ALTER TABLE in NDB Cluster">
    Section 25.6.12, “Online Operations with ALTER TABLE in NDB Cluster”
   </a>
   .
  </p>
  <p>
   <a class="indexterm" name="idm46045184200304">
   </a>
   <a class="indexterm" name="idm46045184198848">
   </a>
   <a class="indexterm" name="idm46045184197344">
   </a>
   <code class="literal">
    PARTITION_BALANCE
   </code>
   : Provides additional
        control over assignment and placement of partitions. The
        following four schemes are supported:
  </p>
  <div class="orderedlist">
   <ol class="orderedlist" type="1">
    <li class="listitem">
     <p>
      <code class="literal">
       FOR_RP_BY_NODE
      </code>
      : One partition per node.
     </p>
     <p>
      Only one LDM on each node stores a primary partition. Each
            partition is stored in the same LDM (same ID) on all nodes.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       FOR_RA_BY_NODE
      </code>
      : One partition per node
            group.
     </p>
     <p>
      Each node stores a single partition, which can be either a
            primary replica or a backup replica. Each partition is
            stored in the same LDM on all nodes.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       FOR_RP_BY_LDM
      </code>
      : One partition for each LDM
            on each node; the default.
     </p>
     <p>
      This is the setting used if
      <code class="literal">
       READ_BACKUP
      </code>
      is set to 1.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       FOR_RA_BY_LDM
      </code>
      : One partition per LDM in
            each node group.
     </p>
     <p>
      These partitions can be primary or backup partitions.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       FOR_RA_BY_LDM_X_2
      </code>
      : Two partitions per LDM
            in each node group.
     </p>
     <p>
      These partitions can be primary or backup partitions.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       FOR_RA_BY_LDM_X_3
      </code>
      : Three partitions per
            LDM in each node group.
     </p>
     <p>
      These partitions can be primary or backup partitions.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       FOR_RA_BY_LDM_X_4
      </code>
      : Four partitions per
            LDM in each node group.
     </p>
     <p>
      These partitions can be primary or backup partitions.
     </p>
    </li>
   </ol>
  </div>
  <p>
   <code class="literal">
    PARTITION_BALANCE
   </code>
   is the preferred interface
        for setting the number of partitions per table. Using
   <code class="literal">
    MAX_ROWS
   </code>
   to force the number of partitions is
        deprecated but continues to be supported for backward
        compatibility; it is subject to removal in a future release of
        MySQL NDB Cluster. (Bug #81759, Bug #23544301)
  </p>
  <p>
   <a class="indexterm" name="idm46045184176560">
   </a>
   <a class="indexterm" name="idm46045184175056">
   </a>
   <code class="literal">
    FULLY_REPLICATED
   </code>
   controls whether the table
        is fully replicated, that is, whether each data node has a
        complete copy of the table. To enable full replication of the
        table, use
   <code class="literal">
    FULLY_REPLICATED=1
   </code>
   .
  </p>
  <p>
   This setting can also be controlled using the
   <code class="literal">
    ndb_fully_replicated
   </code>
   system variable. Setting
        it to
   <code class="literal">
    ON
   </code>
   enables the option by default for
        all new
   <code class="literal">
    NDB
   </code>
   tables; the default is
   <code class="literal">
    OFF
   </code>
   . The
   <a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_data_node_neighbour">
    <code class="literal">
     ndb_data_node_neighbour
    </code>
   </a>
   system
        variable is also used for fully replicated tables, to ensure
        that when a fully replicated table is accessed, we access the
        data node which is local to this MySQL Server.
  </p>
  <p>
   An example of a
   <code class="literal">
    CREATE TABLE
   </code>
   statement using
        such a comment when creating an
   <code class="literal">
    NDB
   </code>
   table is
        shown here:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa4452154"><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 prompt">mysql&gt;</span> <span class="token keyword">CREATE</span> <span class="token keyword">TABLE</span> t1 <span class="token punctuation">(</span>
     <span class="token operator">&gt;</span>     c1 <span class="token datatype">INT</span> <span class="token operator">NOT</span> <span class="token boolean">NULL</span> <span class="token keyword">AUTO_INCREMENT</span> <span class="token keyword">PRIMARY</span> <span class="token keyword">KEY</span><span class="token punctuation">,</span>
     <span class="token operator">&gt;</span>     c2 <span class="token datatype">VARCHAR</span><span class="token punctuation">(</span><span class="token number">100</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
     <span class="token operator">&gt;</span>     c3 <span class="token datatype">VARCHAR</span><span class="token punctuation">(</span><span class="token number">100</span><span class="token punctuation">)</span> <span class="token punctuation">)</span>
     <span class="token operator">&gt;</span> <span class="token keyword">ENGINE</span><span class="token operator">=</span><span class="token keyword">NDB</span>
     <span class="token operator">&gt;</span>
<span class="token keyword">COMMENT</span><span class="token operator">=</span><span class="token string">"NDB_TABLE=READ_BACKUP=0,PARTITION_BALANCE=FOR_RP_BY_NODE"</span><span class="token punctuation">;</span></code></pre>
  </div>
  <p>
   The comment is displayed as part of the output of
   <a class="link" href="show-create-table.html" title="15.7.7.11 SHOW CREATE TABLE Statement">
    <code class="literal">
     SHOW CREATE TABLE
    </code>
   </a>
   . The text of
        the comment is also available from querying the MySQL
        Information Schema
   <a class="link" href="information-schema-tables-table.html" title="28.3.38 The INFORMATION_SCHEMA TABLES Table">
    <code class="literal">
     TABLES
    </code>
   </a>
   table, as
        in this example:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa70016070"><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 prompt">mysql&gt;</span> <span class="token keyword">SELECT</span> <span class="token keyword">TABLE_NAME</span><span class="token punctuation">,</span> TABLE_SCHEMA<span class="token punctuation">,</span> TABLE_COMMENT
     <span class="token operator">&gt;</span> <span class="token keyword">FROM</span> INFORMATION_SCHEMA<span class="token punctuation">.</span><span class="token keyword">TABLES</span> <span class="token keyword">WHERE</span> <span class="token keyword">TABLE_NAME</span><span class="token operator">=</span><span class="token string">"t1"</span>\G
<span class="token output"><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 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 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 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 class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 1. row <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 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 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 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 class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
   TABLE_NAME<span class="token punctuation">:</span> t1
 TABLE_SCHEMA<span class="token punctuation">:</span> test
TABLE_COMMENT<span class="token punctuation">:</span> NDB_TABLE=READ_BACKUP=0,PARTITION_BALANCE=FOR_RP_BY_NODE
</span><span class="token output">1 row in set (0.01 sec)</span></code></pre>
  </div>
  <p>
   This comment syntax is also supported with
   <a class="link" href="alter-table.html" title="15.1.9 ALTER TABLE Statement">
    <code class="literal">
     ALTER TABLE
    </code>
   </a>
   statements for
   <code class="literal">
    NDB
   </code>
   tables, as shown here:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa6391331"><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 prompt">mysql&gt;</span> <span class="token keyword">ALTER</span> <span class="token keyword">TABLE</span> t1 <span class="token keyword">COMMENT</span><span class="token operator">=</span><span class="token string">"NDB_TABLE=PARTITION_BALANCE=FOR_RA_BY_NODE"</span><span class="token punctuation">;</span>
<span class="token output">Query OK, 0 rows affected (0.40 sec)</span>
<span class="token output">Records: 0  Duplicates: 0  Warnings: 0</span></code></pre>
  </div>
  <p>
   The
   <code class="literal">
    TABLE_COMMENT
   </code>
   column displays the comment
        that is required to re-create the table as it is following the
   <code class="literal">
    ALTER TABLE
   </code>
   statement, like this:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa16868038"><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 prompt">mysql&gt;</span> <span class="token keyword">SELECT</span> <span class="token keyword">TABLE_NAME</span><span class="token punctuation">,</span> TABLE_SCHEMA<span class="token punctuation">,</span> TABLE_COMMENT
<span class="token prompt">    -&gt;</span>     <span class="token keyword">FROM</span> INFORMATION_SCHEMA<span class="token punctuation">.</span><span class="token keyword">TABLES</span> <span class="token keyword">WHERE</span> <span class="token keyword">TABLE_NAME</span><span class="token operator">=</span><span class="token string">"t1"</span>\G
<span class="token output"><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 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 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 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 class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 1. row <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 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 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 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 class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
   TABLE_NAME<span class="token punctuation">:</span> t1
 TABLE_SCHEMA<span class="token punctuation">:</span> test
TABLE_COMMENT<span class="token punctuation">:</span> NDB_TABLE=READ_BACKUP=0,PARTITION_BALANCE=FOR_RP_BY_NODE
</span><span class="token output">1 row in set (0.01 sec)</span></code></pre>
  </div>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa38318090"><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 prompt">mysql&gt;</span> <span class="token keyword">SELECT</span> <span class="token keyword">TABLE_NAME</span><span class="token punctuation">,</span> TABLE_SCHEMA<span class="token punctuation">,</span> TABLE_COMMENT
     <span class="token operator">&gt;</span> <span class="token keyword">FROM</span> INFORMATION_SCHEMA<span class="token punctuation">.</span><span class="token keyword">TABLES</span> <span class="token keyword">WHERE</span> <span class="token keyword">TABLE_NAME</span><span class="token operator">=</span><span class="token string">"t1"</span><span class="token punctuation">;</span>
<span class="token output"><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 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 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 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 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 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 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 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 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 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 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 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 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 class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> TABLE_NAME <span class="token punctuation">|</span> TABLE_SCHEMA <span class="token punctuation">|</span> TABLE_COMMENT                                    <span class="token punctuation">|</span></span>
<span class="token output"><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 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 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 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 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 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 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 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 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 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 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 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 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 class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> t1         <span class="token punctuation">|</span> c            <span class="token punctuation">|</span> NDB_TABLE=PARTITION_BALANCE=FOR_RA_BY_NODE       <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> t1         <span class="token punctuation">|</span> d            <span class="token punctuation">|</span>                                                  <span class="token punctuation">|</span></span>
<span class="token output"><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 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 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 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 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 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 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 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 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 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 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 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 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 class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output">2 rows in set (0.01 sec)</span></code></pre>
  </div>
  <p>
   Keep in mind that a table comment used with
   <code class="literal">
    ALTER
        TABLE
   </code>
   replaces any existing comment which the table
        might have.
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa40273645"><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 prompt">mysql&gt;</span> <span class="token keyword">ALTER</span> <span class="token keyword">TABLE</span> t1 <span class="token keyword">COMMENT</span><span class="token operator">=</span><span class="token string">"NDB_TABLE=PARTITION_BALANCE=FOR_RA_BY_NODE"</span><span class="token punctuation">;</span>
<span class="token output">Query OK, 0 rows affected (0.40 sec)</span>
<span class="token output">Records: 0  Duplicates: 0  Warnings: 0</span>

<span class="token prompt">mysql&gt;</span> <span class="token keyword">SELECT</span> <span class="token keyword">TABLE_NAME</span><span class="token punctuation">,</span> TABLE_SCHEMA<span class="token punctuation">,</span> TABLE_COMMENT
     <span class="token operator">&gt;</span> <span class="token keyword">FROM</span> INFORMATION_SCHEMA<span class="token punctuation">.</span><span class="token keyword">TABLES</span> <span class="token keyword">WHERE</span> <span class="token keyword">TABLE_NAME</span><span class="token operator">=</span><span class="token string">"t1"</span><span class="token punctuation">;</span>
<span class="token output"><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 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 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 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 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 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 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 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 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 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 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 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 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 class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> TABLE_NAME <span class="token punctuation">|</span> TABLE_SCHEMA <span class="token punctuation">|</span> TABLE_COMMENT                                    <span class="token punctuation">|</span></span>
<span class="token output"><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 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 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 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 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 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 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 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 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 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 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 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 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 class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> t1         <span class="token punctuation">|</span> c            <span class="token punctuation">|</span> NDB_TABLE=PARTITION_BALANCE=FOR_RA_BY_NODE       <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> t1         <span class="token punctuation">|</span> d            <span class="token punctuation">|</span>                                                  <span class="token punctuation">|</span></span>
<span class="token output"><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 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 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 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 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 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 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 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 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 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 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 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 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 class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output">2 rows in set (0.01 sec)</span></code></pre>
  </div>
  <p>
   You can also see the value of the
   <code class="literal">
    PARTITION_BALANCE
   </code>
   option in the output of
   <a class="link" href="mysql-cluster-programs-ndb-desc.html" title="25.5.9 ndb_desc — Describe NDB Tables">
    <span class="command">
     <strong>
      ndb_desc
     </strong>
    </span>
   </a>
   .
   <a class="link" href="mysql-cluster-programs-ndb-desc.html" title="25.5.9 ndb_desc — Describe NDB Tables">
    <span class="command">
     <strong>
      ndb_desc
     </strong>
    </span>
   </a>
   also
        shows whether the
   <code class="literal">
    READ_BACKUP
   </code>
   and
   <code class="literal">
    FULLY_REPLICATED
   </code>
   options are set for the
        table. See the description of this program for more information.
  </p>
 </div>
 <br/>
</div>
