The Row size too large error occurs when the text field is updated.

Source: Internet
Author: User

Cause:
Group Buying development report indicates an error occurred during the update.

Update the SQL statement as follows::
Copy codeThe Code is as follows:
UPDATE table_name d SET d. column_name = 'hangzhou'
WHERE d. ID = 100976;

The error message is as follows::
Error Code: 1118
Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. You have to change some columns to TEXT or BLOBs
Doubt:
The update field only applies to the column_name field and is of the TEXT type.

My personal understanding is::
The TEXT content exists in off-page in the Dynamic table format and does not occupy the row size calculation.
Barracuda corresponds to row_format (dynamic, compress). All text content in dynamic is stored in off-page (click to view details)
Antelope corresponds to row_format (compact, redundant). The text in compact is stored in 786B in row, and the excess part has off-page.
The server configuration is innodb_file_format = Barracuda
All Tables use a dynamic structure.
But! The reason is as follows:
To preserve compatibility with those prior versions, tables created with the InnoDB Plugin use the prefix format, unless one of ROW_FORMAT = DYNAMIC or ROW_FORMAT = COMPRESSED is specified (or implied) on the create table command.
That is to say, when creating a table, the specified row_format = dynamic is not displayed, even if innodb_file_format = Barracuda table row-format or compact

So in a word: If there are many text fields in a table, we recommend that you add row_format = dynamic when creating the table.
Of course, it is misleading to look back at the MySQL error. The bug Library also gave confirm the bug (click to view it) and optimized the error prompt in 5.1.61.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.