I cannot insert plain text in mysql with text column

Asked

Viewed 411 times

0

I’m not getting a simple update on a table that contains a column TEXT. I put a simple Spanish text but sql returns me error saying that line is too big. However it is a very small sentence. Follow the error code:

Error SQL query: Edit

UPDATE ppplaw.sobre SET pol_gestao_esp = 'Para la continuidad de
la excelencia en la prestación de servicios jurídicos y de la
satisfacción de nuestros clientes, colocamos todos los esfuerzos'
WHERE sobre.id = 1 

Messages from Mysql:

 #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
  • 1

    About actually is the table, the field is pol_gestao_esp that I did not set size, is picking the default size for type TEXT.

  • Also try to see how many characters you have configured, it may be that the configured size is being exceeded.

  • Reading the error message, the problem is not the size of the field, but the total size of the record(Row), exceeding the maximum size for the table type(table) used.

1 answer

0

By showing the error, your column is typed as "table", which does not allow inserting text. Gives a show columns from _nomeTabela_ to see if the guy got it right.

Another alternative would be the collation of your table. If the text is in UTF-8, it is in practice 8 bytes in size, which is 4x more than the text encoded in ANSI or Latin-1, Mysql defaults.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.