Inserting data into MySQL

5 次查看(过去 30 天)
Gurvinder
Gurvinder 2013-8-16
回答: Piyush Kumar 2024-11-20,7:48
Hello, i am currently getting the following error:
??? Error using ==> database.insert at 178 Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
i currently am using this bit of code to insert the data:
insert(conn, 'Sample', colnames, sample2);
Sample 2 contains 150 columns of data with each column data being a string of information of ~ 190-200 characters long.
initally my MySQL table datatype was varchar(250), i have changed this to text, longtext, blob, longblob....i have changed the row_format to dynamic or compressed for each datatype i have tried but still no luck.
can someone help, and know away around it please.
Thank you in advance

回答(1 个)

Piyush Kumar
Piyush Kumar 2024-11-20,7:48
Hi,
The error message "Row size too large" is a known issue with MySQL and MariaDB when dealing with large rows, especially when using the InnoDB storage engine. Please check these links to read about the reported error and suggested troubleshooting steps -

类别

Help CenterFile Exchange 中查找有关 Database Toolbox 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by