Jump to content

Recommended Posts

Posted

Hey,

is there a maximum of how many characters are allowed in a textarea field? Because it looks like I only can include a specific amount of characters in my body-field....

-- Nico

Posted

The body field is saved to field_body.data which is a mediumtext field in mysql. I don't know how much characters are allowed in these, but these fieldtypes all got their limits.

Posted

If you need more space, yes. Shouldn't matter, as long as you don't change the database schema of the field afterwards.

Look here for the different sizes: http://stackoverflow.com/questions/6766781/maximum-length-for-mysql-type-text

Edit: The other way around would be a second fieldtype_textarea, where you could change the database schema in the module itself. I thinks that's the better way of solving this.

Posted

Would be nice to have a "maxlength" option for textareas which would change the database field type automatically to medium text or longtext.

Posted

I think the sanitizer is the bigger bottleneck as the mysql fieldsize, as mediumtexts can already hold ~16.000.000 bytes of data, while the sanitizer limits to 16.000 chars by default. Could be that this was a consideration of performance to not allow more by default.

Posted

I don't think I have ever needed more than a standard mysql text field. 65,000 bytes is a lot already. Jeez, that's the same as the total RAM of my first computer :)

Type | Maximum length
-----------+-------------------------------------
TINYTEXT | 255 (2 8−1) bytes
TEXT | 65,535 (216−1) bytes = 64 KiB
MEDIUMTEXT | 16,777,215 (224−1) bytes = 16 MiB
LONGTEXT | 4,294,967,295 (232−1) bytes = 4 GiB
  • Like 4

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...