content_image/819129.jpg content_image/819130.jpg
COMMENT="NDB_TABLE=READ_BACKUP=0,PARTITION_BALANCE=FOR_RP_BY_NODE" ; 

Spaces are not permitted within the quoted string. The string is case-insensitive. 

The comment is displayed as part of the ouput of SHOW CREATE TABLE . The text of the comment is also available as the TABLE_COMMENT column of the MySQL Information Schema TABLES  table. 

This comment syntax is also supported with ALTER TABLE  statements for NDB  tables. Keep in mind that a table comment used with ALTER TABLE  replaces any existing comment which the table might have had perviously. 

Setting the MERGE_THRESHOLD  option in table comments is not supported for NDB  tables (it is ignored). 

For complete syntax information and examples, see Section 13.1.20.11, “Setting NDB_TABLE Options” . 

• COMPRESSION 

The compression algorithm used for page level compression for InnoDB  tables. Supported values include Zlib , LZ4 , and None . The COMPRESSION  attribute was introduced with the transparent page compression feature. Page compression is only supported with InnoDB  tables that reside in file-per- table tablespaces, and is only available on Linux and Windows platforms that support sparse files and hole punching. For more information, see Section 15.9.2, “InnoDB Page Compression” . 

• CONNECTION 

The connection string for a FEDERATED  table. 

<img src='content_image/819129.jpg'>

• DATA DIRECTORY , INDEX DIRECTORY 

## Note 

Older versions of MySQL used a COMMENT  option for the connection string. 

For InnoDB , the DATA DIRECTORY=’ directory ’  clause permits creating tables outside of the data directory. The innodb_file_per_table  variable must be enabled to use the DATA DIRECTORY clause. The full directory path must be specified. As of MySQL 8.0.21, the directory specified must be known to InnoDB . For more information, see Section 15.6.1.2, “Creating Tables Externally” . 

When creating MyISAM  tables, you can use the DATA DIRECTORY=’ directory ’  clause, the INDEX DIRECTORY=’ directory ’  clause, or both. They specify where to put a MyISAM  table’s data file and index file, respectively. Unlike InnoDB  tables, MySQL does not create subdirectories that correspond to the database name when creating a MyISAM  table with a DATA DIRECTORY  or INDEX DIRECTORY option. Files are created in the directory that is specified. 

You must have the FILE  privilege to use the DATA DIRECTORY  or INDEX DIRECTORY  table option. 

<img src='content_image/819130.jpg'>

## Important 

Table-level DATA DIRECTORY  and INDEX DIRECTORY  options are ignored for partitioned tables. (Bug #32091) 

These options work only when you are not using the --skip-symbolic-links  option. Your operating system must also have a working, thread-safe realpath()  call. See Section 8.12.2.2, “Using Symbolic Links for MyISAM Tables on Unix” , for more complete information. 

If a MyISAM  table is created with no DATA DIRECTORY  option, the .MYD  file is created in the database directory. By default, if MyISAM  finds an existing .MYD  file in this case, it overwrites it. The same applies 

