| Bug #110928 | Documentation about NULL saving storage looks false | ||
|---|---|---|---|
| Submitted: | 5 May 2023 10:59 | Modified: | 16 May 2023 8:58 |
| Reporter: | Nikita Arykov | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: Documentation | Severity: | S3 (Non-critical) |
| Version: | OS: | Any | |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | innodb, NULL rows | ||
[5 May 2023 10:59]
Nikita Arykov
[5 May 2023 12:40]
MySQL Verification Team
Hi Mr. Arykov, Thank you for your bug report. Verified as reported.
[11 May 2023 20:35]
Ilya Kantor
InnoDB compact/dynamic: NULLable columns each take 1 bit always. So total N/8 bytes for N NULLable columns.
[11 May 2023 20:35]
Ilya Kantor
(rounded up)
[16 May 2023 8:58]
Nikita Arykov
Hello Mr. Ilya, Yes, you're correct. total N/8 bytes for N NULLable columns (rounded up). Documentation say "You also save some storage space, one bit per column" (for NOT NULL columns) However I cannot understand how it's possible to save storage. E.g. * every NOT NULL column have some NOT NULL value and take 1 byte or more (we have no less than 1 byte data-type) * every NULLulable column if have some NULL value take 1 byte or less Looks like that NULL value take less space than NOT NULL
[16 May 2023 12:26]
MySQL Verification Team
These are two distinct issues. One is about saving space in the attributes and the other in table and tuples metadata.
