Row size too large error handling measures when updating the text field _mysql

Source: Internet
Author: User
Tags compact error code error handling
causes
Group purchase Development Report said that an error occurred during the update.

update SQL as follows
Copy Code code as follows:

UPDATE table_name D SET d.column_name= ' Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa '
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 are have to change some columns to TEXT or BLOBs
doubt
The update field involves only the column_name field, and the field is the text type.

personally understood before is
The contents of text are in Off-page under the dynamic table format and do not occupy the calculation of row size.
Barracuda corresponds to Row_format (dynamic, compress), where all the contents of the dynamic under text are off-page stored (click to view)
Antelope corresponds to Row_format (compact, redundant), where the text under the compact is stored 786B in row, more than part of existence Off-page
And the server configuration is Innodb_file_format = Barracuda
Logically, all the table uses a dynamic structure.
But! For the following reasons, excerpted from the document:
To preserve compatibility with those prior versions, tables created with the InnoDB Plugin format, prefix o NE of row_format=dynamic or row_format=compressed is specified (or implied) on the CREATE TABLE command.
In other words, the table does not display the specified Row_format = dynamic, even if the Innodb_file_format = Barracuda Table Row-format or compact

so to sum it up as a word is: If a table has a number of text fields that are proposed to be added Row_format = dynamic
Of course, back to the MySQL error is misleading, the bug library also confirm the bug (click to view), and in the 5.1.61 to optimize the error prompts.

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.