[MDEV-10187] Storage Requirements for varchar Created: 2016-06-07  Updated: 2016-06-08  Resolved: 2016-06-08

Status: Closed
Project: MariaDB Server
Component/s: Documentation
Affects Version/s: None
Fix Version/s: N/A

Type: Bug Priority: Minor
Reporter: Nicolas Payart Assignee: Ian Gilfillan
Resolution: Fixed Votes: 0
Labels: None


 Description   

I think that there is a wrong assertion in documentation about Storage Requirements for varchar datatypes.

https://mariadb.com/kb/en/mariadb/data-type-storage-requirements/

Documentation says (in "String data types" section):

Data Type: VARCHAR(M), VARBINARY(M)
Storage Requirement: M + 1 bytes if column is 0 – 255 bytes, M + 2 bytes if column may require more than 255 bytes

As I am concern, this should be:

Data Type: VARCHAR(M), VARBINARY(M)
Storage Requirement: len + 1 bytes if column is 0 – 255 bytes, len + 2 bytes if column may require more than 255 bytes

So space depends on actual value length (len) and not actual definition (M)...



 Comments   
Comment by Ian Gilfillan [ 2016-06-08 ]

Thanks, you are correct. The documentation has been updated.

Generated at Thu Feb 08 07:40:19 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.