Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8831197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T08:15:26+00:00 2026-06-14T08:15:26+00:00

Prelude My question disregards the largest value you actually can transmit between the client

  • 0

Prelude

  • My question disregards “the largest value you actually can transmit between the client and server is determined by the amount of available memory and the size of the communications buffers”.
  • I also don’t take Unicode into account here. I’m aware that if a character uses more than 1 byte of storage, the actual maximum length (number of characters) of TEXT columns will decrease.

When consulting the MySql docs here: http://dev.mysql.com/doc/refman/5.5/en/storage-requirements.html, I can derive 2 answers for my question…

1) The more obvious answer:

TINYBLOB   : 2 ^  8 - 1 = 255
BLOB       : 2 ^ 16 - 1 = 65535
MEDIUMBLOB : 2 ^ 24 - 1 = 16777215
LONGBLOB   : 2 ^ 32 - 1 = 4294967295

2) The bit more complicated answer:

TINYBLOB   : 2 ^  8 - 1 = 255
BLOB       : 2 ^ 16 - 2 = 65534
MEDIUMBLOB : 2 ^ 24 - 3 = 16777213
LONGBLOB   : 2 ^ 32 - 4 = 4294967292

MySql stores the size of the actual data along with that data. And in order to store that size it will need:

  • 1 byte when data < 256 B
  • 2 bytes when data < 64 KB
  • 3 bytes when data < 16 MB
  • 4 bytes when data < 4 GB

So to store the data plus the size of the data, and prevent it from exceeding 256 / 64K / 16M / 4G bytes of needed storage, you will need the -1 / -2 / -3 / -4 factor when determining the maximum declared column length (not -1 / -1 / -1 / -1). I hope this makes sense 🙂

The question

Which of these 2 answers is correct?
(Assuming one of them is.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T08:15:28+00:00Added an answer on June 14, 2026 at 8:15 am

    It’s answer 1.

    From the doc you link to:

    These correspond to the four BLOB types and have the same maximum lengths and storage requirements. See Section 11.6, “Data Type Storage Requirements”.

    That other page has a table with those constraints. For LONGBLOB, the storage required is:

    L + 4 bytes, where L < 232

    L represents the actual length in bytes of a given string value.

    As for the maximum declared column length, just try it out yourself:

    mysql> create table foo(a blob(4294967295));
    Query OK, 0 rows affected (0.08 sec)
    
    mysql> create table bar(a blob(4294967296));
    ERROR 1439 (42000): Display width out of range for column 'a' (max = 4294967295)
    

    (You can’t declare a size for the other three blob types.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This question has a longish prelude before I can actually ask it :) Let's
In Haskell I can easily define a recursive function which takes a value and
I can do the following: Prelude> reads 1 2 3 :: [(Int, String)] [(1,
TL;DR: The question is: Do you know of a cross-platform library that I can
My question is about the sequence function in Prelude , the signature of which
In haskell, the initial value for the foldl operator is clearly mandatory Prelude> foldl
In Prelude, > :load foo.hs > -- before edit > :edit foo.hs ... Edit
In GHCi: Prelude> error (error ) *** Exception: Prelude> (error . error) *** Exception:
I have such code: Prelude> let n = [1,2,3,4] Prelude> n [1,2,3,4] Prelude> 0:n
When I start emacs now, prelude is no longer activated. This is my personal.el

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.