This topic describes the feature for extending varchar field lengths online in RDS for MySQL.
- MySQL 5.7 version, and the kernel minor version is MySQL 5.7.44_20250815 and above.
- MySQL 8.0 version, and the kernel minor version is MySQL 8.0.32_20250815 and above.
- MySQL 8.4 version, and the kernel minor version is MySQL 8.4.7_20260415 and above.
Native MySQL does not allow using the inplace algorithm when extending a varchar field's length beyond 256 bytes. Only the copy algorithm is permitted. During this copy phase, users cannot modify the old table. All write requests are blocked, and only read requests are allowed.
RDS for MySQL supports extending varchar fields online across the 256-byte boundary without blocking write operations during DDL execution. Additionally, when extending a field's length from 127 bytes or less to 256 bytes or more, the extension can be completed in seconds by modifying only the metadata, not the data.
This feature implements Online DDL by changing the algorithm for extending varchar fields from copy to inplace. During a DDL process, you can continue writing to the old table. Subsequent write operations are replayed to the new table through the row log.
By using the properties of varchar fields, it can extend a field from 127 bytes or less to 256 bytes or more in seconds, without modifying the data.
A new parameter is added to manage the online extension of varchar fields.
When the parameter is enabled, the extensions are classified as follows:
After you set the loose_extend_varchar_enhance parameter to ON, the online varchar field extension feature is enabled. For detailed information on modifying parameters, please refer to Modifying parameters. - Extensions within 256 bytes
- Expansion from 0–127 bytes to 256 bytes or more
- Expansion from 128–255 bytes to 256 bytes or more
- Expansion for lengths of more than 256 bytes